diff --git a/.github/workflows/version-impact.yml b/.github/workflows/version-impact.yml index e4403f006..236dcd677 100644 --- a/.github/workflows/version-impact.yml +++ b/.github/workflows/version-impact.yml @@ -40,6 +40,8 @@ jobs: SDL_VIDEO_DRIVER: offscreen SDL_AUDIO_DRIVER: dummy SDL_GPU_DRIVER: vulkan + # CI gates cost per iteration; local comparisons retain the wall default. + DEMO_COST_BASIS: iteration steps: - uses: actions/checkout@v4 with: diff --git a/.gitmodules b/.gitmodules index 3f0e7cfa6..e09a887d3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -300,3 +300,9 @@ [submodule "mono.vendor/accesskit-c"] path = mono.vendor/accesskit-c url = https://github.com/AccessKit/accesskit-c +; Pinned at v3.1.0 for future 2D physics; it is not configured or linked today. +[submodule "mono.vendor/box2d"] + path = mono.vendor/box2d + url = https://github.com/erincatto/box2d.git + branch = main + shallow = true diff --git a/CMakeLists.txt b/CMakeLists.txt index f78903119..f318e9536 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ set_property(DIRECTORY APPEND # MONO_FUZZ_* option set on the command line. if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT (MONO_FUZZ_GUI OR MONO_FUZZ_BAKE OR MONO_FUZZ_SHADER OR MONO_FUZZ_PRESENTATION OR - MONO_FUZZ_PORTAL_EXCHANGE)) + MONO_FUZZ_PORTAL_EXCHANGE OR MONO_FUZZ_WEATHER)) message(FATAL_ERROR "Linux builds use GCC; this configure picked ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}).\n" " Reconfigure without a compiler override: `cmake --preset --fresh`.") @@ -412,11 +412,13 @@ endif() # requests dependency files with `-MD`, which is what depend mode hashes. # Direct hits still work; a miss compiles once instead of expanding the PCH. # -# Two calls per build still report as errors, and they are the two PCH -# *generation* steps - ccache cannot parse a header as a source, so it passes -# them to the compiler untouched. Correct, and 0.11% of the build. +# PCH regeneration must remove its old output before calling ccache. GCC's +# -include otherwise finds that same .gch as an input, which changes during +# compilation and prevents caching both the PCH and its unchanged consumers. +# CompilerCache.cmake handles only that generation step; ordinary compiles +# retain their PCH. A cached regeneration restores identical PCH bytes. # -# Passed through `cmake -E env` rather than left to each developer's +# Passed through the compiler launcher rather than left to each developer's # `ccache.conf`, so the setting travels with the build. A machine-local config # would make the cache behave differently depending on who ran it, which is the # third category of rule `AGENTS.md` rule 6 refuses to allow. `sccache` reads no @@ -454,14 +456,11 @@ if(MONO_CCACHE) # could diagnose. find_program(MONO_COMPILER_CACHE NAMES ccache sccache NO_CACHE) if(MONO_COMPILER_CACHE) - if(MONO_COMPILER_CACHE MATCHES "ccache") - set(MONO_CACHE_LAUNCHER - "${CMAKE_COMMAND}" -E env - "CCACHE_SLOPPINESS=pch_defines,time_macros" - "CCACHE_BASEDIR=${CMAKE_SOURCE_DIR}" - "CCACHE_NOHASHDIR=true" - "CCACHE_DEPEND=true" - "${MONO_COMPILER_CACHE}") + get_filename_component(MONO_COMPILER_CACHE_NAME "${MONO_COMPILER_CACHE}" NAME_WE) + if(MONO_COMPILER_CACHE_NAME STREQUAL "ccache") + set(MONO_CACHE_LAUNCHER + "${CMAKE_COMMAND}" -P "${CMAKE_SOURCE_DIR}/mono.build/CompilerCache.cmake" + "${MONO_COMPILER_CACHE}" "${CMAKE_SOURCE_DIR}" --) else() set(MONO_CACHE_LAUNCHER "${MONO_COMPILER_CACHE}") endif() @@ -483,6 +482,9 @@ endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/mono.build") include(MonoVendor) +# Apply link choices after vendor targets exist, before first-party targets do. +include(MonoLinker) + # After MonoVendor, so that glslc_exe exists to be named. Only the presentation # modules own GLSL, so a server-only configure needs no shader compiler at all. # diff --git a/HANDOFF.md b/HANDOFF.md deleted file mode 100644 index f650d14bd..000000000 --- a/HANDOFF.md +++ /dev/null @@ -1,219 +0,0 @@ -# Work handoff - -Updated 2026-09-24. This records the unfinished work in the main `v0.25` -checkout and the linked worktrees. It is a working note, not a completion claim. - -## Current direction - -- Finish the smaller worktrees first, one at a time. Keep Pixel Composer moving - where it has an independent path. Handle larger remaining items afterward. -- Merge a completed branch into `v0.25` when safe, as the user requested. - Patch equivalent branches need no merge. The main checkout has extensive - uncommitted changes, so inspect overlap before any merge. -- Preserve every dirty worktree until its changes are understood. Do not use - `git worktree remove --force`, `git clean`, or `git reset --hard` to make a - worktree look finished. -- The main checkout contains concurrent uncommitted work from several tasks. - Review ownership before editing shared files or committing. In particular, - do not commit changes made by another agent or the user. -- Follow the repository `AGENTS.md` and each touched module's `AGENTS.md`. - Use CodeGraph first when `.codegraph/` exists. Read `RUNNING.md` before - choosing commands. Never edit the protected instruction documents. - -## Main checkout - -Path: `/home/declan/Documents/GitHub/atomic-game-engine`, branch `v0.25`, -The priority phase benchmark was integrated as `5e30f523`. This handoff and -the portal test fixture fix were committed afterward. The active goal is the -six items in `/home/declan/.codex/attachments/ccb8ba64-ca25-4eaf-a502-18231242fbeb/pasted-text-1.txt`: -virtual camera lock, v0.25 render cleanup, v0.25 MCP cleanup, engine stress -and optimization audit, seamless portals, and Pixel Composer. All remain open. - -### Verified work and next steps - -1. **Virtual camera lock.** A free inspection viewport uses the live camera; - culling, LOD, lighting, particles, and portal demand use the frozen behavior - position with live orientation. This matches the user's choice. Focused - checks passed earlier. Inspect any other camera behavior covered by the - original broad claim, then run the relevant combined gate. -2. **Render pipeline cleanup.** Real GPU render gate previously passed - 1,678,712 assertions in 150 cases. Later history, scope, deferred host, - supersession, and cancellation gates passed. Two real host fixtures for an - incompatible binding and viewport removal passed after correcting fixture - premises. The attempted staged layer import refusal fixture failed its - pending upload premise because an invalid layer is rejected before upload. - It now checks that preflight refusal and last image retention; the focused - Vulkan case passed 20 assertions. An actual failure after staging is still - untested. Review remaining gates in - `docs/v025-RENDER-PIPELINE-CLEANUP.md` before closing this item. -3. **MCP cleanup.** Stages 0 through 5 and the M6 PNG bundle tool are present. - Focused Runner, CLI, architecture, listener, bridge, and 128 cycle soak - checks passed. Quiet paired HEAD/current release timing and broad CI are - still open. The HEAD comparison archive is - `/tmp/atomic-mcp-quiet-3c4i6u88`; current bench binaries need building. - See `docs/v025-MCP-CLEANUP.md` and `docs/v025-MCP-PERF-EVIDENCE.md`. -4. **Stress work.** `docs/ENGINE_STRESS_AUDIT_2026-09-22.md` lists at least five - optimization candidates per engine module. Exact parity checks passed for - replication fixed width deferral, physics solver topology comparison - removal, and MSL reserve adjustment. A matched 200 client Authority - `RecoverRows` rerun is still needed after quiet profiling. The prior - baseline had 200 Playing clients and 194,936 inputs, but its profiler - dropped 73,246 scopes, so its sampled 41.06% share is partial evidence. -5. **Seamless portals.** Scene pose invalidation and local rig demand fixes - passed focused tests. Strict product captures at 30 and 60 Hz still fail. - The 60 Hz resident slot request is received and the first crossing commits - at frame 75, then frame 77 lacks the predicted destination root for one - frame. A red `Replicated` adoption test was linked; implementation was - being compiled when agent capacity ended. Check `mono.client/src/Replicated.cpp` - and `mono.client/tests/Replicated.cpp`, run the focused prediction adoption - gate, then rerun the strict 30/60/144/240 matrix, network, resolution, - profiling, and GPU gates. The 60 Hz trace is under - `.cache/portal-profile/remote/runs/20260924-resident-slot1-60`. -6. **Pixel Composer.** The inventory in `docs/v026-pixel-composer.md` has 990 - documented node rows. Five PXC projects and reference GIFs are at - `/home/declan/Documents/GitHub/atomic-game-engine-hidden-docs/files/pixel-composer-com`. - There is no licensed Pixel Composer 1.21.10 beta executable; the user chose - GIF and documented behavior as references and requested all features. - Native graph, Studio, PXC interchange, selected 2D nodes, Transform Image - 3D, GIF timing, audio capture, and sequence bake work is partial. Do not - claim full product parity. - -### Pixel Composer details that need ownership - -- Five spatial warp nodes passed `test_imagegraph '[imagegraph]'`: 1,966 - assertions in 221 cases. Mirror, Barrel Distort, and Chromatic Aberration - supplied PXC records still need guarded authored control import projection. -- Bounded audio capture parser passed 56 assertions in 6 cases, including - aggregate sample cap refusal before allocation. Audio Window, WAV import, - live device input, audio keyframes, and feedback history remain open. -- `.aseq` 257 to 4096 frame bake and exact variable GIF delays passed asset, - bake, and assetc suites. The scene/client/private playback adapter was - staged and syntax checked. The linked `test_scene`, `test_render`, and - `test_client` build passed; focused sequence checks passed 51, 34, and 11 - assertions respectively. Renderer texture publication remains open. Per - particle age playback needs separate GPU paging. -- Native Transform Image 3D records a bounded pass into the existing batch - command. The focused Vulkan recorder case passed 19 assertions. The - recorder preserves resources until the submit fence, including a failed - render pass after copy commands. A later uncommitted edit now makes - `PollSceneFrames` call `TextureTable::ReplaceAdopt` for successful completed - generations, while older, cancelled, and failed slots are released. The - focused GPU test now checks exact owner/name publication, replacement by a - newer generation, and cancellation retaining the previous output. That test - initially exposed reversed `Succeeded` assignments in the untracked live - recorder; the assignments were corrected and the Vulkan case passed 35 - assertions. Add failed pass, owner retirement, and GPU accounting checks - before calling the edit complete. `QueueTransformImage3D` still has no product - caller outside tests; `client/ImageGraphRuntime.cpp` uses the synchronous - `ExecuteTransformImage3D` adapter. Wire the resident path into graph output - publication before claiming native graph playback. These renderer source and test files remain - untracked alongside the previous agent's implementation, so they were not - included in the handoff commit. -- Source ownership from the prior parallel work is no longer active because - those agents hit a usage limit. Before resuming, inspect the live worktree - and build processes rather than assuming a gate completed. - -## Linked worktrees - -The last audit found 27 linked worktrees, all dirty. All 27 have since -been closed, leaving only the main checkout. `git worktree prune --dry-run --verbose` found no stale -records. Twenty four clean idle `/tmp` worktrees had already been safely -removed. The table gives tracked and -untracked status counts, not an assessment of the changes. Start with the -smallest effective diffs and classify build or submodule pointer noise before -changing source. - -An initial classification found 21 worktrees with no top level source changes, -only `mono.vendor/*` status. Several vendor checkouts contain staged deletions -of their own tracked files, while others only point at a different submodule -commit. Do not assume these are clean from the top level diff count. `git -cherry v0.25 HEAD` showed the authored transmission branch's five commits -were patch equivalent to the main branch. Its sole top level difference was -a clean `ngtcp2` checkout at a different commit. Its worktree was removed; -the `feature/authored-transmission` branch remains. `studio-qa`, `tornado-world`, -`material-capture`, and `lighting-effects` were also removed after confirming -no top level source changes, clean nested vendor repositories, and no commits -unique by patch to `v0.25`. Ten further vendor-only worktrees were removed -after confirming their nested status contained only staged deletions of -missing vendor files, and their commits were patch equivalent to `v0.25`. -Their branch refs remain. The other branches need individual review before -removal or integration. - -The scoring worktree's unique priority phase benchmark commit was integrated -into `v0.25` as `5e30f523`. `bench_replication` built and its priority -refinement suite ran once, printing per-phase samples and a benchmark row. -Its remaining commits were patch equivalent, so its worktree was removed. -The CDN grouper optimization's source and test were byte identical to `v0.25` -and its focused suite passed 56 assertions in 14 cases. Its attempted matched -baseline build failed at CMake regeneration because that worktree's SDL vendor -checkout was missing. Its source was restored afterward. Both CDN worktrees -were removed after confirming the optimized one contained only duplicate -source and vendor symlinks, and the baseline one contained only vendor file -deletions. A matched timing comparison remains unavailable. - -The tornado GPU particle authoring and storm structure damage branches were -reviewed against the current implementation, which contains their behavior -and tests. The rebuilt scene registration suite passed 319 assertions in 13 -cases; the rebuilt physics storm suite passed 30 assertions in 7 cases. The -tornado visual parity branch's 16 volume cap and layered stack test are also -in `v0.25`. Its older example camera and panel values were superseded by a -newer TornadoSim scene; current volume and example tests passed 33 and 143 -assertions. These three worktrees were removed, with branch refs kept. -Debug panel close controls and click routing are in `v0.25`; its panel suite -passed 122 assertions in 43 cases. The detached debug worktree was removed, -and `codex/archived-debug-panel` now preserves its unique commit. -The lighting capability branch's selection logic, shader cap, release stress -target, and tests are present in `v0.25`; its worktree was removed with the -branch ref kept. The remote local play worktree contained only formatting -changes beyond its patch equivalent commit, so it was also removed with the -branch ref kept. - -The local light branch's per-light response planes, control bridge, and tests -are present in `v0.25`, which also has shadow visibility capture. The focused -render data capture suite passed 134,223 assertions in 45 cases. Its 295 MB -untracked vendor backup was moved to `/tmp/atomic-local-light-vendor-backup`, -then the worktree was removed with its branch ref kept. The tornado cap worktree contains an -older all-parcel shader experiment, while `v0.25` now uses bounded depth-sliced -condensation. Preserve its capture script and shader diff until the current -visual parity result is assessed. The portal worktree's host-only Ready fence -change weakens the replica check and was not merged. The main checkout has a -newer source/destination fence condition and a destination prediction seed; -the focused portal adoption test passed 12 assertions in one case. -The detached portal worktree's source diff was saved at -`/tmp/atomic-head-portal-source.patch`, its base commit is preserved by -`codex/archived-head-portal`, and its worktree was removed. The older harness -may still offer useful real transfer coverage, but needs porting to the -current test and cannot justify the host-only fence change. -The tornado cap worktree's source and binary world diff is saved at -`/tmp/atomic-tornado-isolated-cap-fix.patch`, and its capture script is at -`/tmp/atomic-capture-tornado-isolated.sh`. Its branch ref remains. The current -TornadoSim example and GPU particle tests passed 143 and 126 assertions. The -worktree's all-parcel shader and 2.1 million triangle capture threshold do not -fit the newer bounded depth-sliced path, so its uncommitted experiment was not -merged. Visual parity remains open. -The broader `test_client '[client][portal]'` selector initially exited 42: -six cases passed and two GPU cases failed during client initialization because -`PortalLighting.cpp` left a process wide assets override set to -`.cache/build/dev/assets`, where shaders are not staged. The fixture now -restores its prior assets path. After rebuilding, the same selector passed -422,745 assertions in eight cases. The strict 30/60/144/240 product matrix -remains open. - -The primary checkout's unfinished product work continues below. Archived -patches are reference material, not accepted code. - -## Last verification and environment - -- `git diff --check` in the main checkout and `git diff --cached --check` for - the handoff and portal fixture fix passed at 09:23 UTC. The staged priority - benchmark passed `git diff --cached --check` before integration. -- At 09:14 UTC, the filesystem had about 114 GiB free. Avoid duplicating full - build trees without checking space first. -- Commits in this handoff session include `5e30f523`, which preserved the - original benchmark commit's author and message and contains only - `mono.engine/replication/benchmarks/PriorityRefinement.cpp`; `0598d7ce`, - which contains this handoff and the portal lighting test fixture cleanup; - and `4d2d8175`, which updates the handoff after worktree cleanup and GPU - validation. Later handoff edits may be uncommitted. -- Web reference for worktree removal semantics: - . diff --git a/Justfile b/Justfile index 249bb5b3e..2954b8dbe 100644 --- a/Justfile +++ b/Justfile @@ -106,9 +106,8 @@ build target="": export CCACHE_STATSLOG="$PWD/{{build}}/ccache-stats.log" cmake --build --preset {{preset}} {{ if target == "" { "" } else { "--target " + target } }} -# Report one selected build's Ninja edges and cumulative ccache outcomes. The -# build status remains authoritative: a partial Ninja log is still useful after -# a failed compile, but profiling must never turn that failure into success. +# Report only the Ninja edges and ccache outcomes from this build invocation. +# A partial log is still useful after a failed compile, and its exit status wins. build-profile target="": #!/usr/bin/env bash set -euo pipefail @@ -116,23 +115,22 @@ build-profile target="": cmake --preset {{preset}} > /dev/null fi export CCACHE_STATSLOG="$PWD/{{build}}/ccache-stats.log" - set +e - cmake --build --preset {{preset}} {{ if target == "" { "" } else { "--target " + target } }} - build_status=$? - python3 scripts/build-profile.py --build-dir "{{build}}" --stats-log "$CCACHE_STATSLOG" - profile_status=$? - set -e - if [ "$build_status" -ne 0 ]; then - exit "$build_status" - fi - exit "$profile_status" + python3 scripts/build-profile.py --build-dir "{{build}}" --stats-log "$CCACHE_STATSLOG" --run cmake --build --preset {{preset}} {{ if target == "" { "" } else { "--target " + target } }} # The profiler is standalone so it can inspect a build before an engine tool # exists. Its synthetic fixtures cover Ninja timing, grouping, ccache outcomes -# and unity-source attribution. +# current-run log deltas and unity-source attribution. build-profile-check: python3 scripts/tests/build_profile_test.py +# The real GCC PCH launcher, using an isolated cache under this preset's tree. +compiler-cache-check: + cmake -DMONO_TEST_ROOT="{{build}}" -P mono.build/tests/CompilerCache.cmake + +# Check real linker selection, fallback, pool limits and compile flag isolation. +linker-check: + cmake -DMONO_TEST_ROOT="{{build}}" -P mono.build/tests/Linker.cmake + # One program and only its dependencies. client: (build "client") server: (build "server") @@ -189,6 +187,12 @@ render-preparation-bench samples="5": cmake --build --preset bench --target benchrunner bench_render ./.cache/build/bench/tools/benchrunner --build .cache/build/bench --baseline .cache/build/bench/render-baseline.tsv --filter engine.render.bench.world-presentation --all --samples {{samples}} +# CPU-only filtering cost for large default-part and named-mesh draw lists. +keep-loaded-filter-bench samples="5": + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_render + ./.cache/build/bench/bench/bench_render --suite engine.render.bench.keep-loaded --samples {{samples}} + # Data-capture hook dispatch through the real renderer without opening a device. data-capture-hook-bench samples="5": cmake --preset bench > /dev/null @@ -246,8 +250,8 @@ gpu-texture-atlas-bench samples="1": fi # Release-optimised compute, draw, timestamp and logical-memory measurement -# for every supported analytical storm field preset. Allocation refusal remains -# a reported result so modest GPUs still document their supported ceiling. +# for generic GPU field presets plus CPU world collection and camera binding. +# Allocation refusal remains a reported result so modest GPUs document their ceiling. gpu-particle-field-bench samples="1": #!/usr/bin/env bash set -euo pipefail @@ -378,6 +382,59 @@ fuzz-ui runs="1000" compiler="clang++-21": "$fuzz_build/fuzz/$target" "$corpus" -runs={{runs}} -max_len=65536 -timeout=10 -rss_limit_mb=1024 -artifact_prefix="$artifacts/" done +# Seeded samples, packing, clocks, assemblies, residency, events and solver costs. +weather-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_weather + ./.cache/build/{{build_preset}}/bench/bench_weather --samples {{samples}} + +# Device-free descriptor preparation for the weather GPU adapter. +weather-descriptor-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.weather-gpu --samples {{samples}} + +# Actual sparse page selection for cold, retained and teleported camera demands. +weather-residency-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.weatherresidency --samples {{samples}} + +# Device-free temporal invalidation, periodic displacement and cloud composition. +weather-temporal-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.weather-temporal --samples {{samples}} + +# Device-free shadow caster bounds, cascades, low-sun fades and retained revisions. +weather-shadow-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.weather-shadows --samples {{samples}} + +# Weather emission and roof/ground visibility against actual published geometry. +weather-effects-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.weather-effects --samples {{samples}} + +# Real sparse generation and integration at a configurable image size; opens a GPU device explicitly. +weather-gpu-bench samples="3" build_preset="bench" width="1920" height="1080" shadow_resolution="256": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + MONO_WEATHER_GPU_BENCH=1 MONO_WEATHER_GPU_BENCH_WIDTH={{width}} MONO_WEATHER_GPU_BENCH_HEIGHT={{height}} MONO_WEATHER_GPU_BENCH_SHADOW_RESOLUTION={{shadow_resolution}} ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.weather-gpu --samples {{samples}} + +# Coverage-guided hostile weather checkpoint decoding, without graphics. +weather-fuzz runs="10000" compiler="clang++-21": + #!/usr/bin/env bash + set -euo pipefail + fuzz_build=".cache/build/weather-fuzz" + cmake --preset server -B "$fuzz_build" -DCMAKE_CXX_COMPILER="{{compiler}}" -DCMAKE_C_COMPILER="${CC:-clang-21}" -DMONO_BUILD_TESTS=OFF -DMONO_TRACY=OFF -DMONO_HEAP_PROFILE=OFF -DMONO_FUZZ_WEATHER=ON + cmake --build "$fuzz_build" --target fuzz_weather_checkpoint -j 4 + mkdir -p "$fuzz_build/fuzz/corpus" "$fuzz_build/fuzz/artifacts" + "$fuzz_build/fuzz/fuzz_weather_checkpoint" --write-seeds "$fuzz_build/fuzz/corpus" + "$fuzz_build/fuzz/fuzz_weather_checkpoint" "$fuzz_build/fuzz/corpus" -runs={{runs}} -max_len=2097152 -timeout=10 -rss_limit_mb=1024 -artifact_prefix="$fuzz_build/fuzz/artifacts/" + # Measure the benchmark suites a change could have affected. # # **The same selection as `just test`, over `bench/` instead of `tests/`.** A @@ -420,6 +477,20 @@ bakegraph-pipeline-set-bench samples="5": cmake --build --preset bench --target bench_bakegraph ./.cache/build/bench/bench/bench_bakegraph --suite engine.bakegraph.bench.pipeline-set --samples {{samples}} +# Static 2D image composition with normal source copies, allocations and budget checks. +# Report complete CPU evaluation cost per call; retain output only on the terminal. +imagegraph-bench samples="5": + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_imagegraph + ./.cache/build/bench/bench/bench_imagegraph --suite engine.imagegraph.bench.evaluate --samples {{samples}} + +# grug measures cold, source-edit, control-edit and cache-hit work on real Vulkan. +# timestamp cost and fence-completed latency stay separate. output stays on stdout. +gpu-imagegraph-bench samples="1": + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_render + MONO_GPU_IMAGEGRAPH_REPORT=1 ./.cache/build/bench/bench/bench_render --suite engine.render.bench.imagegraph_gpu --samples {{samples}} + # Durable datastore cost for a complete snapshot, using a disposable SQLite file under the bench build. datastore-sqlite-bench samples="5": cmake --preset bench > /dev/null @@ -468,6 +539,48 @@ ui-headless-bench samples="5": cmake --build --preset bench --target bench_ui ./.cache/build/bench/bench/bench_ui --suite engine.ui.bench.headless-interface --samples {{samples}} +# Real Studio toolbar and Preferences widgets, without a window or GPU device. +studio-interface-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_studio + ./.cache/build/{{build_preset}}/bench/bench_studio --suite studio.bench.interface --samples {{samples}} + +# Actual idle content demand, visibility sync, and client presentation systems. +client-frame-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_client + ./.cache/build/{{build_preset}}/bench/bench_client --suite client.bench.frame --samples {{samples}} + +# Node-kind resolution for installed pipelines, preserving declaration order. +view-graph-lookup-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.pipeline-node-lookup --samples {{samples}} + +# CPU instance packing and residency, including centered and off-center meshes. +instance-packing-bench samples="5" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.instances --samples {{samples}} + +# CPU capture planning for 320 visible mirrors with one terminal bounce. +surface-capture-plan-bench samples="3" build_preset="bench": + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.surface-capture-plan --samples {{samples}} + +# CPU planning used after render views, including the installed default pipeline. +frame-plan-bench samples="5": + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_graph + ./.cache/build/bench/bench/bench_graph --suite engine.graph.bench.submission --samples {{samples}} + +# Installed-pipeline diagnostic totals, comparing cache misses with steady hits. +frame-plan-cache-bench samples="5": + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_render + ./.cache/build/bench/bench/bench_render --suite engine.render.bench.frameplan --samples {{samples}} + # Portal reply encoding and decoding, per complete batch. No GPU or process transport. # Run the binary directly so measurements stay on the terminal. portal-exchange-bench samples="5": @@ -832,12 +945,13 @@ source-check: (build "sourcecheck") ./{{build}}/tools/sourcecheck . -# The module index for the API reference, from the graph and the AGENTS.md files. +# The module index for the API reference, from the graph, AGENTS.md files and +# prose under module docs/ directories. # # `mono.tools/docgen/pages/Modules.md` was hand-maintained and listed ten of the # engine's twenty-nine modules, which is what a hand-maintained list of a # generated fact always becomes. It is now a walk of the tree ordered by the -# layers, so a module that exists is on the page. +# layers, so graph modules with invariants or prose are on the page. docs-pages: cmake -DEXPECTED=mono.tools/architecture/expected_graph.json \ -DROOT="$(pwd)" \ @@ -1072,7 +1186,7 @@ bindings-check: (build "bindings") typecheck: (build "scriptcheck") #!/usr/bin/env bash set -euo pipefail - ./{{build}}/tools/scriptcheck mono.engine/examples/assets/scripts/*.luau + ./{{build}}/tools/scriptcheck mono.engine/examples/assets/scripts/*.luau mono.engine/examples/assets/scripts/client/DemoCameras/*.luau if command -v bun > /dev/null; then bun install --silent @@ -1104,7 +1218,7 @@ typecheck: (build "scriptcheck") # 11 minutes of CPU, 39 s wall on 24 cores, once. Afterwards the dependency is a # no-op. typecheck-editor: luau-lsp - ./.cache/build/luau-lsp/luau-lsp analyze --settings=luau-lsp.json mono.engine/examples/assets/scripts/*.luau + ./.cache/build/luau-lsp/luau-lsp analyze --settings=luau-lsp.json mono.engine/examples/assets/scripts/*.luau mono.engine/examples/assets/scripts/client/DemoCameras/*.luau @echo "typecheck-editor ok - every example agrees with the language server" # The editor, with its control surface open for a Model Context Protocol client. @@ -1141,31 +1255,9 @@ mcp port="8738" +args="--width 1600": (build "studio") (build "mcpbridge") # the same `Luau.*` target names ours does. Adding it to this build fails at # configure time; `.gitmodules` carries the full argument. # -# **`-Wno-error=maybe-uninitialized`, and the narrowness is the point.** luau-lsp -# hardcodes `-Wall -Werror` with no option to disable it, and GCC 13 reports a -# false positive in `src/operations/CallHierarchy.cpp`: a `std::string` inside an -# `std::optional` inside the `FunctionName` pair, reported against -# `bits/basic_string.h` rather than against any line upstream wrote. So the build -# fails on a warning about vendored code in a vendored tree. -# `MonoVendor.cmake` turns Luau's own `LUAU_WERROR` off for exactly this reason. -# -# A blanket `-Wno-error` does not work here: `CMAKE_CXX_FLAGS` lands *before* -# their `target_compile_options`, so the later `-Werror` wins. A specific -# `-Wno-error=` takes precedence over the blanket form whatever the -# order, which is why this names the warning rather than silencing all of them - -# every other warning upstream cares about still fails the build. -# -# **`-include cstdint` was the second one and is gone.** It was here because -# luau-lsp pinned a Luau from before GCC 13 stopped including `` -# transitively, so `Ast/src/StringUtils.cpp` named `uint8_t` without including -# it. The v0.15 bump to the revision luau-lsp `d5df9af` pins carries the fix, and -# the flag was removed after building without it rather than on the assumption -# that a newer tree would be fine. `docs/DEFERRED.md` D00019 is the bump. -# -# Flags rather than patches wherever a flag will do. Where one will not, the -# patch is a file under `mono.vendor/patches/luau-lsp/` - the third shape -# `mono.vendor/AGENTS.md` argues for, taken over a fork so that nothing has to be -# pushed to a remote we do not own. +# Copied-tree patches make FunctionName construction and optional codegen logging +# explicit so GCC 13 can check them with upstream warning flags. +# Empty CMAKE_CXX_FLAGS also clears the old warning exemption in existing caches. # # **The patch is applied to a copy, never to the submodule.** Applying it in # place left `mono.vendor/luau-lsp` modified in every `git status` from then on, @@ -1212,7 +1304,8 @@ luau-lsp: cmake -S "$src" -B .cache/build/luau-lsp -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS="-Wno-error=maybe-uninitialized" > /dev/null + -DLUAU_BUILD_TESTS=OFF \ + -DCMAKE_CXX_FLAGS="" > /dev/null cmake --build .cache/build/luau-lsp --target luau-lsp echo "" echo "luau-lsp built: $(pwd)/.cache/build/luau-lsp/luau-lsp" @@ -1233,8 +1326,8 @@ luau-lsp: # recipe is meant to be runnable mid-change. Use `just preset=ci check` for the # strictest configuration this repository has - which is also what the hook # runs, so a push is held to the strictest configuration by default. -check: format-check em-dash-check build-profile-check build test-all test-architecture source-check docs-pages-check shader-check check-one-node-graph bindings-check components-check typecheck typecheck-editor determinism replay-check client-smoke orphan-check - @echo "check ok - format, em dashes, build profile, build, tests, architecture, source rules, shaders, bindings, typecheck, editor, determinism, replay, orphans" +check: format-check em-dash-check build-profile-check linker-check compiler-cache-check build test-all test-architecture source-check docs-pages-check shader-check check-one-node-graph bindings-check components-check typecheck typecheck-editor determinism replay-check client-smoke orphan-check + @echo "check ok - format, em dashes, build profile, compiler cache, build, tests, architecture, source rules, shaders, bindings, typecheck, editor, determinism, replay, orphans" # Run the launcher - the window that starts any of the others. # @@ -1256,6 +1349,11 @@ run *args: (build "client") demo: (build "client") ./{{build}}/client/client --stats --graph +# Run every staged top-level script and world, then validate its BMP capture. +# Large stress scenes get a longer timeout; 4K textures need a larger budget. +demo-check frames="120": (build "client") + python3 scripts/demos/check-demos.py --build "{{build}}" --frames "{{frames}}" + # Run the editor. `just edit --game My.agame` passes flags straight through. # # The only program in the repository where `RunService:IsStudio()` is true, and @@ -1370,10 +1468,6 @@ ui-lab *args: (build "client") ui-test: (build "test_examples") ./{{build}}/tests/test_examples '[ui-lab]' -# Capture every shipped Luau demo and authored world through the headless client. -demo-check frames="120": client - python3 scripts/demos/check-demos.py --build {{build}} --frames {{frames}} - # Exercise the UI lab through the native desktop input path. ui-live-check *args: (build "client") python3 scripts/demos/ui-live-check.py --preset '{{preset}}' {{args}} @@ -1735,7 +1829,7 @@ check-cdn-is-bare: # wrong, in the half nobody tests: the cycle guard, or the hash. # # A third would arrive as a file rather than as a decision. The render pipeline -# editor uses this library; future graph editors must do the +# editor and Image Composer use this library; future graph editors must do the # same so their cycle guards and canvases do not diverge. AGENTS.md rule 6 says # to make that a build check rather than leave it in somebody's memory. # @@ -2089,3 +2183,45 @@ metrics-lookup-bench: ATOMIC_METRICS_LOOKUP_PROFILE=1 timeout --foreground --kill-after=10s 180s ./.cache/build/bench/bench/bench_core --suite engine.core.bench.instrumentation --samples 5 import 'scripts/demos/version-impact.just' + +# grug measure CPU imports at 1080p. flat grey fixtures, no benchmark file. +imagecodec-bench samples="5": + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_imagecodec + ./.cache/build/bench/bench/bench_imagecodec --suite engine.imagecodec.bench.image --samples {{samples}} + +# Measure ordinary GUI copy refresh with a real 1080p EditableImage payload. +# Heap counters cover C++ allocations; reports remain on the terminal. +playergui-projection-bench samples="5": + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_script + MONO_PLAYERGUI_PROJECTION_REPORT=1 ./.cache/build/bench/bench/bench_script --suite engine.script.bench.playergui --samples {{samples}} + +# Actual Studio replication interest with the all-moving demo population. +studio-replication-stress-bench samples="3" build_preset="bench": + cmake --preset {{build_preset}} -DMONO_BUILD_BENCHMARKS=ON > /dev/null + cmake --build --preset {{build_preset}} --target bench_studio + ./.cache/build/{{build_preset}}/bench/bench_studio --suite studio.bench.replicationstress --samples {{samples}} + +# Blank Studio grid: unique completed GPU samples, CPU recording and tracked residency. +grid-composite-bench frames="120" build_preset="bench": + #!/usr/bin/env bash + set -euo pipefail + cmake --preset {{build_preset}} > /dev/null + cmake --build --preset {{build_preset}} --target bench_render + if ! SDL_VIDEO_DRIVER=offscreen SDL_GPU_DRIVER=vulkan MONO_GRID_COMPOSITE_REPORT=1 MONO_GRID_COMPOSITE_FRAMES={{frames}} MONO_GRID_COMPOSITE_PRESET={{build_preset}} timeout --foreground --kill-after=10s 180s ./.cache/build/{{build_preset}}/bench/bench_render --suite engine.render.bench.grid-composite --samples 1; then + echo "grid-composite-bench failed or exceeded its 180s device deadline" >&2 + exit 1 + fi + +# Actual ordinary-emitter CPU recording/self cost, GPU timestamps and residency. +# Device waits are outside CPU recording spans, so these numbers are not FPS. +ordinary-particle-bench samples="1": + #!/usr/bin/env bash + set -euo pipefail + cmake --preset bench > /dev/null + cmake --build --preset bench --target bench_render + if ! MONO_ORDINARY_PARTICLE_REPORT=1 timeout --foreground --kill-after=10s 300s ./.cache/build/bench/bench/bench_render --suite engine.render.bench.particles --samples {{samples}}; then + echo "ordinary-particle-bench failed or exceeded its 300s device deadline" >&2 + exit 1 + fi diff --git a/NEW_ROADMAP.md b/NEW_ROADMAP.md new file mode 100644 index 000000000..d5b3c2f22 --- /dev/null +++ b/NEW_ROADMAP.md @@ -0,0 +1,68 @@ +Engine Features - MISSING\_ENGINE\_FTRES.md (current version: v0.26.0-imagegraph-partial) +--- + +# Zero v0.26.1 + +- unified graph library in underlying engine +- system-specific defined graphs and nodes +- system-specific runtimes +- C01, C02, C04, C06 +- All ray (marching) optimisations across current and new systems. +- Benchmarks for simple and complex scenes for ray optimisations to prove. + +# First v0.26.2 + +- character spawning & preset outfits built into engine +- proper character & camera controller luau modules (instead of C++ unreachable code) +- proper character movement & AutoRotate & StepHeight +- character intent item in document +- Define player-independent characters, player roster and possession ownership, + and neutral driver leases for players, AI, scripts, and replay. See the + [character system plan](docs/future-work/character-system.md) and the + [navigation and AI action seam](docs/future-work/navigation-ai-system.md). + +# Second v0.26.3 + +- animation graphs & event +- default animation controllers and graphs +- G08 animation graphs, masks, synchronise, and event markers +- C02 +- Define character state-machine policy, animation graph composition and + blending, and how animation follows committed character state. See the + [character system plan](docs/future-work/character-system.md). + +# Three v0.26.4 + +- P02 contact policies & complete physical events +- P03 complete fast-body collision and batched world queries + +# Four v0.26.5 + +- R3 matrial graphs, instances and permutation control +- R4 projected decals and mesh-particle effect authoring +- R5 HLOD, imposters & foliage authoring + +# Five v0.26.6 + +- R08 real geometry ray queries and reference path tracing +- may be worth moving to zero specifically for optimisation items +- C03 + +# Six v0.26.7 + +- W04 +- U01 +- U02 +- U03 +- U04 + +# Rules + +1. Must plan the generalisation of these systems so they're adaptable for any purpose (i.e. why we're making a lot of things graphs and have luau APIs, so they're accessible). +2. Prune (document) upon completion. +3. Three rounds of optimisations to improve clock time, latency, memory, compute, etc. +4. Plan first, present to user, user says any changes, tweak, repeat until user happy, then implement once told (usually a goal will be set). Include key factors in your documents and whatnot so we know what we're doing. + +v0.26.8 onwards would be the continuation of the imagegraph system, however, some parts may be used in earlier versions between v0.26.0 to v0.26.7 as part of each implementation item where its applicable. Either you can re-write sections, take high level implementation features and rewrite with new introduced underlying systems, or blend the code with the new work so we just 'slot it in'. + + diff --git a/ROADMAP.md b/ROADMAP.md index d7573b225..f54db5e10 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -54,9 +54,48 @@ The milestone headings below are development labels. Not in line with project ve ### v0.26 -- [_] Create owned 2D images usable by `ParticleEmitter`, `ImageLabel` and existing image consumers, with basic 2D transform and composition nodes. -- [_] Review the preserved full work on the `v0.26.5-imagegraph-full` branch before integration. -- [_] Exclude 3D, audio and broad simulation features from the first integration. +- [x] Create bounded static 2D images with Source, Solid, Resize, Crop, Transform, Flip and Blend nodes, durable projects and named outputs. +- [x] Add Studio Image Composer editing, cached previews, undo/redo, save/open and ordinary `.atex` export; add `.imagegraph` baking to assetc. +- [x] Verify exported images through ordinary signed content delivery in `ParticleEmitter` and `ImageLabel`, plus CPU, editor and sanitizer checks. + +- [x] Define strict document v2 named parameters and bindings, backward v1 reads, pure input resolution and bounded selected-output preparation for the seven 2D nodes. +- [x] Add the keyed L7 per-world `ImageGraph` owner and Luau `SetInput`, `GetInput` and `GetImage` paths using stable imagegraph references. +- [x] Add L12 GPU evaluation, dirty-cone caching and transactional publication through ordinary `TextureTable` images; preserve last-good output on refusal. +- [x] Add Studio live inputs, bindings, GPU preview and publish/apply to ordinary image slots. +- [x] Add bounded raw RGBA8, PNG and JPEG imports, raw Base64 export, `ContentId` consumers and the `ImageBuffers` sample. +- [x] Add a staged demo runner that captures each top-level script and world, checks client diagnostics and validates BMP output. +- [x] Verify the encrypted 1080p EditableImage snapshot and observed update preserve dimensions, full byte payload, colour space, `ContentId` and unrelated replica rows across default chunk and pacing limits (18,302 assertions). +- [x] Verify viewport checks (29 cases, 449 assertions) and final native viewport drag/resnap; repeat Play/Stop coverage passed 228 assertions in the strict-CI binary. +- [x] Pass `just preset=dev docs-check` with zero malformed comments and no undocumented public entities. +- [x] Finish three consecutive interactive Studio Play/Stop checks; restored orange graph output appears in ImageLabel and ParticleEmitter. +- [x] Verify isolated signed GUI Publish/Apply and mismatched-key refusal; six SHA values stayed unchanged, the candidate was absent and the previous Apply remained enabled. +- [x] Initial minimal ImageGraph baseline: strict CI passed 664 suites, 0 skipped and 0 failed; architecture had 50 modules, 6 programs and 36 layered modules. +- [x] Keep LocalScript-created objects and `Workspace` camera descendants local, unsaved and unreplicated; give each player private `StarterGui` copies with independent `ResetOnSpawn`. +- [x] Add protected generated `Workspace.Terrain` with helper and migration paths, opt-in `AuthoredAffordance`, cameras without a `SurfaceCamera` facet, `RenderEffects` None-default dropdowns and an authored portal/mirror grid. +- [x] Build the Tornado demo in pure world Luau over generic GPU field, particle, volume and force systems; verify the 50M-particle server/client run through the Studio HUD button and Bladeborne's character-following local camera with HUD visible. +- [x] Capture and pass all 77 top-level demos; pass GPU renderer checks (9 cases, 902 assertions) and consumer checks (4 cases, 617 assertions), and verify native viewport float and resnap behavior. +- [x] Keep GPU timing averages sample-aware and separate from CPU placement: sparse device spans average over returned samples, and late query durations stay on the GPU timing axis (`82ba4842`, `da06e334`). +- [x] Reuse drawable-source membership during presentation updates and hoist label-name lookup out of per-instance loops (`443e4588`). +- [x] Bound mirror captures by authored bounce depth; the one-bounce GPU fixture renders all 320 mirror-ball facets independently of portal depth (`956e76e9`, `cf75b379`). +- [x] Preserve complete instance births through transport pressure and loss; the stress test checks all 1,536 instances converge to the final changing value after one join (`813fd045`). +- [x] Ground the ReplicationStress player before admission; verify all 20,000 authored block states, grounded client camera visibility and final position convergence through the actual Studio link. +- [x] Group all built-in reflected properties with inherited `PropertiesTag` metadata and an `Unassigned` fallback; put collection tag add, rename, remove and undo in the Properties footer. See [Studio properties](docs/STUDIO_PROPERTIES.md). +- [x] Freeze paused Frame Graph counters and draw data, stop recorder collection while paused unless another profiling consumer needs it, reuse retained clipped flame indices and theme palette, and fit structural averages by actual parent relationships so child order does not hide gaps. +- [x] Admit tick exchange workers using each stage's measured cost, wake only workers selected for the active batch and report worker bodies only when they own tasks. +- [x] Replace inactive DOF, god rays, bloom, lenses, sky, fog and empty overlays with output-preserving copies or clears; skip empty G-buffer shader draws, depth linearisation, SSAO and deferred lighting only when cleared texture contents prove the result. Retain disabled environment outputs without compute, copy matching presentation images and omit cleared game UI blends. GPU fixtures cover active transitions, authored writes, retained UI, lighting captures and authored zero-depth exports. +- [x] Preserve cleared component write epochs for skipped presentation consumers, rebuild cached portal cuts and omit capture-label scans when no attribute rows exist. +- [x] Reuse render-batch scratch and dirty ranges, step shared GPU particle fields once per frame and keep inactive inputs out of environment cache keys. +- [x] Index capture surfaces by slot, avoid redundant ribbon restoration uploads and omit zero-strength ground-grid draws. +- [x] Preserve opaque depth in transparent passes when empty surface overlays skip rendering, and refuse failed image publications or pass starts in transparent geometry, mirror and portal capture paths without exporting retained stale images. +- [x] Retain Output filtering and text extents, clip visible rows and cache canonical Explorer searches while keeping computed-property searches live; preserve multiline layout and selection behavior. +- [x] Resolve built-in and runtime image references through the correct content owner before portal promotion, and refresh readiness when renderer resource revisions change. +- [x] Fit mandatory nested portal images to their existing fair pixel budget and regenerate their camera keys after sizing; keep optional seam radiance separate. +- [x] Hide only the displayed local player's body in Studio first-person and restore it in third-person; the real viewport GPU fixture also checks another player's visibility. +- [x] Preserve depth-tested SurfaceGui pixels through oblique captures with a bounded decal depth tolerance; GPU checks cover ordinary and authored shaders, close occluders and portal adoption. +- [_] Non-acceptance follow-up: audit aggregate replica snapshot and staged-byte ceilings for large EditableImage rows. The current path has a `uint32_t` total cap but no explicit assembled-image budget; per-image bounds and windowed staging are tested. +- [_] Security follow-up: audit dynamic schema and component-codec acceptance, plus client-local provenance and descendant filtering across replication and authored game saves. + +The accepted implementation is `v0.26.0-imagegraph-minimal`. The preserved full Composer work remains on `v0.26.5-imagegraph-full` for user review. ### v0.27 @@ -85,7 +124,9 @@ When you create a new world/scene, it auto appends the scripts in. ### FUTURE -- [_] /docs/future-work/navigation-ai-system.md +- [_] Navigation and AI: bounded navigation, perception, named inspectable AI + states, behaviour plans, and driver-safe character actions in the + [navigation and AI plan](docs/future-work/navigation-ai-system.md). - [_] pathfinding - [_] more advanced pathfinding where you can specify wall climbing and stuff, like a "can climb" zone or stuff lik that for ai too @@ -98,9 +139,13 @@ When you create a new world/scene, it auto appends the scripts in. - [_] localization support - [_] /docs/future-work/terrain-system.md -- [_] /docs/future-work/character-system.md +- [_] Player-independent characters, controller state, animation graphs, and + player roster/possession in the [character system plan](docs/future-work/character-system.md). - [_] /docs/future-work/vfx-system.md -- [_] /docs/future-work/input-system.md +- [_] Input actions, normalized devices, and a bounded `VirtualDeviceService` + for custom controllers and external ingress. See the [input system + plan](docs/future-work/input-system.md) and [virtual device service + plan](docs/future-work/virtual-device-service.md). - [_] /docs/future-work/camera-and-cinematics.md - [_] /docs/future-work/prefab-package-system.md - [_] /docs/future-work/procedural-generation.md @@ -127,7 +172,16 @@ When you create a new world/scene, it auto appends the scripts in. - [_] concept idea: setup a public mcp repository in python, add .mcp.json in project folder that loads it, it watches forums channels in the discord server for new/existing bugs. agent writes a message in the channel stating you're fixing it, other agents work on other bugs. agents can write that "this bug is a big rewrite" in the channel too which could be helpful. as a custom plugin? maybe just consider as a separate project. - [_] could we try some minecraft shaders / pbr texture packs as test items? maybe upload to my cdn and then load it and ill check if it works - [_] add modulescript boundaries between luau and javascript VMs. moving values between vms. add a container component flag to enable it. add a [experiment] marker. -- [_] VR support (oculus rift s) +- [_] VR support, with Rift S as a requested validation target: OpenXR stereo + views, in-game per-eye image-clarity calibration, and calibrated glasses-style + magnification. Physical optical focus depends on headset support. Expand the + Far Cry VR and Space Marine VR references from Zero Latency Adelaide when + POVs arrive. Check OpenXR profiles for Vive wands, Rift S Oculus Touch, Valve + Index, and the simple-controller fallback; targets remain unverified and + runtime-dependent. Check Cosmos and Focus separately. See the [VR system + plan](docs/future-work/vr-system.md), [input system + plan](docs/future-work/input-system.md), and [virtual device service + plan](docs/future-work/virtual-device-service.md). - [_] setup a studio permissions system for: microphone, camera, etc - [_] setup a example plugin for mocap with camera point track - [_] ECS driven RL agent environments diff --git a/RUNNING.md b/RUNNING.md index 965267cce..8300158fe 100644 --- a/RUNNING.md +++ b/RUNNING.md @@ -10,6 +10,13 @@ documentation generators can update checked-in reference files. Every Linux preset builds with GCC, and configure refuses any other compiler. Only the fuzz recipes use `clang++-21`, because libFuzzer needs it. If a build directory picked up another compiler, run `cmake --preset --fresh`. +This does not change the compiler: `MONO_LINKER=auto` uses LLVM LLD on native +GCC/Linux when its probe succeeds, and otherwise uses the system linker. To +use the system linker, configure with +`cmake --preset dev -DMONO_LINKER=system`; +`MONO_LINK_JOBS` (default `2`) limits concurrent first-party Ninja links. Set +`MONO_LLD` to an `ld.lld` path when CMake cannot find it automatically. +See [build performance](docs/BUILD_PERFORMANCE.md) for measurements and comparisons. ## Start here @@ -53,6 +60,14 @@ just preset=release build just preset=server test ``` +For `windows-cross` from Linux, install MinGW and Wine with +`sudo apt install mingw-w64 wine`, then add the Rust target with +`rustup target add x86_64-pc-windows-gnu`. The preset uses native `glslc` at +`.cache/build/release/mono.vendor/shaderc/glslc/glslc`; prepare it with +`just preset=release configure` and `just preset=release build glslc_exe`. +Then run `just preset=windows-cross configure` and +`just preset=windows-cross build`. + ## Setup and build | Recipe | Purpose | @@ -62,8 +77,10 @@ just preset=server test | `ccache [size]` | Show compiler-cache status, or set its size. | | `configure` | Configure the selected preset. | | `build [target]` | Build the selected preset, optionally one target. | -| `build-profile [target]` | Build and report Ninja and compiler-cache timing. | +| `build-profile [target]` | Build and report current-invocation edge, compiler-cache, and wall-clock timing. | | `build-profile-check` | Test the build-profile tool. | +| `linker-check` | Check automatic, system, and LLD linker selection in a standalone CMake fixture. | +| `compiler-cache-check` | Verify GCC PCH regeneration and compiler-cache hits. | | `client` | Build the client. | | `server` | Build the server. | | `cdn` | Build the content origin. | @@ -118,6 +135,7 @@ Examples: `just test engine.ecs`, `just test-all`, and | `host [args...]` | Run the headless server. | | `serve [args...]` | Run the content origin. | | `materials [count]` | Fetch and publish PBR materials. Default: `100`. | +| `demo-check [frames]` | Run staged scripts and worlds headlessly, then validate BMP captures. Default: `120`. | | `mcp [port] [args...]` | Run Studio's MCP bridge. Defaults: `8738`, `--width 1600`. | | `luau-lsp` | Build the vendored Luau language server. | | `unified [args...]` | Run unified client/server arrangements. | @@ -145,12 +163,39 @@ Documentation is written to `.cache/build//docs/`; use Benchmark output is printed to the terminal unless a recipe names an output directory. Use the `bench` preset for comparable measurements. +Frame Graph's `250 ms` setting is the aggregation window, not a frame duration. +Structural averages can place CPU spans at overlapping mean positions; separate +rows preserve those values without claiming parallel execution. GPU queries use +a separate duration scale because their results can arrive several frames late +and have no correlated CPU start. `submit.scene SDL handoff` identifies time in +the backend submission call separately from engine submission bookkeeping. + | Recipe | Purpose | |---|---| | `bench [args...]` | Run selected affected benchmarks. | | `bench-all [args...]` | Run every benchmark. | | `bench-accept [args...]` | Accept benchmark baselines. | +| `weather-bench [samples] [build_preset]` | Measure seeded weather, packing, clocks, assemblies, sparse residency, events and the stateful solver without graphics. Defaults: `5`, `bench`; use `bench-o0` for unoptimized costs. | +| `weather-descriptor-bench [samples] [build_preset]` | Measure device-free weather GPU descriptor preparation. Defaults: `5`, `bench`. | +| `weather-residency-bench [samples] [build_preset]` | Measure actual sparse cloud page selection, retained maintenance and teleports without graphics. Defaults: `5`, `bench`. | +| `weather-temporal-bench [samples] [build_preset]` | Measure temporal invalidation, periodic displacement and cloud composition without graphics. Defaults: `5`, `bench`. | +| `weather-shadow-bench [samples] [build_preset]` | Measure shadow caster bounds, cascades, low-sun fades and retained revisions without graphics. Defaults: `5`, `bench`. | +| `weather-effects-bench [samples] [build_preset]` | Measure weather emission and roof/ground visibility against published geometry without graphics. Defaults: `5`, `bench`. | +| `weather-gpu-bench [samples] [build_preset] [width] [height] [shadow_resolution]` | Open a GPU device and measure sparse weather generation, reuse, integration and tracked memory. Defaults: `3`, `bench`, `1920`, `1080`, `256`. Shadow resolution must be a power of two in `32..2048`. | +| `weather-fuzz [runs] [compiler]` | Fuzz complete weather checkpoint decoding with AddressSanitizer and UBSan. Defaults: `10000`, `clang++-21`. | +| `imagecodec-bench [samples]` | Measure CPU image imports at 1080p and print results to stdout. Default: `5`. | +| `ui-headless-bench [samples]` | Measure ImGui layout and frozen draw signatures without a GPU. Default: `5`. | +| `studio-interface-bench [samples] [build_preset]` | Measure toolbar, Preferences, retained 250 ms Frame Graph, and idle content scans without a window or GPU. Defaults: `5`, `bench`; use `bench-o0` for unoptimized engine costs. | +| `studio-replication-stress-bench [samples] [build_preset]` | Measure the actual Studio link with 20,000 moving Parts, replica delivery, and acknowledgements. Defaults: `3`, `bench`. | +| `client-frame-bench [samples] [build_preset]` | Measure idle content demand, visibility and actual PreRender systems. Defaults: `5`, `bench`; use `bench-o0` for unoptimized costs. | +| `view-graph-lookup-bench [samples] [build_preset]` | Compare pipeline node scans and indexed lookup. Defaults: `5`, `bench`; use `bench-o0` for unoptimized costs. | +| `instance-packing-bench [samples] [build_preset]` | Measure instance conversion and residency with centered and off-center meshes. Defaults: `5`, `bench`; inline conversion is optimized in the benchmark translation unit. | +| `surface-capture-plan-bench [samples] [build_preset]` | Measure CPU planning for 320 visible mirror roots with one bounce and retained buffers. Defaults: `3`, `bench`; no GPU work is included. | +| `frame-plan-bench [samples]` | Measure CPU frame planning, including the default PBR pipeline. Default: `5`. | +| `frame-plan-cache-bench [samples]` | Compare installed-pipeline diagnostic cache misses and hits. Default: `5`. | | `render-preparation-bench [samples]` | Measure render-preparation work. Default: `5`. | +| `keep-loaded-filter-bench [samples]` | Compare copying 100,000 default Parts with retaining their draw span, plus resident and missing named meshes. Default: `5`. | +| `ordinary-particle-bench [samples]` | Measure ordinary emitter preparation, actual upload bytes, dispatch lanes, and delayed Vulkan pass timings. Default: `1`; waits are outside CPU recording spans. | | `volume-light-stress [frames]` | Check lighting stress scene, selection costs, and Vulkan fog stress. Default: `120`. | | `lighting-stress-scene [frames]` | Run the 256 point, 256 spot, 256 fog volume scene. Default: `720`. | | `data-capture-hook-bench [samples]` | Measure renderer data-capture hooks. Default: `5`. | @@ -184,6 +229,20 @@ directory. Use the `bench` preset for comparable measurements. | `recovery-rows-bench [samples]` | Measure recovery-row re-offer work. Default: `5`. | | `bench-mesh-lod [samples]` | Measure mesh LOD generation. Default: `5`. | +The prototype's 12 ms combined weather GPU budget was met by this one-layer, +1920x1080 Vulkan fixture on an RTX 4090 with one 256x256 shadow cascade. +Concurrent GPU residency affected timing variance; this measurement does not +establish a universal frame guarantee or a quality ranking. The default matches +authored shadow resolution. Compare lower-quality maps with +`just weather-gpu-bench 3 bench 1920 1080 64` and +`just weather-gpu-bench 3 bench 1920 1080 128`. +`MONO_WEATHER_GPU_BENCH_SHADOW_RESOLUTION` sets the same value when running the +benchmark executable directly; invalid values are refused before SDL +initialization. Set `MONO_WEATHER_GPU_BENCH_TICK` to choose its initial +canonical tick, for example `MONO_WEATHER_GPU_BENCH_TICK=128`; the benchmark +prints `initial_tick` and refuses values that leave its eight-tick phase open to +overflow. Its default is `0`. + Profile and soak outputs are retained under `.cache/`, including `.cache/medium-render-profile/`, `.cache/heap-*.txt`, and `.cache/build//`. diff --git a/VERSION b/VERSION index d21d277be..4e8f395fa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.25.0 +0.26.0 diff --git a/docs/BUILD_PERFORMANCE.md b/docs/BUILD_PERFORMANCE.md new file mode 100644 index 000000000..2c3748236 --- /dev/null +++ b/docs/BUILD_PERFORMANCE.md @@ -0,0 +1,120 @@ +# Build performance + +Measured on 2026-10-15 with the `dev` preset, GCC 13.3, LLD 21, full debug +information and 24 available CPU threads. Other processes were running, so these +are local observations rather than portable timing guarantees. + +| Work | System linker (GNU BFD) | LLD, four workers | +|---|---:|---:| +| Full dev relink and resulting asset staging | 52.807 s | 10.667 s | +| Studio test executable, isolated relink | 9.70 s | 1.74 s | + +The full comparison used the same existing objects and two concurrent link +jobs in both runs. Neither run invoked the compiler. It includes shader +translation and asset baking triggered by relinking their tools. An earlier +LLD pass also rebuilt the Studio archive and took 13.090 s. + +This measures relinking, not a clean source build. PCH and unity settings stay +as they were. A null dev build took about 0.13 s. Rebuilding the same cached +Studio source twice took 0.09 s each, with direct cache hits on both calls. +Historical cache misses therefore did not establish a current cache defect. + +`MONO_LINKER=auto` now probes LLD for native GCC/Linux builds and falls back to +the system linker. `MONO_LINKER=system` disables the choice; `MONO_LINKER=lld` +requires it. Compiler options and generated objects are unaffected. Four LLD +workers reduced CPU work on the Studio test link from 11.09 to 5.54 CPU-seconds +versus unrestricted LLD, at the cost of 1.74 s rather than 1.32 s elapsed time. + +That large link peaked around 6.4 GB RSS with LLD versus 4.8 GB with BFD. +`MONO_LINK_JOBS=2` bounds simultaneous first-party Ninja links. Compiles can +still overlap links, so this is not a whole-build memory bound. Caller-supplied +job pools are preserved. + +Use the existing profiler to repeat the comparison: + +```sh +cmake --preset dev -DMONO_LINKER=system +just build-profile +cmake --preset dev -DMONO_LINKER=auto +just build-profile +``` + +Each linker change forces relinking. The profiler now reports only the current +build command's new Ninja edges and ccache events. Its wall time excludes any +initial configure performed by the recipe. Standalone inspection remains +historical: + +```sh +python3 scripts/build-profile.py --build-dir .cache/build/dev +just build-profile-check +just linker-check +``` + +ngtcp2 is pinned to upstream `main` commit +`48228939787d4b5bea94c7795b8c7fe0781d918e` from 2026-10-11, newer than stable +tag `v1.25.0`. Linux `dev`, `server` and strict `ci` builds passed with this +pin. Strict headless suites passed 723/723, and server CTest passed 43/43. + +The [first native CI run][cold-platform-run] had cold compiler caches. Its +largest cumulative edge group was shaderc: 2,285 seconds on Windows and 1,295 +seconds on macOS. Luau +followed at 1,084 and 434 seconds. These are overlapping work totals, not build +wall times. The AccessKit Cargo step took 141 seconds on Windows and 34 seconds +on macOS. Windows completed; the macOS log stops at the compile failure below. +The existing CI compiler cache was saved for subsequent runs. The [next Windows +run][cache-run] had 1,175 hits and two misses for changed translation units, after +subtracting the cold run's counts from the retained stats log. Its fresh Ninja +log spanned 135 seconds versus 1,483 seconds cold. This demonstrates existing +cache reuse, not a separate speedup introduced by these changes. No linker +speedup is claimed for either native platform. + +The platform fixes make CMake invoke `assetc` by target name so Wine runs it, +build AccessKit for `x86_64-pc-windows-gnu` into Rust's target-specific artifact +path and link its reported native libraries, and rename the graph lookup to +`FindResourceDesc` to avoid the Win32 macro. Apple AccessKit links AppKit, +Foundation and objc from the Rust static-library probe. + +The full `windows-cross` build passed with MinGW GCC 13 posix, including all +products, tools and staging; its null build took 0.083 s. Under Wine 11, +`server`, `cdn` and `launcher --version` passed, as did a three-tick server +run. Unmodified `client --version` and `studio --version` failed in the built-in +`dbghelp` DWARF `dwarf2_locate_cu` parser. Copies with only debug sections +removed passed both commands; the original artifacts and build options were +unchanged. No GPU runtime was tested. + +Rust-only AccessKit static-library probes passed for Windows GNU, Windows MSVC +and macOS ARM64 on Linux. The macOS probe used no Apple SDK and did not link a +native application. The [final native platform run][platform-run] passed the +Windows and macOS release builds and packaging. Both passed the 10 build-profiler tests, +and macOS passed the floating-point parser suite using its own standard library. +The macOS fixes route Studio number parsing through `core::FromChars` and name +an image-composer lambda capture explicitly for Apple Clang. The portable parser +now rejects overflow and zero underflow while preserving valid subnormals. + +After those fixes, Linux `dev`, `server` and strict `ci` builds passed again. +The complete core CTest check passed; focused checks passed 203 parser +assertions, 146 UI-authoring assertions and 354 image-composer assertions. +Formatting, prose checks, architecture and source checks, the linker fixture, +and the build-profiler tests passed. No GPU or macOS application runtime was +tested. + +[platform-run]: https://github.com/SPOOKEXE/atomic-game-engine/actions/runs/38848123921 +[cold-platform-run]: https://github.com/SPOOKEXE/atomic-game-engine/actions/runs/38725290645 +[cache-run]: https://github.com/SPOOKEXE/atomic-game-engine/actions/runs/38847518322 + +The driver search option is applied only while linking, because GCC also uses +[`-B` to select compiler tools and search paths](https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html). +Link concurrency uses [CMake's Ninja job pools](https://cmake.org/cmake/help/v3.28/prop_gbl/JOB_POOLS.html). + +LLD links keep hot, unlikely and startup text inputs in their matching output +sections with [`-z keep-text-section-prefix`](https://lld.llvm.org/ELF/linker_script.html). +This leaves those groups together instead of interleaving them by object. It +does not enable garbage collection or identical-code folding, and removes no +code. One local GCC 13.3 / LLD 21 server-alone Rings workload, measured for 15 +seconds of serial compute, used the same objects and a no-GC, one-flag control: +final executable mapping fell from 15,848 KiB to 13,956 KiB, and total RSS from +34,860 KiB to 32,968 KiB. A same-object joined ServerRings paired GDB check +using the same software-Vulkan viewer at 960x540 and a 60 Hz cap for 15 seconds +of serial compute measured executable RSS at 17,176 KiB to 15,180 KiB and total +RSS at 38,092 KiB to 36,084 KiB. Both are local diagnostic memory observations, +with no timing improvement or hosted CI result claimed. diff --git a/docs/DEMOS.md b/docs/DEMOS.md index c818d9530..0cadc3e00 100644 --- a/docs/DEMOS.md +++ b/docs/DEMOS.md @@ -1,4 +1,5 @@ -# Demo projects +# demo projects + The staged sample set contains Luau scripts and authored `.aworld` files. Sources live under [`mono.engine/examples/assets`](../mono.engine/examples/assets). Use the examples to inspect behavior, then run them through the same headless client @@ -21,11 +22,21 @@ payload and dimensions. Ordinary runs have a 45-second limit. `StressPhysics` and `PbrTextureUniqueStress` have a 600-second limit. The 4K texture stress also requests its documented 9,216 MiB texture budget. +Before the Luau-only catalog cleanup, a bench-preset Vulkan capture sweep +passed 77 staged rows at 120 frames each with dummy audio and a 60 FPS cap. +All 77 captures received visual review. The captures and `results.json` are in +`.cache/build/bench/demo-check/20261009T072153Z-1658443/`. + +A focused rerun with the current checker passed all 7 DataFactory, image-buffer +and particle rows. This includes explicit `--data-factory` handling. Its +results are in +`.cache/build/bench/demo-check/20261009T073439Z-1687610/results.json`. + For focused reruns, call the script directly: ```console python3 scripts/demos/check-demos.py --build .cache/build/dev \ - --only '^(EditableImage|Particles)\.luau$' --frames 240 --timeout 60 + --only '^(ImageBuffers|Particles)\.luau$' --frames 240 --timeout 60 ``` The headless sweep checks that each demo starts, runs and produces a valid @@ -35,6 +46,10 @@ tests and real client checks for behavior that a startup capture cannot prove. ## image and particle examples +- [`ImageBuffers.luau`](../mono.engine/examples/assets/scripts/ImageBuffers.luau) + shows raw RGBA8, PNG and JPEG import paths, then assigns images to labels, + mesh texture slots, a `Texture` and a particle emitter. See + [IMAGE_BUFFERS.md](IMAGE_BUFFERS.md) for the format and size contract. - [`EditableImage.luau`](../mono.engine/examples/assets/scripts/EditableImage.luau) draws into a live image and applies its `ContentId` to a mesh part. - [`Meshes.luau`](../mono.engine/examples/assets/scripts/Meshes.luau) and @@ -48,7 +63,12 @@ tests and real client checks for behavior that a startup capture cannot prove. compares playback modes using the packaged `effects/fox_dance.atex` atlas. [`Particles.luau`](../mono.engine/examples/assets/scripts/Particles.luau) includes both a feature row and a large emitter grid. - +- [IMAGEGRAPH_LIVE.md](IMAGEGRAPH_LIVE.md) documents named source-path inputs + and ordinary image outputs. A string parameter bound to `image.source.path` + can receive an `EditableImage.ContentId`; without an instance override, the + source path uses the signed graph's authored parameter default. The focused + signed integration check exercises graph output in particles and other image + consumers. `PbrTextureUniqueStress.luau` is a memory stress scene, not a normal sample. Its 100 unique 4096-square RGBA8 images account for about 6.25 GiB before diff --git a/docs/DEMO_COVERAGE.md b/docs/DEMO_COVERAGE.md index 0979f27a1..f573ed370 100644 --- a/docs/DEMO_COVERAGE.md +++ b/docs/DEMO_COVERAGE.md @@ -4,7 +4,7 @@ This is a source-level audit of every top-level Luau scene and authored world in ## Launch and assets -Build with `just preset=dev client`, then run a script with `scripts/demos/run-demo.sh Rings` or a world with `scripts/demos/run-demo.sh TornadoSim.aworld`. The Windows launcher is `scripts\demos\run-demo.bat`. A bare stem selects `.luau`. Luau module trees and Arena's client shooting companion stage with their scenes. `just preset=dev demo-check` captures each listed scene headlessly; it checks startup and image validity, not appearance or interaction. +Build with `just preset=dev client`, then run a script with `scripts/demos/run-demo.sh Rings` or a world with `scripts/demos/run-demo.sh TornadoSim.aworld`. The Windows launcher is `scripts\demos\run-demo.bat`. A bare stem selects `.luau`. Client camera companions and Luau module trees stage with their scenes. `just preset=dev demo-check` captures each listed scene headlessly; it checks startup and image validity, not appearance or interaction. - `Mirrors-4-worlds` needs `--worlds 4`. `CrossWorldSeam` compares `--worlds 1` with `--worlds 2 --view-spacing 0`; the zero spacing is required for its pane alignment. `ImmersivePortals` needs the same script in two named worlds. The `Playground` and `Arena` scenes need their respective pad scripts and both worlds for the teleport round trip. `Arena` shows its targets in a standalone preview; shooting and target resets require a server hosting `Arena.luau` and its Luau client companion. - `DataFactoryDemo` and `DataFactoryAdvancedDemo` need client data-factory mode and an MCP port, for example `--data-factory --mcp-port 8738`. `DataFactoryPackageDemo` exercises the external package workflow. `RenderFeaturesDemo` pairs with `examples/pipelines/RenderFeatures.pipeline`. `VirtualCameraCapture.agame` is launched by `scripts/studio-virtual-camera-capture-test.sh`, outside the normal demo list. @@ -53,6 +53,7 @@ Build with `just preset=dev client`, then run a script with `scripts/demos/run-d | [`EditableImage.luau`](../mono.engine/examples/assets/scripts/EditableImage.luau) | DrawCircle and DrawLine; live image revision; texture on a 3D mesh | | [`EditableMesh.luau`](../mono.engine/examples/assets/scripts/EditableMesh.luau) | procedural vertices and triangles; per-vertex colour; live geometry deformation | | [`GuiInteraction.luau`](../mono.engine/examples/assets/scripts/GuiInteraction.luau) | 2D text entry; button/image activation; event callbacks and visual state | +| [`ImageBuffers.luau`](../mono.engine/examples/assets/scripts/ImageBuffers.luau) | raw RGBA8; PNG and JPEG decoding; ImageLabel, texture and particle consumers | | [`Libraries.luau`](../mono.engine/examples/assets/scripts/Libraries.luau) | MagicCore compiler and validation; TerrainCore generation; runtime module loading | | [`Lighting.luau`](../mono.engine/examples/assets/scripts/Lighting.luau) | directional sun; fog; ambient/outdoor lighting over coloured blocks | | [`LodDecimation.luau`](../mono.engine/examples/assets/scripts/LodDecimation.luau) | automatic mesh decimation; built-in and EditableMesh sources; triangle count inspection | @@ -106,10 +107,12 @@ Build with `just preset=dev client`, then run a script with `scripts/demos/run-d The focused scenes stay because their narrow compositions make failures visible: for example `MirrorDepth` fixes a reflection angle, `PortalSeamMatchedRoom` supplies a direct-room control frame, `MipProbe` isolates minification, and `MagicTests` runs Luau library checks. The heavy scenes and paired controls remain separate so their workloads and baselines are comparable. The most useful polish targets are the launch instructions for multi-world scenes, external asset setup, and live visual QA of the larger authored worlds. -The demo source tree now contains Luau script assets only. Removed alternate scene sources: `Rings.js`, `Mirrors-1-world.ts`, and `Mirrors-4-worlds.ts`. The examples asset build no longer transpiles or stages those alternates, and the demo resolver accepts Luau scripts or authored worlds. The general JavaScript runtime, API, and source-map tests remain. The default server scene is now `ServerDefault.luau`, a deterministic moving cube field, and `Arena.luau` contains the arena shooting behavior with a Luau client companion. +The demo source tree now contains Luau script assets only. Removed alternate scene sources: `Rings.js`, `Mirrors-1-world.ts`, and `Mirrors-4-worlds.ts`. Removed the two mirror `.client.js` companions. The examples asset build no longer transpiles or stages those alternates, and the demo resolver accepts Luau scripts or authored worlds. The general JavaScript runtime, API, and source-map tests remain. The default server scene is now `ServerDefault.luau`, a deterministic moving cube field, and `Arena.luau` contains the arena shooting behavior with a Luau client companion. + +The full source-based inventory, including dependencies, known rough edges, test references, XML embedded-script paths, and keep or polish recommendations, is in `.cache/demo-audit/catalog.json` in this workspace. These are source conclusions, not claims of a fresh live capture. ## Validation scope -This inventory describes the v0.25.0-fixes sources. All 75 catalog entries and the separate `VirtualCameraCapture.agame` fixture passed a five-frame headless startup capture at 640 by 360 with the strict CI build. Arena's guidance was also inspected at 320 by 180. These captures check startup and image validity; they do not establish complete visual or interaction coverage for every scene. +On 2026-10-12, the strict CI build passed headless Vulkan startup captures for all 76 scenes in the normal demo list at five frames each. The separate `VirtualCameraCapture.agame` fixture also passed a five-frame capture. The checker validates process exit, logs and image structure. These captures establish startup coverage for all 77 inventory entries; they do not establish visual quality, long-running behavior, multiplayer interactions or external asset completeness. Arena's C++ integration tests drive its actual Luau scripts through authenticated network clients. They cover valid shots, rejected aim payloads, cooldowns, obstructions, replica authority and client input. The default server scene has C++ wall-bounce parity and snapshot/replay checks. diff --git a/docs/ECS_COMPONENTS.md b/docs/ECS_COMPONENTS.md index 5ea8e2dcd..fd8c6933c 100644 --- a/docs/ECS_COMPONENTS.md +++ b/docs/ECS_COMPONENTS.md @@ -30,10 +30,12 @@ state until v0.19. | component | size | align | save | raw | pad | wire | what it is for | |---|---|---|---|---|---|---|---| | `ecs.AttributeTable` | 120 | 8 | yes | . | . | . | Per-world singleton holding every instance attribute a game has set, as a map per entity keyed by interned attribute name. | +| `ecs.ClientLocal` | 0 | 1 | . | . | . | . | Viewer-owned provenance for predicted instances; replication and game saves exclude the tagged instance and its descendants, and client mutation is allowed only on predicted rows. | | `ecs.DirtyBits` | 8 | 8 | yes | yes | . | . | One row's changed-component bits, one bit per column position in its archetype's sorted set, so marking a write is an index the store already holds. | | `ecs.Hierarchy` | 40 | 8 | yes | yes | . | 8 | Parent, first and last child and both sibling links for one instance, which is how the instance tree is stored rather than as a child vector per node. | | `ecs.InstanceClass` | 4 | 4 | yes | . | . | . | Which registered class an entity was created as, so `ClassName` and `:IsA` are a column read rather than a lookup in a side index. | | `ecs.InstanceName` | 4 | 4 | yes | . | . | . | An instance's name, interned, so a thousand parts called "Part" cost one string and comparing two names is an integer compare. Names are not unique. | +| `ecs.InstanceProjection` | 16 | 8 | yes | . | yes | . | Viewer-local source identity for a projected instance, used to remap reads between a canonical row and its local copy; restored metadata is inactive until rebuilt. | | `ecs.NotArchivable` | 0 | 1 | . | . | . | . | A tag meaning this instance is left out of a save. `Archivable` is `!Has`, which is the same fact read the cheap way round. | | `ecs.WorldTime` | 32 | 8 | yes | yes | . | . | Per-world singleton clock: simulated seconds elapsed, the fixed tick delta, completed ticks, and the frame's wall delta and interpolation alpha. | @@ -104,6 +106,7 @@ state until v0.19. | `gui.PageLayout` | 32 | 8 | yes | yes | . | . | `UIPageLayout`: shows one of the parent's children at a time and slides the rest aside, with a tween time, easing curve and circular wrap. | | `gui.PageMotion` | 32 | 8 | yes | . | . | . | Engine state for a sliding `UIPageLayout`: which pages it is between, when the slide began, and how far along the eased curve it is. | | `gui.Picture` | 92 | 4 | yes | . | yes | . | The image an `ImageLabel` or `ImageButton` shows: the asset name, tint, scale mode, slice and tile settings, and the hover and pressed swaps. | +| `gui.PlayerGuiTemplateOrigin` | 4 | 4 | yes | . | . | . | Stable path from a StarterGui template, used to reconnect a retained local collector when the server replaces its source rows. | | `gui.PresentationState` | 656 | 8 | yes | . | yes | . | The local, derived override sample of an `AnimationPlayback`, rebuilt from the caller's explicit UI timeline and never saved or replicated. | | `gui.Resolved` | 60 | 4 | yes | . | . | . | Where the layout pass actually put a 2D element: absolute position, size and rotation, the clip rectangle, the drawn text size and the paint order. | | `gui.ResolvedStyle` | 792 | 8 | yes | . | yes | . | Viewer-local result of resolving theme tokens, class rules, interaction state and direct properties. | @@ -141,12 +144,15 @@ state until v0.19. | `physics.PhysicsClock` | 56 | 8 | yes | . | yes | . | Per-world singleton physics clock: the step rate, simulated time owed but not yet spent, the running step's length, and which step of the tick it is. | | `physics.PhysicsWorld` | 10632 | 8 | yes | . | . | . | Per-world singleton holding the broadphase grids, collider proxies, contact manifolds and solver arrays that one physics step builds and walks. | | `physics.PoppercamState` | 8 | 8 | yes | yes | . | . | Per-world singleton holding the blocker the camera pass last faded, so the next call clears exactly that one and nothing else. | -| `physics.Storm` | 116 | 4 | yes | . | yes | . | Per-world authored analytical tornado field and its fixed-tick trajectory, sampled by the physics force pass when enabled. | -| `physics.StormLink` | 20 | 4 | yes | yes | . | . | Per-joint wind failure rating, material strength and accumulated fatigue, read before rigid-joint connectivity is rebuilt. | -| `physics.StormResponse` | 16 | 4 | yes | yes | . | . | Per-rigid-body aerodynamic area, drag and force settings that the storm pass uses to apply wind loads. | -| `physics.StormVegetation` | 52 | 4 | yes | yes | . | . | Per-static-part rest pose and wind-bend settings used to flex authored vegetation in the storm field. | | `physics.observation-log` | 17688 | 8 | yes | . | yes | . | Per-world bounded log of completed physics-step summaries at the post-integration, pre-solve, and completed-solver boundaries. | +## `playergui` + +| component | size | align | save | raw | pad | wire | what it is for | +|---|---|---|---|---|---|---|---| +| `playergui.Projection` | 40 | 8 | yes | . | . | . | Per-player runtime state mapping canonical GUI collectors to local copies and tracking character changes and locally destroyed copies until respawn. | +| `playergui.Source` | 16 | 8 | yes | . | yes | . | Marks an authoritative GUI source and links it to its viewer-local copy; the mapping is cleared when snapshot data is restored. | + ## `replication` | component | size | align | save | raw | pad | wire | what it is for | @@ -167,15 +173,16 @@ state until v0.19. | `scene.AtmosphereProcedural` | 24 | 4 | yes | . | . | . | Extra scattering controls on an `AtmosphereProcedural` instance: planet and atmosphere scale, Rayleigh and Mie strength, and bounded integration quality for the resident environment compute pass. | | `scene.Attachment` | 56 | 4 | yes | yes | . | . | A named point on a part: the authored local `Frame` plus the `WorldFrame` every host recomposes each tick. The cache puts an emitter and a lamp where their part is, and its reported write is what signals a change. | | `scene.AudioState` | 16 | 8 | yes | yes | . | . | Resource: the world's one ear and master gain - listener mode, listener instance and volume, set through `SoundService` and consumed by the client mixer. | -| `scene.AuthoredAffordance` | 8 | 4 | yes | . | . | . | Explicit bounded gameplay semantics on a BasePart, read by data-scene affordance queries without inferring meaning from geometry. | +| `scene.AuthoredAffordance` | 8 | 4 | yes | . | . | . | Opt-in bounded gameplay semantics on a BasePart, read by data-scene affordance queries without inferring meaning from geometry; ordinary parts do not allocate the row. | | `scene.AwakeWorld` | 4 | 4 | yes | yes | . | . | Held by an entity that wants the world to keep ticking, with a required `Reason` naming why. `world::DecideLifecycle` walks these rows. | +| `scene.BloomEffect` | 16 | 4 | yes | yes | . | . | On a child of `Lighting`: whether bloom contributes and its intensity, brightness threshold and spread radius. | | `scene.BodyIdentity` | 24 | 8 | yes | . | . | . | Globally unique persistent body key and lifetime generation, preserved by rename and reparent and refused when a live key collides. | | `scene.BodyIdentityAuthority` | 16 | 8 | yes | yes | . | . | Per-world authority holding the stable namespace and next sequence used to mint persistent body identities. | | `scene.Bone` | 116 | 4 | yes | yes | . | . | One joint of a rig on a `Bone` instance: its rest frame, the animated offset on top of it, its inverse bind frame, its resolved world frame, and its palette slot and parent slot. | | `scene.BoolValue` | 4 | 1 | yes | yes | . | . | The boolean stored by a `BoolValue` instance. | | `scene.Bounds` | 12 | 4 | yes | yes | . | . | Half the extent of a part on each local axis. Render culling reads it every frame, the broad phase every tick, and the `Size` property writes it. | | `scene.CFrameValue` | 28 | 4 | yes | yes | . | . | The coordinate frame stored by a `CFrameValue` instance. | -| `scene.Camera` | 36 | 4 | yes | yes | . | . | The lens: vertical field of view, near plane and far plane. It deliberately holds no aspect ratio, because that is a fact about a window and not about the world. | +| `scene.Camera` | 36 | 4 | yes | yes | . | . | The lens: vertical field of view, near plane and far plane. It deliberately holds no aspect ratio, because that is a fact about a window and not about the world; plain Camera instances are local to their viewer. | | `scene.CameraBodyPose` | 88 | 8 | yes | . | . | . | Local last-presented body rows, joint palette and root pose retained while a replica's source rows retire. | | `scene.CameraCharacterHold` | 88 | 8 | yes | yes | . | . | Local character and Humanoid camera hold while the source rig retires and the successor rig is pending. | | `scene.CameraController` | 144 | 8 | yes | yes | . | . | Resource: how this viewer's own eye is driven - orbit angles and distance, zoom and sensitivity limits, camera mode, the poppercam distance override, and the resolved subject's observed portal transit. | @@ -191,12 +198,16 @@ state until v0.19. | `scene.Color3Value` | 12 | 4 | yes | yes | . | . | The colour stored by a `Color3Value` instance. | | `scene.Constraint` | 120 | 8 | yes | yes | . | . | A generic six-degree-of-freedom joint between two attachments: a motion mode and a limit per axis, plus the drive target, stiffness, damping and force caps. Each Roblox constraint class is a prototype of this one row. | | `scene.ControllerState` | 512 | 4 | yes | yes | . | . | Resource: this host's mapped gamepad and raw joystick state for up to eight local devices, including connection changes and sticky button edges consumed by gameplay and scripts. | -| `scene.EditableImage` | 56 | 8 | yes | . | . | . | Script-drawable RGBA8 pixels with dimensions, presentation packing policy and a revision the client watches for upload changes. | +| `scene.DepthOfFieldEffect` | 20 | 4 | yes | yes | . | . | On a child of `Lighting`: whether depth of field contributes and its blur intensity, focus distance, focus range and radius. | +| `scene.EditableImage` | 64 | 8 | yes | . | . | . | Script-drawable RGBA8 pixels with dimensions, presentation packing policy and a revision the client watches for upload changes. | | `scene.EditableMesh` | 176 | 8 | yes | . | . | . | Script-built geometry with presentation packing policy and a revision the client watches for upload changes; authored arrays remain canonical for editing and collision. | | `scene.EditableMeshCollision` | 24 | 8 | yes | . | . | . | Resource: which revision of each `EditableMesh` already has a collision shape baked for it, so a mesh a script is still editing is baked once per change and not once per tick. | -| `scene.GpuParticleField` | 72 | 4 | yes | . | . | . | Authored request for a deterministic analytical storm particle field, including enabled layers, normalized count, reset seed, and per-layer colour, opacity and size. | +| `scene.FogEffect` | 24 | 4 | yes | yes | . | . | On a child of `Lighting`: whether distance fog contributes, its colour and the start and end distances of its linear fade. | +| `scene.GodRaysEffect` | 16 | 4 | yes | yes | . | . | On a child of `Lighting`: whether sun shafts contribute and their intensity, brightness threshold and spread radius. | +| `scene.GpuParticleField` | 152 | 8 | yes | . | . | . | Authored configuration for a generic device-local particle field, including spawn samples, bounds, velocity response, visual layers and styles; live particle positions stay on the GPU. | | `scene.Gravity` | 12 | 4 | yes | yes | . | . | Per-world gravity acceleration applied to dynamic simulated bodies before physics integrates them; omitting the resource disables gravity, while `PrepareGravity` supplies Earth's default. | | `scene.Humanoid` | 48 | 8 | yes | yes | . | . | The character controller's state: move direction, walk and jump speed, capsule size, health, and the grounded, jump-requested and enabled latches the movement pass reads every tick. | +| `scene.ImageGraph` | 48 | 8 | yes | . | . | . | On an `ImageGraph` instance: the signed graph asset, world-unique key, selected output, typed input overrides and local revision the client watches to resolve ordinary image outputs. | | `scene.InputState` | 56 | 8 | yes | yes | . | . | Resource: this host's keyboard, mouse and focus state for the current frame, with last-frame copies and sticky press edges. It is a machine's own input, never another's. | | `scene.IntValue` | 8 | 8 | yes | yes | . | . | The signed 64-bit integer stored by an `IntValue` instance. | | `scene.JointInstance` | 80 | 8 | yes | yes | . | . | The two parts, local C0 and C1 frames, and enabled state shared by legacy rigid joints such as Weld. | @@ -204,7 +215,7 @@ state until v0.19. | `scene.LODCustom` | 36 | 4 | yes | . | . | . | Per-level authored mesh overrides and an optional final billboard texture. Nil fields inherit the matching `scene.LODAuto` field and valid fields take precedence. | | `scene.LODSettings` | 12 | 4 | yes | . | . | . | Per-item LOD distance floors. An all-zero row inherits the active view's default mesh LOD distances. | | `scene.Light` | 28 | 4 | yes | yes | . | . | A point, spot or surface light: colour, brightness, range, cone angle, face and enabled flag. The client walks these rows and fills its lighting uniforms. | -| `scene.LightingService` | 104 | 4 | yes | yes | . | . | On the single `Lighting` service instance: ambient and outdoor ambient colour, fog colour and range, sun brightness, time of day and geographic latitude. | +| `scene.LightingService` | 44 | 4 | yes | yes | . | . | On the single `Lighting` service instance: ambient and outdoor ambient colour, sun brightness, time of day, geographic latitude and the default render feature policy. | | `scene.LocalPlayer` | 8 | 8 | yes | yes | . | . | Resource: the `Player` this host is looking through, or null on a server. It backs the `Players.LocalPlayer` property. | | `scene.LocalTransparency` | 4 | 4 | yes | . | . | . | A per-viewer override of `Visual::Transparency`, written only through `SetLocalTransparency`, that fades a part standing between the camera and what it is watching. | | `scene.MaterialCatalogue` | 80 | 8 | yes | . | . | . | Resource: the derived table of texture sets per material name, filled by the content pump and read by `ResolveMaterials`. It is not authored and not saved. | @@ -233,7 +244,7 @@ state until v0.19. | `scene.PostProcessing` | 4 | 4 | yes | . | . | . | Resource: the fragment shader that replaces the engine's own tonemap for this world. An invalid name leaves the default pass in place. | | `scene.PreviousTransform` | 28 | 4 | yes | yes | . | . | Where `Transform::Frame` stood when the current tick began. The presentation pass blends between the two so drawing stays smooth between ticks. | | `scene.PublishedCatalogue` | 24 | 8 | yes | . | . | . | Resource: the published mesh names in manifest order, as the content pump saw them. It backs `ContentService:GetPublishedMeshes`. | -| `scene.RenderEffects` | 88 | 4 | yes | . | . | . | A bounded list of compute and post-processing graph nodes attached to one visual, with selection masks, ordering, revisions, stages, and enabled state. | +| `scene.RenderEffects` | 88 | 4 | yes | . | . | . | A bounded list of compute and post-processing graph nodes attached to one visual, with selection masks, ordering, revisions, stages, and enabled state; Studio offers compatible enabled visual nodes from the active profile plus `None` to clear a slot. | | `scene.Rendered` | 4 | 1 | yes | yes | . | . | Marks exactly the entities a draw list should contain, added and removed only by `SyncRendered`; the `Mark` byte is that walk's own scratch and is zero between passes. | | `scene.RenderedSignature` | 16 | 8 | yes | . | . | . | Resource: a rolling hash of the instance tree `SyncRendered` last ran against, so the walk can early-out on a frame where nothing structural moved. | | `scene.RigKeypoint` | 36 | 4 | yes | . | . | . | One authored named semantic point under a skeleton: its joint slot and joint-local frame. The data-rig export derives its current world frame from the named joint pose. | @@ -250,25 +261,32 @@ state until v0.19. | `scene.Sun` | 24 | 4 | yes | yes | . | . | Per-world singleton directional light: the direction it shines and the ambient standing in for sky on the faces it misses. | | `scene.Surface` | 4 | 4 | yes | . | . | . | The physical material name a part feels like, resolved against the world's `SurfaceTable` once per contact. Separate, on purpose, from what the part looks like. | | `scene.SurfaceAppearance` | 96 | 4 | yes | . | yes | . | The seven texture maps, shader name, alpha mode and cutoff a drawable is rendered with. `ResolveMaterials` writes it and the PBR paths read it. | -| `scene.SurfaceBounces` | 4 | 4 | yes | yes | . | . | Resource: how deep a mirror may show another mirror, or zero to let the engine decide. Set through the `workspace.SurfaceBounces` property. | -| `scene.SurfaceCamera` | 20 | 4 | yes | yes | . | . | On a mirror or portal pane: render-texture size, redraw cap, tag filter, post-grade, which face it projects off and which surface slot it writes. | +| `scene.SurfaceBounces` | 4 | 4 | yes | . | . | . | Resource: how deep a mirror may show another mirror, or zero to let the engine decide. Set through the `workspace.SurfaceBounces` property. | +| `scene.SurfaceCamera` | 20 | 4 | yes | yes | . | . | Authored camera subtype for a mirror or portal pane: render-texture size, redraw cap, tag filter, post-grade, projection face and surface slot; unlike a plain Camera, it is not a viewer-local runtime class. | | `scene.SurfaceLens` | 84 | 4 | yes | yes | . | . | The off-axis frustum, oblique clip plane and pane mapping `AimSurfaceCameras` fits to a mirror or portal every frame. Derived from where the local eye stands, never authored. | -| `scene.SurfaceLimit` | 4 | 4 | yes | yes | . | . | Resource: how many surface panes may be drawn at once, from zero upward. Set through the `workspace.MaxSurfaces` property. | +| `scene.SurfaceLimit` | 4 | 4 | yes | . | . | . | Resource: how many surface panes may be drawn at once, from zero upward. Set through the `workspace.MaxSurfaces` property. | | `scene.SurfaceTable` | 24 | 8 | yes | . | . | . | Resource: the world's material table, mapping a `Surface::Material` name to the friction and restitution the narrow phase combines with. | | `scene.TagTable` | 24 | 8 | yes | . | . | . | Resource: the registered tag names, at most thirty-two, whose index is the bit `Tags::Mask` sets. A mask means nothing without the table beside it. | | `scene.Tags` | 4 | 4 | yes | yes | . | . | One bit per registered tag, named by the world's `TagTable`. Read by tag-filtered surface cameras and by every `CollectionService:GetTagged` call. | | `scene.Team` | 12 | 4 | yes | yes | . | . | On a `Team` instance: the side's colour, which is the thing spawn pads are matched against. Deliberately nothing else. | -| `scene.Terrain` | 32 | 8 | yes | . | . | . | Resource: how a world's ground is generated - the node graph, the seed, chunk extent and resolution, vertical extent and how far chunks are kept. The recipe is stored and the ground it makes never is. | +| `scene.Terrain` | 32 | 8 | yes | . | . | . | Component: the authored recipe on the generated Terrain instance under Workspace. It stores the graph, seed, chunk extent and resolution, vertical extent and view distance, while generated ground remains derived. | | `scene.TextContent` | 32 | 8 | yes | . | . | . | The text a `StringValue` or `LocalizationTable` holds, verbatim and not interned. Written through the `Value` property and by Rojo `.txt`/`.csv` sync. | | `scene.TextureCatalogue` | 64 | 8 | yes | . | . | . | Resource: the flipbook facts - grid, frame count and rate - the content pump learned about each loaded texture. | | `scene.Tool` | 28 | 4 | yes | yes | . | . | On a `Tool` instance: where its handle sits relative to the grip point. `EquipTool` and the grip pose read it, and it decides where a held handle is drawn. | | `scene.Transform` | 28 | 4 | yes | yes | . | 10 | Where a thing is: a world-space CFrame, never relative to a parent. The component almost every system reads. | -| `scene.Transient` | 0 | 1 | . | . | . | . | Marks an instance made by whoever is looking rather than by the world's author, so the game-file writer leaves it out of a saved `.agame`. | +| `scene.Transient` | 0 | 1 | . | . | . | . | Marks a viewer-owned subtree omitted from authored game saves, so local viewport state cannot become shared world content. | | `scene.Vector3Value` | 12 | 4 | yes | yes | . | . | The vector stored by a `Vector3Value` instance. | | `scene.VectorField2D` | 32 | 4 | yes | yes | . | . | A planar vector field over its local XZ plane: constant, radial and tangential flow, optionally bounded and faded, that descendants select as their nearest field ancestor. | | `scene.VectorField3D` | 52 | 4 | yes | yes | . | . | A three-dimensional vector field: constant, radial and axis-directed tangential flow, optionally bounded and faded, that descendants select as their nearest field ancestor. | | `scene.Visual` | 40 | 4 | yes | . | . | . | What a drawable looks like: mesh, tint, transparency, visibility, shadow casting, editor lock, and which mirror surface it shows. The draw-list walk reads it every frame. | | `scene.Volume` | 60 | 4 | yes | yes | . | . | A placed participating medium: coloured, bounded density with extinction, falloff, noise and ray-march controls. `ResolveVolumes` copies enabled instances into a bounded value snapshot for the renderer. | +| `scene.WeatherAcceptedDefinition` | 256 | 8 | yes | . | . | . | Canonical accepted weather controls for unfinished ticks; pending desired edits remain on the authored provider. | +| `scene.WeatherClock` | 136 | 8 | yes | . | yes | . | Accepted per-provider weather epoch, integer tick, phase and cumulative wind anchor, independent of local world elapsed time. | +| `scene.WeatherClockEstimate` | 200 | 8 | yes | . | yes | . | Local-only receipt and RTT estimate for weather display time; saved state resets it and canonical weather clocks remain authoritative. | +| `scene.WeatherClockInbox` | 5128 | 8 | yes | . | yes | . | Bounded local final-anchor inbox retained until replicated weather providers arrive. | +| `scene.WeatherClockPublication` | 32 | 8 | yes | . | yes | . | Local reliable weather-clock publication generation and heartbeat schedule; pending state covers periodic updates and pause/resume anchors. | +| `scene.WeatherCompute` | 224 | 4 | yes | . | yes | . | Authored world-unit weather controls on a WeatherCompute cloud provider: versioned seed, thermodynamics, wind, progression, sparse quality and optional consumer responses. | +| `scene.WeatherWorldPause` | 1 | 1 | yes | . | . | . | Local world suspension control shared by weather-clock updates. | | `scene.WeldConstraint` | 24 | 8 | yes | yes | . | . | A direct rigid link between two parts whose initial relative frame is captured by the physics world. | | `scene.WorldBounds` | 4 | 4 | yes | yes | . | . | Resource: how far the world reaches from the origin on each axis. Camera framing, the bounce loop and wire quantisation all read it. | @@ -292,6 +310,20 @@ state until v0.19. | `script.TeleportRequestHandler` | 8 | 8 | yes | . | . | . | Per-world singleton holding the `TeleportService.TeleportRequested` callback that decides whether the server processes a requested teleport. Transient, because a restored world must not revive a host callback. | | `script.TeleportRequestOutbox` | 56 | 8 | yes | . | . | . | Per-world singleton FIFO of local teleport requests waiting for the client to send, with the next monotonic request id. Transient, because an old request must not send after a world is restored. | +## `weather` + +| component | size | align | save | raw | pad | wire | what it is for | +|---|---|---|---|---|---|---|---| +| `weather.EpochHistory` | 24 | 8 | yes | . | . | . | Saved authoritative named-stream epoch high-water marks that prevent event identity reuse after provider deletion, recreation or renaming; excluded from replication. | +| `weather.Events` | 32 | 8 | yes | . | . | . | Bounded copied authoritative lightning and hail journal with stable event identity, endpoints and delayed-thunder inputs. | +| `weather.GroundQuery` | 56 | 8 | yes | . | . | . | Local host callback for authoritative storm impacts against accepted terrain and collider geometry; reset on load and excluded from replication. | +| `weather.Listener` | 64 | 8 | yes | . | . | . | Local-only thunder listener cursor and bounded due events derived from accepted lightning observations. | +| `weather.RuntimeCache` | 88 | 8 | yes | . | . | . | Disposable prepared weather arithmetic and changed-input epochs; definitions and timelines remain on their ECS rows. | +| `weather.RuntimeState` | 40 | 8 | yes | . | yes | . | Persistent authoritative storm charge, hail growth and event sequence driven by canonical weather ticks. | +| `weather.StatefulCheckpoint` | 416 | 8 | yes | . | . | . | Complete versioned canonical stateful-weather checkpoint published at a bounded cadence for save, late join and replay. | +| `weather.StatefulInitializationFailure` | 24 | 8 | yes | . | yes | . | Saved authoritative initialization-refusal revision that allows corrective weather edits without publishing an invalid atmosphere or checkpoint; excluded from replication. | +| `weather.StatefulState` | 544 | 8 | yes | . | . | . | Authoritative full-precision canonical weather solver state with source budgets and forcing history; replicas reconstruct device-local state. | + ## `world` | component | size | align | save | raw | pad | wire | what it is for | @@ -304,4 +336,4 @@ state until v0.19. --- -232 components registered by the engine, 0 without a purpose line. +254 components registered by the engine, 0 without a purpose line. diff --git a/docs/IMAGEGRAPH_2D.md b/docs/IMAGEGRAPH_2D.md new file mode 100644 index 000000000..05777b5e9 --- /dev/null +++ b/docs/IMAGEGRAPH_2D.md @@ -0,0 +1,112 @@ +# Static 2D ImageGraph + +Image Composer creates static images from source images and basic 2D nodes. +A `.imagegraph` file stores the editable graph. Export produces an ordinary +`.atex` texture. Set `ParticleEmitter.Texture` or `ImageLabel.Image` to the +exported content name, such as `sprite.atex`, through the existing asset flow. +The game loads that texture without evaluating the graph. Graph outputs are +display images; using a `.imagegraph` project as a numeric material map, such as +a normal or roughness map, is refused. + +Live `.aimagegraph` use is a separate implemented path with named inputs and +runtime image outputs. Signed headless Vulkan content/render integration, +focused GPU tests, optimized profiling and real Studio checks have passed. The +signed ImageLabel, portal ownership and adopted-texture checks have passed. +Strict CI passed all 661 suites. Full dev and server CTest passed after the +required retries. +See the [live ImageGraph guide](IMAGEGRAPH_LIVE.md) for its frozen document +contract and current status. Static export remains the verified workflow +described on this page. + +## Studio + +Open **View > Image Composer**. The initial graph contains a white Solid node +bound to the `image` output. + +1. Add nodes with the palette buttons and connect their image sockets. +2. Select a node to edit its controls in the sidebar. Source paths are relative + to the project directory. Keep the project beside or above its source images. +3. Enter an **Output name** and click **Bind selected node**. Choose the named + output with **Preview output**. +4. Enter a `.imagegraph` path in the top field and click **Save**. **Open** loads + that path. **Undo** and **Redo** restore graph edits and output bindings. +5. Click **Reload** after changing source image files on disk. Preview results + and decoded sources are cached between edits. +6. Enter an **Asset** name, such as `sprite.atex`, and click **Export .atex**. + This writes into Studio's configured baked content directory and registers + the ordinary texture in its asset catalogue. **Publish assets** uses the + existing Assets publication flow for the content origin. + +Invalid edits show a diagnostic and retain the last successful preview. Export +refuses invalid edits instead of writing that older preview. Failed saves or +exports preserve the prior file. Saving into a different directory rewrites +relative source paths and refuses moves that would require escaping that directory. + +## Nodes + +Coordinates start at the top left. X increases rightward and Y downward. +Images use straight-alpha RGBA8 with encoded sRGB colour channels, using the +[standard sRGB transfer curve](https://registry.khronos.org/DataFormat/specs/1.4/dataformat.1.4.html#TRANSFER_SRGB). Sampling and +blending operate on those encoded channels. Linear `.atex` source RGB is converted +to encoded sRGB before composition; alpha stays linear. Single-channel textures +become opaque grayscale, and floating source values are clamped to the SDR range. + +| Node | Controls and result | +|---|---| +| Source | Project-relative PNG, JPEG, BMP, GIF atlas, or ordinary `.atex`. SVG rasterization and recursive graph sources are refused. | +| Solid | Positive integer Width and Height, and RGBA Colour. | +| Resize | Explicit Width and Height; `nearest` or `bilinear` sampling. | +| Crop | Integer X and Y, and explicit Width and Height. Pixels outside the source are transparent. | +| Transform | Explicit output Width and Height; Translate X/Y in pixels; nonzero Scale X/Y; clockwise Degrees; Pivot X/Y in pixels; `nearest` or `bilinear`. Scale and rotation occur around the pivot, followed by translation. Pixels outside the source are transparent. | +| Flip | Horizontal and Vertical switches; dimensions stay unchanged. | +| Blend | Background and Foreground inputs of equal dimensions; foreground Opacity from 0 to 1; normal source-over composition. Use Resize or Transform to match canvases first. | + +Named outputs reference node IDs. A single output is selected automatically; +projects with several outputs require a name when baking from the CLI. +Node IDs, kinds, source paths and output names are strings in the project. +Canvas positions affect the editor layout only. + +## CLI example + +Put `source.png` in `art/` and save this as `art/sprite.imagegraph`: + +```json +{ + "version": 1, + "nodes": [ + { + "id": "source", "kind": "image.source", "inputs": [], + "position": [0, 0], "properties": {"path": "source.png"} + }, + { + "id": "flip", "kind": "image.flip", "inputs": ["source"], + "position": [240, 0], + "properties": {"horizontal": true, "vertical": false} + } + ], + "outputs": [{"name": "sprite", "node": "flip"}] +} +``` + +After building the `assetc` target with the `dev` preset, run: + +```console +.cache/build/dev/tools/assetc --input art --output baked --imagegraph-output sprite --no-mipmaps +``` + +This bakes `baked/sprite.atex`, with the source image flipped horizontally. +The directory bake also imports `source.png` as `source.atex`. To preserve the +full authored output size, add `--max-texture 0`; the ordinary default cap is +2048 pixels on the longest axis. Omit `--no-mipmaps` to build the usual mip chain. +Publish the baked directory through the existing asset publication workflow +before referencing these names from a game using that content origin. + +Project files are limited to 1 MiB. Dimensions are limited to 4096 pixels per +axis, each RGBA image and encoded source to 64 MiB, and retained graph results to +256 MiB. Evaluation also has a 64-million pixel-work budget. Source references +must be relative, with no parent segments, and stay inside the allowed source +root after resolving symlinks. A failed bake returns a nonzero CLI exit status +and preserves the previously exported graph texture. + +The project schema accepts only the documented 2D node kinds and controls. +It does not load projects from the archived Composer implementation. diff --git a/docs/IMAGEGRAPH_2D_PLAN.md b/docs/IMAGEGRAPH_2D_PLAN.md new file mode 100644 index 000000000..0c02008e9 --- /dev/null +++ b/docs/IMAGEGRAPH_2D_PLAN.md @@ -0,0 +1,76 @@ +Minimal ImageGraph implementation specification + +Evidence and cut point +- Fixes baseline: v0.25.0-fixes. Full archive: v0.26.5-imagegraph-full. Initial native commit: 8ec3532e. +- Whole initial native module is already excessive: Document.cpp has 6,522 lines and includes AudioCapture, TimelineSchedule, recursive array/value evaluation, and Transform3D. +- Current PixelOpsBasicFilters/Blend/SpatialWarp include the enormous archived Document.hpp. Their local equations and independently expected pixel fixtures can be extracted, but whole-file imports are not a minimal dependency closure. +- Ordinary assets::Texture, TexturePixel, Resample; bake::ReadImage; Studio nodegraph::Canvas; assetc bake pipeline already exist in fixes. Keep these. + +User promise +Create a durable, editable 2D graph from images and simple 2D nodes, preview it in Studio, save/reopen it, export ordinary image assets usable through the existing ParticleEmitter.Texture and ImageLabel.Image content paths. Engine owns document validation and pixel evaluation. Bake/filesystem and Studio own adapters. No live-runtime graph, 3D, audio, simulation, timeline, foreign Composer project import, HLSL, or new renderer producer. + +Suggested node set +- image.source: stable relative content/source path, image output. +- image.solid: positive integer width/height and straight RGBA8 color. +- image.resize: explicit width/height, nearest or bilinear choice with stable names. +- image.crop: integer x/y/width/height, transparent pixels outside input. +- image.transform: explicit output canvas dimensions, translation in pixels, scale X/Y, clockwise degrees, pivot in pixels; inverse mapping at pixel centers; transparent exterior; finite controls and nonzero scales. +- image.flip: horizontal/vertical booleans, preserving dimensions. +- image.blend: background/foreground, opacity, normal straight-alpha source-over composition; differing input dimensions either rejected clearly or handled by explicit transform onto a matching canvas. Prefer reject shape mismatch so placement stays explicit. +- Named output references one node's image port. One output default; an explicit selected output for multiple. + +Graph contract +Own a small Image RGBA8 struct plus Source/Solid/Resize/Crop/Transform/Flip/Blend data. Kind and node identifiers are durable strings in serialized project. Plan stores only derived dense indices. Validate duplicate/missing names, input counts, dangling links, unsupported kinds/options, cycles, dimensions, color/control ranges, finite numbers, and byte/pixel-work limits before allocating. Evaluate only the selected dependency cone in stable order, once per shared node, with caller-supplied source resolver and no filesystem or renderer access. Retain image results only for the bounded call. Malformed Read/Compile/Evaluate preserve destination values and return a node-specific diagnostic. + +Serialization +Private nlohmann/json is a viable small durable parser, never in public headers. A small versioned JSON schema is simpler than extracting the archived handwritten text/parser/value codecs. Bound input bytes and JSON nesting before parse, then build checked native structs. Do not imply archived project compatibility. Save Studio node positions plus graph and named outputs in project; positions never affect evaluation. Serialize all named node kinds/options and values by stable text. Atomic checked temporary-file publication belongs in host; failing save preserves old project. + +Adapter/edit paths +- New mono.engine/imagegraph/CMakeLists.txt, include/engine/imagegraph/Document.hpp, src/Document.cpp, src/Evaluate.cpp, private src/Pixels.hpp, tests/Document.cpp, tests/Evaluate.cpp. Existing AGENTS scope says core-only CPU bounded document/evaluator, no files/decoders/UI. Register L9 shared module in mono.engine/CMakeLists.txt and mono.tools/architecture/expected_graph.json, with proper consumer closures. +- New mono.engine/bake/include/engine/bake/ImageGraph.hpp and src/ImageGraph.cpp provide source-decoder/TextureData bridge with a host resolver callback. tests/ImageGraph.cpp verify ordinary .atex output and decode semantics. Engine imagegraph never depends up on bake or Studio. +- mono.tools/assetc/CMakeLists.txt and src/Bake.cpp: use small .imagegraph project extension, output .atex; settings/output selector and CLI only as needed. Existing .graph support was removed with the oversized work, so deliberate distinct extension avoids silently promising archive compatibility. Source resolver accepts sources under the input root, no graph recursion. New tests/ImageGraph.cpp plus CLI tests demonstrate rebake and failure preserving prior output. +- New mono.studio/include/studio/ImageComposer.hpp and src/ImageComposer.cpp with a small owned state, plus an engine graph to existing nodegraph canvas adapter. Add Editor forward-declared owned state, DrawImageComposer/ShowImageComposer, initialization/shutdown, menu/window routing in Editor.cpp/Interface.cpp. Register only the above node types through the existing nodegraph registry; no duplicate graph UI library, old SourceDynamicGroups, source ports, or timeline. +- Studio export writes an ordinary .atex or PNG into existing authored raw/baked content flow, then returns the content name. Exporting a preview alone does not publish content. Use Renderer.AddTexture for editor preview only, with a studio-specific name and cleanup. Product content export must have the ordinary asset name discoverable in Studio's configured content origin. + +Meaningful validation seams +- Known 2x2 asymmetric colors test source, crop, resize, both flips, translation, rotation and negative scale. Assert literal pixels, not the implementation formula mirrored in tests. +- Blend transparent colored pixels and two half-alpha layers, testing exact expected source-over RGB/alpha. Identity transform and resized/pivot behavior. +- Shared DAG, disconnected unsupported node policy, reachable cycles, missing source, source dimension/pixel inconsistency, over-budget graph, malformed/truncated/deep JSON, save/read/layout roundtrip preserving image result, failure preserving previous result. +- Adapter end-to-end: PNG source -> transform -> blend -> ordinary Texture::Write/Read; assetc repeat bake after source/graph edit; unsafe source path refusal; failed rebake leaves old output intact. +- Studio headless ImGui frame harness: create/link nodes, inspector edit, undo/redo, save/open, preview/output selection, export resulting content name. Existing Studio AGENTS explicitly favors real ImGui context tests over extracting helpers merely to avoid testing UI. +- Consumer check: generated asset read through ordinary content loading into both ParticleEmitter and ImageLabel. Existing engine/client consumer path should need no graph-specific ECS property or renderer code. +- Headless dev build, selected suites, architecture and source checks; server-safe dependency checks. Small release evaluation benchmark added to Justfile prints timings without files. Headless Vulkan texture and particle verification was explicitly approved by the user. No interactive Studio session was run. + + +Execution checklist +- [x] classify: minimal static 2D images and Studio composition, confirmed by user. +- [x] discover-core: archived graph is too broad; ordinary .atex consumers already exist. +- [x] specify: bounded CPU graph, versioned project and ordinary export contracts above. +- [x] localize: finalize public API and adapter entry points before dependent edits. +- [x] prototype: use literal pixel fixtures for sampling uncertainty; skip throwaway duplicate code. +- [x] stubs: agree the engine public header across Studio and bake adapters. +- [x] implement: engine first, adapters and Studio next, root owns build wiring. +- [x] validate: pixel/document tests, export/consumer tests, real ImGui context tests, headless Vulkan texture checks. +- [x] optimize: measure a small release evaluation benchmark; no unsupported performance claims. +- [x] review: independent read, generated contracts, clean committed branch and evidence. + +Function logic statements +- Read: bound encoded size and nesting, parse stable named kinds into temporary authored data, validate it, then replace the destination only on success. +- Write: validate authored data, encode version and stable names plus canvas placement, and report unsupported or invalid data rather than silently discarding it. +- Compile: validate identity, ports, parameters, limits and cycles, then produce a stable derived dependency order; preserve the previous plan on refusal. +- Evaluate: check the selected output, resolve bounded decoded sources, visit its dependency cone once per node, perform bounded 2D pixel operations, then replace the output only after success. +- BakeImageGraph: compile and evaluate with the supplied source resolver, then move the accepted RGBA8 pixels into ordinary TextureData. Assetc binds confined project-relative file reads and atomic publication at its host boundary. +- Composer adapter: map the existing nodegraph canvas to the strict engine document and back with stable identities and placements; reject unknown types or invalid links before accepting a load. +- Composer refresh: compare semantic graph and source revisions, evaluate only after a change, preserve the previous good preview on failure and upload a successful preview once. +- Composer export: validate the selected output and asset leaf name, serialize ordinary .atex bytes, atomically publish them in configured baked content and register the accepted asset through the existing Editor path. + +Verification evidence +- Complete dev and server-only builds pass; optimized unity assetc build passes. +- Engine: 13 cases / 419 assertions; the same suite passes ASan, UBSan and leak detection. +- Complete Studio: 662 cases / 13,020 assertions; bake: 128 / 15,425; assetc: 40 / 319; nodegraph: 23 / 204. +- Headless Vulkan texture and particle checks: 10 cases / 364 assertions; actual Composer export, publication and consumer rendering: 1 / 23. +- Five actual MCP contract suites: 22 cases / 2,135 assertions. Only the engine/imagegraph resource was added. +- Architecture: 49 modules / 6 programs / 35 layered modules plus six fixtures; independent server graph: 38 / 1 / 29. Shader contracts: 76 modules. +- CPU evaluation benchmark ran with five samples on the optimized bench preset, including normal allocation and profiling costs. Timings stayed on the terminal. +- Independent reads caught and fixed linear source color conversion, PNG inflation bounds and durable copied-node identity. Final checks also cover bounded GIF atlases. +- Whole repository tests were not repeated after the minimal integration. The fixes baseline completed 647 suites, with its four failures subsequently repaired and verified. No interactive Studio session or full archive revalidation was performed. diff --git a/docs/IMAGEGRAPH_LIVE.md b/docs/IMAGEGRAPH_LIVE.md new file mode 100644 index 000000000..fbb0b8e07 --- /dev/null +++ b/docs/IMAGEGRAPH_LIVE.md @@ -0,0 +1,117 @@ +# live ImageGraph + +The v2 parser, per-world graph owner, Luau API, render cache and Studio paths are implemented. Signed headless Vulkan consumer integration, focused GPU tests, an optimized benchmark and real Studio checks have passed. Targeted ImageLabel color, portal ownership and adopted-texture checks also pass. Historical strict CI on `7d6c3c0e` passed 661 suites; current strict CI passed 664 suites with none skipped or failed. Current architecture covers 50 modules, 6 programs and 36 layered modules. Full dev and server CTest passed on the earlier implementation snapshot. See [IMAGEGRAPH_LIVE_PLAN.md](IMAGEGRAPH_LIVE_PLAN.md) for evidence and remaining gates. The static workflow is in [IMAGEGRAPH_2D.md](IMAGEGRAPH_2D.md). + +Live graphs keep a small job: seven 2D image nodes, named inputs, and ordinary image outputs. They do not add 3D, audio or broad simulation features. + +## author a live graph + +Version 1 remains the static format. Its unextended writes stay v1. Version 2 adds named parameters, node-property bindings, source interpretation and output space. The writer uses v2 when those live fields are present. + +The exact v2 document shape is: + +```json +{ + "version": 2, + "nodes": [ + { + "id": "tile", + "kind": "image.solid", + "inputs": [], + "position": [0, 0], + "properties": {"width": 64, "height": 64, "colour": [255, 128, 32, 255]} + }, + { + "id": "spin", + "kind": "image.transform", + "inputs": ["tile"], + "position": [220, 0], + "properties": { + "width": 64, "height": 64, + "translate_x": 0, "translate_y": 0, + "scale_x": 1, "scale_y": 1, "degrees": 0, + "pivot_x": 32, "pivot_y": 32, "filter": "nearest" + } + } + ], + "outputs": [{"name": "image", "node": "spin", "space": "srgb"}], + "parameters": [{"name": "angle", "type": "number", "default": 0}], + "bindings": [{"node": "spin", "property": "degrees", "input": "angle"}] +} +``` + +Every node has exactly `id`, `kind`, `inputs`, `position` and `properties`. Every output has `name`, `node` and `space`. Every parameter has `name`, `type` and `default`. Every binding has `node`, `property` and `input`. Version 2 requires all five root keys: `version`, `nodes`, `outputs`, `parameters` and `bindings`. Unknown or missing fields fail. Version 1 keeps its original root, node and output fields. + +The seven node kinds are `image.source`, `image.solid`, `image.resize`, `image.crop`, `image.transform`, `image.flip` and `image.blend`. Their controls match the static graph guide. Bindable properties are: + +- `source`: `path` +- `solid`: `width`, `height`, `colour` +- `resize`: `width`, `height`, `filter` +- `crop`: `x`, `y`, `width`, `height` +- `transform`: `width`, `height`, `translate_x`, `translate_y`, `scale_x`, `scale_y`, `degrees`, `pivot_x`, `pivot_y`, `filter` +- `flip`: `horizontal`, `vertical` +- `blend`: `opacity` + +Source `interpretation` and output `space` are structural fields and cannot be bound. A colour binding replaces the whole RGBA8 value; there is no `colour.a` binding. + +Parameter types are `number`, `boolean`, `colour` and `string`. A colour default is four integer channels from 0 to 255. Parameter names, binding input names and instance keys use portable tokens: 1 to 128 ASCII characters from letters, digits, `_`, `-` and `.`, except `.` and `..` alone. Static node and output names keep their wider v1 rules; live output references and live cooking require portable output tokens, with a diagnostic for a name that does not fit. + +Source interpretation is `colour` or `data`. Colour sources normalize to encoded sRGB bytes. Data sources preserve raw channel bytes. Graph math operates on stored byte channels and quantizes each intermediate. Output `space` is `srgb` or `linear`; it declares the intended meaning of the bytes and does not convert them. Alpha remains a byte channel. Choose `data` and `linear` for numeric material maps. + +## cook and publish + +Use a project-relative source such as `effects/fire.imagegraph`. Runtime graph asset names end in `.aimagegraph` and use portable relative paths: no spaces, control bytes, non-ASCII, `%`, `?`, `#`, backslashes, colons or `.` / `..` path segments. Cook the graph and its exact normalized `.atex` source closure: + +```console +.cache/build/dev/tools/assetc --live-imagegraphs --input art --output baked --only effects/fire.imagegraph +``` + +`--live-imagegraphs` keeps the graph live as `.aimagegraph`; `--only SOURCE` selects one source and its live graph texture closure. `--input` and `--output` are required. Publish the cooked graph and source textures through the existing signed content flow. The ordinary static bake remains the path when a single `.atex` image is wanted. + +Live graph sources resolve to exact `.atex` assets after cooking. The graph asset is opaque signed content. The runtime admits verified graph content before parsing it. Graphs cannot recursively use another graph as a source. + +## use a graph in a world + +Create a world-owned `ImageGraph` instance with a unique stable key. Set `Graph` to the cooked asset name, then parent the instance into the world: + +```lua +local graph = Instance.new("ImageGraph") +graph.Name = "FireImage" +graph.InstanceKey = "fire" +graph.Graph = "effects/fire.aimagegraph" +graph.Output = "image" +graph.Parent = workspace + +local image = graph:GetImage("image") +``` + +Assign `image` to an ordinary image slot. The stable reference is `imagegraph-instance://fire#image`; the world supplies the scope. A direct asset output uses `imagegraph://effects/fire.aimagegraph#image`. + +The graph instance reference can be used anywhere the engine accepts a texture +content name. Common slots include `ImageLabel.Image`, `ImageButton.Image`, +`MeshPart.TextureID`, `Texture.Texture` and `ParticleEmitter.Texture`. In Studio, +the **Image slot** list contains writable texture properties shared by the +current selection. **Publish live graph** cooks and publishes the graph and its +normalized source textures through signed content. **Apply to selection** then +creates a world-owned `ImageGraph` and assigns its selected output reference to +that property on each selected instance. The live output remains evaluated at +runtime; static export instead bakes one ordinary `.atex` texture. + +`SetInput` changes an authored parameter override. `GetInput` returns that explicit override, or `nil` when the graph default is in use. Passing `nil` to `SetInput` resets the override. Inputs accept numbers, booleans, `Color3` and strings. `Color3` becomes encoded RGBA8 with alpha 255. For example, update the transform binding from a heartbeat: + +```lua +local RunService = game:GetService("RunService") +local angle = 0 +RunService.Heartbeat:Connect(function(delta) + angle = angle + delta + graph:SetInput("angle", math.sin(angle) * 20) +end) +``` + +An unchanged value does not advance the instance revision. A real change dirties the bound node and its downstream image cone. Do not serialize an ECS entity ID as graph identity. Use the stable graph asset name and instance key. + +Set inputs in the authoritative world. For a replicated controller, use a server script; replica worlds refuse changes to graph inputs. + +## Studio status + +Studio provides parameter and binding controls, GPU preview, `PublishLive` and `Apply` into ordinary image slots. Real-editor checks passed graph sizing, v2 save/open, diagnostics, last-good behavior, missing-key refusal, two undock/resnap cycles, three consecutive Play/Stop cycles and the final native viewport drag/resnap. The restored orange output appeared in both ImageLabel and ParticleEmitter. An isolated task store allowed successful signed publish/apply checks without changing the default user store. A mismatched signing key was refused without writes. The historical 661-suite result remains on `7d6c3c0e`; current strict CI passed 664 suites. Full dev and server CTest passed on the earlier implementation snapshot. See the live plan for measured results and verification limits. diff --git a/docs/IMAGEGRAPH_LIVE_PLAN.md b/docs/IMAGEGRAPH_LIVE_PLAN.md new file mode 100644 index 000000000..035d43468 --- /dev/null +++ b/docs/IMAGEGRAPH_LIVE_PLAN.md @@ -0,0 +1,114 @@ +# live ImageGraph plan + +status: implemented on `v0.26.0-imagegraph-minimal`. The seven-node 2D layer includes document v2, named world inputs, script controls, signed content, GPU evaluation and Studio editing. Historical strict CI on `7d6c3c0e` passed 661 suites; current strict CI passed 664 suites with none skipped or failed. Current architecture covers 50 modules, 6 programs and 36 layered modules. Full dev and server CTest, focused Vulkan checks, sanitizers, profiling and real Studio checks passed on the implementation snapshots. Static ImageGraph evidence remains in `IMAGEGRAPH_2D.md` and `IMAGEGRAPH_2D_PLAN.md`. + +The first live layer stays small: seven 2D nodes, ordinary image outputs, no 3D, audio or broad simulation work. Engine code decides graph meaning. The world owns named inputs. Render owns GPU images. Studio edits and previews through those same paths. + +## document contract + +Version 2 has exactly these root fields: `version`, `nodes`, `outputs`, `parameters` and `bindings`. A node has `id`, `kind`, `inputs`, `position` and `properties`; an output has `name`, `node` and `space`. A parameter is `Parameter{Name, Type, Default}`; `Type` is `number`, `boolean`, `colour` or `string`. A colour default is four RGBA8 integers from 0 to 255. A binding is `Binding{Node, Property, Input}` and connects one named input to one supported property on one node. + +Version 1 remains accepted with its current schema and meaning. An unextended static document writes as v1. The writer uses v2 when parameters, bindings, a data source or a linear output require live fields. The reader rejects malformed versions, unknown fields, duplicate names, missing references, type mismatches and ambiguous bindings. It does not coerce values or reinterpret v1 fields. Instance inputs override parameter defaults; a binding reads the resulting named input. No matching input means the node keeps its authored property value. + +Parameter names, binding input names and instance keys use tokens of 1 to 128 ASCII characters from `A-Z`, `a-z`, `0-9`, `_`, `-` and `.`, excluding `.` and `..` alone. Static node and output names keep their wider v1 rules; live output references and live cooking require portable output tokens, with a diagnostic for a name that does not fit. Runtime graph names are relative `.aimagegraph` asset names. Reject spaces, controls, non-ASCII, `%`, `?`, `#`, backslash, colon, and `.` or `..` path segments. + +Only these 2D node kinds are live: + +- `image.source` +- `image.solid` +- `image.resize` +- `image.crop` +- `image.transform` +- `image.flip` +- `image.blend` + +Keep the static document's dimensions, bytes and pixel-work limits. `Prepare` checks the selected output's dependency cone against those bounds before GPU work. It does not evaluate pixels or touch a device. + +Source JSON has `interpretation: "colour"` or `"data"`. Colour sources normalize to encoded sRGB bytes; data sources preserve raw channel bytes. Graph math operates on stored byte channels and quantizes every intermediate. Output JSON has `space: "srgb"` or `"linear"`. Space declares the byte interpretation and does not transform values. Alpha remains a byte channel. Material numeric maps use data and linear unless their material contract says otherwise. Source interpretation and output space are structural and cannot be bound. `colour` is one RGBA8 property; no `colour.a` binding exists. + +## owners and references + +The L7 scene ECS carries only plain data in `ImageGraph`: `Graph`, `InstanceKey`, `Output`, `Inputs` and `Revision`. `Graph` names a `.aimagegraph` asset. `InstanceKey` is unique within its world and stable as text. `Inputs` holds typed named overrides. `Revision` is a local invalidation counter; never save or send it. Do not serialize ECS entity IDs. + +The world owner is keyed by world plus `InstanceKey`. A direct authored asset output uses `imagegraph://asset.aimagegraph#output`. A world instance uses `imagegraph-instance://key#output`; world scope comes from the caller. Script methods are `SetInput`, `GetInput` and `GetImage`. `GetImage` returns the stable image reference, not CPU pixels. + +`.aimagegraph` is a signed opaque asset. Host admission verifies its signature and content hash before parsing. Cooking keeps the live graph as `.aimagegraph`, resolves and hashes exact source dependencies, and writes those dependencies as ordinary `.atex`. Static export still writes the selected output as `.atex`. The CLI flags are `--live-imagegraphs`, `--input`, `--output` and `--only SOURCE`; `--only` selects one source and its live graph texture closure. No recursive graph sources. No ECS number crosses a save or world boundary as identity. + +## live GPU path + +L12 render owns `Set`, `Evaluate` and `Drop`. `Set` admits a prepared instance and its sources. `Evaluate` executes only dirty nodes in the selected cone and publishes ordinary `TextureTable` outputs. `Drop` releases one world's cached instance. Cache identity includes graph content hash, world-local instance key, output name, effective inputs, revision and dependency hashes. + +Changing an input to its existing value is a no-op. A real change marks only that bound node and its descendants dirty. An unchanged frame issues zero GPU commands, uploads and resource creations. Live evaluation never reads GPU pixels back to CPU. Reuse existing render resource accounting and normal deferred texture lifetime. + +Updates are transactional. Validate and prepare first. Admit signed sources and check bounds before allocating staged GPU resources. Queue work only after those checks succeed. Swap the ordinary output binding only after allocation and command submission are accepted. On any refusal, discard staged resources, report a useful diagnostic and keep the last-good output. Retire replaced textures through the normal device lifetime path. + +Studio exposes parameter values and bindings, previews the selected output on GPU, publishes live graphs and applies outputs to ordinary image slots. Consumers are particles, GUI, all six sky faces and materials. Material numeric slots require explicit data and linear handling. Existing consumers keep loading ordinary images; they do not gain graph-specific branches. + +## function contracts + +- `Read` bounds and parses v1 or v2 into temporary authored data, validates the schema and graph, then replaces the destination only on success. +- `Write` validates before encoding. Unextended static data stays v1; live inputs, data sources or linear outputs require v2. +- `ResolveInputs` is pure. It combines typed defaults and overrides, applies supported bindings and returns a validated resolved snapshot. +- `Prepare` is pure. It selects one output cone, checks source extents and budgets, then returns an execution plan without evaluating pixels or touching a device. +- `scene::SetImageGraphInput`, `scene::ResetImageGraphInput` and `scene::GetImageGraphInput` manage typed overrides. A changed value advances revision; reset restores the graph default. +- `Content::Admit` accepts host-verified graph bytes, validates portable references and runtime `.atex` sources, then retains the bounded document. +- `Renderer::SetImageGraph`, `Renderer::EvaluateImageGraph` and `Renderer::DropImageGraph` own resident inputs, dirty-cone GPU execution and cleanup. Refusal keeps the prior published output. +- `PublishLiveImageComposer` cooks and signs through the existing asset path; `ApplyImageComposerSelection` assigns the stable instance reference to ordinary image slots. + +## implementation sequence + +The implementation and current strict CI steps are complete. Earlier and current verification results are recorded below. + +1. Freeze v1 behavior and v2 schema with strict parser cases. +2. Add typed parameters and bindings to the authored document. +3. Implement pure `ResolveInputs` and bounded `Prepare`. +4. Add stable per-world `InstanceKey` ownership in scene ECS. +5. Add Luau input and image-reference calls without ECS IDs. +6. Add signed `.aimagegraph` admission and normalized `.atex` cooking. +7. Add L12 source admission, staged allocation and `Set`/`Evaluate`/`Drop`. +8. Add dirty-cone cache keys and last-good transactional output publication. +9. Add Studio input/binding controls, GPU preview and ordinary-slot apply. +10. Run the acceptance gates below; update evidence only from actual results. + +## verification results + +These verification results passed: + +- Signed live integration and independent output fixture: 2 cases and 76 assertions total. `LiveImageGraphContentRender` is 1 case and 61 assertions: Luau changes tint on a signed graph, then checks ImageLabel, particles, `MeshPart.TextureID`, `EmissiveMap` and all six sky faces over 150 frames. The authored sample `[255, 64, 0]` now captures green byte 64 after the `SampledSRGB` boundary change. The missing-source fixture once captured 0 cyan pixels against a threshold above 2,000; it passes after the loader fix. +- GPU renderer: 8 cases and 788 assertions, including literal R8, R16 and R32 data parity and the 1,405-byte output path. Texture GPU: 8 cases and 228 assertions. +- `InterfacePass` target/encoding and portal ownership checks: 2 cases and 1,059 assertions. Capture, adopted-UNORM and texture-owner checks: 7 cases and 230 assertions. +- Composer and dock CPU suites: 22 cases and 469 assertions, excluding asset suites. +- Real Studio Vulkan/SDL/XTest dock check passed two complete undock/resnap cycles. Initial origins were (0, 0) and (300, 100); final dock id was `00000003` (original); process exit was 0. The freed-central dock cache issue has since been fixed. +- Final native viewport drag/resnap passed: floating Hallway at 1214 by 610 snapped to the stable central guide, then resnapped to a 1214 by 871 docked viewport. The floating window disappeared and both ImageLabel and ParticleEmitter showed the orange output. Captures are under `.cache/build/dev/composer-publish-verify/`. +- Real Composer GPU check changed a named output from 64 to 32 pixels. Save/open retained the v2 binding, default input and authored sRGB output. Setting width to 0 showed a diagnostic and kept last-good preview; reopening restored the saved graph. A publish signing key that differs from the effective `Content.ToSettings.Publisher` is now refused before cooking or publication, and the previously accepted graph remains in place. +- The Studio preview mid-tone bug displayed byte 64 as 13. The preview adapter now uses temporary linear storage while authored and exported data stay sRGB; a CPU fixture covers that path. Current isolated Studio checks passed signed publish and apply. A mismatched signing key was refused without writes: six expected SHA values stayed unchanged, the candidate asset was absent and the previous Apply remained enabled. The task store ran in a sandbox and the default user store stayed untouched. +- Three consecutive real Studio Play/Stop checks passed. Restored graph trees retained the expected orange result in both ImageLabel and ParticleEmitter. +- Shared Luau and JavaScript API: 1 case and 24 assertions. Client and server property audits each passed 1 case and 1 assertion. +- Scene: 4 cases and 128 assertions. Replication: 12 cases and 84 assertions. +- Full client retry: 300 cases and 16,091 assertions passed. ImageGraph ASan and UBSan: 30 cases and 963 assertions passed with leak checking enabled. +- Server-only build passed. Architecture: 38 modules, 1 program and 29 layered modules, with no graphics stack. Server reports version `0.26.0`. +- Full CTest covered 52 dev and 41 server test executables. Physics passed in both. Initial property-contract failures were fixed; SQLite fixtures collided because both presets used the same temporary directory. Required CTest retries then passed all three affected dev executables and both affected server executables. Sequential datastore suites each passed 10 cases and 70 assertions. +- Strict `just preset=ci check` passed on `7d6c3c0e`: 661 suites run, 0 skipped and 0 failed. It also passed formatting, build profile, architecture, source rules, shader contracts, generated bindings, component documentation, both script type checks, determinism, replay, headless client interaction and orphan checks. Development architecture covers 49 modules, 6 programs and 35 layered modules. +- The 661-suite CI result above is historical for `7d6c3c0e`. Current strict CI passed 664 suites with 0 skipped and 0 failed; architecture covers 50 modules, 6 programs and 36 layered modules. Full output is in `.cache/build/image-buffer-final-ci.log`. +- Component catalogue check passed for 235 components. The earlier module page + check covered 44 pages; the current generated-page check passed for 45. +- `just preset=dev docs-check` passed with zero malformed comments and no + undocumented public entities. + +## measured GPU profile + +Five samples ran on an RTX 4090, driver 580.173.02, Vulkan, using the optimized `bench` preset at O3 with heap profiling enabled. This is not the exact shipped release build. Workload was Source -> Transform (bilinear) -> Blend at 256 and 1024 extents. Output stayed on stdout; no benchmark file was written. + +| 1024 workload | median wall time | latest GPU timestamp | dispatches | +|---|---:|---:|---:| +| cold composition | 1.150383 ms | 45.312 us | 3 | +| source edit | 1.889402 ms | 42.24 us | 3 | +| transform edit | 1.130765 ms | 29.696 us | 2 | + +At both extents, 1,000 unchanged cache hits measured 88 ns per call and recorded zero GPU commands, uploads or device allocations. The 1024 graph retained 16 MiB. A transform edit made zero device allocations. GPU timestamps above are the latest sample, not medians. Wall medians include benchmark-only 1 ms fence polling; the live path uses nonblocking GPU work and does not poll that fence. + +## verification limits + +An earlier editor snapshot skipped successful GUI publication and apply to protect the default user store. Current checks passed signed publish and apply through an isolated task store; the default store and user configuration stayed untouched. GUI export was not part of that check. Three consecutive Play/Stop checks and the final viewport drag/resnap check passed. + +Real-device checks used Linux Vulkan. Windows and macOS execution were not run. Shader contract checks include generated SPIR-V and MSL. diff --git a/docs/IMAGE_BUFFERS.md b/docs/IMAGE_BUFFERS.md new file mode 100644 index 000000000..b231183be --- /dev/null +++ b/docs/IMAGE_BUFFERS.md @@ -0,0 +1,89 @@ +# editable image buffers + +`EditableImage` owns row-major RGBA8 pixels. `ContentId` gives the image a +world-local runtime name such as `editable-image://42`. Use that name in an +ordinary image slot, including `ImageLabel.Image`, `MeshPart.TextureID`, +`Texture.Texture` and `ParticleEmitter.Texture`. + +## raw pixels + +`Resize(width, height)` clears the image and chooses its size. `FromBuffer` then +copies exactly `width * height * 4` raw RGBA8 bytes into that image. `ToBuffer` +returns an owned copy in the same row order. These existing methods keep their +larger 16,777,216-pixel storage limit. + +`ColorSpace` accepts only `"linear"` and `"srgb"`. It describes the RGB bytes; +setting it does not convert them. Alpha is straight UNORM8 in either space. +Raw buffer imports preserve the image's current size and color space. Resize +before importing so the raw byte count has an exact destination. + +## bounded import and export + +The whole-image import methods have explicit formats: + +```lua +image:FromBase64(encoded, "rgba8") +image:FromBase64(encoded, "png") +image:FromBase64(encoded, "jpeg") +image:FromEncodedBuffer(buffer, "png") +image:FromEncodedBuffer(buffer, "jpeg") +local raw = image:ToBase64() +``` + +The format argument is required. `"rgba8"` means canonical padded Base64 of +raw RGBA8 bytes. It uses the current image dimensions and `ColorSpace`, just +like `FromBuffer`. `ToBase64()` exports those raw pixels; it does not encode a +PNG or JPEG. Its text uses the standard [RFC 4648 Base64 +format](https://www.rfc-editor.org/rfc/rfc4648): padded, standard alphabet, +without whitespace or a data-URL prefix. + +`"png"` and `"jpeg"` decode a complete still image, infer its dimensions and +set `ColorSpace` to `"srgb"`. PNG alpha and transparency are retained. The +decoder accepts non-interlaced 8- or 16-bit PNG and baseline sequential 8-bit +grayscale or YCbCr JPEG. Interlaced PNG and progressive JPEG are refused. +Decoded imports replace the whole image only after parsing and size checks +succeed, so a refused import leaves the previous pixels in place. + +These new methods cap imported dimensions at 1920 by 1080, raw or encoded +bytes at 8,294,400, and Base64 text at 11,059,200 characters. `ToBase64()` +returns an empty string for an image beyond the bounded export size. The new +caps do not change `Resize`, drawing methods, `FromBuffer` or `ToBuffer`. + +A full 1080p RGBA8 image spans at least 1,013 ticks at the default replica +budget of eight 1,024-byte chunks per tick, before transport overhead. Reuse +imported images and update small graph inputs instead of decoding and sending +the complete Base64 payload every frame. + +## image graph sources + +An editable image can feed a live graph through a named string parameter bound +to the source node's `path` property. Set that parameter on the graph instance: + +```lua +graph:SetInput("texture", image.ContentId) +``` + +Without an instance override, the bound source path comes from the string +parameter's authored default in the signed graph. `SetInput` stores bounded +name/value overrides without checking them against the authored graph first. +Resolution before evaluation rejects unknown names and type mismatches. A +declared parameter may remain unbound; its override has no node effect until a +binding uses it. +The live graph guide describes the document and world ownership rules in +[IMAGEGRAPH_LIVE.md](IMAGEGRAPH_LIVE.md). + +The shared `imagecodec` module provides the PNG/JPEG decoder to both runtime +image imports and bake. Moving this reusable decoder out of `bake` is an +approved, narrow policy exception. It keeps runtime and baked image decoding on +one implementation; it does not move general asset import into runtime code. + +The staged [ImageBuffers demo](../mono.engine/examples/assets/scripts/ImageBuffers.luau) +shows raw, PNG and JPEG import paths in image labels, a mesh part, a texture and +a particle emitter. + +The codec suite passed 28 cases and 3,362 assertions. Normal and ASan/UBSan +runs with leak checking passed. + +A local O3 benchmark decoded flat-grey 1920 by 1080 PNG, JPEG and raw RGBA8 in +about 10.4, 12.3 and 13.4 ms per iteration, respectively. These are the minimum +times from five samples, not medians; the benchmark output stayed on stdout. diff --git a/docs/MISSING_ENGINE_FTRES.md b/docs/MISSING_ENGINE_FTRES.md new file mode 100644 index 000000000..1f74deb00 --- /dev/null +++ b/docs/MISSING_ENGINE_FTRES.md @@ -0,0 +1,925 @@ +# Missing engine features worth building + +Research date: 2026-10-15. Repository baseline: `VERSION` 0.26.0, revision +`ce69e58d`, including the working tree available during this review. + +The strongest additions would help someone finish a multiplayer game: dependable +character movement, combat, navigation, animation, reusable content, and world +streaming. Rendering and compute have useful opportunities too, particularly +lighting, material authoring, residency, and reusable GPU workloads. + +This is a researched selection of 43 feature proposals, not a replacement +roadmap or a claim that every proposal should be built. Existing system plans +remain the design owners. Priorities, relative effort, and proposed acceptance +scenes below are engineering judgments. They are not user-survey results, +measured performance claims, delivery estimates, or commitments. + +The VR proposal was added on 2026-10-16 from the requested calibration features +and official references. Its target headset/runtime support and the forthcoming +Zero Latency Adelaide POVs have not been verified in this review. + +## How to read the gaps + +- `Extension`: working foundations exist, but the proposed workflow needs more. +- `Planned`: an existing system plan describes the missing work. This does not + mean its implementation is complete or that all of the plan is still current. +- `Not found`: no complete implementation appeared in the reviewed public APIs, + relevant consumers, examples, and targeted source searches. This is a bounded + finding, not proof that no related code exists anywhere. +- `P1`: broad value, or a blocker for the stated game type. +- `P2`: valuable once its dependencies and a real game need exist. +- `P3`: specialised or expensive enough to require a demonstrated need first. + +Effort is relative: `M` extends a contained path, `L` crosses several systems, +and `XL` changes fundamental runtime, content, or deployment contracts. A first +useful slice can be much smaller than the complete feature. + +The review used CodeGraph, current headers and runtime consumers, examples, +tests as source evidence, the roadmap, and existing future-work documents. +Engine binaries and demos were not run for this document. Older plans contain +stale absence claims, so current source takes precedence. + +## Existing foundations to preserve + +These are present in the reviewed checkout. Recommendations below extend them. + +| Area | What already exists | Repository evidence | +|---|---|---| +| Rendering | Graph-driven rendering, PBR texture maps, shadows, SSAO, temporal/post effects, portals and mirrors, editable images/meshes, automatic mesh LOD, GPU culling and indirect work | [Renderer](../mono.engine/render/include/engine/render/Renderer.hpp), [materials](../mono.engine/scene/include/engine/scene/Materials.hpp), [mesh residency](../mono.engine/render/include/engine/render/MeshTable.hpp), [LOD](../mono.engine/render/include/engine/render/AutomaticMeshLod.hpp) | +| Graphs | Typed node declarations, dependency waves, execution plans, barriers, resource lifetimes, transient allocation planning, profiling, and Studio graph editing | [render graph](../mono.engine/graph/include/engine/graph/RenderGraph.hpp), [schedule](../mono.engine/graph/include/engine/graph/Schedule.hpp), [allocation planning](../mono.engine/graph/include/engine/graph/PipelineProfile.hpp), [Studio graph](../mono.studio/src/RenderPipelineGraph.cpp) | +| Compute and VFX | Authored compute dispatch, GPU particles and fields, weather, live image graphs, and bounded capture/readback paths | [authored nodes](../mono.engine/render/src/nodes/AuthoredNodes.cpp), [particle fields](../mono.engine/scene/include/engine/scene/GpuParticleField.hpp), [image graphs](../mono.engine/imagegraph/include/engine/imagegraph/Document.hpp), [capture](../mono.engine/render/include/engine/render/DataCapture.hpp) | +| Physics | Fixed-tick rigid bodies, contacts, solver, sleeping, fast-body sweeps, weld assemblies, named collision groups and a C++ collision matrix, raycasts, overlaps, and shape casts | [physics world](../mono.engine/physics/include/engine/physics/PhysicsWorld.hpp), [queries](../mono.engine/physics/include/engine/physics/Query.hpp), [continuous collision](../mono.engine/physics/include/engine/physics/Continuous.hpp), [collision groups](../mono.engine/spatial/include/engine/spatial/CollisionGroups.hpp), [BasePart.CollisionGroup](../mono.engine/scene/src/Part.cpp) | +| Characters and animation | Humanoid movement, health/damage and respawn, tools, skeletons, animation clips/tracks, weighted playback, and rendered bone poses | [characters](../mono.engine/scene/include/engine/scene/Characters.hpp), [tools](../mono.engine/scene/include/engine/scene/Tools.hpp), [animation state](../mono.engine/scene/include/engine/scene/Animation.hpp), [pose evaluation](../mono.engine/render/include/engine/render/Animation.hpp) | +| Networking | Transport, discovery, admission, snapshots/deltas, interest predicates, priority, ownership records, native client movement prediction with input replay/reconciliation and correction smoothing, cross-process portal handoff, and a position-rewind helper | [authority](../mono.engine/replication/include/engine/replication/Authority.hpp), [prediction](../mono.engine/replication/include/engine/replication/Prediction.hpp), [client prediction](../mono.client/src/Replicated.cpp), [portal session](../mono.engine/game/include/engine/game/PortalSession.hpp), [rewind](../mono.engine/replication/include/engine/replication/Rewind.hpp) | +| Persistence | DataStore routing, file/SQLite/HTTP adapters, script services, and actual server load/save/flush integration | [world stores](../mono.engine/world/include/engine/world/DataStore.hpp), [SQLite](../mono.engine/datastore/include/engine/datastore/Sqlite.hpp), [HTTP](../mono.engine/datastore/include/engine/datastore/Http.hpp), [server integration](../mono.server/src/Server.cpp) | +| Replay | Universe snapshots and ordered barrier-envelope recording/replay, with an explicit same-binary, same-machine contract | [recording](../mono.engine/world/include/engine/world/Recording.hpp) | +| Audio | Scene sounds/listeners, stereo spatialisation, a mixer graph, and sample-deadline command scheduling | [audio graph](../mono.engine/audio/include/engine/audio/Graph.hpp), [mixer](../mono.engine/audio/include/engine/audio/Mixer.hpp), [spatialisation](../mono.engine/audio/include/engine/audio/Spatial.hpp) | +| Game UI | Retained layout, bindings, virtual collections, shaped/bidirectional text, localisation catalogues, semantic accessibility, and native accessibility adapters | [GUI APIs](../mono.engine/gui/include/engine/gui), [localisation](../mono.engine/gui/include/engine/gui/Localization.hpp), [semantics](../mono.engine/gui/include/engine/gui/Accessibility.hpp), [native adapter](../mono.client/src/Accessibility.cpp) | +| Studio | Explorer/properties, asset tools, live graph editors, play sessions, collaborative editing, profiling, debugger tools, and automation surfaces | [Studio sources](../mono.studio/src), [control APIs](../mono.engine/control/include/engine/control) | + +Two especially important limits: + +1. [Client prediction reconciliation](../mono.client/src/Replicated.cpp) + already rebuilds local predicted state from authority, replays unconfirmed + movement inputs, and retains visual correction for smoothing. Deferred item + D00109 in [DEFERRED.md](DEFERRED.md) is stale. The remaining gap is a shared, + player-independent capsule and movement-mode simulation with richer + collision-aware parity. The existing rewind helper retains positions, not + complete historical combat hitboxes. The [Arena example](../mono.engine/examples/assets/scripts/Arena.luau) + explicitly resolves shots against current physics state. +2. The [raytrace shader](../mono.engine/resources/shaders/raytrace.comp) marches + the visible depth buffer. The [global-illumination shader](../mono.engine/resources/shaders/global-illumination.comp) + estimates lighting from G-buffer values. The [pathtrace shader](../mono.engine/resources/shaders/pathtrace.comp) + accumulates an estimate without traversing scene geometry. These are + implemented effects, but they do not establish a geometry ray tracer or a + physically based path tracer. + +## What the other engines demonstrate + +These are capability examples from official documentation, not a scorecard. +Package, renderer, platform, and version restrictions still apply. + +| Engine | Useful patterns to study | Why the pattern matters here | +|---|---|---| +| Unity | [Shader Graph](https://docs.unity3d.com/Manual/shader-graph.html), [humanoid retargeting](https://docs.unity3d.com/Manual/Retargeting.html), [Prefabs](https://docs.unity3d.com/Manual/Prefabs.html), and [Netcode for Entities physics history](https://docs.unity3d.com/Packages/com.unity.netcode@1.10/manual/physics.html) | Make specialist features reusable by game authors; connect simulation history to actual networked interactions. | +| Unreal Engine | [Gameplay Ability System](https://dev.epicgames.com/documentation/en-us/unreal-engine/understanding-the-unreal-engine-gameplay-ability-system), [World Partition](https://dev.epicgames.com/documentation/en-us/unreal-engine/world-partition-in-unreal-engine), and [Render Dependency Graph](https://dev.epicgames.com/documentation/en-us/unreal-engine/render-dependency-graph-in-unreal-engine) | Coordinate gameplay across systems, stream authored worlds, and expose resource/queue behaviour to developers. | +| Roblox Studio/platform | [Pathfinding](https://create.roblox.com/docs/characters/pathfinding), [instance streaming](https://create.roblox.com/docs/workspace/streaming), [DataStoreService](https://create.roblox.com/docs/reference/engine/classes/DataStoreService), [MemoryStoreService](https://create.roblox.com/docs/reference/engine/classes/MemoryStoreService), and [TeleportService](https://create.roblox.com/docs/reference/engine/classes/TeleportService) | Offer approachable scripting workflows around navigation, partial worlds, persistent state, shared ephemeral state, and travel. Hosted services are a separate responsibility from the engine runtime. | +| Godot | [AnimationTree](https://docs.godotengine.org/en/stable/tutorials/animation/animation_tree.html), [NavigationAgent avoidance](https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationagents.html), [GI choices](https://docs.godotengine.org/en/stable/tutorials/3d/global_illumination/introduction_to_global_illumination.html), and [compute shaders](https://docs.godotengine.org/en/stable/tutorials/shaders/compute_shaders.html) | Provide bounded, understandable tools with clear limitations. A navigation path, avoidance, physical movement, and rendering remain distinct jobs. | + +There is also direct game evidence. Riot describes timestamped shots and bounded +server rewind in [VALORANT's netcode](https://www.riotgames.com/en/news/peeking-valorants-netcode), +and team vision as an important part of [League's fog of war](https://www.riotgames.com/en/news/story-fog-and-war). +Those articles support the practical value of the corresponding features below. +They do not imply that League uses Unity, Unreal, Roblox, or Godot. + +## Start with these + +The order assumes the engine should support several multiplayer genres. For a +specific game, follow the genre table later in this document instead. + +| Rank | Proposal | Main users | Effort | Dependency or reason | +|---|---|---|---|---| +| 1 | [G01: character intent and collision parity](#g01-character-intent-shared-movement-and-prediction-parity) | Shooters, action RPGs, MMOs | L | A common movement path extends existing prediction to bots, replay, and abilities. | +| 2 | [G05: tiled navigation](#g05-tiled-navigation-meshes-and-bounded-route-queries) | MMOs, MOBAs, co-op games | L | Turns existing movement and queries into usable NPC routes. | +| 3 | [G08: animation graphs and events](#g08-animation-graphs-masks-synchronisation-and-event-markers) | Almost every character game | L | Playback already exists; coordinated locomotion and attacks are the next useful step. | +| 4 | [G03: abilities and effects](#g03-reusable-abilities-attributes-effects-and-gameplay-cues) | MOBAs, RPGs, hero shooters | L | Gives game scripts one tested contract for costs, interrupts, and effects. | +| 5 | [G02: historical hit validation](#g02-historical-hitboxes-and-authoritative-combat-queries) | Competitive shooters, action combat | L | Builds on G01 and existing rewind; proves the shooter path. | +| 6 | [W03: prefabs and variants](#w03-prefabs-variants-and-versioned-content-packages) | Every content-heavy game | L | Reuse a complete enemy, weapon, building, or UI subtree safely. | +| 7 | [P01: solved general constraints](#p01-solve-the-existing-generic-constraints) | Physics games, vehicles, ragdolls | L | Makes existing authored joint data do useful runtime work. | +| 8 | [R03: material graph](#r03-material-graphs-instances-and-permutation-control) | Artists across genres | L | Makes existing shader support practical without hand-authoring every GLSL program. | +| 9 | [G04: team vision](#g04-team-vision-fog-of-war-and-gameplay-relevance) | MOBAs, RTS games, tactical shooters | M/L | Connects game visibility to authoritative information disclosure. | +| 10 | [R01: baked lighting and probes](#r01-baked-lighting-reflection-probes-and-a-deliberate-gi-path) | Indoor shooters, RPGs, low-end clients | L | Offers controllable indirect light without starting with a full real-time GI system. | +| 11 | [W02: world cell streaming](#w02-world-cell-streaming-with-explicit-activation) | Open worlds, MMOs, survival games | XL | Needs lifecycle and content contracts, not just distance culling. | +| 12 | [W07: multiplayer fault and load scenes](#w07-repeatable-multiplayer-fault-scenes-and-load-profiles) | All multiplayer development | M/L | Proves the features together under latency, churn, and content pressure. | + +## Gameplay, navigation, and animation + + +### G01. Character intent, shared movement, and prediction parity + +P1. Extension and planned. Owners: [character system](future-work/character-system.md) +and [input system](future-work/input-system.md). + +The character plan also defines player-independent NPC characters, player roster +and possession ownership, and the lease boundary between a human driver and AI. +The [navigation and AI plan](future-work/navigation-ai-system.md) specifies the +correlated named-action request and acknowledgement seam. + +The native client already predicts movement, reconciles authoritative state, +replays unconfirmed move inputs, and retains visual correction for smoothing. +Extract a player-independent CharacterIntent and controller so players, bots, +scripts, and replay can use the same rules. Extend that controller with +capsule-based collision, explicit grounding/steps/slopes, moving-platform +behaviour, and game-defined modes such as climbing or swimming. Keep the server +authoritative and extend collision-aware parity between client replay and server +simulation. + +First useful slice: exercise existing input acknowledgment, replay of +unconfirmed commands, and visual smoothing through the improved controller. +Prove it with two clients, stairs, a moving platform, loss, and variable +latency. Report correction size and replay cost. Arbitrary scripted movement +needs an explicit prediction policy; reproducible fixed ticks do not establish +bitwise determinism across machines. + + +### G02. Historical hitboxes and authoritative combat queries + +P1 for shooters. Extension. Build on the current position rewind and query APIs. + +Store a bounded history of collision poses, hitbox dimensions, stance, relevant +animation state, and moving blockers. Validate firing time, origin, fire rate, +ammunition, and permitted rewind before querying that history. Run queries +against historical data without temporarily changing the live world. + +First useful slice: hitscan against moving capsules and a moving door. Add +skeletal hit regions only when needed. Show the firing view, accepted server +query, and hit result in a debug replay. Include expired history, respawn, and +portal traversal. Unity documents [collision-world history](https://docs.unity3d.com/Packages/com.unity.netcode@1.10/manual/physics.html); +Riot explains why [bounded rewind](https://www.riotgames.com/en/news/peeking-valorants-netcode) +matters to actual gunplay. + + +### G03. Reusable abilities, attributes, effects, and gameplay cues + +P1 for MOBAs, RPGs, and hero shooters. Extension; a complete shared contract was +not found. Existing [MagicCore examples](../mono.engine/examples/assets/scripts/libraries/MagicCore) +already implement substantial spell, projectile, and status-effect behaviour. + +Extract only the reusable needs: typed attributes, resource costs, cooldowns, +stacking policies, targeting, cancellation, authoritative activation, and +deduplicated presentation cues. Keep individual spells and balance rules in +game-owned data/scripts. Stable gameplay tags can describe blocked states and +immunities without hard-coding every combination. + +First useful slice: a projectile spell with mana cost, cooldown, stun, and +interrupt. Two clients must agree after duplicate requests and denied casts; +predicted sound/VFX must not play twice. Unreal's [ability framework](https://dev.epicgames.com/documentation/en-us/unreal-engine/understanding-the-unreal-engine-gameplay-ability-system) +is a useful behavioural reference. Copy the useful contract, not its class tree. + + +### G04. Team vision, fog of war, and gameplay relevance + +P1 for MOBAs/RTS; P2 elsewhere. Extension; a complete gameplay vision service +was not found. Replication already accepts interest predicates and priorities. + +Add authoritative vision sources, occluders, team masks, revealed/explored +state, and explicit detection rules. Use that result for replication, +targeting, minimaps, and the rendered fog mask. Camera occlusion alone cannot +decide whether a team knows an enemy's position. Define what happens to a +previously known enemy when it becomes hidden. + +First useful slice: two teams, walls, brush, and a temporary ward. Hidden units +must stop receiving protected updates while allies remain visible. Inspect the +actual outgoing data. League's [fog-of-war account](https://www.riotgames.com/en/news/story-fog-and-war) +is a concrete reference for the visual side; the disclosure policy is a proposed +engine/game contract, not a claim about that article's network implementation. + + +### G05. Tiled navigation meshes and bounded route queries + +P1. Extension and planned: [navigation and AI](future-work/navigation-ai-system.md). + +The current [path query](../mono.engine/physics/include/engine/physics/Query.hpp) +uses a small set of authored horizontal box tops. Extend beyond that with +walkable mesh baking, agent radius/height profiles, area costs, stacked rooms, +tile references, and explicit partial/unreachable results. Reuse collision +geometry and publish navigation changes at a defined tick boundary. + +First useful slice: a bot follows routes through ramps, stairs, and two floors +without cutting through a ceiling. Then add a closed door and a changed tile. +Show the corridor and reason for failure in Studio. Study Roblox's +[pathfinding workflow](https://create.roblox.com/docs/characters/pathfinding) +and Godot's [navigation-server lifecycle](https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationservers.html). + +### G06. Crowd steering and explicit traversal links + +P2; promote for MOBAs and large NPC scenes. Planned in the navigation plan. + +Separate global routing from local avoidance. Add bounded neighbour queries, +arrival/queue behaviour, and authored links for ladders, jumps, climbs, doors, +and portals. A link requests a movement action through G01; it does not teleport +the agent past unsolved movement. Flow fields are a later option for many agents +sharing destinations, after a measured need appears. + +First useful slice: two groups pass through a narrow gate without permanent +deadlock, then reserve and cross one ladder link. Test stacked floors so agents +on different levels do not avoid each other. Godot explicitly documents that +[avoidance does not change pathfinding](https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationagents.html). + +### G07. Perception, inspectable behaviours, and tactical queries + +P2. Planned in the [navigation and AI plan](future-work/navigation-ai-system.md). +Useful for shooter bots, MMO enemies, pets, and village simulations. + +Add sight/hearing/proximity facts, named hierarchical AI states, Boolean +transition guards, and query scoring for cover, attack range, and reachable +positions. Expose the selected state, failed condition, remembered stimulus, +and chosen destination. The plan keeps state transitions separate from +same-tick behaviour dataflow and uses one bounded behaviour representation. +Registered typed condition/action/task nodes provide programmable extensions +without worker-thread callbacks. Export the canonical state tree and labelled +transitions to SVG and self-contained HTML, with an optional revision-matched +active path and reason snapshot. + +First useful slice: a guard patrols, hears a noise, investigates, chases, and +returns home. A ranged enemy chooses reachable cover. Unreal's +[StateTree](https://dev.epicgames.com/documentation/en-us/unreal-engine/overview-of-state-tree-in-unreal-engine) +and [EQS example](https://dev.epicgames.com/documentation/unreal-engine/environment-query-system-quick-start-in-unreal-engine) +provide useful references for state inspection and candidate scoring. + + +### G08. Animation graphs, masks, synchronisation, and event markers + +P1. Extension and planned in the [character system plan](future-work/character-system.md). +Clips and weighted tracks already play; adding another clip player would +duplicate existing work. AI requests named character actions through the +[navigation and AI plan](future-work/navigation-ai-system.md), which does not +own animation state or bones. + +Add locomotion blend spaces, state transitions, upper/lower-body masks, +additive aim/recoil, sync groups, and event markers. Define looping, reverse +playback, interruptions, and event deduplication. Root-motion properties already +exist, but authority-side movement consumption needs a real controller contract. +Gameplay hit windows must be available headlessly instead of depending on a +client-only pose evaluator. + +First useful slice: run and strafe while reloading, then interrupt with a stun. +Footstep and weapon events must remain correct across blends and reconciliation. +Godot's [AnimationTree](https://docs.godotengine.org/en/stable/tutorials/animation/animation_tree.html) +shows the relevant blend-tree and state-machine workflows. + +### G09. Retargeting, procedural rig controls, and avatar deformation + +P2. Extension and planned in the character plan. Useful for RPG avatars, +shooter weapon grips, and reducing animation-authoring cost. + +Start with a humanoid mapping and retarget preview, then two-bone IK for feet +and hands, aim/look controls, and explicit attachment sockets. Treat facial +morph targets, equipment skinning, and character customisation as later slices +with their own import/runtime contracts. These were not found as a complete +workflow in the reviewed animation/import path. + +Prove one locomotion set on two differently proportioned rigs, a hand staying +on a weapon grip, and feet following stairs. Unity's +[humanoid retargeting](https://docs.unity3d.com/Manual/Retargeting.html) is a +useful reference. Animation sharing needs compatible rig semantics, not merely +matching bone counts. + +### G10. Spectators, killcams, and replay presentation + +P2. Extension. Universe recording/replay already exists, so the missing feature +is a game-facing replay product. + +Add spectator permissions, target following, a presentation timeline, bounded +seek checkpoints, and a killcam view. Decide whether a shipped replay stores +authoritative snapshots, versioned events, or requires the original executable. +The existing same-binary, same-machine recorder is not a promise of portable +match playback across releases. + +First useful slice: replay a short combat encounter from attacker and victim +views without altering the live match. Restrict team-hidden information during +live spectating. Use this to inspect G02 and G04 before building a broadcast UI. + +## Physics and physical gameplay + + +### P01. Solve the existing generic constraints + +P1. Extension and planned: [physics expansion](future-work/physics-expansion.md). + +The saved, script-visible [six-axis constraint](../mono.engine/scene/include/engine/scene/Constraints.hpp) +is not currently solved. Connect it to the existing contact/impulse pipeline, +including limits, drives, break thresholds, sleeping, and assembly ownership. +Unify the relevant weld path as the plan specifies. + +First useful slice: a hinged door, driven sliding platform, pendulum, and +breakable joint all interact with ordinary bodies. Inspect impulses and limit +error. This is a better foundation for physical gameplay than independently +adding a vehicle solver and a ragdoll solver. + +### P02. Contact policies and complete physical events + +P1/P2 by game. Extension and planned in the physics plan. Layers, material +properties, triggers, and internal contact transitions already exist. Named +collision groups, the C++ pairwise collision matrix, and the +`BasePart.CollisionGroup` property are also present. Script or project +configuration of matrix pairs is still a gap; `PhysicsService`-style matrix +editing was not found. Friction and restitution already use fixed combine +rules, so the proposed work is author-selectable combine/contact overrides. + +Add script/project configuration for the existing collision matrix, explicit +material-combine overrides, bounded contact/trigger event delivery, and +complete hit information. Define collision-group lifecycle and keep query +filtering consistent with solver filtering while allowing a query to ask for a +different purpose, such as aim selection or camera blocking. + +First useful slice: configure the existing matrix through a project or script +surface, then verify projectiles ignore their owner and entering a hazard +produces one ordered enter/exit pair. Changing a group, destroying an +overlapping body, and disabling a collider must have defined event behaviour. + +### P03. Complete fast-body collision and batched world queries + +P2. Extension and planned in the physics plan. Sweeps, CCD-related counters, +shape casts, and batched occupancy/signed-distance queries already exist in +[Query.hpp](../mono.engine/physics/include/engine/physics/Query.hpp). + +Add exact time-of-impact cases where the current conservative path is +insufficient, configurable body modes, batched raycasts/shape casts, richer +query filters, and consistent overflow/results. Choose cases from a failing +projectile or vehicle scene. Do not replace the collision system on an +unmeasured suspicion. + +Prove a small fast projectile crossing a thin moving blocker, a rotating body, +and a burst of gameplay queries. Record missed contacts, solver cost, candidate +counts, and query latency. Keep authoritative results within the tick contract. + +### P04. Vehicles and physical character rigs + +P2. Planned in the physics/character plans. Unreal's +[physics overview](https://dev.epicgames.com/documentation/en-us/unreal-engine/physics-in-unreal-engine) +provides examples of separate vehicle and ragdoll capabilities. + +Build a suspension/traction model on the shared bodies and constraints. Build +ragdoll joints and an animated-to-physical transition separately, on that same +solver. Add buoyancy only with an explicit water-volume query. Decorative +debris can remain client-side; gameplay vehicles and carried bodies need an +authority and correction policy. + +First useful slices: a four-wheel vehicle on rough ground, then a character +falling down stairs and recovering. Verify against moving platforms and +networked ownership changes before adding tuning-heavy specialist models. + +### P05. Bounded destruction and breakable assemblies + +P2 for destruction games; P3 otherwise. Planned in the physics plan. + +The existing [BreakGroup](../mono.engine/scene/include/engine/scene/BreakGroup.hpp) +already releases authored anchored parts into simulation. Extend it with +fracture authoring, break conditions, fragment budgets, and coordinated +collision/navigation updates. Replicate authoritative breaks and gameplay-relevant +pieces; permit cosmetic fragments to use cheaper local simulation. Arbitrary +runtime mesh cutting is a separate, larger feature. + +First useful slice: break a wall that opens a navigation route and blocks vision +before destruction. A late join sees the same opening. Prove bounded debris +count, released resources, and persistence of the structural change. Chaos +destruction in Unreal's physics documentation is a reference, not a reason to +start with its entire fracture pipeline. + +### P06. Cloth, soft bodies, and simulated fluids + +P3. A complete runtime was not found. Useful for clothing, ropes, banners, +water interaction, and specialised simulation games. + +Choose one visual feature first, such as a cape or rope with collision and +distance-based quality. Define attachment, bounds, reset, and CPU fallback. +Authoritative fluid or soft-body gameplay has a much larger replication and +replay contract than decorative GPU motion. + +Prove a banner attached to a moving object, including teleport and reset, before +proposing a general multiphysics framework. Existing particle/field/weather +systems should supply inputs where appropriate. + +## Rendering and content scale + + +### R01. Baked lighting, reflection probes, and a deliberate GI path + +P1/P2. Extension; a complete light-baking/probe workflow was not found. Existing +ambient estimates and portal radiance should remain explicitly described. + +Start with baked indirect lighting for static geometry and sampled lighting for +moving characters. Add authored reflection probes and predictable blending. +Offer bake diagnostics, invalidation, streaming ownership, and clear limitations +for moving/emissive objects. Decide later whether dynamic GI needs probes, +distance fields, or geometry tracing. + +First useful slice: an indoor room with an off-screen coloured bounce source +and a character walking from outside to inside. Compare against a reference +capture and inspect leaks. Unity's [Adaptive Probe Volumes](https://docs.unity3d.com/Manual/urp/probevolumes-concept.html) +and Godot's [GI comparison](https://docs.godotengine.org/en/stable/tutorials/3d/global_illumination/introduction_to_global_illumination.html) +show why several lighting tiers can be useful. + +### R02. Many-light selection and local-shadow budgets + +P2. Extension; a complete clustered many-light path was not found in the reviewed +lighting implementation. Point/spot lights and lighting passes already exist. + +Add tile/cluster light lists only after a representative scene demonstrates +that light evaluation is costly. Budget shadow updates by visible importance, +cache unchanged results, and expose overflow. A village with many lamps and a +MOBA team fight need different priorities from an empty benchmark grid. + +First useful slice: a night street plus moving ability lights. Match the +existing lighting result within a declared tolerance, show affected lights per +tile and shadow-update decisions, and measure total GPU time including list +construction. More queues or fewer draw calls alone are not proof of a win. + + +### R03. Material graphs, instances, and permutation control + +P1/P2. Extension. Materials, map channels, runtime fragment shaders, and cooked +shader variants already exist. A complete visual material authoring workflow +was not found. + +Build typed material nodes and named parameters over the existing shader ABI. +Include texture slots, parameter instances, reusable functions, previews, +compile diagnostics, and bounded permutation generation. Keep the render-pipeline +graph distinct: it schedules passes; a material graph defines surface shading. + +First useful slice: author a dissolve material, make two parameter variants, +save/bake/publish them, and retain the last good shader after an invalid edit. +Study Unity's [Shader Graph](https://docs.unity3d.com/Manual/shader-graph.html). +Extend the existing compiler/library rather than adding another shader path. + +### R04. Projected decals and mesh-particle effect authoring + +P2. Extension and planned: [VFX system](future-work/vfx-system.md). Face-bound +decals, tiled textures, particles, beams, trails, and GPU fields already exist. + +Add pooled world-projected decals with receiver layers, depth/normal fading, +bounded lifetime, and PBR channels where supported. These support bullet holes, +scorches, footprints, puddles, and MOBA area indicators. Extend effect authoring +with mesh-particle outputs and coordinated events as separate useful slices. + +First useful slice: repeated impacts on curved geometry with a hard pool limit; +transparent receivers and portals have an explicit policy. Godot documents +[projected decals](https://docs.godotengine.org/en/stable/tutorials/3d/using_decals.html); +Unity's [VFX Graph](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@17.0/manual/index.html) +is an authoring reference, not evidence that Atomic lacks GPU particles. + +### R05. HLOD, impostors, and foliage authoring + +P2. Extension. Automatic mesh LOD, resident cluster pages, GPU selection, and +occlusion already exist. The remaining workflow is aggregation and residency +across large authored regions, plus vegetation authoring. + +Generate region proxies, merged material atlases or impostors, foliage +placements, and stable transitions. Keep distant visual proxies separate from +collision, AI, and replication fidelity. Add wind and interaction only through +the existing field inputs where they fit. + +First useful slice: a forest and village remain visible when their detailed +cells are unloaded. Measure draw/instance work, residency, and visible popping. +Unreal's [World Partition HLOD](https://dev.epicgames.com/documentation/en-us/unreal-engine/world-partition---hierarchical-level-of-detail-in-unreal-engine) +shows a distinct benefit beyond per-mesh triangle reduction. + +### R06. View-driven mip residency before virtual texturing + +P2; virtual texturing P3. Extension. Texture delivery, mip chains, budgets, +owner scoping, and runtime updates already exist in the +[texture table](../mono.engine/render/include/engine/render/TextureTable.hpp). +The reviewed upload path uploads the supplied levels together. + +Add requested/resident mip ranges, priorities across cameras and portals, +bounded uploads, eviction, and prewarming. Begin with ordinary mip streaming. +Introduce sparse tiled virtual textures only if terrain/material scale needs +them and backend support justifies the added machinery. + +Prove rapid travel through a textured town under a fixed GPU memory budget, +including a second camera and a teleport. Inspect requested versus resident +detail and upload spikes. References: Unity's [mipmap streaming](https://docs.unity3d.com/Manual/TextureStreaming.html) +and Unreal's [virtual texturing](https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-texturing-in-unreal-engine). + +### R07. Temporal upscaling and frame-budget quality control + +P2. Extension. Temporal AA, motion-vector features, history, reduced-size +resources, and GPU measurements already provide parts of the foundation. + +Add separate render/display resolutions, deliberate history invalidation, +disocclusion handling, reactive treatment of transparent effects, and an +upscaler adapter. Dynamic resolution needs a stable GPU-time controller and +minimum quality bounds. Keep UI at display resolution and handle portal and +multi-viewport histories independently. + +First useful slice: moving foliage, thin geometry, particles, a camera cut, +and a resize. Compare image sequences, latency, and frame time against native +resolution. Unreal's [Temporal Super Resolution](https://dev.epicgames.com/documentation/en-us/unreal-engine/temporal-super-resolution-in-unreal-engine) +documents this as a complete temporal workflow. No particular vendor upscaler +or licensing arrangement is assumed here. + +### R08. Real geometry ray queries and reference path tracing + +P3. Extension beyond the current screen-space/heuristic passes. A geometry +acceleration structure and tracing backend were not found in the reviewed path. + +Start with a small static-scene BVH and validated ray/triangle queries, then +instance transforms and an explicit update budget. A reference path tracer +also needs surface sampling, material/light evaluation, random sampling, +accumulation, and defined convergence. Hardware tracing is a separate capability +adapter, not a scene feature flag alone. + +Prove an off-screen reflected object, a shadow from non-visible geometry, and +multi-bounce colour transfer. Keep these distinct from screen-space reflection +tests. A Nanite-like geometry system is another separate program: Unreal's +[Nanite description](https://dev.epicgames.com/documentation/en-us/unreal-engine/nanite-virtualized-geometry-in-unreal-engine) +includes hierarchical clusters, fine-grained streaming, and a specialised draw +path. Existing cluster pages do not establish equivalent functionality. + +### R09. Water surfaces, water volumes, and underwater rendering + +P2 for open worlds; P3 elsewhere. A complete integrated workflow was not found. +Existing refraction, reflection, volumes, and fields are reusable foundations. + +Separate the visual surface from authoritative water-volume queries. Start +with a plane/river mesh, depth-based colour/absorption, shoreline fading, +underwater camera state, and a simple current/buoyancy query. Swimming consumes +G01's movement modes. Full fluid simulation is not required for useful water. + +First useful slice: enter a river, swim, float a rigid object, and move the +camera below the surface. Verify mirrored/portal views and stream-out behaviour. +Give caustics, waves, and fluid interaction separate quality and cost budgets. + +## Graphs, compute, and diagnosis + +### C01. General authored buffer compute and reusable kernels + +P2. Extension. Graph buffer descriptors, authored image-oriented dispatch, +specialised particle/weather buffers, noise jobs, and readback already exist. + +The useful gap is an end-to-end authoring contract for named typed buffer +inputs/outputs, binding validation, dispatch bounds, ownership, dependencies, +and completion. The reviewed generic dispatch binds sampled/storage images and +an optional engine instance buffer; it is not a general arbitrary-buffer API. +Add scan, compaction, reduction, sort, or noise kernels only when a consumer +needs them. + +First useful slice: compact an authored buffer, feed it to another GPU pass, +and optionally retrieve a bounded result asynchronously. Compare against a CPU +oracle for empty, odd-sized, and oversized inputs. Godot's +[compute guide](https://docs.godotengine.org/en/stable/tutorials/shaders/compute_shaders.html) +is a useful API reference and explicitly warns about immediate synchronisation. + +### C02. Simulation and animation levels of detail + +P2 for MMOs, MOBAs, and battle scenes. Extension; a complete coordinated policy +was not found. Mesh LOD and an animator throttling property already exist. + +Introduce explicit update tiers for perception, behaviour, animation, and +non-critical effects, with ownership and maximum staleness per subsystem. +Distance alone is insufficient: a far-away projectile, combatant, or player-owned +object may still require full gameplay fidelity. Lower-frequency simulation +must run at defined tick multiples with deterministic scheduling. + +First useful slice: a populated town with a few active combatants. Inspect why +each agent is in its tier, then provoke combat during promotion. Measure tick +cost, promotion spikes, and stale decisions. Keep combat authority and gameplay +animation events separate from visual pose throttling. + +### C03. Reusable graph assets, versioning, and live replacement + +P2. Extension. Typed documents, validation, execution, and graph editors already +exist. A complete cross-asset subgraph/version/override workflow was not found. + +Add reusable subgraphs with named typed ports, immutable asset revisions, +instance parameters, migrations, diagnostics mapped to the source node, and +transactional replacement. Define retained-state/history compatibility before +swapping a live graph. Reuse existing document, validation, and editor +infrastructure where compatible. Keep domain execution and timing rules +explicit; audio, image baking, and frame scheduling need different contracts. + +First useful slice: two effects use one authored subgraph. Update it, show the +affected instances, and reject an incompatible update without losing the +previous working output. Do not turn this into a universal gameplay language +before material/VFX/behaviour users establish their actual common needs. + +### C04. Physical GPU queue overlap and parallel recording + +P3 until a profile justifies it. Extension. The current +[execution plan](../mono.engine/graph/include/engine/graph/ExecutionPlan.hpp) +already classifies graphics/compute/transfer work. The SDL adapter advertises +`UnifiedQueue = true`; separate command buffers do not prove simultaneous work. + +A backend with separate physical queues needs fence/semaphore dependencies, +resource ownership transitions, measured scheduling, and reliable fallback. +CPU command recording can also be parallelised where ownership permits. Neither +change is automatically faster on a bandwidth-saturated frame. + +First useful slice: one independent compute workload overlaps one raster branch +on supported hardware. Compare serial and overlapping modes, including transfers +and synchronisation. Show actual GPU overlap in a capture. Unreal's +[RDG](https://dev.epicgames.com/documentation/en-us/unreal-engine/render-dependency-graph-in-unreal-engine) +documents queue scheduling, resource lifetimes, and diagnostics worth studying. + +### C05. Reproducible renderer captures and resource inspection + +P2. Extension. Frame Graph profiling, graph diagnostics, image previews, +readback, structured capture, and world recording already exist. + +Add a diagnostic bundle tying a world snapshot to pipeline revision, shader +artifacts, camera/history state, settings, and content hashes. Provide +pass-by-pass resource inspection and a bounded way to reproduce a problematic +frame. Engine-level reproducibility is distinct from native GPU command capture; +use an external GPU debugger where that is the actual need. + +First useful slice: capture a bad portal/transparent-effect frame, restore its +inputs, and inspect the first incorrect resource. Name backend/build restrictions +and unavailable history. Extend existing tools rather than adding a second +unrelated profiler. RDG's resource-lifetime/overlap views are a useful comparison. + +### C06. Procedural content graphs with reproducible outputs + +P2. Planned: [procedural generation](future-work/procedural-generation.md). +Noise jobs, editable meshes, image graphs, and scripted terrain examples already +provide parts of the foundation. + +Add seeded recipes, dependency tracking, bounded spatial queries, spline +inputs, scatter/exclusion rules, and immutable generated artifacts. Separate +editor generation from runtime generation. Use domain-owned adapters so a +road generator and a dungeon generator do not each invent content delivery. + +First useful slice: a seeded forest and village road network with exclusion +around entrances. Rebuild one edited region and leave unrelated outputs intact. +Bake and publish the same result. Unreal's +[PCG overview](https://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-overview) +is a useful reference for authoring a procedural workflow. + +## Worlds, reusable content, and online services + +### W01. Production terrain and landscape authoring + +P2; P1 for a terrain-centred game. Extension and planned: +[terrain system](future-work/terrain-system.md). + +Saved `Workspace.Terrain` data and the scripted +[TerrainCore](../mono.engine/examples/assets/scripts/libraries/TerrainCore)/[TerrainRuntime](../mono.engine/examples/assets/scripts/libraries/TerrainRuntime/init.luau) +already provide height fields, chunked greedy box generation, edits, pooled +parts, and staged rebuilds. The larger gap is a reusable landscape asset and +Studio workflow with terrain-specific mesh/collision outputs, seams, material +layers, brushes, and durable edits. Extend that foundation; add voxel/SDF terrain +when caves, digging, or planets actually require it. + +First useful slice: edit terrain, stream its neighbour, save, reload, and walk +across the boundary. Collision, navigation, and visible terrain must agree. +Define rebuild budgets and last-good output while a chunk changes. Large +planets additionally need a coordinate/precision contract across physics, +rendering, networking, and asset placement. + + +### W02. World cell streaming with explicit activation + +P1 for MMOs/open worlds. Extension and planned: +[world streaming](future-work/world-streaming.md). + +Asset delivery, interest filtering, multiple worlds, portals, and chunk indexes +are real foundations. Add cell manifests, staged load/activate/deactivate, +reference resolution, state persistence, pinned dependencies, and multiple +streaming sources. Rendering visibility, client replication interest, and +server simulation residency need related but distinct decisions. + +First useful slice: cross a town boundary while a projectile, quest NPC, and +portal remain relevant. Teleport to a cold region, disconnect during loading, +and revisit modified state. Inspect CPU/GPU residency and activation spikes. +Unreal's [World Partition](https://dev.epicgames.com/documentation/en-us/unreal-engine/world-partition-in-unreal-engine) +and Roblox's [instance streaming](https://create.roblox.com/docs/workspace/streaming) +show useful author-facing concepts; they do not solve cross-server MMO placement. + + +### W03. Prefabs, variants, and versioned content packages + +P1. Extension and planned: +[prefab/package system](future-work/prefab-package-system.md). + +Clone/subtree documents and project archives already exist. Add stable member +identity, prefab definitions, instance overrides, nested prefabs, variants, +dependency versions, and explicit update/conflict handling. A ZIP project +package is not this authoring workflow. + +First useful slice: reuse an enemy with a rig, behaviour, effects, and UI. Change +the source health/mesh while retaining one instance's deliberate override. +Verify save/load and undo after a deleted or renamed member. Unity's +[Prefab documentation](https://docs.unity3d.com/Manual/Prefabs.html) provides a +useful comparison for reuse and overrides. + +### W04. Parties, matchmaking, and cross-server travel + +P1 for hosted multiplayer; P2 for local/private games. Extension and planned: +[session/social system](future-work/session-and-social.md). + +Discovery, rendezvous, session keys, presence, local world travel, and +cross-process portal handoff already exist. The authenticated, resumable +handoff gates source retirement on destination acknowledgment; a durable +prepare/commit journal is wired when a DataStore root is configured. See +[portal transfer](../mono.engine/script/src/PortalTransfer.cpp) and +[portal session](../mono.engine/game/include/engine/game/PortalSession.hpp). +A hosted control plane still needs account identity, party membership, lobby +and match allocation, reconnect orchestration, and broader travel policies. +Region placement and host recovery need a real multi-host deployment to validate. +They cannot be proved with only several worlds in one executable. + +First useful slice: a party enters a reserved match, reconnects after a dropped +connection, and returns together. Name what happens when a destination fails. +Roblox's [TeleportService](https://create.roblox.com/docs/reference/engine/classes/TeleportService) +and shared ephemeral [MemoryStoreService](https://create.roblox.com/docs/reference/engine/classes/MemoryStoreService) +illustrate the user-facing needs. Keep provider adapters separate from engine +simulation and game rules. + +### W05. Durable gameplay transactions and ownership transfer + +P1 for MMOs/economies; P2 elsewhere. Extension. Persistent stores and several +adapters already exist, so the proposal is not to add another generic key/value +service. + +Define game-facing contracts for idempotent purchases/rewards, revision +conflicts, inventory transfer, session leases, schema migration, and crash +recovery. Verify what each existing backend can guarantee before exposing a +stronger promise. Atomic trade across multiple records or servers needs an +explicit protocol; a collection of independent successful saves is insufficient. + +First useful slice: award loot, retry the request, transfer an item, and kill +the host between writes. The chosen durable record/protocol must prevent +duplication and preserve ownership. Roblox's persistent +[DataStoreService](https://create.roblox.com/docs/reference/engine/classes/DataStoreService) +is a reference for the service category, not evidence of identical transaction +guarantees. Keep the engine adapter separate from a game's economy policy. + +### W06. Data-driven item, equipment, quest, and encounter kits + +P2. Extension; complete reusable kits were not found. Tools, health, script +reflection, data tooling, and MagicCore are existing foundations. + +Provide optional script/data packages for inventories, equipment slots, loot +tables, quest objectives, dialogue state, and encounters. Support stable +definition names, validation, content references, and migrations. These should +exercise the engine APIs while keeping MMO-specific progression and balance +out of the low-level runtime. + +First useful slice: pick up/equip an item, complete a quest objective, receive +one reward, reconnect, and retain the result. Inspect the chain from definition +to authoritative state to UI. This is a practical integration test for G03, +W03, and W05, even if no generic quest framework is ultimately needed. + + +### W07. Repeatable multiplayer fault scenes and load profiles + +P1/P2. Extension. Existing tests, stress scenes, observations, automation, +profilers, and Studio play links already do substantial work. + +Add a convenient repeatable profile combining delay, jitter, loss, bandwidth +limits, joins/leaves, cold content, and host failure with gameplay scenarios. +Use existing injection/harness paths where available; the gap is a cohesive +author workflow and curated genre scenes, not an assertion that networking +has no tests. Capture seeds/settings and show per-client correction, tick cost, +traffic, and convergence. + +First useful slice: rerun the same two-player combat/door scenario under a +saved adverse-network profile. Then run bots through a crowded objective and +a cell transition. Report the real player/entity counts and hardware. Do not +advertise an MMO player capacity from an empty-world connection test. + +## Input, sound, and presentation workflows + +### U01. Project-owned gameplay actions and device profiles + +P1/P2. Extension and planned: [input system](future-work/input-system.md). + +Raw devices, IME, GUI actions, and named `ContextActionService` callbacks +already exist. Add serialisable typed game actions, contexts, composite axes, +rebind/conflict UI, saved profiles, device glyphs, and local-player routing. +Touch needs a real adapter and authored controls; the current callback API's +touch-button argument does not create a touch surface. + +First useful slice: the same move/aim/interact actions work with keyboard/mouse +and gamepad, survive reconnect/rebind, and respect modal UI capture. Add a touch +profile only with device verification. Build this into the character/ability +samples rather than introducing a second movement input path. + +### U02. Audio effects, spatial filtering, and acoustic zones + +P2. Extension and planned: [audio system](future-work/audio-system.md). + +The current graph has Player, Fader, Emitter, Bus, and Output nodes. Extend it +with filters, sends, reverb, limiting, ducking, voice prioritisation, and +virtualisation. Spatial placement currently returns stereo gains without an +occlusion filter or head model. Add obstruction/room effects before treating +an observation field as implemented acoustic behaviour. + +First useful slice: move a sound behind a closed door, open it, and cross from +a small room to outside. A dialogue bus ducks combat audio. Check audio-thread +allocation/blocking, peaks, and audible transitions. HRTF binaural rendering is +a later quality option with its own listening and device tests. + +### U03. Streaming media, adaptive music, and voice transport + +P2/P3. Extension and planned in the audio/session plans. Complete streaming +music/voice and video playback workflows were not found. + +Treat these as separate slices: buffered music decoding with seek/loop +behaviour; music state driven by gameplay; capture/encode/jitter buffering for +voice; and decoded video frames with audio synchronisation. Voice also needs +per-user permission, mute, and routing policy. A video widget alone cannot +provide a decoder and streaming clock. + +First useful slice: music loops while content arrives slowly without starving +the mixer. For voice, prove two remote clients under jitter and reconnect. +For video, prove seek/pause and bounded decoded residency. Existing deferred +`VideoFrame` work should keep its single owner in [DEFERRED.md](DEFERRED.md). + +### U04. Camera rigs, sequences, and cinematic authoring + +P2. Extension and planned: +[camera/cinematics](future-work/camera-and-cinematics.md). + +Follow cameras, first-person modes, portal views, and scripted cameras already +exist. Add reusable rigs, blending, rails, target framing, shake channels, and +an authored timeline for camera/animation/audio/events. Establish authority for +sequence events and use existing animation/audio clocks rather than wall-time +callbacks that drift independently. + +First useful slice: a boss introduction blends from gameplay to a rail camera, +plays animation/sound, can be skipped, and returns control correctly. Test a +late join, player death, and scene unload during the sequence. Do not make a +cinematic timeline the required way to implement ordinary gameplay. + +### U05. VR stereo views, per-eye calibration, and magnification + +P2/P3. Planned in the [VR system plan](future-work/vr-system.md). This is a +proposal, with Rift S as a requested validation target rather than confirmed +runtime support. + +Add runtime-derived stereo views and tracked actions through the existing +camera, input, render, and character systems. Provide an in-game calibration +flow for independent left/right image clarity and linked binocular +magnification, with preview, confirmation, cancel, and reset. Physical per-lens +optical focus is a separate, hardware-dependent capability. FOV, zoom, and +sharpening cannot replace prescription lenses or move a fixed optical focal +plane. Full-world projection magnification needs compositor and comfort +validation before enabling it; UI zoom and a bounded magnifier provide smaller +first steps. + +First useful slice: a calibration room and an original two-player tracked +range. Verify eye geometry, hand/aim alignment, room origin, tracking loss, +boundaries, reconnection, and local profile restoration. Far Cry VR and Space +Marine VR at Zero Latency Adelaide are reference experiences named by the user; +their POV comparison remains pending. Official product descriptions and the +proposed engine requirements are recorded separately in the VR plan. + +## Choose a genre-sized vertical slice + +| Game target | Build first | Playable proof | Add after the proof | +|---|---|---|---| +| Competitive shooter | G01, G02, G08, U01, W07 | Two players move, aim, fire, reload, and contest a moving door under adverse network conditions. | G10 killcams, R04 impact decals, G07 bots, U02 spatial filtering. | +| MOBA comparable in needs to League | G03, G04, G05, G06, C02 | Two teams, lanes, minions, wards, towers, and a fight with stacked effects and interrupts. | Replay/spectating, skin/material workflows, hosted matches, richer tactical AI. | +| MMORPG | G01, G03, G05, W02, W04, W05 | Two authored regions, a party, an encounter, persistent loot, travel, and reconnect without duplication. | Larger populations, social systems, simulation LOD, richer avatars and terrain. | +| Co-op action RPG | G03, G08, G09, W03, W06 | A reusable enemy encounter with synced attacks, gear, rewards, and a saved quest objective. | Procedural dungeons, richer animation, voice, and cinematic tools. | +| Co-op VR range or arena | U05, U01, G01, G02, W07 | Two tracked players calibrate, aim, interact, hear spatial world audio, and recover from tracking loss without breaking room alignment. | Voice, richer acoustic effects and avatars, and encounters informed by the pending Zero Latency POVs. | +| Survival/building/physics game | P01, P03, P05, W01, W02, W03 | A constructed mechanism, breakable wall, editable ground, and persisted changes across a cell transition. | Vehicles, water, procedural worlds, and selected soft-body effects. | +| Large battle or village simulation | G05, G06, G07, C02, R05 | Agents navigate, make inspectable decisions, fight or work, and change fidelity without losing state. | Flow fields, shared animation, procedural population and settlement tools. | + +These are proposed demonstrations, not claims that Atomic currently meets the +corresponding production scale. A small coherent game is more informative than +many disconnected feature demos. + +## Implementation guardrails and acceptance evidence + +Keep reusable engine systems under `mono.engine`. Studio owns authoring and +inspection, products own adapters, and game packages own game-specific rules. +New module placement must follow the existing layer stack and target graph. +Do not use this document as permission to create upward dependencies. + +Keep authoritative facts in ECS, stable names in durable formats, and copied +messages across worlds. Extend the current graph, content, replication, +profiling, and replay paths. Cosmetic GPU work can finish asynchronously; +authoritative simulation must honour the fixed-tick/join contract. A GPU result +becoming ready on an arbitrary future frame cannot silently steer gameplay. + +For each selected slice, agree on evidence before expanding it: + +| Evidence | What it must answer | +|---|---| +| Playable scene | Can an author use the feature end to end through the intended script/editor/content path? | +| Focused headless tests | Are rules, rejection cases, interruption, lifecycle, and replication/persistence behaviour correct? | +| Visual or audible verification | Do animation, shading, decals, sound, and transitions actually work in the real client? | +| Release profile | What are CPU tick time, GPU time, tail latency, allocations, residency, uploads, and network cost in the named scene? | +| Failure/recovery exercise | What happens on capacity refusal, stream-out, disconnect, duplicate request, restore, or interrupted publication? | +| Inspectable state | Can the author see why an agent, graph, server, or renderer made its decision? | + +Keep measurements under the build output and add a `just` job for any new +benchmark. Record preset, backend, hardware, scene size, and settings with each +performance result. Existing tests were inspected as implementation evidence +for this research; no runtime checks or performance results are claimed here. + +The most useful next delivery is one complete slice from the genre table. +Build the shared systems that slice actually needs, then use the result to +choose the next feature. diff --git a/docs/STUDIO_PROPERTIES.md b/docs/STUDIO_PROPERTIES.md new file mode 100644 index 000000000..742822790 --- /dev/null +++ b/docs/STUDIO_PROPERTIES.md @@ -0,0 +1,41 @@ +# Studio properties + +The Properties panel groups reflected properties into collapsible sections. +Mesh parts expose separate LOD, PBR, Geometry, Transform, Appearance and Physics +sections. Other built-in classes use sections suited to their properties. +Filtering matches property names and hides sections with no matching rows. + +## Property metadata + +`ecs::PropertyDescriptor::PropertiesTag` names the inspector section. An invalid +tag places a property under `Unassigned`. The tag changes presentation only; +it does not move component storage or change property names, saves or replication. + +Assign a tag after declaring a property: + +```cpp +ecs::Classes::SetPropertiesTag( + scene::EditableMeshClass(), "TriangleCount", core::Name("Geometry") +); +``` + +`SetPropertiesTag` accepts the class that declares the property and returns +false for an unknown property or an inherited-only declaration. Descendants +inherit the tag. A redeclaration inherits the base tag until it receives its +own valid tag; clearing that local tag restores the inherited tag. + +Section names are ordinary names, so extensions can supply their own groups. +Property editors retain the declaring class and property identity when grouped. +Mixed selections continue to expose their shared editable property surface. + +## Collection tags + +Expand `Collection Tags` in Properties. Press `+` to open a new text row. +Enter a name and press Enter or leave the row to apply it. A blank or +whitespace-only name cancels the row; Escape cancels an edit. + +Click an existing name to rename its selected memberships. Use `x` to remove +them. Mixed membership is marked, and its checkbox can add the tag to the +remaining selected instances. Authored tag edits support undo and redo; +renaming to an existing tag preserves each selected instance's prior membership +when undone. A full tag table refuses a rename before removing its original tag. diff --git a/docs/THIRD_PARTY_NOTICES.md b/docs/THIRD_PARTY_NOTICES.md index d639d8d90..e749c389f 100644 --- a/docs/THIRD_PARTY_NOTICES.md +++ b/docs/THIRD_PARTY_NOTICES.md @@ -12,7 +12,7 @@ All of them are permissive and compatible with MPL-2.0. **Nothing here is copyleft beyond MPL-2.0's own file-level scope**, and that is a condition of adding a dependency rather than a happy accident - see `mono.vendor/AGENTS.md`. -One of them is not a dependency of the build at all. **luau-lsp is a developer +Two entries are not dependencies of the build at all. **luau-lsp is a developer tool**, cloned only when somebody runs `just luau-lsp`; `just setup` walks past it and no target links it. It brings a second copy of Luau with it, which is why it is built in a tree of its own - `.gitmodules` carries the reasoning. @@ -23,6 +23,9 @@ of the cloned tree before building. Nothing modified is redistributed - the patc diff against upstream, the build is local, and no shipped game contains a byte of it. `mono.vendor/AGENTS.md` argues the shape. +**Box2D is pinned for future 2D physics work.** The v3.1.0 submodule is not +configured or linked today, so it is not built or shipped. + | Library | Licence | Used for | In a shipped game | |---|---|---|---| | [SDL3](https://github.com/libsdl-org/SDL) | Zlib | window, input, GPU abstraction | client only | @@ -31,6 +34,7 @@ it. `mono.vendor/AGENTS.md` argues the shape. | [spdlog](https://github.com/gabime/spdlog) | MIT (bundled fmt is MIT) | logging behind `core::Log` | yes | | [Tracy](https://github.com/wolfpld/tracy) | 3-clause BSD | the engine profiler | yes, on demand only | | [Catch2](https://github.com/catchorg/Catch2) | BSL-1.0 | the test framework | no - tests only | +| [Box2D](https://github.com/erincatto/box2d) | MIT | future 2D physics work; pinned at v3.1.0 but not configured or linked | no | | [shaderc](https://github.com/google/shaderc) | Apache-2.0 | `glslc` at build time, `libshaderc` at runtime | yes, once a caller exists - see below | | [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) | Apache-2.0 | SPIR-V to MSL, from v0.15: `mono.tools/shadercross` at build time, `Engine::msl` at runtime | client only, once a caller exists - see below | | [Dear ImGui](https://github.com/ocornut/imgui) | MIT | editor and tooling UI | studio only | diff --git a/docs/VERSION_SPLIT.md b/docs/VERSION_SPLIT.md index 83ea10d73..bd691cf51 100644 --- a/docs/VERSION_SPLIT.md +++ b/docs/VERSION_SPLIT.md @@ -28,3 +28,9 @@ git worktree list The fixes-only full dev runner initially completed 647 suites: 643 passed and 4 failed. All four failures were subsequently resolved. The stale contract fixtures now pass focused checks: server, 255 assertions across 4 cases; CDN, 101 assertions across 1 case; launcher, 32 assertions across 2 cases. The preexisting portal solid-hat fixture passed in the full script suite, with 134 cases and 14,776 assertions, including 35 portal cases and 13,967 assertions. Headless Vulkan passed 10 cases and 364 assertions. Architecture passed with 48 modules, 6 programs, 34 layered modules and 6 fixtures. Shadercheck passed 76 shader modules. Luau passed 71 scripts, and TypeScript checks passed. The PNG decoder now refuses inflation beyond its header before growing output storage; the complete bake suite passed 121 cases and 15,352 assertions after this independent fix. The full ImageGraph archive remains preserved for review and was not revalidated. + +## Minimal 2D verification + +The complete dev build and server-only build pass. The optimized unity build of assetc and the CPU evaluation benchmark pass. New engine tests pass 419 assertions in 13 cases, including an AddressSanitizer and UndefinedBehaviorSanitizer run with leak detection. Complete affected suites pass: Studio, 13,020 assertions in 662 cases; bake, 15,425 in 128; assetc, 319 in 40; nodegraph, 204 in 23. All five MCP contract suites pass 2,135 assertions across 22 cases. Headless Vulkan texture and particle suites pass 364 assertions in 10 cases. The end-to-end Composer export, signed publication and ordinary client ImageLabel/ParticleEmitter rendering test passes 23 assertions; it checks both visible consumers independently. Architecture passes with 49 modules, 6 programs, 35 layered modules and all six fixtures; the server graph passes independently. Shader checks pass 76 modules. Source checks, generated module pages and scoped formatting pass. + +The full repository test runner was not repeated on the minimal branch; its unchanged fixes baseline was checked separately above. No interactive Studio session was run. The full archive was not revalidated. See [Static 2D ImageGraph](IMAGEGRAPH_2D.md) for Studio controls, the project format and the verified CLI command. diff --git a/docs/WEATHER_CLOCK_RESIDENCY.md b/docs/WEATHER_CLOCK_RESIDENCY.md new file mode 100644 index 000000000..d9b75ca6c --- /dev/null +++ b/docs/WEATHER_CLOCK_RESIDENCY.md @@ -0,0 +1,151 @@ +# Resident weather time and client synchronization + +The residency audit found two gaps: procedural shaders received time only +through CPU uniforms, and network clock refresh depended on ordinary component +replication. The implementation now retains an integer GPU counter and sends +independent reliable clock anchors every second. + +## Ownership and transfers + +| Data | Owner and residency | +|---|---| +| Packed cells, assemblies, page tables and summaries | Retained GPU buffers | +| Cloud history, reconstructed images and shadow maps | Retained GPU textures | +| Stateful cells, falling water, terrain flags and solver scratch | Retained GPU buffers; checkpoint decode is transient | +| Phase counter and displacement | One retained 32-byte GPU buffer per active world/pipeline generation | +| Authoritative definitions, anchors and events | Shared ECS and copied network messages | +| Client clock estimate and correction debt | Local ECS, driven by monotonic time | +| Visibility, allocation plans and cache signatures | Bounded CPU control metadata | + +Normal rendering neither mirrors the volume on the CPU nor reads back the GPU +clock. A changed logical sample uploads one 32-byte clock command. Other uploads +include view/appearance uniforms, changed page descriptors and explicit stateful +checkpoint/terrain input. Stateful validation still downloads grouped +diagnostics, `ceil(cellCount / 64) * 32` bytes per staged transition. This is +separate from a physical-volume mirror or clock readback. + +## GPU progression + +[WeatherGpuClock.cpp](../mono.engine/render/src/WeatherGpuClock.cpp) plans +absolute anchors or increments. [weather-clock.comp](../mono.engine/resources/shaders/weather-clock.comp) +adds the phase delta using two uint32 words with carry, then adds displacement +deltas modulo uint32. Integer arithmetic preserves large ticks and wrapped +wind coordinates without accumulating floating-point timer drift. + +Generation, summaries, cloud integration and shadows read the resident result. +Their ordinary time uniforms are zeroed when the resident path is active. +Portal and mirror captures reuse that generation's counter. Uniform evaluation +remains available for standalone fixtures and explicit fallback paths. + +The host supplies logical tick deltas from the smoothed clock, rather than +incrementing once per rendered frame. Repeated views and unchanged ticks do no +clock dispatch or upload. A missed render advances directly to the current +sample without replaying previous procedural generations. The GPU does not run +an autonomous background timer while no work is submitted. + +The counter receives an absolute anchor initially, every five source-clock +seconds, and after identity, revision, rate, backward-time or large-seek changes. +An ordinary periodic anchor agrees with the already accumulated counter. +Command cancellation invalidates its publication and forces an absolute retry. +The allocation remains resident until its generation/world is released. + +## Synchronization and smooth correction + +The server and Studio Play links prepare fresh samples every second, including +when ordinary replication is slower. Reliable admission respects entity interest. +Per-recipient publication receipts prevent a blocked client from causing repeated +sends to healthy clients. Retries retain the latest accepted anchor. Publication +uses the bounded current layer set, excluding retired providers' leftover clocks. +Pause, accepted edits and automatic fault suspension request immediate anchors. +Heartbeat ordering advances the sample sequence, without stepping weather time. + +Clients already estimate receipt time using local monotonic time and filtered +RTT/2, capped at half a second of delay compensation. Small corrections change +the local base rate within 90% to 110%: + +- A client ahead of the server slows down. +- A client behind the server speeds up. +- Fresh anchors measure error against the server's advancing timeline. + +This closes the correction debt in finite time for consistent samples. At the +10% limit, a one-second offset takes about ten seconds to close. A fixed midpoint +would leave a residual offset; the moving server estimate remains the target. +The GPU receives the resulting integer deltas, preserving the same correction. +Authoritative gameplay time is never adjusted to follow a client. + +Existing discontinuity policy remains explicit: new epochs, accepted timeline +changes and errors exceeding two seconds reconstruct and invalidate history. +Without a fresh sample, the local estimate extrapolates for at most two seconds, +then holds. Heartbeats are scheduled every second; transport backpressure and +loss can still delay them. RTT/2 assumes symmetric delay and does not measure +sender queue age, so exact simultaneous display time is not guaranteed. +Stateful fields retain their existing authoritative checkpoint reconciliation. +Clock agreement alone does not establish identical floating-point solver grids +across devices. + +## Device measurements + +Compared with `ce69e58d`, using the optimized `bench` preset, RTX 4090, Vulkan, +driver 580.173.02, 1920x1080, one procedural view and a 256x256 shadow cascade. +Two alternating runs at each starting tick 0, 128 and 250 requested three +benchmark samples each. The six run medians for the new clock pass range from +5.376 to 5.632 us, with median **5.504 us**. + +The comparison checks equal field/summary/ray/shadow work and exactly **32 extra +logical GPU bytes** in each phase. Eight advancing frames add eight clock +dispatches and 256 uniform bytes. Eight same-tick frames record eight clock +cache hits with zero clock dispatches and zero clock uniform bytes. All frame +compute-dispatch totals include the clock pass. These are serialized pass costs +with completion waits, not FPS or queue-overlap measurements. Other desktop GPU +work was present. Benchmark output stays on stdout. + +```console +MONO_WEATHER_GPU_BENCH_TICK=128 just weather-gpu-bench 3 bench 1920 1080 256 +``` + +## Verification + +GPU readback tests prove exact carry, modular displacement, pause/reuse, +cancellation, reanchoring and stable allocation. Deliberately incorrect uniform +time still produces CPU-reference cells and unsafe compact-page summaries when +the resident counter is bound. Normal rendering does not use those readbacks. + +The affected GPU selection passes 950,950 assertions in 23 cases in development +and strict CI, including portal/mirror weather, seams, shadows and stateful +checks. Headless renderer checks pass 830 cases in each preset. All 88 shader +contracts and MSL translations pass; device execution was checked on Vulkan. + +Clock tests exercise moving-target convergence at 30 and 144 FPS, unequal RTTs, +both skew directions, large ticks, stale samples and the extrapolation cutoff. +Heartbeat fixtures cover reliable capacity pressure, interested and excluded +clients, current membership, retry deduplication, faults, save/load and Studio +delivery. These shared suites pass in development, strict CI and the headless +server preset: + +| Suite | Cases | Assertions | +|---|---:|---:| +| ECS | 474 | 135,706 | +| Scene | 670 | 534,378 | +| Weather | 115 | 22,574 | +| Replication | 314 | 52,808 | + +Studio Play-link checks pass 36 cases and 5,785 assertions in development and +strict CI. Client component/property invariants pass three cases and 147 +assertions in each. The targeted server fault case passes 12 assertions in +all three presets. + +The complete headless-server suite passes 106 cases and 3,692 assertions. +Server component/property, weather and MCP checks pass seven cases and 274 +assertions in development and strict CI. Client, server and Studio programs +build in both presets; the headless server builds without staged shaders. +Architecture, source scanning, changed-file formatting and diff checks pass. + +Broader server validation exposed an outdated weather-resource manifest and +two mismatches in unchanged weather code. The property audit now permits +provably clean no-op writes while still detecting unmarked property/backing +mutations. Default stateful component envelopes round-trip as uninitialized +data, without becoming valid physical checkpoints. Initialized and malformed +physical checkpoint validation remains intact. + +The earlier [high-FPS portal handoff findings](WEATHER_VISUAL_VALIDATION.md) +remain separate and unresolved. diff --git a/docs/WEATHER_GPU_OPTIMISATION.md b/docs/WEATHER_GPU_OPTIMISATION.md new file mode 100644 index 000000000..2bf6b205c --- /dev/null +++ b/docs/WEATHER_GPU_OPTIMISATION.md @@ -0,0 +1,109 @@ +# Weather GPU compute optimisation, 2026-10-15 + +The page-summary kernel now uses one 64-lane workgroup per page. Each lane +reads eight cells, then shared-memory integer reductions combine maximum, +minimum, total density and sample count. Previously, one invocation read all +512 cells serially. The host dispatch changes with the shader; these two parts +must be deployed together. + +Summary output remains exact. Clipped cells contribute neutral extrema and +zero count. Page exits are uniform across a workgroup, and every remaining +lane reaches every barrier. The largest total is 130,560, within uint32. +Shared scratch is 1,024 bytes per workgroup. Certified-empty pages still +produce `(0, 0, 0, 512)`. + +Density sampling also avoids redundant work: + +- Interior LOD-zero samples reuse the selected page for emptiness and density + sampling. Existing margins guarantee that all eight interpolation corners + belong to that page. Boundary and transition samples retain their full checks. +- Compact density reads use the first eight bytes of an assembly, containing + the exact density sum and unsafe marker. Other channels retain their existing + decoding path. +- Density-only procedural fallback returns zero immediately when the vertical + envelope is zero. Full semantic cell generation remains unchanged. + +Unsafe assemblies retain canonical evaluation. Sampling resolution, integration +steps, optical error guards and visual quality settings are unchanged. The +reduction uses ordinary workgroup barriers without subgroup extensions. + +## Device measurements + +Measured on an NVIDIA GeForce RTX 4090, Vulkan, driver 580.173.02, using the +optimized `bench` preset at 1920x1080 with one 256x256 shadow cascade. +The baseline is commit `8261ac23`. The candidate includes density sampling +commit `e0dfc3ed` and parallel summary commit `f8cf937e`. Each uses its +corresponding summary dispatch code and compiled shaders. + +For each starting tick, two alternating baseline/candidate runs each requested +three benchmark samples. The harness emitted 11 phase rows per run, including +warmup rows. Each entry below is the median of the two run medians, measured +with completed device timestamp queries. Times are microseconds. + +| Starting tick | Summary before | Summary after | Same-tick clouds before / after | Advancing clouds before / after | Shadows before / after | +|---|---:|---:|---:|---:|---:| +| 0 | 76.032 | 5.120 | 1,849 / 1,738 | 3,399 / 3,388 | 2,348 / 2,342 | +| 128 | 73.728 | 5.120 | 2,302 / 2,219 | 4,286 / 3,606 | 2,364 / 2,256 | +| 250 | 75.008 | 5.440 | 1,801 / 1,812 | 2,791 / 2,891 | 2,388 / 2,374 | + +Across all six run medians, summary time falls from **74.752 to 5.120 us**, +about **14.6 times faster**, a **93% reduction**. Individual summary medians +range from 73.728 to 76.288 us before and 5.120 to 5.632 us after. +Cloud and shadow deltas are mixed, including a slower advancing-cloud result +at tick 250. Desktop GPU activity was present. These results establish the +summary improvement on this device, not a general frame-rate improvement. + +All compared phases retain identical dispatch counts, generated cell counts, +ray pixels, shadow texels and logical live GPU bytes. Advancing phases generate +536,576 cells across eight field generations, integrate 4,147,200 pixels and +evaluate 196,608 shadow texels. Logical residency is 265,548,696 bytes. +The summary's workgroup geometry intentionally changes while its page count +and 512 logical input samples per full page remain the same. + +The fixture waits for device completion between frames. These are serialized +pass costs, not throughput, queue overlap or end-to-end FPS measurements. +The performance fixture uses one procedural view. Stateful and multi-view +behavior are covered by correctness tests, without new performance claims. + +```console +MONO_WEATHER_GPU_BENCH_TICK=128 just weather-gpu-bench 3 bench 1920 1080 256 +``` + +The comparison keeps raw benchmark output in memory and prints results to +stdout. No benchmark output files are added. + +## Verification + +Development and strict CI client and renderer-test builds pass. Both presets +also pass all 87 shader resource contracts and MSL translation checks. Metal +and other physical devices have not been run. + +Four new GPU cases exercise the optimized code directly: + +- Compact density decoding covers every legal density sum, every child and + both unsafe-marker states, with unrelated packed channels varied. +- Density-only evaluation matches full packed GPU evaluation and independent + canonical CPU samples at boundaries, negative and extreme coordinates, + phase endpoints, intermediate ticks and UINT64_MAX. +- Summary readback matches independent CPU accumulation for complete and + partial dense grids, including the maximum total and thin edge pages. +- Sparse summary readback covers negative origins, dense and compact pages, + certified-empty pages, entirely unsafe pages and mixed unsafe assemblies. + +The final affected GPU selection passes **941,447 assertions in 21 cases** in +each preset. It includes canonical field parity, seams, eviction/refill, +shadows, portal and mirror composition, precipitation, lightning and stateful +GPU checks. Full headless renderer checks pass **822 cases** in each preset +(414,469 development assertions and 414,470 strict CI assertions). Formatting +and diff checks pass. + +```console +.cache/build/dev/tests/test_render '[gpu][weather],[gpu][weather-stateful],[cloud-seams]' --reporter compact +.cache/build/ci/tests/test_render '[gpu][weather],[gpu][weather-stateful],[cloud-seams]' --reporter compact +.cache/build/dev/tests/test_render '~[gpu]' --reporter compact +.cache/build/ci/tests/test_render '~[gpu]' --reporter compact +``` + +The earlier intermittent high-FPS portal-crossing and handoff sample-count +findings remain open in [visual validation](WEATHER_VISUAL_VALIDATION.md). +These compute changes do not resolve those findings. diff --git a/docs/WEATHER_IMPLEMENTATION_STATUS.md b/docs/WEATHER_IMPLEMENTATION_STATUS.md new file mode 100644 index 000000000..cd4b06cc6 --- /dev/null +++ b/docs/WEATHER_IMPLEMENTATION_STATUS.md @@ -0,0 +1,367 @@ +# Weather implementation and verification + +The [weather upgrade plan](WEATHER_SYSTEMS_UPGRADES.md) is implemented across +shared weather semantics, authoritative simulation and GPU presentation. The +approved device checks now run on Vulkan with an NVIDIA GeForce RTX 4090 and +driver 580.173.02. Canonical GPU parity, stateful evolution, sparse transition +images, lightning, portal composition and exact opaque-wall preservation pass +in both development and strict CI builds. CPU and GPU measurements are recorded +below. Other backends have not been run. + +The later [GPU compute optimisation](WEATHER_GPU_OPTIMISATION.md) records +parallel page summaries, reduced density-sampling work and a measured +14.6-fold summary-kernel speedup on the local Vulkan device. Its affected GPU +and complete headless renderer checks pass in development and strict CI. + +The [resident clock audit](WEATHER_CLOCK_RESIDENCY.md) adds an integer GPU +counter, reliable one-second client anchors and measured clock traffic. +Small corrections use the existing bounded local rate slew. + +The later [portal and mirror visual validation](WEATHER_VISUAL_VALIDATION.md) +records the expanded scene checks, capture repairs and an unresolved +intermittent black frame during a 144 FPS portal crossing. The final client +rerun also fails handoff sample-count gates. A passing earlier isolated rerun +does not close these findings. + +## Implemented behavior + +| Area | Implementation | +|---|---| +| Authoring | `WeatherCompute` inherits `CloudCompute` appearance and composes with existing `Atmosphere` and `FogEffect`; reflection, save/wire codecs and both script declarations are generated | +| Procedural field | Versioned seed, canonical integer noise, eight-byte semantic cells, bounded arbitrary-time seeking, retained wind anchors and four-lane SSE2/NEON evaluation | +| Synchronization | Accepted definitions, canonical clocks, receipt estimates, final pause anchors, named saved epoch high-water marks and bounded late-join inboxes | +| Stateful field | Fixed camera-independent FP32 grid, pressure projection, condensation, source/boundary budgets, terrain solids, surface moisture flux and conservative falling-water transport | +| Checkpoints | Complete format 3 state, bounded replay and transactional refusal; replicas query validated bytes without another CPU solver grid | +| Script sampling | Owned `WeatherCompute:Sample(position[, groundHeight])` results in Luau and JavaScript, including exact decimal tick/epoch metadata | +| Sparse volumes | Coarse coverage, dense/compact/certified-empty pages, bounded per-frame preparation, shared multi-view requests and immediate teleport invalidation | +| Assemblies | Exact encoded totals, separate child velocities, hysteresis, canonical reconstruction and a final optical error guard | +| Rendering | Packed GPU generation/evolution, half-resolution volume integration, depth-aware temporal reconstruction and optional distance-bounded cloud shadows | +| Fallback | Bounded fragment clouds for Tier B, missing graph products and refused compute resources; unavailable shadows use unity transmittance | +| Consumers | Atmosphere response, terrain-relative fog, rain/snow/hail particles, roof clipping, authoritative lightning/hail events, ribbons and delayed thunder | +| Lazy work | ECS write/membership epochs, retained terrain snapshots, bounded maintenance, cached descriptors, completed-publication reuse and retry gates for unchanged failures | +| Demo | Six shared weather recipes, procedural default, stateful/pause controls and ground/interior/above/valley/roof/storm views; canonical precipitation replaces the old manual rain emitters | + +Physical cells occupy 32 bytes plus four bytes of falling water. Terrain heights, +solid bits, scratch, forcing, checkpoints and renderer targets are additional +storage. GPU stateful buffers currently require 260 bytes per cell plus grouped +diagnostics. The eight-byte procedural payload is not a complete physical-state +memory estimate. + +GPU publication swaps physical cells, falling water and terrain flags only after +completed validation. Compatible forcing and appearance edits retain the same +physical owner across graph pipelines. A changed terrain payload requires a new +accepted terrain revision. Stateful checkpoints remain available when visible +clouds are hidden but ground shadows are active. + +## Plan exit gates + +The plan's eight stages have separate acceptance gates. Compiled shaders and +headless planning tests do not establish rendered behavior or device performance. + +| Stage | Current evidence | Acceptance | +|---|---|---| +| 1. Contract and dense slice | CPU/GPU packed bytes agree, including phase-wrap and UINT64_MAX; world rays clip to depth; all six recipes and interior/above views were captured | Passed on local Vulkan | +| 2. Time and lifecycle | Clock/replication suites cover cold joins, correction, pause and save/load; actual renderer shutdown/reinitialization regenerates the field and reproduces the cold image exactly | Passed on the local Vulkan backend | +| 3. Sparse residency | Dense/compact words and per-pixel dense references agree across seams, missing pages, eviction and refill; planning covers budgets, motion, teleports and multi-view unions | Passed within declared optical/FP16 bounds | +| 4. Lazy LOD and assemblies | Totals, retained velocities, reconstruction, hysteresis and bounded maintenance pass; compact/coarse transitions and unsafe shadow fallback meet their error bounds | Passed | +| 5. Lighting and shadows | Device fixtures cover occlusion, temporal silhouettes, colored sun/night, direct versus ambient light, disabled shadows and both portal capture paths | Passed on local Vulkan | +| 6. Weather consumers | Shared events, terrain adapters, VM controls, fog/roof geometry and mixer callbacks pass; actual GPU precipitation composes, lightning branches render/expire, and roof/storm/fog captures were inspected | Passed | +| 7. Stateful evolution | CPU budgets/checkpoints and actual GPU terrain, falling-water, top escape, shared-owner and transactional-refusal fixtures pass | Passed with authoritative CPU state and cosmetic GPU evolution | +| 8. Performance and replacement | 720p/1080p device work, shadow quality and logical memory are measured; compiler optimization reduces costs; replaced manual weather effects are removed | Named local prototype budget passes; hardware limits below | + +The six demo recipes cover clear sky, scattered cumulus, overcast stratus, +towering storm, wispy ice and ground fog. They use the same provider with distinct +shape, moisture, temperature and motion controls. The far clip is 6,000 metres; +interior and above-cloud cameras follow the selected layer. Actual VM button +events verify these controls, including snow without liquid rain in the ice +recipe and positive near-ground fog extinction. Canonical occupancy checks +retain scattered cumulus, broad stratus and sparse ice at three specified times. + +## Headless validation + +The development client, server and Studio programs, the headless server preset +and strict CI programs build. These completed central runs include the final +review fixes. + +| Suite | Assertions | Cases | +|---|---:|---:| +| Shared weather | 22,474 | 108 | +| Scene | 530,090 | 669 | +| Game | 5,243 | 111 | +| Script sampling, both VMs | 214 | 3 | +| Full script host | 9,043 | 450 | +| Shared script API | 14,886 | 142 | +| Graph | 11,933 | 255 | +| Replication | 52,540 | 312 | +| World | 34,188 | 294 | +| Weather rendering, headless | 118,158 | 53 | +| World view collection | 938 | 15 | +| Thunder, headless | 4,225 | 12 | +| Audio mixer | 16,743 | 36 | +| Studio weather | 21 | 3 | +| Weather demo | 598 | 2 | +| Full renderer, dev and strict CI separately | over 413,000 | 819 | +| Weather GPU, dev and strict CI separately, Vulkan | 486,878 | 16 | + +Review and tests found real defects in checkpoint cache invalidation, top escape +flow, shadows-only checkpoint collection, fully blocked storm columns, thunder +age/deadlines and terrain preparation observation. Each has a concrete fixture. +Incorrect cadence, graph reuse and single-substep expectations were corrected +where the production behavior was valid. Real GPU runs exposed retained history +buffers being incorrectly treated as externally supplied buffers, and a coarse +shadow fallback bypassing its fine optical guard. Both have reproduced failures +and passing checks. Graph baseline tests now include the weather nodes and +resources. The demo test checks the actual client camera, including view requests +and free movement between requests. + +Architecture and all six fixtures pass. Source scanning and its fixtures pass +with zero open ownership, crossing-pointer or serialized-name-ID findings; +public-header reports are advisory. Component documentation and generated +bindings pass their checks. All 128 Luau examples, the Luau +language server and Studio TypeScript checks pass. All 87 staged shaders pass +resource-binding checks and MSL translation. Public documentation coverage +passes after documenting the new API. Formatting and em-dash checks pass. +Checkpoint format 3 decoding passes 10,000 libFuzzer runs under AddressSanitizer +and UBSan, including valid terrain/rain and escaped-top seed checkpoints. +Raw build/test logs and derived artifacts live under the build tree. + +## CPU measurements + +Five-sample benchmark runs on an AMD Ryzen 9 9900X, with the named benchmark +presets. Other programs loaded the machine, including a game using about eleven +CPU cores. Variance is substantial, especially in optimized solver results. +These figures describe the fixtures and do not establish shipping frame budgets. +Benchmark output is printed to stdout. + +| Operation | `bench` optimized | `bench-o0` | +|---|---:|---:| +| Scalar procedural sample | 339 ns/cell | 1,422 ns/cell | +| Batched procedural sample | 260 ns/cell | 1,371 ns/cell | +| Four-view shared maintenance check | 17 ns/call | 407 ns/call | +| 4,096-cell cold solver tick | 2.11 ms | 29.70 ms | +| 4,096-cell warm solver tick | 1.95 ms | 25.19 ms | +| 4,096-cell terrain/rain/source tick | 2.04 ms | 26.08 ms | +| Complete 4,096-cell checkpoint encoding | 298 us | 4.16 ms | +| 4,096-cell presentation packing | 225 us | 1.45 ms | + +Cached adjacency, pressure-neighbor counts and direct typed rows remove wrapper +work from Jacobi iteration while preserving the original summation order. +The previous warm O0 fixture measured 187.7 ms under concurrent build load; +different host loads prevent treating the difference as a controlled speedup. +O0 selects scalar evaluation because its intrinsic wrappers previously measured +slower than the scalar path. Optimized builds use four-lane integer arithmetic. + +Actual render residency benchmarks measured 219 ns for warm four-view reuse, +109 us for first one-view coverage, 171 us for first four-view coverage and +151 us for teleport invalidation. Complete four-view maintenance measured +19.4 ms across the bounded preparation steps, not in one presentation frame. +Descriptor preparation measured 324 ns; temporal keys for 32 views measured +560 ns and four-cascade shadow planning measured 304 ns. Weather emission +against 10,000 bounds measured 76.8 us unchanged and 287 us cold. + +Words and byte planes round-trip every legal codec byte exactly. Software E4M3 +is lossy, bounds error to eight unsigned/four signed codes, retains the same +eight-byte cell payload and adds 1 KiB of lookup tables. Packing fixtures consume +encoded data before decoding so the compiler cannot erase an immediate inverse. +Sub-nanosecond reported word costs are below the report's resolution and do not +justify a storage decision. + +Certified empty procedural intervals retain no field payload and include the +sampling halo. The conservative bound passes one million evaluator samples, +6,000 worst-noise cases, 50,112 interval checks, 32 symbolic lemmas and sanitizer +checks. Stateful history does not use that certificate. An isolated uniform-page +fixture halves field payload but reduces metadata-inclusive memory by only +5.24 percent; no general compression ratio is claimed. + +## Device verification and measurements + +User approval covered real GPU fixtures, benchmarks, short headless captures and +reruns after fixes. Vulkan is the locally exercised weather backend. MSL +translation and binding checks pass for all 87 shaders, but Metal execution has +not been tested. The NEON branch has not executed on this x86 host. + +The device fixtures compare canonical CPU/GPU words at large and wrapped times, +validate terrain/rain/top-boundary evolution, and reject partial stateful +publication. Renderer recreation regenerates the procedural field. Volume +fixtures compare every pixel against a dense reference across dense/compact +seams, coarse LOD, missing pages, eviction, refill and topology blending, with +the declared optical budget and FP16 allowance. Lightning images require visible +branches away from the main channel and exact restoration after expiry. + +Portal comparisons cover mixed and separate captures, two camera poses and +both compute and pending-stateful fragment fallback. They keep the existing +two-display-code tolerance and verify cold scratch allocations and warm reuse. +These checks exposed missing capture weather, padded-depth sampling and +oblique fallback rays crossing infinity. Capture weather now uses stored depth, +its own camera, bounded bank-owned scratch and no shared temporal history. +Raw opaque-wall captures proved exact zero scattering, unit transmission and +zero medium hits. Weighted reconstruction normalization still introduced an +FP16 ULP at some pixels. An exact-neutral branch now preserves the original +scene, with unchanged exact comparisons in both pinned and ordinary graph +variants. Non-neutral and absorbing samples retain the original integration. + +Inspected 1280x720 captures include the six recipes, cloud interiors, above-cloud +views, valley fog, roof and storm controls with the sunset environment. Artifacts +are under `.cache/build/dev/weather-acceptance/`. Cumulus was nearly dry in the +original recipe. Its moisture now produces both clouds and clear columns at +ticks 0, 100 and 500. Stratus retains at least 75 percent occupied columns at +those times; ice remains sparse and deliberately faint. Actual VM tests sample +the canonical field rather than checking only the authored parameter values. + +The optimized `bench` fixture uses 1920x1080 output, 960x540 cloud images, +one layer/view/opaque receiver, 64-metre cells, 512-page budget, maximum LOD 4, +12 authored cloud steps and one shadow cascade. The kernel takes four samples +per authored step. Completed GPU queries are sampled every fourth frame; +the cold submission has no sampled device timing. Recording time excludes the +explicit device-idle wait. Eleven printed phase rows from a three-sample job, +including harness warmups, supply each median below. + +| Prototype comparison | Before | After | +|---|---:|---:| +| Same-tick cloud integration, 32x32 shadows | 6.22 ms | 2.35 ms | +| Advancing cloud integration, 32x32 shadows | 8.93 ms | 3.75 ms | +| Shadow map, 32x32 | 6.45 ms | 1.80 ms | + +This comparison changes shader compiler optimization while retaining identical +work counters and residency. The two weather kernels use `-O -g`; debug names +are needed for the SPIR-V/MSL binding check. Their unused cloud colour sampler +was removed and bindings renumbered. Extra page-lookup and raw-corner caches +were measured and removed because their gains did not survive the final gate. +Power-of-two page masks replace signed division; negative-coordinate behavior +follows the bit-preserving integer conversions in the +[GLSL specification](https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.html). + +The subsequent shadow-quality sweep, without the raw-corner cache, measured +the following medians. Other desktop/GPU work was present, including a resident +19,608 MiB model server. Variance prevents ranking the close quality settings or +claiming an isolated maximum frame time. + +| Shadow resolution | Advancing cloud | Shadow map | Approximate sum of measured weather passes | Logical live GPU bytes | +|---|---:|---:|---:|---:| +| 64x64 | 5.92 ms | 1.97 ms | 8.03 ms | 265,057,176 | +| 128x128 | 5.98 ms | 3.93 ms | 10.06 ms | 265,155,480 | +| 256x256 | 5.37 ms | 2.96 ms | 8.47 ms | 265,548,696 | + +Final runs after the depth/neutral-reconstruction fixes retain the authored +256x256 single-cascade default: + +| Output | Same-tick cloud | Advancing cloud | Shadow map | Sum of measured weather passes | Logical live GPU bytes | +|---|---:|---:|---:|---:|---:| +| 1280x720 | 2.00 ms | 3.00 ms | 2.48 ms | 5.60 ms | 127,297,176 | +| 1920x1080 | 2.39 ms | 3.73 ms | 2.41 ms | 6.28 ms | 265,548,696 | + +At 1080p, CPU command recording measured 0.75 ms per same-tick frame and +1.03 ms per advancing frame; the cold recording measured 9.58 ms. These are +recording durations, not total frame or first-use shader compilation costs. + +The local prototype target is at most 12 ms for these measured weather passes; +these sampled medians pass it. This is not a full-frame, cold-start or +cross-hardware guarantee. The sum includes field generation, summary, +integration and reconstruction; it does not imply queue overlap. Logical live +bytes cover the renderer's tracked resources, not just weather cells and not +driver heap commitment. Advancing frames generate 536,576 cells over eight +generations; same-tick frames generate none, record eight field-cache hits and +still integrate eight views. Refinement and history warmup allocate resources, +so these short phases do not establish allocation-free steady state. + +Run `just weather-gpu-bench 3 bench 1920 1080 256`. Width/height are bounded to +3840x2160; shadow resolution is a power of two in 32..2048. Invalid configuration +is refused before SDL initialization. Only `MONO_WEATHER_GPU_BENCH=1` enters the +device path. The benchmark requires positive generation, summary, ray and shadow +work, plus actual same-tick reuse, so an empty/refused workload cannot report +success. Results print to stdout. Disabled-harness timings are not GPU evidence. + +## Uncapped presentation and follow-up performance, 2026-10-15 + +Client presentation now defaults to immediate mode with no FPS cap. `--vsync` +restores display pacing, and `--max-fps N` sets an explicit presentation rate. +The fixed simulation rate remains independent. Headless data-factory and +inherited presentation services retain their bounded service cadence. See +[client frame pacing](../mono.client/docs/FramePacing.md). + +Studio also defaults to uncapped presentation. Its Preferences page now exposes +an **Uncapped presentation** toggle that restores the saved active, idle, +focused and unfocused limits when disabled. Explicit saved caps still load; +`--uncapped` remains a temporary override. See +[Studio frame pacing](../mono.studio/docs/FramePacing.md). The local user profile +was switched to uncapped without changing its other values; the previous file +is backed up under `.cache/build/dev/weather-uncapped/studio-preferences-before.json`. + +Three sequential 180-frame native window checks at 640x360 reported 464 FPS +by default, 60 FPS with VSync and 95 FPS with a 100 FPS cap, including startup. +These empty-scene checks verify pacing choices rather than weather throughput. + +Changing sunlight previously changed the exact shadow-demand radius every +frame, repeatedly restarting sparse residency maintenance. Planning now expands +requested ranges upward to a world-brick boundary and uses that same range for +both coverage and invalidation. Crossing the expanded boundary still rebuilds +immediately. Tests exercise a camera between the raw and expanded limits, plus +160 actual animated-sun shadow demands completing bounded maintenance. + +Two sequential 600-frame `dev` runs used the same final shaders, 1280x720, +`Weather.luau`, no FPS cap and an RTX 4090 Vulkan backend. The retained executable +for the first run predates the CPU residency fix. The before snapshot retains +396 frames in its five-second window; the after snapshot contains all 600. + +| Development frame-graph measurement | Before | After | +|---|---:|---:| +| Residency planning median | 6.969 ms | 0.011 ms | +| Residency planning mean | 6.944 ms | 0.085 ms | +| Whole-frame median | 12.409 ms | 4.738 ms | + +These are unoptimized CPU measurements with concurrent desktop/CPU work, not +shipping performance guarantees. Startup and maintenance spikes remain: the +after run includes a 2.622-second first-use frame. Snapshots and runtime logs +are under `.cache/build/dev/weather-uncapped/`. The optimized `bench` residency +suite measures the new 180-frame animated-sun scenario at 16.867 microseconds +per frame, including its initial bounded maintenance. Run +`just weather-residency-bench 3 bench`. + +Cloud noise now skips an epoch when its integer interpolation weight is exactly +zero. Two call sites retain the original integer results and avoid the interior +regression measured with a larger four-call-site variant. Shadows retain their +original branchless interpolation because endpoint branching regressed their +interior timings. Packed-cell GPU parity covers the branch boundaries, extreme +signed coordinates, feature shifts and epoch wrap. + +The final 1920x1080, 256x256-shadow GPU comparison alternated original and final +shader binaries twice. Each value below is the range of two medians, each from +11 printed phase rows of a three-sample job. Work counts and tracked residency +were identical. + +| Initial canonical tick | Original paused cloud integration | Final paused cloud integration | +|---|---:|---:| +| 0 | 2.356 to 2.372 ms | 1.763 to 1.807 ms | +| 128 | 2.362 to 2.398 ms | 2.282 to 2.301 ms | +| 250 | 2.439 to 2.482 ms | 1.786 to 1.800 ms | + +The roughly 24 to 27 percent endpoint gain applies to endpoint phases, which +cover 13 of 256 phase codes. It is not a whole-cycle speedup. Interior cloud +timings did not regress in these comparisons; shadow timings remained within +the observed run variance. Set `MONO_WEATHER_GPU_BENCH_TICK=128` for an interior +phase. Invalid, malformed and overflowing tick settings are refused before +device initialization. Device timestamps remain sampled and cold GPU time is +unavailable, as described above. + +Validation passed in both `dev` and strict `ci`: six pacing/settings cases +(48 assertions), all 821 headless renderer cases (414,448 assertions), and +16 actual GPU weather cases (801,390 assertions). All 87 shader SPIR-V/MSL +contracts, changed C++ formatting and changed-file em-dash checks pass. Metal +execution remains unverified; these device results are local Vulkan evidence. + +Broader Studio checks exposed a pipeline-editor compatibility gap: weather's +storage-image output could not connect to a colour-image reader when saving. +The adapter now accepts that read edge while retaining buffer/image and +depth/colour rejection. Tests round-trip all seven weather nodes, their pins, +resource descriptors and edited execution settings through save, build and +schedule compilation. + +All 722 Studio headless cases pass in both presets (76,701 assertions each). +The two MCP contract cases launch a real GPU-backed Studio, so they now carry +the GPU tag and use isolated configuration directories. Device/world startup +has a separate 60-second allowance after a measured 24-second cold start; +individual protocol replies retain their five-second deadline. Both manifests +were missing only the new weather module's resource entry. The strict updated +contracts pass in both presets (493 assertions each). Source checks and the +architecture check also pass. Studio's new Preferences control has behavioral +test coverage; its visual interaction was not exercised. diff --git a/docs/WEATHER_PERFORMANCE_AUDIT.md b/docs/WEATHER_PERFORMANCE_AUDIT.md new file mode 100644 index 000000000..698652603 --- /dev/null +++ b/docs/WEATHER_PERFORMANCE_AUDIT.md @@ -0,0 +1,102 @@ +# Weather performance audit + +## Setup + +Captured 2026-10-15 on an RTX 4090 with Vulkan driver 580.173.02. The native +client used the `dev` preset, a CPU build at `-O0`, uncapped at 1280 x 720, with +profiling enabled. Each run used one view, with no portals or mirrors. The +FrameGraph summary covers the final approximately five seconds of a +`--profile-seconds 15` run. All runs used `--capture ` and +`--frames 100000` to keep the same diagnostic scene-target path as the +exploratory headless runs. Profiling ended before the capture frame, so no +capture file was written. The native presentation path still used an offscreen +scene texture and an extra composition step, as described in +[`Client.cpp`](../mono.client/src/Client.cpp#L4647). On and off runs used the +same path, which makes their paired delta illustrative, but these figures are +not ordinary client FPS measurements. + +Each case has one weather-off and one weather-on run. The scene copies of +[`Weather.luau`](../mono.engine/examples/assets/scripts/Weather.luau) selected +the preset and camera at startup and initialized authored light, cloud and fog +values immediately. Off disabled `weather.WeatherEnabled`, `weather.Enabled`, +`lowBank.Enabled` and `ruinMist.Enabled`. On enabled them, including +precipitation and weather responses. Geometry, authored sky, atmosphere, light +and post effects were otherwise the same. Standard output was captured in RAM; +no raw benchmark output files were kept. Desktop GPU activity was present, so +these single paired runs are illustrative development-build measurements, not +optimized release guarantees. All six runs exited successfully. The weather +work guard showed no active weather GPU work when off and an integration pass +when on. + +## Frame timings + +Values are FrameGraph wall-clock frame durations in milliseconds. The on-run +window and frame count are listed for context. + +| Case | Off mean | Off p99 | On mean | On median | On p99 | On max | On frames / window | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | --- | +| Overcast ground | 4.467 | 7.545 | 9.410 | 9.362 | 15.897 | 18.533 | 518 / 4.991 s | +| Dense stratus interior | 4.600 | 7.578 | 23.201 | 22.224 | 34.897 | 42.357 | 213 / 4.997 s | +| Ground fog valley | 4.712 | 7.644 | 9.520 | 9.200 | 16.921 | 17.671 | 511 / 4.995 s | + +At 60 FPS the frame budget is 16.67 ms. The dense interior run exceeded that +budget on average in this capture. Its cloud ray-marching pass averaged +20.248 ms, the dominant measured cost. That result describes this one dev run, +not a general release-performance claim. The final windows exclude startup, +but this does not establish that all first-use costs disappear in longer runs. + +## Render passes + +| Case | Cloud pass mean | Local fog pass mean | Shadow update mean | +| --- | ---: | ---: | ---: | +| Overcast ground | 6.257 ms | 0.338 ms | 1.847 ms | +| Dense stratus interior | 20.248 ms | 0.011 ms | No update sampled | +| Ground fog valley | 6.672 ms | 0.269 ms | 1.123 ms | + +Shadow timings are conditional update costs, not per-frame costs. Field, +summary and clock work measured approximately 0.012-0.013 ms, 0.005 ms and +0.004-0.005 ms respectively. The demo uses 32 authored ray steps, two shadow +cascades at 256 resolution, 512 sparse pages, 64-metre canonical cells and a +20 Hz weather timeline. The cloud integrator takes four samples per authored +step, so this demo runs up to 128 integration samples. The existing optimized +benchmark fixture uses one cascade and 12 steps, for 48 samples, so its numbers +do not represent this dense demo scene. + +Headless exploratory runs showed large renderer waits and are excluded from +the native measurements above. Their cause has not been established. The native +client uses an SDL GPU swapchain, where the allowed frames in flight setting +applies; see [`SDL_SetGPUAllowedFramesInFlight`](https://wiki.libsdl.org/SDL3/SDL_SetGPUAllowedFramesInFlight). +The headless wait measurements do not establish that production scenes stutter +or identify first use as their sole cause. + +## Visual and lighting findings + +The inspected acceptance captures are `stratus.png`, `inside.png`, `storm.png` +and `fog.png` under `.cache/build/dev/weather-acceptance/`. Overcast showed broad, +smooth blue-grey coverage. The storm view was almost uniform dark blue. The +warm horizon remains from the authored Sunset sky in +[`Weather.luau`](../mono.engine/examples/assets/scripts/Weather.luau#L361). +The prototype did not show convincing detailed self-shadowing across the +overcast layer. [`weather-clouds.comp`](../mono.engine/resources/shaders/weather-clouds.comp#L301) +uses one lighting value along each ray. + +The default lighting path does not automatically dim ambient light with cloud +cover. [`Sunlight.cpp`](../mono.engine/scene/src/Sunlight.cpp#L56) copies the +authored `Ambient` and `OutdoorAmbient` values, and +[`ambient-lighting.glsl`](../mono.engine/resources/shaders/ambient-lighting.glsl#L2) +uses those values directly. Deferred lighting applies +[`WeatherShadowFactor`](../mono.engine/resources/shaders/deferred-lighting.glsl#L200) +to direct sunlight; ambient lighting is separate. Optional weather density, +haze and glare responses are assembled in +[`WeatherEffects.cpp`](../mono.engine/render/src/WeatherEffects.cpp#L310), but +their strengths default to zero in +[`WeatherCompute.hpp`](../mono.engine/scene/include/engine/scene/WeatherCompute.hpp#L102). +Rain does not act as an ambient dimmer. + +The demo supplies an authored presentation response by lerping brightness, +ambient and outdoor ambient in +[`Weather.luau`](../mono.engine/examples/assets/scripts/Weather.luau#L786): +clear uses brightness 3 and outdoor ambient `(110, 132, 170)`, stratus uses +1.35 and `(57, 73, 104)`, and storm uses 0.55 and `(25, 37, 64)`. That scripted +response works in the demo. Automatic engine ambient response to cloud cover +remains absent. diff --git a/docs/WEATHER_SYSTEMS_UPGRADES.md b/docs/WEATHER_SYSTEMS_UPGRADES.md new file mode 100644 index 000000000..5809afcc7 --- /dev/null +++ b/docs/WEATHER_SYSTEMS_UPGRADES.md @@ -0,0 +1,753 @@ +# Weather systems upgrades + +## 1. Proposed system + +Build seeded procedural clouds as part of one weather model shared by clouds, +ground fog, precipitation, wind and storms. Keep the resident volumetric field, +its sparse representation and its visual computation on the GPU. ECS owns the +authored settings, weather timeline and authoritative weather events. The +renderer owns disposable device resources derived from those inputs. + +Use a directly evaluable procedural field for the first complete system. A cell +at a particular weather tick can be reconstructed from its world coordinate, +seed and timeline segment without simulating from world creation. This provides +deterministic initial conditions, time progression, bounded late joins and +recovery after GPU resource loss. It is a designed weather approximation, not a +numerical atmospheric forecast. + +Support a separate stateful evolution mode when accumulated advection, +condensation and feedback are required. That mode needs checkpoints and bounded +replay. An arbitrary evolving fluid cannot be made seekable by wrapping its +clock. Both modes use the same cloud rendering and weather input contracts. + +The deliverables are: + +- Seeded initial conditions and reproducible progression at integer weather ticks. +- Packed GPU cells, GPU generation and compute-based volumetric visualization. +- Dense nearby bricks, coarse distant bricks and absent empty regions. +- Conservative culling and LOD maintenance on an approximately five-second cadence. +- Assemblies that merge similar cells and split with deterministic reconstruction. +- Atmosphere integration, fog/mist, rain, snow, hail, thunder and lightning. +- Optional cloud shadows with separate distance and quality controls. +- Server clock synchronization, late joins, save/load and world lifecycle handling. + +This is an implementation plan. Formats, thresholds and performance figures +below are proposals or explicit arithmetic, not measured results. The current +`VERSION` is `0.26.0`; this document does not assign a release milestone or mark +roadmap work complete. + +## 2. Existing engine integration + +Extend the existing paths instead of creating another sky or particle system. + +| Existing location | Relevant capability | Planned use | +|---|---|---| +| [Atmosphere.hpp](../mono.engine/scene/include/engine/scene/Atmosphere.hpp) | `Atmosphere`, `Clouds`, `CloudCompute`, fog and resolved environment state | Preserve authored appearance controls; add a weather-driven source | +| [Volume.hpp](../mono.engine/scene/include/engine/scene/Volume.hpp) | Placed participating media, extinction and bounded resolution | Share integration and bounds handling for clouds and local fog | +| [CloudDensityOctree.hpp](../mono.engine/scene/include/engine/scene/CloudDensityOctree.hpp) | CPU sparse density tree and packed renderer snapshots | Use as a reference fixture and migration input, not a second live cloud simulation | +| [GpuParticleField.hpp](../mono.engine/scene/include/engine/scene/GpuParticleField.hpp) | GPU cosmetic particle requests with ECS-owned initial conditions | Reuse for precipitation populations where its capabilities fit | +| [RenderEnvironment.cpp](../mono.engine/render/src/RenderEnvironment.cpp) | Cloud environment compute and retained result signatures | Integrate weather revisions and shared cloud field residency | +| [environment-clouds.comp](../mono.engine/resources/shaders/environment-clouds.comp) and [volume.frag](../mono.engine/resources/shaders/volume.frag) | Existing cloud and volume shader paths | Consolidate sampling and lighting when replacing their work | +| [Weather.luau](../mono.engine/examples/assets/scripts/Weather.luau) | Existing weather demo | Extend into the visual acceptance scene | + +`CloudDensityGpuNode` is currently a 48-byte node containing eight child indices +and four floats. That is not a nine-byte weather cell, and tree overhead must +not be counted as cell payload. Keep existing callers working during migration; +remove the replaced production path after equivalent rendering is verified. +Retain a CPU tree only for callers that still need CPU-authored density. + +Respect [CODE_ARCH.md](CODE_ARCH.md) and the module instructions: + +- `scene`, L7 shared: semantic authored components and owned value snapshots. + New GPU layouts, page-table offsets and device handles stay out of this module. +- A proposed `weather` module, L8 shared: pure weather evaluation, timeline + resolution and authoritative weather scheduling. Depend downward on `scene`, + `ecs` and `core`. Add its exact edges to + `mono.tools/architecture/expected_graph.json` when implementation creates it. +- `render`, L12 client: packed device layout, brick residency, assembly compute, + volume integration, shadows and temporal history. Built-in GLSL belongs in + `mono.engine/resources/shaders/`. +- `graph`, L9 shared: resource and dependency vocabulary. Weather node handlers + remain in `render`; the graph runtime never acquires a graphics dependency. +- `script`, L9, and its VM adapters: expose semantic weather controls and queries. + Record new component purposes in `mono.tools/componentdoc/purposes.md`. +- `replication`, L12 shared: encode copied weather definitions, clock anchors, + events and checkpoints. `mono.client` and `mono.server` wire services together. + +If physics needs wind, inject resolved weather samples or a low-level sampling +port. Do not add a sideways L8 `physics -> weather` dependency. GPU weather, +cloud density and cosmetic precipitation must never feed gameplay queries. +Authoritative simulation retains the engine's strict IEEE and fixed-tick rules. + +## 3. Parameters that produce useful variety + +The requested six inputs are useful, but their meanings need to be distinct. +Cloud condensate is not air density. Relative humidity is not conserved water +content. Height is a coordinate rather than a substance that spreads. + +| Requested parameter | Canonical meaning | Storage decision | +|---|---|---| +| Density | Physical condensate mass concentration in kg water/m^3, or a normalized visual proxy with a named conversion to that unit; rendering derives extinction | One quantized byte per resident cell; separate air-density approximation for buoyancy | +| Temperature | Temperature relative to an altitude-dependent reference profile | Signed byte anomaly; full reference profile on the layer | +| `y_level` | Altitude in metres in the weather coordinate frame | Derive from brick origin and cell index; store a layer base and brick coordinate | +| Humidity | Water-vapour mixing ratio in kg water/kg dry air, with relative humidity derived from temperature and pressure | One quantized byte; never conserve or average relative humidity as water mass | +| Wind velocity X/Y/Z | Metres per second, with horizontal drift, shear and vertical lift | Three signed quantized bytes using layer scales | +| Pressure | Anomaly about a reference pressure profile | Signed quantized byte; avoid eight-bit absolute pressure | + +Add a small set of authored controls that the six inputs cannot express alone: + +| Control | Effect | +|---|---| +| Coverage and condensate scale | Independent cloud amount and opacity | +| Cloud base, thickness and vertical shape | Flat sheets, detached layers and tall towers | +| Horizontal feature size and breakup | Large fronts versus small scattered cells | +| Stability/lapse profile and lift strength | Stable stratus versus rising cumulus | +| Wind shear and turbulence amplitude | Stretched clouds, billows and changing silhouettes | +| Moisture supply, condensation and evaporation rates | Growth, clearing and precipitation transitions | +| Ice fraction/freezing profile | High ice clouds and cold precipitation appearance | +| Front contrast and progression rate | Distinct air masses rather than uniform drifting noise | + +Use correlated seeded fields at weather, cloud-body and detail scales. Their +scale ratios and vertical profiles provide more readable variety than giving +every cell unrelated random values. Separate purpose hashes for moisture, +temperature, pressure, body shape, erosion and split detail. Changing one +control must not reshuffle the unrelated fields. + +Start with configurable bounded encoding ranges, for example temperature +anomalies within +/-32 degrees Celsius, pressure anomalies within +/-32 hPa, +horizontal wind within +/-64 m/s and vertical wind within +/-16 m/s. These are +prototype ranges, not assertions about the full range of real weather. Vapour +and condensate scales are named per-layer quantities with documented units. +Changing a scale increments the definition revision and invalidates packed data. + +Preset scenes should cover clear, scattered cumulus, overcast stratus, towering +storm, wispy ice cloud and ground fog. Match each to a recognizable vertical +profile, moisture regime and wind field. Do not implement presets as independent +renderers. + +## 4. Weather behavior + +Pressure gradients accelerate air from high pressure toward low pressure; +rotation, friction and inertia modify the resulting wind. Pressure normally +decreases with altitude, so use pressure anomalies about a reference profile +instead of accelerating every cloud upward from the entire background gradient. +This corrects the rough high-to-low rule without requiring a forecast model. +See the [National Weather Service pressure and wind explanation](https://www.weather.gov/source/zhu/ZHU_Training_Page/winds/pressure_winds/Pressure.htm). + +Wind advects vapour, condensate and temperature. Turbulent mixing spreads +concentrations. Temperature and moisture affect buoyancy; rising air cools, +and condensation begins when vapour exceeds the local saturation amount. +Cold air alone does not guarantee a cloud. Humidity, temperature and pressure +must be interpreted together. See the +[National Weather Service humidity explanation](https://www.weather.gov/lmk/humidity). + +For the procedural mode, express these relationships through moving pressure +fronts, correlated moisture/temperature fields, altitude profiles and bounded +lift/deformation. Front displacement is derived from an analytically integrable +timeline wind, not accumulated independently by each client's render frames. +Use a smooth growth/decay envelope for each seeded cloud feature. Widening that +envelope can approximate mixing; it is not a mass-conserving diffusion solver. + +For stateful mode, implement the following fixed-step pipeline: + +1. Sample pressure-gradient and buoyancy forces, plus authored forcing and drag. +2. Update velocity using a declared compressible approximation or an + incompressible velocity projection. Keep thermodynamic pressure distinct from + the projection solver's numerical pressure. +3. Advect vapour, condensate and temperature from the previous state into the + next state. Prefer a bounded conservative finite-volume scheme when claiming + mass conservation; ordinary semi-Lagrangian sampling does not guarantee it. + Compressible mode must transport or retain dry-air mass to recover vapour + mixing ratio. An initial incompressible constant-density approximation must + declare that assumption. Count these physical or residual fields outside the + eight-byte cosmetic payload. +4. Apply bounded mixing, condensation and evaporation. Transfer equal water + amounts between vapour and condensate; include the chosen latent-heat term. +5. Transfer precipitating condensate into the precipitation budget and transport + it downward. Record source, sink and boundary flux totals explicitly. +6. Publish the completed state and its revision, then rebuild affected summaries. + +Document domain boundaries: horizontal periodic wrapping is an explicit world +option; finite domains need defined inflow/outflow; ground has a terrain-aware +mask and moisture source; the top has declared escape behavior. Never sample a +missing page as empty if it contains an unsampled active neighbor. + +Choose timestep and substeps from the smallest active cell size, maximum speed +and scheme stability constraints. A five-second maintenance interval is not a +simulation timestep. Reducing density to eight bits after every small step can +erase slow changes; retain higher precision or a quantization residual for +stateful evolution and include that memory in its budget. + +## 5. Determinism and arbitrary-time reconstruction + +Define three different guarantees: + +| Surface | Required guarantee | +|---|---| +| Server weather events and gameplay samples | Same accepted definition, tick and event sequence produce the same authoritative result | +| Procedural cloud samples | Same seed, timeline, canonical lattice coordinate and integer tick produce identical packed reference samples on supported backends | +| Lighting, ray integration and temporal reconstruction | Same weather field and event timing; pixel equality across GPUs is not promised | + +A seed and a server time do not make arbitrary floating-point GPU simulation +bit-identical. Operation precision, contraction and rearrangement matter. The +[Vulkan SPIR-V specification](https://docs.vulkan.org/spec/latest/appendices/spirvenv.html) +describes these freedoms. Treat backend determinism as a tested contract. + +For the directly evaluable mode, define a versioned function: + +```text +PackedSample = Evaluate(AlgorithmName, AlgorithmVersion, WorldSeed, + LayerName, TimelineSegment, CellCoordinate, WeatherTick) +``` + +Quantize control scales, coordinates and timeline inputs once with a versioned +encoding before CPU/GPU reference evaluation. Replicated canonical input words +must agree. + +Use a named, fixed-width unsigned hash with specified overflow and bit order. +Use integer lattice noise, fixed interpolation/rounding rules, bounded integer +lookup tables and wider temporary products for the packed reference evaluator. +Specify every signed conversion and intermediate bound. Do not use floating +point `sin` hashing, hardware filtered samples, unordered reductions or atomic +arrival order in this evaluator. A CPU reference evaluates individual samples +for tests without maintaining a CPU copy of the resident volume. + +The integer reference evaluator constructs a cosmetic packed field. It does not +replace the engine's strict IEEE authoritative simulation policy. Weather event +and gameplay evaluation lives in shared code under that policy; GPU lighting +may unpack samples into FP32 without feeding the result back into gameplay. + +LOD and camera distance select how many reference samples to retain and how +finely to integrate them. They never select a different seed, canonical timeline +or server storm event. Coarse averages use fixed child order and integer sums. +Compact page indices may differ by device without changing coordinate-keyed data. + +### Large time and seamless points + +Carry time as a 64-bit weather tick on CPU and wire. Pass high/low 32-bit words +to shaders when native 64-bit integer operations are unavailable. Convert only +a bounded segment-local phase to float for visual interpolation. Also keep +world coordinates as integer brick coordinates plus bounded local offsets; +camera rebasing must not change hashes. + +Keep a cumulative displacement at each timeline anchor. For constant or +piecewise-linear wind, evaluate the segment displacement directly, including +the anchor offset. A late join receives the current anchor, not the entire +world's previous wind changes. This avoids the incorrect `currentWind * totalTime` +shortcut when wind has changed. + +Modulo is safe only for a field designed to be periodic. A looping feature must +match value and first derivative at the wrap point, and its displaced coordinates +must also return to an equivalent spatial phase. A local phase wrapping alone +does not reset a drifting front. Rebased epochs keep their seed and displacement +continuity. A quaternion does not solve the missing history of a fluid. + +For non-repeating weather, schedule bounded deterministic feature lifetimes in +overlapping timeline windows. Evaluate the current window and the required +neighbor windows directly; fade features in/out with matching boundary slopes. +Retain enough overlap and displacement anchors to reconstruct the current field +without replay. Include authored changes in timestamped timeline records. + +## 6. Server time, replication and checkpoints + +The implemented [resident clock and synchronization audit](WEATHER_CLOCK_RESIDENCY.md) +records the GPU counter, one-second reliable anchors, rate slewing and measured +transfer costs. The descriptor and recovery requirements below remain the design +contract. + +Replicate a small weather descriptor, not every cloud cell. Proposed descriptor +fields are algorithm name/version, world epoch, seed, layer definitions, +parameter revision, current segment and displacement anchor, anchor weather +tick, tick rate and time scale. Stable layer and preset names cross saves/wires +as strings. Epochs, revisions, ticks and coordinates remain numerical values; +never serialize declaration-order IDs or `core::Name::Id()`. + +Use existing connection timing data where available. Add timestamped clock +anchors and request/reply timing only where needed. Estimate clock offset from +multiple samples with round-trip information; receiving a time value is not the +same as knowing the server's time at receipt. Extrapolate with the local +monotonic clock. Wall-clock dates are not the progression driver. + +Slew small clock corrections in the visual interpolation clock. Apply large +corrections by reconstructing the target field and invalidating affected +history. Render interpolation can lag by a small bounded amount, while server +events are indexed by exact ticks. Late, reordered and duplicate records are +handled by epoch, revision and event sequence. + +| Lifecycle case | Recovery | +|---|---| +| Late join in procedural mode | Receive the current descriptor and evaluate the required bricks at the target tick | +| Resource eviction or graphics device reset | Recreate only desired pages from the same descriptor | +| Pause, time scale change or world suspension | Apply an explicit tick-stamped timeline anchor; resume according to the world's pause policy | +| Save/load or server restart | Restore epoch, seed, settings, clock anchor, displacement and event sequence | +| Portal or world transfer | Use the destination world's descriptor; never borrow a pointer or GPU page from another world | +| Definition/version mismatch | Refuse incompatible decoding, request supported data or show the explicit visual fallback | + +For stateful mode, time alone is insufficient. A checkpoint contains its exact +tick, algorithm/encoding version, canonical domain and resolution, complete +packed fields, required high-precision residuals, topology, boundary/forcing +state and subsequent ordered events. Replay only a bounded interval from the +latest compatible checkpoint. Budget checkpoint bytes and admission bandwidth. + +Prefer a fixed canonical stateful grid and deterministic topology independent of +viewer LOD. If shared GPU stateful simulation cannot pass exact cross-backend +parity, transmit authoritative state/checkpoints for the shared field, or label +that mode cosmetic with authoritative events separate. Do not claim exact +stateful agreement while quietly replacing it with periodic resets. + +Checkpoint capture is explicit GPU-to-CPU transfer outside normal rendering. +GPU-only volume residency means there is no continuously mirrored CPU grid; it +does not mean a headless server has GPU state. A headless authoritative stateful +mode requires a shared CPU reference solver or an explicit compute host. The +procedural default needs neither server GPU simulation nor volume readback. + +## 7. Packed memory and packed computation + +The original fields total 72 bits: + +```text +density 8 + temperature 8 + y_level 16 + humidity 8 + + wind (3 * 8) + pressure 8 = 72 bits = 9 bytes +``` + +That is a logical byte count. A compiler-generated C++ struct, shader struct or +storage-buffer array can have a larger stride. Do not use compiler bitfields as +a wire/GPU ABI or assume a nine-byte layout is efficient on every backend. +Likewise, three eight-bit wind components are a 24-bit packed vector, not one +native FP24 number. Native FP8 support is not a baseline requirement. + +Use explicit normalized/fixed-scale integer encodings for the first format. +They give a known error bound and make exact reference generation simpler than +custom FP8. For `b` bits spanning a range of width `R`, round-to-nearest gives a +maximum unsaturated error of `R / (2 * (2^b - 1))`. Reserve invalid codes only +if needed, and recompute the bound when codes are reserved. A nonlinear density +encoding needs its own per-range error bound. + +Recommended baseline: two 32-bit words per cell, eight bytes total. + +| Word | Bits 0..7 | Bits 8..15 | Bits 16..23 | Bits 24..31 | +|---|---|---|---|---| +| 0 | Condensate | Temperature anomaly | Vapour | Pressure anomaly | +| 1 | Wind X | Wind Y | Wind Z | Flags, including optional quantized ice fraction | + +Height follows `BrickOrigin + CellIndex * CellSize`; use the centre offset when +sampling cell-centred data. Layer metadata supplies physical scales. If a +non-grid export genuinely needs per-cell height, define a separate explicit +nine-byte format with signed 16-bit local height and documented range/units. + +Compare this baseline to byte-plane SoA packing: four eight-bit values in each +32-bit word for each field. A packed word has one owning invocation; several +invocations must not read-modify-write different byte lanes of the same word. +Integer additions across packed lanes require independent masks and carry +handling. Unpack, compute in registers, repack is the portable baseline. + +Use FP32 or bounded 32-bit integer intermediates as required by the operation. +Do not assume packing produces an arithmetic speedup. Try subgroup/SIMD integer +operations only after parity tests and measurements. Shader bindings and formats +must follow the actual SDL backend contract, including the +[SDL compute pipeline binding rules](https://wiki.libsdl.org/SDL3/SDL_CreateGPUComputePipeline). + +### Memory arithmetic + +| Domain | Original nine-byte payload | Proposed eight-byte payload | +|---|---|---| +| One cell | 9 B | 8 B | +| One `8 * 8 * 8` brick, 512 cells | 4,608 B = 4.608 kB = 4.5 KiB | 4,096 B = 4 KiB | +| `50 * 50 * 4` cells, 10,000 cells | 90,000 B = 90 kB = 87.891 KiB | 80,000 B = 78.125 KiB | +| `50 * 50 * 4` bricks, 5,120,000 cells | 46,080,000 B = 43.945 MiB | 40,960,000 B = 39.0625 MiB | + +Keep cell, brick and assembly terminology distinct. The 90 kB example is correct +only if those 10,000 blocks are individual cells. A two-state buffer pair doubles +the payload. Page tables, headers, hierarchy nodes, occupancy, ghost cells, +velocity/residual retention and the rendering targets are additional costs. + +For a concrete prototype ceiling, `32 * 32 * 8` dense bricks at eight bytes per +cell cost 32 MiB per field state, or 64 MiB for a pair. A `960 * 540` RGBA16F +cloud image costs another 4,147,200 B, about 3.955 MiB, per image. Histories, +depth and auxiliary targets count separately. These are allocation examples, +not a selected shipping configuration or evidence of a GPU performance budget. + +## 8. GPU residency and sparse bricks + +Begin with a bounded uniform brick grid to establish reference output. Then add +a sparse page table over fixed `8^3` dense bricks and a coarse hierarchy. Avoid +one GPU allocation per brick. Use preallocated pools with configurable ceilings +for pages, summaries and maintenance scratch. + +Near occupied regions retain dense bricks. Mid-distance regions retain reduced +bricks or uniform assemblies. Far regions use coarse density/optical summaries +with consistent world-space seeded detail. Empty regions retain no cell payload. +Sparse occupancy and coarse LOD are different decisions: an occupied distant +cloud still has a representation, and a nearby empty region can stay sparse. + +Retain a guaranteed coarse representation for visible coverage and for shadow +casters outside the view. Refine within a bounded allocation budget. When a +pool is exhausted, keep coarse coverage and refuse optional refinement. Do not +evict the only visible parent before children are available. + +Use coordinate keys for pages. A stable integer scan allocates slots where +stable indexing is useful; unordered allocation must never enter random seeds. +Publish the new page table and field revision only after generation completes. +Keep generations for pages referenced by in-flight work and retire them through +the renderer's existing resource lifetime mechanism. + +Generation, summary reduction and publication are graph-visible operations. +For stateful simulation, read previous cells and write the next state, with +explicit dependencies and correctly filled neighbor halos. A brick with an +`8^3` interior needs `10^3` samples if a complete one-cell halo is stored; +sampling neighboring pages may be cheaper. Measure both. + +Procedural mode can regenerate evicted pages at the current tick. Stateful mode +must retain canonical evolution or restore from a compatible checkpoint; hiding +a page cannot pause its weather. GPU queue order preserves logical step +dependencies. Late GPU completion never supplies a nondeterministic gameplay +input, and a shared field advances once per weather tick, not once per viewport. + +```mermaid +flowchart TD + A[ECS weather definition and timeline] --> B[Tick and revision descriptor] + B --> C[GPU packed field generation or evolution] + C --> D[Sparse pages and assembly summaries] + D --> E[Volume integration per view] + D --> F[Cloud shadow transmittance] + E --> G[Depth aware reconstruction and composition] + F --> H[Direct sunlight attenuation] + A --> I[Authoritative events and gameplay samples] +``` + +## 9. Lazy culling and LOD + +Use five seconds as the initial configurable cadence for expensive occupancy +rebuilds, merge/split selection and residency planning. Stagger brick work by a +stable key so all layers do not rebuild together. Budget work per frame and +record actual maintenance age; a job that overruns five seconds is not fresh. + +Cheap per-view frustum/bounds checks and ray traversal still run each frame. +Camera motion and cloud movement make a five-second frozen visible list unsafe. +The expensive list is a conservative candidate set, not the final visibility +answer. + +Expand candidate bounds over their actual maximum lifetime. For speed limit +`MaximumSpeed`, acceleration limit `MaximumAcceleration` and lifetime +`MaintenanceSeconds`, a conservative movement allowance is: + +```text +MotionMargin = MaximumSpeed * MaintenanceSeconds + + 0.5 * MaximumAcceleration * MaintenanceSeconds^2 + + GrowthMargin + ReconstructionMargin +``` + +Include camera-relative movement in residency planning. Bound authored growth +and condensation over the interval, or retain an occupied envelope independent +of the old mean density. A zero mean at the previous update cannot prove a page +stays empty. Reduce maximum density/extinction for skipping, not only averages. + +Teleports, newly visible portal views, fast camera movement, large wind changes, +timeline changes and newly active weather force early maintenance. Until it +finishes, sample the guaranteed coarse representation or evaluate missing +procedural samples directly. Never display a hole because the timer has not +expired. Stateful mode requires resident canonical data for this fallback. + +Choose rendering LOD by projected brick size and bounded optical error, with +distance as a cap. Add hysteresis and a minimum residence time. Transition +between parent and children by sampling a single blended density field before +integration, or another method that does not double optical depth. Adapt ray +step size cheaply per view; rebuild density hierarchy only when necessary. + +Multiple views share world field pages and use the union of residency demands. +Each view has its own cheap cull and temporal history. Optional portal views +follow the existing fair rendering budget and use coarse clouds when necessary. + +## 10. Assemblies, merging and splitting + +An assembly is an aligned region of equal-resolution cells represented by one +coarse record and bounded reconstruction information. Start with eight spatially +adjacent octree children; do not merge arbitrary disconnected cells merely +because their velocities happen to match. + +Merge only when scalar variance, density contrast, vertical-profile variation, +velocity difference, direction and speed difference are within declared error +thresholds. Treat near-zero velocities separately so normalization does not +produce an undefined direction. Strong density edges, precipitation boundaries +and pressure fronts remain refined even when wind is uniform. + +Preserve physical water totals using consistent units: + +```text +VapourWaterMass = sum(DryAirDensity[i] * Volume[i] * VapourMixingRatio[i]) +CondensateWaterMass = sum(Volume[i] * CondensateMassConcentration[i]) +ParentVapourMixingRatio = VapourWaterMass / sum(DryAirDensity[i] * Volume[i]) +ParentCondensateMassConcentration = CondensateWaterMass / sum(Volume[i]) +``` + +Volume-weighted vapour is valid only under a declared constant dry-air density +or in cosmetic mode. Average temperature by heat capacity if it participates +in physical evolution; use volume-weighted temperature only as an explicitly +cosmetic approximation. Pressure is a coarse sample, not a conserved mass. A +physical merged velocity uses mass-weighted momentum. Retain minimum/maximum +values for conservative bounds and error checks. + +Preserve separate child velocities either as compact residuals or by reevaluating +the canonical procedural velocity at the child coordinates. Do not claim that +one mean vector preserves future separation. At least `3 * ChildCount` bytes +remain if every child retains three eight-bit velocity values, before any scalar +or topology overhead. Count this in measured compression ratios. + +### What can be recovered + +Averaging discards information. Random reconstruction can preserve a mean but +cannot recover the original cloud shape, gradients, velocity correlation or +history without retained residuals or a reproducible source field. + +For procedural mode, split by evaluating the same canonical field at the current +tick. Derive the current parent summary from those same samples. Cached parent +and child summaries must refer to the same tick/revision when comparing them. +This recovers the intended field, independent of prior merge order. + +For an explicitly lossy assembly mode, create deterministic balanced residuals. +For equal-volume children: + +```text +ParentMean = sum(ChildValue[i]) / ChildCount +ChildValue[i] = ParentMean + Residual[i] +sum(Residual[i]) = 0 +``` + +The `40 -> 38, 42` example is valid for equal weights. With eight-bit integer +samples, retain each scalar's original integer sum, not just its rounded mean. +Such sums preserve encoded cosmetic means within one encoding/reference profile, +not general physical conservation. Eight unsigned byte children have a sum at +most 2,040, requiring 11 bits. Use the quotient and remainder to reconstruct +children whose exact integer total equals that sum; pair or redistribute seeded +integer residuals afterward. + +Limit perturbations before writing so bounds stay valid without a final clamp +breaking the sum. For unequal volumes, weight vapour mixing ratios by dry-air +mass and condensate mass concentrations by volume. Preserve their combined +water budget using consistent kg water units; the simple zero-sum residual +rule is insufficient. + +Seed split detail from world/layer, spatial key, refinement depth, field purpose +and a declared time epoch. Exclude allocation slots, camera identity, wall time +and the number of times a region has split. Velocity divergence can request an +early split. Hysteresis prevents threshold chatter. On allocation failure retain +the parent and its separate velocity/reconstruction data. + +Camera-dependent assemblies are a rendering compression layer. If stateful +simulation ever evolves assemblies themselves, its refinement criteria must be +canonical and viewer-independent, with conservative coarse/fine fluxes. Prove +that scheme separately; do not let a player approaching a cloud change its +authoritative weather. + +## 11. Compute-based volumetric rendering + +Evaluate optical properties from the packed density field and integrate view +rays in a compute node. Begin at half resolution per dimension, configurable by +quality. Clip intervals against the weather layer, local volume bounds and scene +depth, including cameras inside clouds and near ground fog. + +Use Beer-Lambert transmittance for each step: + +```text +StepTransmittance = exp(-ExtinctionPerMetre * Density * StepLengthMetres) +RayTransmittance *= StepTransmittance +``` + +Use a bounded phase model for direct sunlight, cached ambient sky contribution +and a declared approximation for multiple scattering. Keep density-to-extinction +units consistent across LODs and layer thicknesses. Integrate cloud and fog +optical contributions without applying the same medium twice. + +Skip provably empty intervals using conservative hierarchy bounds; terminate +when transmittance is negligible under the chosen image error budget. Refine +ray steps near density boundaries and reduce detail sampling with distance. +Avoid compulsory nested light marches at every view sample: share light-space +transmittance or coarser light samples. + +Keep raymarch color/transmittance and the reconstruction history per view. +Reproject with camera motion and estimated cloud displacement. Reject history +for disocclusion, teleports, incompatible field revisions and large timeline +corrections. Upsample with depth and medium-aware weights. Screen-space jitter +may vary per view because it never changes reference weather samples. + +The ground-view and fly-through requirements need real volumetric coverage, +not just a scrolling sky texture. Guerrilla's +[Nubis³ presentation overview](https://www.guerrilla-games.com/read/nubis-cubed) +describes voxel clouds, accelerated ray traversal and dense-data reconstruction +as relevant production approaches. Their reported results are not this engine's +performance measurements. + +Add graph-visible nodes for field generation/evolution, summaries, cloud light +data, integration and reconstruction. Declare reads, writes and retained +resource revisions. Reuse the existing environment source selection and volume +composition contracts. Static/paused weather can retain fields and lighting; +camera changes still invalidate the view-dependent image. + +Disabled weather binds a clear/no-cloud result and does no weather generation, +marching or shadow updates. Unavailable compute uses an explicit existing cloud +fallback while retaining synchronized authoritative weather events. A failed +dispatch/allocation preserves the last compatible published state or switches +to the defined coarse fallback; never publish an unwritten resource. + +## 12. Cloud shadows + +Compute a low-resolution light-space optical-depth/transmittance map over a +bounded receiver region. Sample it in direct sunlight evaluation. Clouds outside +the camera frustum can cast visible shadows, so shadow demand has its own caster +bounds and contributes to shared residency requests. + +Expose enabled state, strength, receiver distance, map resolution/cascade count +and update rate separately from cloud visibility. Disabled shadows skip map +compute. Fade attenuation to unity at the distance boundary. Keep ambient light +and emissive surfaces separate from direct-sun attenuation. + +Update on cloud/lighting change or a bounded shadow interval; the shadow map +does not inherit a mandatory five-second delay. At a low sun angle a receiver's +caster footprint can become very large. Cap the footprint and fade or disable +that contribution according to the explicit quality policy. Test moving clouds, +sun changes, terrain receivers and moving shadow-cache regions. + +## 13. Atmosphere, fog and precipitation + +Use one weather definition to drive optional consumers. Molecular/aerosol +atmosphere scattering remains distinct from cloud condensate and ground fog; +weather can modulate it through explicit response curves. Define whether +authored appearance or the weather-driven value wins for every property. + +Fog is suspended condensate near the ground, with formation driven by saturation, +surface cooling and mixing. Use terrain-relative height, moisture and a +near-ground temperature profile. Mist can use the same field at lower optical +density. Settling and turbulent suspension can be simplified parameters; +particle-by-particle droplets are unnecessary for the volumetric image. + +Rain and snow are emitted from weather precipitation rates, not simply from +high visual density. A column temperature profile chooses liquid/frozen +appearance and melting transitions. Reuse generic GPU cosmetic particle fields +for nearby drops/flakes, with deterministic spawn keys and precipitation +interpolation. Provide indoor/terrain occlusion and reduced far precipitation +without changing the authoritative precipitation rate. + +Hail needs its own bounded updraft/growth rule and explicit server events for +damage; it is not rain with a different texture. Lightning needs a minimal +charge-separation proxy associated with storm intensity, ice and updrafts. +Schedule discharge on the server with stable event IDs, tick, endpoints and +seed. A deterministic event can define branching/light/audio across clients; +damage is evaluated once by the authoritative system. Electrical circuit +simulation is not required unless conductive gameplay becomes a requirement. + +Thunder follows the lightning event and each listener's distance, with delay +computed using a declared speed-of-sound model. Never generate authoritative +lightning from a local GPU threshold or a camera LOD. Storm event payloads are +copied values across world/process boundaries. Cloud shadows are cosmetic and +do not implicitly change authoritative solar heating. + +## 14. ECS data and lifecycle + +Proposed names below are new semantic records, not existing APIs: + +| Record | Ownership and purpose | +|---|---| +| `WeatherDefinition` | ECS component for seed, profiles, timeline mode, bounds and authored controls | +| `WeatherLayer` | ECS component for a named layer, vertical extent and medium response | +| `WeatherTimeline` | ECS resource for accepted clock anchors, bounded active segments and revisions | +| `WeatherEvent` | Bounded ECS event records or copied scheduled messages with tick and stable ID | +| `WeatherPresentation` | Owned device-free descriptor passed to presentation consumers | + +Use an entity per authored layer/region, not an entity per voxel. ECS is the +single owner of shared definitions and timeline facts. Renderer cache records +hold resources, keys and derived revisions; they do not duplicate mutable +weather definitions or introduce another dirty-flag registry. + +Register reflection, validation, scripting properties, serialization and +component purposes together. Batch related parameter edits into one definition +revision. Validate finite values, positive cell sizes, ordered bounds, encoding +ranges and bounded layer/page/event counts at the adapter boundary. + +Remove resources on layer/world retirement, clear per-view histories on source +replacement and preserve ordinary Studio undo/redo and Play/Stop behavior. +Authored saves contain definitions and timeline state. Procedural GPU caches are +reconstructed; stateful saves require a complete compatible checkpoint. + +## 15. Implementation sequence and exit gates + +| Stage | Work | Exit gate | +|---|---|---| +| 1. Contract and dense slice | Establish semantic records, world time, integer reference evaluation, eight-byte packing and one dense cloud layer through the render graph | Same canonical samples at selected ticks on CPU/GPU; seed/time controls and fly-through rendering work | +| 2. Time and lifecycle | Replicate clock/timeline anchors, handle definition changes, late joins, pause/load and resource loss | Direct reconstruction matches continuous evaluation at the same tick; no replay from world creation in procedural mode | +| 3. Sparse residency | Add brick pool/page table, coarse coverage, neighbor sampling, occupancy and shared multi-view requests | Dense and sparse reference parity; bounded memory; eviction/refill has no missing visible clouds | +| 4. Lazy LOD and assemblies | Add conservative maintenance, hysteresis, merge/split, separate velocity retention and deterministic reconstruction | Five-second maintenance survives motion/teleports; child totals and canonical reconstructed samples meet their declared contracts | +| 5. Lighting and shadows | Add depth-aware temporal reconstruction, light sampling cache and optional cloud-shadow maps | Ground/inside/above-cloud scenes and offscreen shadow casters pass visual checks; disabling shadows removes their work | +| 6. Weather consumers | Connect atmosphere response, terrain fog, precipitation and authoritative lightning/hail events | Multiple clients share event identity/rates across different visual quality settings; server stays headless | +| 7. Stateful evolution mode | Add declared solver, stability controls, conservation accounting, compatible checkpoints and bounded replay | Supported determinism claim passes; water/energy errors are measured; late join and save/load restore complete state | +| 8. Performance and replacement | Profile packing/layout choices, residency/assembly savings and quality tiers; retire replaced production paths | Budgets pass on named target hardware/backends; no duplicate live weather ownership or redundant renderer path remains | + +Treat each stage as a working vertical slice with its own tests. Stateful mode +is a planned capability with a separate acceptance gate, not a shortcut needed +for the procedural default. Do not expose settings whose consumers are absent. +Read the relevant module instructions again before implementation changes them. + +## 16. Verification and profiling + +Keep CPU-verifiable behavior in the owning module's focused suites. Use real +backend checks for device behavior; no mock renderer or endless duplicate smoke +tests. Extend the existing weather demo and volume GPU fixtures. + +| Check | Required evidence | +|---|---| +| Encoding | Exhaustive byte-code round trips; boundary/range refusal; signed values; CPU/shader word agreement; quantified saturation and error | +| Determinism | Fixed seed/tick/coordinate fixtures, repeated runs, workgroup/order changes and supported GPU backend comparisons | +| Time | Different render frame rates, very large ticks, phase boundaries, changing wind anchors, reordering, clock correction and pause/resume | +| Seek and lifecycle | Cold late join versus continuously running reference at the same tick; eviction, device loss and save/load | +| Sparse/LOD | Dense versus sparse samples, brick boundaries, missing-page fallback, empty-to-occupied growth, multiple cameras and bounded overflow | +| Assemblies | Exact integer totals, bounds, zero wind, divergent retained velocities, repeated merge/split and merge-order-independent procedural reconstruction | +| Stateful solver | Source/sink/boundary water budget, bounded values, timestep stability, coarse/fine fluxes where used and checkpoint completeness | +| Replication/events | Same authoritative storm events under different camera paths/LOD, late joins, duplicates, epoch changes and headless operation | +| Visual scenes | Ground view, cloud interiors, flight above/below, fogged valleys, sunset, storms, temporal motion, portals and ground shadows | +| Disable/failure | No unnecessary dispatch/upload/allocation, no stale history or shadow leak, no partial publication after refusal | + +Run appropriate build, architecture, component, documentation and source checks +using [RUNNING.md](../RUNNING.md). During implementation, request approval for +final live/GPU verification according to the repository instructions. Writing +this plan does not require running a graphics application. + +Instrument meaningful CPU boundaries with `ENGINE_PROFILE` or +`ENGINE_PROFILE_CAT`. Use completed nonblocking GPU timestamp queries with the +`Gpu` category and `gpu ` prefix. Separate maintenance spikes, steady integration +cost and actual queue submissions; structural async eligibility is not measured +hardware overlap. + +Count actual allocated/released/live/peak GPU bytes, pages, retained child +velocities, residuals, halo storage, dispatches, uploads and checkpoint readbacks. +Record ray sample counts, skipped intervals, coarse fallback use, maintenance +age, cache hits and real compression ratio. Separate cache hits from absence. + +Compare dense eight-byte words, byte-plane packing, optional software FP8, +stateful high-precision storage and sparse assemblies against identical output +or a declared visual error tolerance. Profile `release` for shipped cost; also +report `dev` behavior where useful. Name GPU, backend, resolution, layer count, +resident cells, quality settings and active views beside every result. + +Add dedicated `just` jobs for new benchmarks. Print benchmark results to stdout; +keep any build artifacts under the build tree and do not add benchmark-output +files. Select shipping defaults from measured memory, bandwidth and frame-time +results, not from the nine-byte arithmetic alone. + +## 17. Decisions settled by this plan + +- Dense cells derive height from their coordinates; the baseline GPU payload is + eight bytes, with explicit encodings and wider compute intermediates. +- Procedural direct evaluation is the default synchronization/late-join method. + Nonlinear stateful evolution uses complete checkpoints and bounded replay. +- Five seconds applies to expensive maintenance. Cheap visibility and safe + fallback respond immediately to camera and weather changes. +- Assemblies preserve declared totals and separate velocities. Exact procedural + detail comes from reevaluation; random splits do not recover discarded history. +- GPU volumes are presentation data. Authoritative weather and events remain + shared, headless-capable and independent of camera quality. +- Cloud shadows are optional, distance-bounded and updated independently of + the expensive LOD/culling cadence. + +Backend format support, final encoding ranges, solver choice and numerical +tolerances, pool ceilings and performance budgets are prototype gates. Complete +their measurements before committing shipping defaults; none is represented +here as already verified. diff --git a/docs/WEATHER_VISUAL_VALIDATION.md b/docs/WEATHER_VISUAL_VALIDATION.md new file mode 100644 index 000000000..89febdf98 --- /dev/null +++ b/docs/WEATHER_VISUAL_VALIDATION.md @@ -0,0 +1,204 @@ +# Weather, portal and mirror visual validation + +Validation on 2026-10-15 used an NVIDIA GeForce RTX 4090, Vulkan and driver +580.173.02. Runtime captures use the `dev` preset unless stated otherwise. +These are real rendered images, including native-window checks, rather than +mock renderer results. Metal execution remains unverified. Capture-file waits +and fixed capture pacing make these runs unsuitable as FPS benchmarks. + +Renderer acceptance passes in both presets. Client high-FPS handoff acceptance +remains open: the final rerun fails sample-count gates, and an earlier run +captured an all-black crossing frame. Details and original evidence are below. + +Local images, metadata, contact sheets and logs are retained under +`.cache/build/dev/weather-visual/`. Strict CI logs use the corresponding +`ci/weather-visual/` directory; test-owned captures live under each preset's +`tests/` directory. Generated images are build artifacts rather than checked-in +benchmark output. + +## Inspected scenes + +| Coverage | Evidence | +|---|---| +| Weather recipes | Clear, scattered cumulus, overcast stratus, towering storm, wispy ice and ground fog at 1280x720; GUI status text confirms each selection | +| Weather views and controls | Ground, cloud interior, above clouds, valley fog, roof/rain and storm; stateful checkpoint and pause controls | +| Portal composition | `Portals-1-world`, `CrossWorldSeam` with two worlds and zero spacing, `PortalShadow`, and both near/far lighting scenes | +| Mirror composition | `Mirrors-1-world` surface grades, `Mirrors-4-worlds` with four worlds, `RecursiveMirrors`, `MirrorCorridor` and `MirrorDepth` | +| Surface load | `StressMirrors` with 320 authored facets; this is a visual workload check, not a frame-budget claim | +| Reflection depth | One- and three-bounce variants of the recursive and depth demos | + +The initial and extended stills are in `base-contact.png` and +`extended/contact.png`; weather controls are in `controls/contact.png`. +Inside-cloud and storm views contain broad, smooth dense volumes. These checks +establish visible composition and working controls, not photorealistic cloud +detail. The corrected scattered-cumulus and wispy-ice button names were actually +activated; earlier invocations with incorrect names are not positive evidence. + +A native-window `Portals-1-world` tour wrote all 1,800 images and metadata +records at 640x360, with 1,800 simulation ticks and no dropped ticks. Frame 999 +crosses the seam, mapping the camera by 28.638 metres. Inspected adjacent +frames retain the continuous room view. None of the 1,800 images is entirely +black. See `motion/native-portal-contact.png`, +`motion/native-crossing-contact.png` and `motion/image-audit.json`. +The complete fixed-step tour is also encoded as `motion/native-portal-tour.mp4`. + +Two 180-frame recursive-mirror sequences use one and three bounces, fixed alpha +0.5 and 60 Hz capture progression. Compared frames 30, 90 and 179 have identical +camera poses and ticks in both runs. The three-bounce view contains additional +nested reflections; both sequences contain moving reflected objects and no +entirely black frames. See `motion/recursive-contact.png`. This is separate +from the intermittent networked high-FPS observation below. +`motion/recursive-bounce-comparison.mp4` places one bounce on the left and three +on the right, with matching frames. + +## Portal seam and lighting measurements + +The 1920x1080 seam run captured 90 frames each from side, front and far views, +plus 90 matching continuous-room reference frames. All 360 BMPs and metadata +records were written. The report confirms complete metadata, matching fixed +interpolation alpha 0.5 and pipeline identities. + +Across the 90 matched front/reference frames, the body moved 62.906 pixels and +the maximum missing and duplicated body counts were both zero under the +report's one-pixel boundary allowance. This checks body silhouette and aperture +coverage; it does not assert identical whole-image shading. See +`seam-1080p60/portal-seam-report.json` and its contact sheet. + +All four 1280x720 lighting stills passed the existing pixel reporter: + +| Scene/view | Positive pixels | +|---|---| +| Amber lamp, near | 305,493 amber; 329,658 lit | +| Amber lamp, far | 115,198 amber; 131,328 lit | +| Red/green lamps, near | 83,270 red; 18,520 green; 138,708 mixed | +| Red/green lamps, far | 26,731 red; 39,988 green; 65,032 mixed | + +The sun is disabled in these fixtures. The far amber illumination and the +opposite lamp's channel provide positive evidence of light crossing the seam. +The contact sheet is `lighting/contact.png`; raw counts are in +`lighting-helper.log`. The final helper rerun reproduces these counts and +requires clean client exits for all four views. Its images and per-view runtime +logs are in `lighting-final/`, with the reporter output in +`lighting-helper-final.log`. + +## Weather in a mirror + +A downward camera sees a horizontal mirror. Every primary ray points down, +while the deliberately red cloud slab lies above the camera. The direct view +therefore cannot explain red cloud pixels in the mirror aperture. + +Both mixed and separate capture paths pass the new GPU fixture. It requires +positive red cloud pixels inside an analytically bounded mirror aperture, +preserves exterior samples within two display codes, and restores the original +image after clouds are disabled. Each preset passes 25,144 assertions in one +case. Development and strict CI were run separately on the actual device. + +An independent runtime on/off pair changes all 153,600 samples in its central +mirror region and zero of 48,640 samples in the exterior top strip. Images and +the difference are in `integration/`. A separate behind-camera red marker +produces 3,136 red reflection pixels and zero with reflection disabled, in +`mirror-marker/contact.png`. A previously black mirror was looking into an +empty black background; that observation did not justify a renderer change. + +## Repairs made during validation + +The seam and lighting capture helpers now preserve the scene basename in a +per-view fixture directory. Renaming the scene previously broke lookup of its +client camera companion and prevented captures from starting. The actual seam +and lighting helpers now generate their expected images. +The lighting helper also retains per-view logs and rejects failed or timed-out +clients even if a BMP was already written. + +`CrossWorldSeam` now authors coincident mouth centres and opposite face normals +in the two worlds. The former destination mouth was displaced and faced the +same way, so the rear view requested an unserved nested return capture. +Paired front/rear images now show the blue destination. A headless test loads +the real scene in both worlds and checks mappings, axes, both camera sides and +crossing round trips: 40 assertions in each preset. + +The client prepares an unjoined sequence-capture portal only once per frame. +Previously it prepared the native eye and then appended the same portal claim +again in the fallback path. The reproduced run wrote JSON records but no BMPs. +The new real-client GPU test requires all 24 images and metadata records, +unique portal indices, and a completed destination image. Development and +strict CI each pass 199 assertions. + +The disabled-weather graph now forwards the unchanged colour image through +weather reconstruction and fog. The storage-image boundary previously broke +the identity chain and recorded extra full-image copies. The contract permits +the bridge only when the storage name has known sampled-image readers; +writable storage and unknown consumers keep materialized images. Other declared +outputs remain checked for overwrite conflicts. + +The allocation plan must retain forwarded sources through their later readers. +At 640x480 this adds one 2,457,600-byte physical target to the plan and extends +two RGBA16F image lifetimes, raising planned peak live bytes by 4,915,200. +These are planning bounds, not measured driver residency. Inactive output +targets need not allocate. The existing device oracles measure two identity +copies with named intermediate inspection and one without inspection, compared +with three in the reproduced regression. +The earlier logical-memory measurements in the implementation report predate +this allocation-plan change; no new full-weather memory benchmark was run here. + +The real-process portal fixture now allows 60 seconds for device startup while +retaining five-second image-reply deadlines. One actual child needed 29.708 +seconds between timestamp initialization and renderer readiness, exceeding the +former 20-second startup allowance. Both child variants then passed. Early +child exit now reports its reason, code and signal immediately. + +The final explicit non-GPU renderer selection passes 822 cases and 414,470 +assertions in each of `dev` and strict `ci`. Source checking, architecture and +their fixtures pass. Changed C++ formatting and shell syntax checks pass. +The default renderer selection also passes 844 cases and 415,896 assertions in +`dev`; it includes device work and overlapped a CI run, so it is not an isolated +GPU run or a performance measurement. + +The initial broad device run failed six of 206 renderer cases, with 12 failed +assertions. Those checks exposed the startup allowance and disabled-weather +forwarding issues described above. The rebuilt development device run passes +all 206 cases and 2,510,681 assertions without weakening the image or copy-count +oracles. Its log is `render-gpu-accepted.log`. +The final strict CI device run also passes all 206 cases, with 2,510,678 +assertions. The final two device selections ran sequentially; their small +assertion-count difference does not change the selected cases or their outcomes. + +## Intermittent high-FPS findings + +The broader client GPU selection completed 31 cases with 30 passing and one +failing, with three failed assertions out of 1,689,455. The selected cases cover +first/third-person traversal, return crossings, cleared subjects, variable +presentation, late content, image handoff, retirement and fault scenarios. The +24-cell network impairment matrix was explicitly excluded from this visual run. + +At 144 FPS with 60 Hz simulation, frame 276 was entirely black. Adjacent frames +contained 7,232 and 7,465 nonblack pixels out of 16,384. The camera was about +1.9 mm beyond the seam; portal metadata still named a ready, current image and +a matching camera revision. That metadata cannot prove the producer's pixels +were valid. The same case also missed two sample-count gates at 240 FPS. + +The failed assertions in `mono.client/tests/PortalWalk.cpp` were: + +```text +1314: visible for: false (144 FPS, frame 276) +1455: adoptedClearSamples >= 3 for: 1 >= 3 (240 FPS) +1621: observed.LookSamples[stage] >= 10: 9 >= 10 (240 FPS, stage 0) +``` + +An isolated rerun, with no concurrent GPU work, passes all 73,560 assertions at +144/240 FPS. This does not resolve the first observation. Some diagnostic +captures overlapped the initial broad run, so it supplies no isolated timing +claim and does not establish contention as the blackout's cause. + +A final isolated rerun against the rebuilt client fails two of 72,337 +assertions: `adoptedClearSamples >= 3` reports `1 >= 3` at both 144 and 240 FPS. +Its visible-pixel assertion does not fail. This is still a failed acceptance +check, not a resolved handoff issue. The log is `client-high-fps-final.log`; +all 3,840 final BMPs and metadata records are archived in +`high-fps-final-run/`. The evidence does not establish whether these sample +failures and the earlier blackout share a cause. + +The original metadata and images were archived before rerunning under +`high-fps-first-run/`; the full logs are `client-gpu.log` and +`client-high-fps-isolated.log`. No speculative near-plane change was made. +Producer and final consumer image readbacks at the failing camera pose are the +next discriminating diagnostic. This remains an open visual continuity issue. diff --git a/docs/future-work/camera-and-cinematics.md b/docs/future-work/camera-and-cinematics.md index fe4e86dd4..394f90c98 100644 --- a/docs/future-work/camera-and-cinematics.md +++ b/docs/future-work/camera-and-cinematics.md @@ -87,6 +87,42 @@ viewport frame, thumbnail, and Studio panel may have different sizes and near plane needs. The future system keeps that rule. It caches target-independent rig and lens output, then each view resolves matrices against its own target. +### Tracked headset views + +The [VR system plan](vr-system.md) owns headset sessions, per-eye calibration, +and experimental glasses-style magnification. It extends the shared view +output with runtime eye poses and asymmetric frusta. A headset's optical focal +plane is separate from this document's cinematic `FocusDistance` and depth of +field; changing a render lens cannot supply physical diopter adjustment. + +In VR, camera rigs and sequences drive the allowed tracking origin or explicit +locomotion policy while retaining the user's tracked head motion. Desktop +camera shake, forced head rotation, and cinematic FOV curves require a separate +VR comfort policy. The spectator camera remains an independent view and cannot +overwrite headset eye geometry or the user's local calibration profile. + +### Current viewer-owned cameras + +`Instance.new` follows the script's execution side. A client script creates a +predicted, viewer-local instance; a server script creates an authoritative +instance. Creating below a viewer-local parent keeps the new subtree local, and +classes explicitly marked runtime-local remain local on either side. Client-local +instances do not enter authority replication or authored game saves, and that +ownership applies to their descendants. + +The plain `Camera` class is runtime-local. Studio creates one named `Camera` +for each local viewport, so two Studio views may each contain a `Camera` with +the same name. The viewport retains its own entity handle; the name alone does +not identify a panel's eye. Runtime cameras are also transient in Studio, which +keeps the camera and its children out of the game file. + +`SurfaceCamera` and `Portal` are authored camera classes. They are not the +viewer-local runtime `Camera` class: their lens and surface settings belong to +the authored world and can be saved or replicated when created authoritatively. +A client-created instance still follows the normal local-creation rule. This +distinction keeps a mirror's projection camera from being mistaken for the +editor's point of view. + ## Non-negotiable design rules 1. Simulation and presentation have separate clocks and separate side effects. diff --git a/docs/future-work/character-system.md b/docs/future-work/character-system.md index 789d107ca..3e0dd82f7 100644 --- a/docs/future-work/character-system.md +++ b/docs/future-work/character-system.md @@ -163,6 +163,12 @@ spawners, NPC scripts, tests, and authored worlds. - source tick and monotonic sequence - an intent revision +Each named action request carries a bounded request id and source tick. For +character actions submitted by AI, the same request record also carries the +agent generation, driver token, and lease generation. `BotController` places +these requests in the action field of the one `CharacterIntent` row it +publishes per tick; there is no separate character action command stream. + The row contains no pointer or player id. A human client adapter, server bot, AI graph, replay reader, or script command validates its own source and writes the same data. Missing or expired intent means neutral input, not reuse of the @@ -178,6 +184,16 @@ Bots run on the server and emit deterministic intent with explicit seeds and bounded work. Replays emit recorded intent. Neither needs a fake `Player`, a local client, or a different controller path. +| Character case | Roster relation | Active driver | Character state owner | +|---|---|---|---| +| NPC in an AI-only world | None; no `Players` service required | `AIController` through `BotController` | Character stack and authority simulation | +| Player's active human character | In that player's roster and active possession | Validated human input lease | Character stack and authority simulation | +| Player's roster character driven by a bot | In roster, not active possession | Bot lease through `BotController` | Character stack and authority simulation | + +The roster controls selection; the active driver controls whose intent is +accepted. Neither relation owns character state, animation time, or physical +state. + ### `Players` roster and active possession `Players` owns one authoritative relation table instead of mirrored forward @@ -433,15 +449,28 @@ This is the visible state machine. It holds: - `CurrentState` - `PreviousState` -- `RequestedState` +- bounded region-qualified state requests - `ActiveMotionController` - `AutomaticTransitionsEnabled` - `Revision` Each child `CharacterState` instance has a stable name, an enabled flag, and a motion-controller reference. Built-in code supplies the first transition -policy. Scripts may disable a state or request an enabled state. A request is -validated and committed at one fixed point in the tick. +policy. Scripts may disable a state or submit a request naming a declared +region and enabled state. The bounded request record carries region, state, +source, priority, sequence, and expiry. Its capacity is declared; overflow is +rejected and counted before arbitration. `RequestState(region, state)` submits +a region-qualified request, while legacy `Humanoid:ChangeState(state)` targets +the locomotion region. Requests are validated and arbitrated at the state +commit point; equal-priority conflicts use stable source and sequence ordering. +Writers never modify active-state projections directly. + +When composed regions are present, `CurrentState` and `PreviousState` remain +the locomotion-region compatibility projection used by `Humanoid`. A separate +read-only active-configuration view exposes the stable state name in every +region. `StateChanged` and legacy compatibility events report locomotion +changes only. A separate full-region change view and `RegionStateChanged` +records expose changes in every region. State identity is a stable `core::Name`, not a closed runtime enum. Built-in names map to Roblox `HumanoidStateType` values at the compatibility boundary. @@ -479,7 +508,11 @@ Transition arbitration is explicit: - an accepted manual request beats ordinary automatic locomotion for that tick - each transition declares priority, minimum residence time, cooldown, re-entry permission, and whether it may interrupt the current state -- at most one transition commits per fixed tick +- the initial flat machine commits at most one transition per fixed tick; a + composed machine commits at most one transition per region +- safety transitions override ordinary requests and transitions; conflicts + between ordinary candidates use declared priority, then source-scope depth, + then stable authored transition id - requests that lose arbitration are consumed or retained according to their declared policy, never by incidental evaluation order @@ -489,10 +522,11 @@ animation selector may crossfade among locomotion poses, aim poses, and action layers without changing gameplay state. Animation completion may enqueue a future state request, but it cannot mutate state during pose sampling. -State entry and exit are recorded into a bounded `CharacterStateChanges` world -resource. The script layer drains it and fires `StateChanged` and compatibility -events after the store mutation barrier. Property changes still use the normal -property signal path. +State entry and exit for every region are recorded in the bounded +`CharacterStateChanges` world resource. After the store mutation barrier, the +script layer drains these full-region records and fires `RegionStateChanged`. +It fires `StateChanged` and legacy compatibility events only for locomotion +changes. Property changes still use the normal property signal path. ### `Humanoid` compatibility shim @@ -515,13 +549,15 @@ one field on the controller and no shadow field on the humanoid. | `Enabled` | `CharacterController.Enabled` | | `FloorMaterial` | Material resolved from `GroundEntity`, read-only | | `GetState()` | `CharacterStateController.CurrentState` | -| `ChangeState(state)` | Validated state request | +| `ChangeState(state)` | Validated locomotion-region request | +| `RequestState(region, state)`, `GetActiveStates()` | Region-qualified request and read-only active-state view | | `SetStateEnabled(state, enabled)` | Matching `CharacterState.Enabled` | | `GetStateEnabled(state)` | Matching `CharacterState.Enabled` | | `Move(direction)` | Writes `CharacterController.MovingDirection` | | `TakeDamage(amount)` | Existing authority-only health path | | `Died` | Health transition event | -| `StateChanged` | Drained state-change record | +| `StateChanged` | Drained locomotion-region change record | +| `RegionStateChanged` | Drained state-change record for any region | Full shim coverage is tracked by a checked-in compatibility manifest, not by a claim in prose. Every supported Roblox `Humanoid` property, method, and event is @@ -674,11 +710,13 @@ fixed tick ensure character links and default stack commit the typed parameter snapshot sample controller sensors - choose requested state + resolve preliminary state candidates for controller selection + resolve one candidate motion controller before the capsule sweep evaluate root motion, if enabled - run active motion controller - sweep and commit capsule movement - commit state transition + run the resolved candidate motion controller + sweep capsule and stage movement plus contact results + finalize state candidates from staged contacts without integrating motion again + atomically commit capsule movement and final state transitions update animation-track intent advance tracks and fades publish replication changes @@ -876,11 +914,160 @@ state instances first. This gives a working character and proves the inputs a graph actually needs. The first machine is flat. The later state blueprint may group leaf states -under parents such as `Alive`, `Grounded`, and `Airborne`. Parent entry tasks and -transitions remain active with the chosen leaf, allowing one death transition -or one shared airborne task instead of copies on every child. Leaf-to-root -transition order and stable state id tie breaks must be part of the compile -format. +under parents such as `Alive`, `Grounded`, and `Airborne`. Parent entry tasks +and transitions remain active with the chosen leaf, allowing one death +transition or one shared airborne task instead of copies on every child. + +### Reusable custom state machines + +`CharacterStateBlueprint` is a reusable saved asset, separate from each +character's bounded runtime state. It declares stable named states, one initial +state per exclusive region, and ordered transitions. A state may declare +bounded entry and exit tasks, residence and cooldown limits, re-entry policy, +and interruptibility. A transition names its source scope, target state, +priority, guard, and request-consumption policy. General guards read only the +committed `CharacterParameters` snapshot and committed sensor output. Dedicated +post-sweep landing and safety predicates may also read this tick's staged +contact result, which stays immutable during finalization. The resolver +atomically commits that result with movement and final states. Guards cannot +write parameters, issue arbitrary instance changes, or run script callbacks +inside the solver. + +State names and asset references are stable strings in files and on the wire; +compiled slots are process-local. Unknown names round-trip unchanged. Declared +custom states compile, unresolved references do not. Runtime holds bounded +active state per region, residence and cooldown counters, and task state. +Custom task kinds declare their storage bound and reset behavior; ticks cannot +allocate or grow this state. + +### Exclusive and parallel state composition + +Initially, an exclusive (OR) group has exactly one active child. A parallel +(AND) group has one active child in each declared region, with disjoint region +identity and bounded child counts. +For example, a locomotion region can be `Grounded` or `Freefall` while a +separate upper-body region is `Unarmed` or `Aiming`. This allows running and +aiming together without inventing a combined `RunningAndAiming` state. +These composition operators are separate from Boolean guard logic. Guards use +AND, OR, and NOT over their typed conditions; an OR group still selects exactly +one active state child. + +Each region resolves its own eligible transitions from one immutable tick +snapshot. Preliminary candidates select the motion controller before the +capsule sweep, using explicit controller priority and stable authored region id +as the tie break. These candidates are provisional and do not commit state. +After the sweep stages movement and contact results, the resolver finalizes +state candidates without integrating motion again. It commits at most one +transition per region and the movement output together at one barrier, so no +reader sees half of a cross-region transition. +Competing transitions within a region use explicit priority, then source scope +depth, then stable authored transition id. Declaration order and entity +iteration order never decide a winner. A transition spanning multiple regions +must name every affected region and win arbitration in all of them before any +of its exits or entries run. + +Parent transitions are eligible while a descendant is active. A parent may +preempt a child transition only when its declared priority wins the same +arbitration; deeper scope is the tie break after priority. A system safety +transition such as death overrides every ordinary transition, including +cross-region transitions, and commits once for the character. It cancels +incompatible active tasks at that commit. Possession or driver-lease changes +only route future intent; they do not reset character states, cancel state +tasks, or restart animation. Explicit gameplay requests own those changes. + +Entry and exit order is deterministic: regions use stable authored order, +exits run deepest to parent, and entries run parent to deepest. Declared task +cancellation and re-entry policies govern interruptions without resetting all +regions implicitly. + +### Animation graph asset and evaluation contract + +`AnimationTree` is the saved graph asset for selecting and combining motion. It +declares typed input parameters by reference to the character's existing +`CharacterParameters`; it does not declare a second parameter table. Graph +ports have fixed types and cardinality. Connected ports must match type, and +missing required inputs or multiple connections to a single-input port fail +validation with a node and port diagnostic. + +The initial node registry contains: + +- clip nodes that reference an existing `Animation`, `AnimationClip`, or + world-owned `AnimationBuffer`, with loop, rate, and phase inputs +- transition nodes that select between clip or subgraph outputs with a typed + condition, duration, and interruption rule +- blend-space nodes that map a bounded vector of parameters to clip weights +- mask nodes that restrict output to a validated set of named rig bones +- additive nodes that apply a clip relative to an explicit reference pose +- output nodes that route track intent, a pose layer, or an optional root-motion + sample to the character animation binding + +Nodes cannot create `AnimationTrack` instances, write gameplay state, or mutate +the rig. The existing `Animator` owns playback and rig binding; the graph +produces bounded track intent and weights that update or reuse +`AnimationTrack` rows. Existing marker traversal and fade rules remain the +playback contract. Final blended local transforms are sampled into the +transient `PoseBuffer`, then the existing bone and pose-binding path applies +them. Masks and additive reference data are resolved during compile, not by +walking authored graph nodes during sampling. + +Graph input declarations refer to shared parameter slots and inherit their +type, default, replication policy, writer authority, and bounds. Values outside +declared bounds follow the parameter's existing validation rule and never +silently widen a graph input. A blend with total weight zero resolves through +its explicit fallback input; compilation rejects a missing fallback. If a +fade is interrupted, the next fade starts from the current composite weights +and pose, not from the previous fade's endpoints. The graph source can be +shared by many characters, but phase, transition progress, and current output +weights are per-character runtime state. Tracks are reused by stable binding +identity and are not recreated when graph evaluation repeats. + +Animation graph evaluation has two explicit outputs. Fixed-tick evaluation +advances deterministic phase, marker-relevant track intent, and optional +authoritative root-motion samples. Presentation evaluation blends the current +track times and weights into a `PoseBuffer`; throttling may skip this work but +never advances gameplay or marker time. A visual-only graph cannot produce +authoritative root motion. A graph that enables root motion must use the shared +deterministic sampler and feed displacement through controller intent and +capsule collision. + +Compilation validates bounds, types, stable node ids, rig references, masks, +and cycle rules, then emits an immutable plan. State-transition cycles across +fixed ticks are valid. Same-sample dataflow cycles fail unless a bounded delay +or state node breaks the cycle. A compile cache is keyed by canonical authored +content revision plus referenced clip, rig, and mask revisions; editor layout +is excluded. Changing any dependency invalidates the plan before evaluation. +Invalid edits leave the last valid plan active and report the failed revision. +Compiled plans and `PoseBuffer` samples are local caches, never saved or +replicated. + +### AI and driver seam + +The AI system owns named behavior states, transitions, and task policy through +the shared bounded `BehaviourPlan` described in +[`navigation-ai-system.md`](navigation-ai-system.md). Its `AIController` owns +behavior execution. A `BotController` adapts that output into the same +`CharacterIntent` accepted from human input, replay, and scripts. The character +system does not add a second AI graph or accept direct AI writes to state, +transform, motion-controller selection, animation tracks, or undeclared graph +inputs. + +`BotController` puts correlated named actions in the action field of its one +`CharacterIntent` row per tick. Character action requests carry a request id, +source tick, agent generation, driver token, and lease generation. The +character side returns a bounded status (`Accepted`, `Refused`, `Running`, +`Completed`, `Cancelled`, or `Failed`), optional result, bounded reason, and +source tick for that id. Acknowledgements with an unknown or expired request +id, stale agent generation, or prior driver lease generation are discarded. +State and animation feedback is a read-only projection of committed character +states, parameters, and action results. AI may publish declared gameplay +parameters such as aim or mood only when its writer authority permits it, at +the parameter commit barrier. AI and animation graphs resolve those values +from the same declared `CharacterParameters` slots; neither keeps a duplicate +parameter table. Changing possession revokes the old input lease and +invalidates its pending action acknowledgements, but does not reset character +state or animation phase. The AI controller may cancel its own driver tasks +according to behavior task policy; that is separate from resetting character +state or cancelling character-owned tasks. When graph authoring ships, add a shared, device-free behaviour graph document and compiler under `mono.engine`. Do not link `scene`, `physics`, or any engine @@ -892,8 +1079,8 @@ The shared graph layer supports three documents: | Document | Runs | Output | |---|---|---| | `CharacterBlueprint` | Once when building or spawning | A validated instance template and controller links | -| `CharacterStateBlueprint` | Fixed tick | A requested state and motion-controller selection | -| `AnimationTree` | Fixed tick plus presentation sample | Track weights, playback speeds, and an optional root-motion sample | +| `CharacterStateBlueprint` | Fixed tick | Resolved state per active region and one motion-controller selection | +| `AnimationTree` | Fixed tick plus presentation sample | Track intent and weights, a `PoseBuffer` sample, and an optional root-motion sample | Graph rules: @@ -901,7 +1088,9 @@ Graph rules: - node and edge counts are bounded - data ports are typed - graph parameters resolve against the shared `CharacterParameters` declaration -- cycles are rejected unless a node kind explicitly owns bounded state +- state transitions may form cycles across fixed ticks, such as + `Idle -> Running -> Idle`; same-sample dataflow cycles are rejected unless an + explicit bounded delay or state node breaks the cycle - compile happens after edits, never in the tick - the compile result is immutable and revision-cached - the document stores a revision and the compile result records which revision @@ -913,6 +1102,11 @@ Graph rules: - editor position, folding, groups, and comments never affect the runtime hash - scripts receive entry and exit events but arbitrary script callbacks do not run in the middle of the physics solver +- flat state machines retain one transition per tick; composed machines resolve + one transition per active region and commit the selected set atomically +- every character resolves one active motion controller from candidate region + outputs before the capsule sweep; movement and selected states commit at the + same barrier after movement Do not force one universal node runtime too early. State graphs and animation trees are the first two consumers that justify a shared document and compiler. @@ -937,8 +1131,10 @@ not a prerequisite for any phase. | Sensor tuning and references | yes | yes | authority or authoring world | | Sensor hit output | snapshot-safe, recomputed next step | yes when script-visible | authority physics | | Ground and support output | snapshot-safe, recomputed next step | yes when script-visible | authority physics | -| Current and previous state | yes | yes | authority state controller | -| State definitions and animation bindings | yes | yes | authority or authoring world | +| `CurrentState` and `PreviousState` locomotion projection | yes | yes | authority state controller | +| Full active region configuration, residence, cooldown, and bounded task state | snapshot-safe state only | yes | authority state controller; task policy declares its own writer | +| Pending transition candidates and cross-region arbitration | no | no | fixed-tick state resolver | +| State definitions, graph assets, and animation bindings | yes | yes | authority or authoring world | | Player roster and active possession | runtime snapshot only | yes | authority `Players` service | | Character appearance and clothing | yes | yes | authority or authoring world | | Bone rest pose and controls | yes | yes | author, animation, or controller by field | @@ -949,6 +1145,7 @@ not a prerequisite for any phase. | Derived pose binding cache | no | no | local resolver | | Compiled cage and retarget caches | no | no | local compiler from saved inputs | | Active ragdoll state | snapshot policy only | yes while active | authority physics | +| Per-character animation graph phase and weights | snapshot-safe track state only | through existing animator and track state | authority animation evaluation | | Compiled graph plan | no | no | local compiler from saved document | The server remains authoritative. The first release may keep current @@ -1115,10 +1312,12 @@ round-trips within declared tolerances and fires identical markers. - preserve unknown custom states through save and replication - add bounded typed `CharacterParameters` - enforce manual and automatic transition priority, interruption, cooldown, - residence, re-entry, and one-transition-per-tick rules + residence, re-entry, and the flat machine's one-transition-per-tick rule Gate: custom states and parameters round-trip, replicas refuse invalid writers, and the same fixed input sequence chooses the same transition on every run. +Flat state tests also cover safety override, request consumption, and stable +priority ties. ### Phase 9: ragdoll handoff @@ -1135,12 +1334,30 @@ without overlap, replicate consistently, and replay deterministically. - add the shared graph document and bounded compiler - add state and animation node registries - compile against typed parameters and stable custom state names +- support exclusive OR groups, parallel AND regions, Boolean AND/OR/NOT guards, + parent transitions, atomic cross-region commits, and one resolved motion + controller before the capsule sweep +- define clip, transition, blend-space, mask, additive, and output nodes with + fixed-tick and presentation outputs +- keep animation graph runtime phase and weights per character while reusing + persistent `Animator` and `AnimationTrack` rows +- connect `AIController` and `BotController` through shared `BehaviourPlan`, + bounded correlated action results, declared parameter writers, and + read-only character feedback - adapt Studio's node canvas without moving ImGui into the engine -- compile on edits and cache by content revision +- compile on edits and cache by content and dependency revisions - add a character-construction blueprint that runs only at spawn -Gate: saved graphs survive unknown nodes, reject cycles and bad types, compile +Gate: saved graphs survive unknown nodes, reject invalid dataflow cycles and +bad types, compile deterministically, and produce the same result as the plain default policy. +Legal state-transition loops across ticks remain valid; same-sample dataflow +cycles fail unless a bounded delay or state node breaks the cycle. Tests cover +Boolean AND/OR/NOT guards, AND locomotion plus aim, one-region +transition limits, atomic cross-region changes, parent death override, and +stable controller selection. Animation tests cover zero-weight fallback, +interrupted crossfade from the current composite pose, dependency cache +invalidation, track reuse, and presentation throttling without marker delay. ## Test and profile plan @@ -1154,6 +1371,10 @@ existing suites or narrow successors: - `engine.physics.characters` for capsule movement and contacts - `engine.scene.animation` and `engine.render.animation` for binding, markers, curves, sync, masks, additive layers, pose buffers, and procedural bake parity +- character graph suites for typed port rejection, custom state transitions, + parallel region arbitration, parent safety overrides, per-character graph + state, animation fallback and interruption, compile-cache invalidation, and + deterministic blend output - appearance and render suites for classic clothing, rigid attachments, layered cages, cache invalidation, scale, and invalid assets - `engine.physics.characters` successors for ragdoll entry, contact, replication @@ -1165,18 +1386,22 @@ existing suites or narrow successors: - both script runtimes for the same properties, methods, buffers, and events Add focused cases, not a second pile of generic smoke tests. Each error branch -needs a case: missing root, bad controller reference, disabled or unknown custom -state, stale possession revision, duplicate possession, bot handoff, marker at a -loop boundary, reverse seek, invalid mask, invalid cage, ambiguous accessory -attachment, unsafe ragdoll recovery, invalid capsule dimensions, and a replica -write. +needs a case: missing root, bad controller reference, disabled or unresolved +custom state, stale possession revision, duplicate possession, bot handoff, +stale action acknowledgement after lease change, marker at a loop boundary, +reverse seek, invalid mask, invalid cage, ambiguous accessory +attachment, unsafe ragdoll recovery, invalid capsule dimensions, a same-tick +landing state finalized from staged sweep contact with exactly one movement +integration, and a replica write. Profile the release preset with idle, moving, and accessory-heavy crowds. Record: - controller time per active character - sweep count and slide iterations - state transitions per tick +- active state regions and controller arbitration decisions - animation tracks sampled and cache hits +- graph evaluations, compiled-plan cache hits, and crossfade restarts - marker events, throttled visual samples, and procedural bake keys retained - accessory rebinds versus cache hits - cage and retarget compiles versus cache hits @@ -1207,12 +1432,23 @@ This plan is complete in code when all of these are true: - `Humanoid` visibly forwards to a default modular controller stack - controller state and motion are scriptable instances, not private objects - custom state names and typed parameters save and replicate intact -- transition interruption, cooldown, re-entry, and priority are deterministic +- flat transition interruption, cooldown, re-entry, and priority are + deterministic; composed regions resolve one transition each and commit + atomically +- `CurrentState` stays a locomotion compatibility projection while the full + active region configuration is available read-only - bones and rigid pose bindings drive limbs, tools, and accessories - appearance, classic clothing, rigid accessories, and layered clothing share the rig without becoming movement authorities - existing animation instances and tracks bind to controller state - markers, curves, sync groups, masks, and additive layers have exact semantics +- animation graphs use typed ports and shared bounded parameters, cache by + content dependencies, reuse tracks, and resume interrupted blends from the + current composite pose +- AI owns behavior execution, while `BotController` adapts it to character + intent and receives only correlated action results and read-only feedback +- player roster, active possession, and driver lease remain separate; lease + changes do not reset physical state, character states, or animation phase - transient pose buffers and procedurally baked animation buffers use the same sampling and binding path as asset clips - visual throttling never delays markers, root motion, or gameplay events diff --git a/docs/future-work/input-system.md b/docs/future-work/input-system.md index a8c8da9c3..fb0395270 100644 --- a/docs/future-work/input-system.md +++ b/docs/future-work/input-system.md @@ -6,7 +6,9 @@ This document describes future work. It extends the current SDL translator, world input resources, script services, client intent path, Studio keybinds, replication input channel, and recording tools. It does not claim that named game actions, touch controls, input profiles, local multiplayer, pen input, or -XR input exist today. +XR input exist today. General scripted devices and external tracking ingress +are specified in the [VirtualDeviceService plan](virtual-device-service.md) +and are also future work. The first production target is deliberately smaller than the complete device matrix: keyboard, mouse, and mapped gamepads feeding named and typed actions, @@ -41,6 +43,9 @@ The system must provide: - a fixed-tick sample suitable for character intent, networking, prediction, and replay; - a script surface shared by Luau and JavaScript; +- general scripted controllers through `VirtualDeviceService`, with Singleton + or Multiple definitions, up to 32 typed values per device, queued ingestion, + optional preprocessing, and connection/data events; - project-owned action map assets separate from machine-owned user profiles; - a Studio action editor, live monitor, event trace, conflict view, and latency counters; @@ -68,6 +73,11 @@ from a caller-owned SDL event pump and currently produces: - focus-loss releases so a key released outside the window cannot remain held; - normalized mapped gamepad and raw joystick input with a fixed 0.12 deadzone. +The raw joystick fallback currently projects only the first 16 buttons, six +axes, and hat 0 into the compatibility gamepad shape. It is not a complete +wheel, flight-stick, or arbitrary-controller interface. Current translation +and script tests verify synthetic events, not every physical controller model. + SDL instance ids stay inside the adapter. Worlds currently see first-free `Gamepad1` through `Gamepad8` slots. A disconnect clears a slot and a reconnect may occupy another one. That is a usable script-facing slot scheme, but it is @@ -217,6 +227,7 @@ resources: | `ActionTickState` | local player and tick | deterministic levels, transitions, counters, and accumulated deltas consumed by simulation | | `InputAssignmentState` | client world | local player to device assignment and active action-map revision | | `InputDiagnostics` | client-local | bounded counters and timestamps, never saved or replicated | +| virtual device definitions and samples | world and local-player scope | shared typed schema, multiplicity, latest committed values, and connection status; see the [device plan](virtual-device-service.md) | If several local players share one world, one singleton action resource is not enough. Store action state in local-player keyed rows or in a bounded client @@ -252,7 +263,7 @@ Each live `InputDevice` record contains: | Field | Meaning | |---|---| | `Handle` | generation-checked runtime identity | -| `Kind` | keyboard, mouse, gamepad, touch, pen, or XR controller | +| `Kind` | keyboard, mouse, gamepad, raw joystick, touch, pen, XR controller, or explicitly virtual device | | `Capabilities` | bounded bitset of available controls and output features | | `DisplayName` | sanitized local display text | | `MappingGuid` | backend mapping identity where available | @@ -307,6 +318,7 @@ touch/contact/primary/position pen/tip/pressure xr/hand/left/trigger xr/hand/right/pose +virtual/TrackedHand/Left/Pinch ``` Keyboard bindings must declare whether they mean a logical key or a physical @@ -361,6 +373,27 @@ Mapped gamepads expose semantic buttons and axes. Raw joysticks expose bounded numbered controls only through explicit raw control paths. A raw button ordinal must not masquerade as a semantic south button. +#### Controller coverage and acceptance targets + +Existing support means the translator and compatibility scripts have a path; +it does not mean a hardware/OS combination has been validated. Keep an explicit +device, connection mode, operating system, backend/runtime, and feature record +when implementation or physical checks run. + +| Controller family | Current engine path | Planned acceptance work | +|---|---|---| +| Xbox-style, PlayStation DualShock/DualSense, Nintendo Switch Pro, and other SDL-mapped gamepads | Standardized buttons and six axes through SDL gamepad events and eight `ControllerState` slots; individual models unverified here | Enumerate at startup, open/close correctly, hotplug, mapping reload, button labels, wired/Bluetooth reconnect, and focus releases on each tested OS | +| Raw joysticks, flight sticks/HOTAS, wheels, and unmapped controllers | Limited ordinal fallback through the compatibility shape | Separate bounded raw button/axis/hat paths, explicit mapping UI, calibration, and correct refusal of unsupported controls; force feedback requires its own output capability | +| HTC Vive wands, Oculus Touch/Rift S, Valve Index, and other OpenXR controllers | No XR input adapter today | Runtime/profile discovery, typed buttons/axes/touchpad and grip/aim poses, tracking validity, profile changes, reconnect, and capability-checked haptics; see the [VR targets](vr-system.md#input-comfort-and-player-control) | +| External trackers and custom controllers | No script-created device service today | `VirtualDeviceService` definitions, typed queued samples, preprocessing, connection/data events, and the Python hand-tracking fixture | + +SDL separates arbitrary joystick controls from mapped semantic gamepad +controls. Optional sensors, touchpads, LEDs, and rumble depend on hardware and +OS support. Query capabilities rather than inferring them from a brand name +([SDL gamepad documentation](https://wiki.libsdl.org/SDL3/CategoryGamepad), +[joystick documentation](https://wiki.libsdl.org/SDL3/CategoryJoystick)). +Preserve supported standard controls when optional features are unavailable. + Deadzone calibration moves out of the translator's one fixed constant and into binding processors or a device calibration profile. The raw normalized state keeps the full bounded range. Default gamepad bindings may apply a radial 0.12 @@ -903,13 +936,28 @@ through the owning gameplay service. They do not see a client's local ### Virtual devices and tests -Scripts do not receive an unrestricted API to impersonate hardware. Test and -trusted tooling may create a bounded virtual input device through a permissioned -host API. Ordinary game scripts can drive characters or game systems through -their semantic APIs instead. - -Virtual device events use the same normalization, map, context, and sampling -path. This is the basis for headless input tests and Studio's event injector. +Add a general `VirtualDeviceService` for ordinary game scripts as well as tests +and tools. It is independent of VR. Definitions use +`Enum.VirtualDeviceDefinitions.Singleton` or `Multiple`; instances expose at +most 32 typed values each, stable enumeration, `OnDeviceConnected`, +`OnDeviceDisconnected`, `OnDataReceived`, and an optional `PreprocessData` +callback. The [device plan](virtual-device-service.md) owns the complete API, +scope, quota, pump, ownership, and lifecycle contracts. + +The motivating example is external Python hand tracking, received by Luau over +an approved HTTP or other transport bridge, then submitted through +`device:PushData`. Queue admission never calls handlers inline. The fixed-tick +pump preprocesses, validates, commits, and delivers events. Network access is a +separate host permission and implementation task: current `HttpService` has no +HTTP request methods. Local virtual device creation does not grant network, +camera, OS input injection, or physical-hardware impersonation privileges. + +Virtual controls enter the same normalization, map, context, and sampling path +as physical controls, with explicit virtual provenance. Device event delivery +can ship before named actions; it must not wait for the whole action roadmap. +Direct bot control still uses semantic character intent without a fake device. +Tests and Studio injection reuse the virtual-device path. XR adapters also use +the shared action contracts; see the [VR system plan](vr-system.md). ## Action-map asset and user profile @@ -1092,6 +1140,7 @@ ceilings: |---|---| | live devices | 32 per process | | script-facing gamepads | existing 8 slots | +| values per virtual device | hard maximum 32; separate from live-device count and bindings | | local player slots | 8 per client | | active touch contacts | 16 per surface | | action maps active per local slot | 8 layers | @@ -1136,6 +1185,8 @@ private hardware identifiers or one line per frame. | raw `InputState` | current snapshot rules | no | not as player authority | diagnostic only | world and client adapter | | device handles and SDL ids | no | no | no | no | input runtime | | device match descriptors | no | yes, privacy-safe | no | local aliases only | local client | +| virtual device definitions | optional project declarations | calibration only | content revision only | schema revision | project and scoped registry | +| virtual samples and lifecycle | no | no | validated semantic intent only | accepted typed samples and cancellations, opt-in | scoped virtual device registry | | active contexts | no, unless game state recreates them | optional profile defaults | no | action trace | local slot | | action frame state | no | no | no | diagnostic trace | input runtime | | action tick sample | no | no | semantic intent only | action trace | local slot | @@ -1201,6 +1252,8 @@ consumer has one named migration owner. - preserve current `Translator` output byte for byte where applicable; - enumerate existing devices and handle duplicate hotplug notifications; - add disconnect cancellation and device diagnostics. +- record mapped gamepad and raw joystick coverage separately, including the + standard-controller targets above and explicit unsupported capabilities. Gate: old raw input behaviour is unchanged, stale handles fail safely, and hotplug stress leaves no stuck levels or leaked device handles. @@ -1225,6 +1278,8 @@ byte-identical, and all compiled plans are allocation-free during evaluation. - add context priority, owner tokens, consumption, and barrier updates; - integrate GUI processed evidence and focus cancellation; - add virtual-device test injection. +- prove the device pump handles Singleton/Multiple definitions, bounded typed + samples, event ordering, and callback-enqueued deferral without named actions. Gate: taps never disappear between ticks, double transitions follow declared policy, and the same physical fixture at different frame rates produces the @@ -1250,7 +1305,11 @@ replayed characters consume the same intent shape. - extend processed-state and device reporting; - bridge supported raw controls into `ContextActionService` without changing its VM-local callable ownership; -- add permissioned virtual input for tests and tools. +- add `VirtualDeviceService` for scripted controllers, tests, and tools using + the [device API](virtual-device-service.md), including connection/data events + and optional preprocessing; +- add one separately approved external ingress bridge and the Python tracker + example; keep network completions off the script thread until admission. Gate: both languages pass the same end-to-end input fixtures and generated declarations match the runtime surface. @@ -1308,6 +1367,8 @@ mouse synthesis being required. presentation poses, and haptics; - add tracking-loss cancellation and recenter events; - validate headless builds remain backend-free. +- check the named Vive, Touch, Index, and fallback profile targets and record + actual runtime/device results rather than a blanket controller-support claim. Gate: XR adds no alternate gameplay intent path and a tracking loss cannot leave an action active. @@ -1404,6 +1465,9 @@ leave an action active. - `ContextActionService` pass and sink behaviour remains compatible; - raw `UserInputService` and named action services agree on device changes; - generated declarations cover every reachable runtime member; +- virtual devices cover 32/33-value bounds, Singleton/Multiple rules across + scripts, enumeration, preprocessing failures, queue refusal, event ordering, + stale/tracking loss, disconnect/reconnect, teardown, and producer-free replay; - headless server surfaces refuse local device methods clearly. ### Studio @@ -1510,7 +1574,7 @@ The first production action system does not include: - cloud synchronization of personal profiles; - kernel-level global hotkeys or input capture outside application focus; - anti-cheat based on trusting client device metadata; -- arbitrary script-created hardware identities; +- impersonating physical hardware or OS devices through scripted controllers; - recording personal typed text; - platform gesture results as authoritative gameplay; - XR hand skeletons, eye tracking, or body tracking before the base XR adapter; @@ -1571,6 +1635,9 @@ The input system is complete for its first production scope when: - prediction, reconciliation, and authoritative replay retain semantic tick inputs; - Luau and JavaScript expose matching raw and named input behaviour; +- general virtual controllers support up to 32 typed values, both definition + multiplicities, queued preprocessing, enumeration, connection/data events, + safe lifecycle, and one externally supplied tracking example; - profiles survive restart, map migration, device reorder, and reconnect; - Studio can author, validate, test, monitor, and publish maps while its command bindings remain isolated; diff --git a/docs/future-work/navigation-ai-system.md b/docs/future-work/navigation-ai-system.md index e2acbd36d..70f8ea3fe 100644 --- a/docs/future-work/navigation-ai-system.md +++ b/docs/future-work/navigation-ai-system.md @@ -26,6 +26,8 @@ The system must support: - stable local avoidance for crowds without changing the global path; - sight, hearing, proximity, and script-defined perception facts; - high-level goals and a small domain-specific behaviour plan; +- inspectable AI state machines with named states, declared guards, and + registered typed logic nodes; - server bot drivers that write the same neutral intent as players and replays; - offline baking, Studio preview baking, and explicit runtime publication; - streamed navigation data and paths that may cross cells, portals, and worlds; @@ -113,7 +115,7 @@ Responsibilities are split as follows: | `spatial` | General spatial indexes and bounded candidate queries | | `scene` | Serializable navigation components, service classes, requests, results, links, modifiers, agents, sensors, and character intent | | `physics` | Resolve generic world-query batches against the authoritative collider indexes | -| `navigation` | Bake artifacts, tile residency, pathfinding, route following, avoidance, perception reduction, goals, behaviour plans, and bot driver output | +| `navigation` | Bake artifacts, tile residency, pathfinding, route following, avoidance, perception reduction, goals, AI state evaluation, behaviour plans, and bot driver output | | `assets` | Content addressing, manifests, bundles, and verified byte delivery | | `script` | Methods and properties that create scene requests and inspect scene results | | `render` | Debug drawing from immutable navigation debug snapshots | @@ -783,8 +785,9 @@ condition. ### Goals A goal has a stable name, eligibility conditions, a bounded score expression, -cooldown, minimum hold time, and one behaviour plan entry point. Goal scoring -runs at a declared cadence and after relevant fact changes. +cooldown, minimum hold time, and one default behaviour-plan entry point. Goal +scoring runs at a declared cadence and after relevant fact changes. Activating +a goal initializes its state machine and plan from their declared defaults. Equal scores are resolved by explicit author priority then stable goal name. Switching records the reason and source facts. A goal cannot oscillate every @@ -818,6 +821,186 @@ Custom game logic may implement a registered native task or use a script to write goals and facts outside the plan. The format does not grow into a second general programming language. +### Inspectable `AIController` state machines + +`AIController` owns an agent's decision state and evaluates it on the fixed +tick. It is separate from `BotController`: an AI controller may direct a +non-character agent, while `BotController` adapts bounded AI requests into the +current character driver's neutral intent. A character can have an AI +controller without having a player, and an AI agent need not be a character. + +Each controller references one immutable, named state-machine asset and one +bounded runtime state row. States have stable names, an optional parent, entry +and exit tasks, declared conditions, and a bounded set of outgoing transitions. +The asset declares its initial state and an explicit fallback for invalidated +or unavailable choices. Terminal states are explicit. A missing state never +silently selects the first state in file order. + +Hierarchical state composition follows the same authoring vocabulary planned +for character state and animation graphs, without requiring a shared runtime. +An exclusive parent has one active child. A parallel parent has a bounded set +of active regions, each with its own initial child and transition order. The +authoring model can express exclusive OR composition and concurrent AND +regions. Parent entry and exit tasks have explicit lifetime rules, and a child +cannot accidentally restart a still-active parent task. AI, physical character +state, and animation remain separate authorities even when their diagrams use +the same composition terms. + +Conditions are typed declarations, separate from state composition. A +transition guard may combine declared predicates with bounded Boolean AND, OR, +and NOT nodes. Leaf conditions read named blackboard values or copied, +read-only facts from navigation and gameplay owners. They do not invoke an +arbitrary callback while parallel work or a solver is running. A transition +declares its source, destination, guard, priority, optional minimum state +duration, cooldown, and reason code. Ties resolve by explicit priority, deeper +source state, then stable transition name. Every state with no eligible +transition follows its declared hold or fallback policy. + +Transitions are evaluated at a declared boundary once per AI tick. A state +change may lead to another state on a later tick, including a cycle such as +patrol to investigate to patrol. The compiler rejects combinational dataflow +cycles and unbounded same-tick state re-entry. A transition budget and +per-tick entry/exit task budget provide a second runtime guard; exhausting a +budget preserves the committed state and reports why work stopped. Explicit +bounded retry operations remain valid inside a behaviour plan. + +Goal selection owns goal choice. On goal activation or change, it initializes +the goal's declared state and default plan entry point. Retaining a goal +preserves active state and task progress. The active state may select a +state-specific plan entry point, which takes precedence over the goal default, +but it cannot select or write a goal. State and goal changes select one entry +point and operate one `BehaviourPlan` lifecycle. If the selected entry point +changes, the old plan is cancelled or suspended by its declared policy before +the new plan starts. One evaluation cannot enter both defaults or start two +plans. This one-way flow avoids goal/state feedback and duplicate tasks. + +At the start of evaluation, the controller reads one immutable snapshot of +facts, goal, state, and agent generation. Character-bound actions additionally +read the current driver token and lease generation. It chooses at most one +transition per active region for that tick. Parallel-region candidates are +arbitrated atomically against the same snapshot. If transitions conflict because they +exit a shared parent or target the same exclusive region, explicit priority, +deeper source state, then stable transition name break the tie. Stable region +order is only for deterministic traversal and commit. Independent region +winners commit together. A flat exclusive machine can commit at most one +transition globally per tick. No region observes a partially committed +parallel transition set. + +Example tree: + +```text +Agent +├─ Activity (exclusive OR) +│ ├─ Patrol (initial) +│ ├─ Investigate +│ ├─ Chase +│ ├─ Attack +│ └─ Return +└─ Disabled (sibling state, reachable from every active state) +``` + +`Disabled` is a top-level sibling reachable from every active state on the +authoritative death or disable fact, so it does not depend on each local +transition list remembering a special case. Re-enabling returns through the +declared initial-state policy. The table below sketches the normal exclusive +`Activity` region; death/disable has higher declared priority than its rows. + +| State | Guard or event | Next state | Bounded request | Reason exposed to inspection | +|---|---|---|---|---| +| `Patrol` | visible hostile | `Chase` | path to visible target | `target-acquired` | +| `Patrol` | new sound fact | `Investigate` | path to last heard position | `sound-remembered` | +| `Investigate` | target becomes visible | `Chase` | path to visible target | `target-acquired` | +| `Investigate` | search expires | `Return` | path to home position | `search-expired` | +| `Chase` | target in range and action permitted | `Attack` | named attack action | `attack-range-reached` | +| `Chase` | target lost past memory limit | `Investigate` | path to last seen position | `target-memory-expired` | +| `Attack` | target leaves range | `Chase` | path to target | `target-left-range` | +| Any active state | authoritative death or disable fact | `Disabled` | cancel actions, neutral intent | `agent-disabled` | +| `Return` | home reached | `Patrol` | resume patrol route | `home-reached` | +| `Disabled` | explicit gameplay re-enable | `Patrol` | none | `agent-enabled` | + +The example is a state-machine sketch, not a promise that every state needs a +navigation route or character action. The active state, parent chain, active +parallel regions, failed guard, winning transition, priority, source fact +revision, and reason code are inspectable as a copied snapshot. + +### Programmable logic nodes and action boundary + +The authoring graph can include registered, typed condition, action, and task +nodes. Each node declares stable type and version names, typed inputs and +outputs, bounds, authority requirements, and a deterministic evaluation +contract. Native nodes are registered before an asset is compiled. Unknown +nodes remain visible in the source and prevent publication. Node implementations +run in the owning AI phase and receive copied inputs plus bounded output slots. + +Luau and JavaScript may supply custom logic through a staged request/result +boundary. Script code reads a copied input snapshot and emits typed requests; +the owning fixed-tick phase validates and commits them, and results become +visible on the next declared AI tick. Script callbacks do not run inside +parallel sensor gathers, path solvers, collision queries, or other worker jobs. +This keeps script logic useful without making task completion depend on OS +scheduling. + +Every AI request carries a stable request id, request kind, source tick, and +agent generation. Character-bound actions additionally carry the current +driver token and lease generation and are embedded by `BotController` in the +action field of the character's single `CharacterIntent` row for that tick. +The character authority validates those fields and returns an acknowledgement +with the same correlation data, a result phase (`Accepted`, `Refused`, +`Running`, `Completed`, `Cancelled`, or `Failed`), and a bounded reason. +Non-character request owners validate acknowledgements against their own agent +generation and request id; they have no character lease fields. AI consumes +acknowledgements on the following AI tick and ignores stale generations or +unknown request ids. + +AI reads character feedback, including actual movement and action +acknowledgements. It may request movement, facing, jump, or a named action via +the active driver. It never writes transforms, velocity, physical character +state, animation state, or bones. Navigation goals and non-character agents use +the same decision runtime without passing through the character adapter. + +### Ownership and possession changes + +AI ownership, player roster membership, and the current driver lease are three +different relations. An NPC/gameplay owner may keep an AI controller attached +to an agent; a player may keep several characters in a roster; one active +driver token holds the current right to write character intent. Player +possession does not transfer character ownership or destroy the NPC's +controller. + +When possession revokes the AI driver's character lease, pending character +action requests are cancelled or suspended by a declared policy, task work +cannot publish lease writes, and old acknowledgements are ignored by lease +generation. The physical character state and current animation state are not +reset by possession loss. A later lease may resume a declared resumable plan +or start a new plan after an explicit owner decision. An AI controller for a +non-character agent has no possession or character lease dependency. + +### State tree and transition exports + +Studio and offline tooling export a state tree and transition view from the +canonical state-machine source. The exporter produces a standalone SVG and a +self-contained HTML document with the SVG embedded. Neither output compiles or +executes runtime behavior. State names, hierarchy, initial and terminal +markers, exclusive parents, parallel regions, guard labels, transition +priorities, and task/goal entry points come from the same validated source used +by the compiler. + +An optional active-path snapshot may highlight active states and parallel +regions and show the transition reason, failed guard, and source revision. It +is attached to a specific compiled asset revision and runtime tick; it is not +live control input. The static diagram remains useful without a snapshot. +Optional read-only controls may pan, zoom, or collapse parent regions. The +export has no external CDN, script dependency, or continuously repainting +animation. It uses a true black background, white primary text, dense labels, +and minimal chrome. Author-provided labels are escaped for SVG and HTML +contexts. + +Layout and output bytes are deterministic for equivalent canonical source and +export settings. Layout may be cached by source revision and renderer version. +The exporter owns layout and serialization; transition semantics remain in the +compiler and fixed-tick evaluator. SVG text includes a readable title, +description, and semantic labels for logical components. + ### Compile format Studio may use its `nodegraph` library to edit a behaviour document. Editor @@ -829,16 +1012,22 @@ Compilation performs: - schema and version validation; - port type checking; -- cycle rejection except for explicit bounded retry nodes; +- dataflow-cycle rejection, while allowing state transitions across ticks; +- rejection of unbounded same-tick state re-entry; +- guard, state composition, transition-priority, and node-type validation; - reachability and dead-node diagnostics; - key and task name resolution; - bound aggregation for stack depth, active tasks, and work per tick; - canonical ordering and content hashing; -- emission of an immutable flat `BehaviourPlan`. +- emission of immutable bounded plan and state-machine artifacts from the same + domain-specific source model. -Runtime evaluates the flat plan. It never walks Studio graph objects. Missing -node or task types keep the source document openable and visibly broken, but a -broken document cannot publish an executable artifact. +Runtime evaluates compiled artifacts. It never walks Studio graph objects. +Missing node or task types keep the source document openable and visibly +broken, but a broken document cannot publish an executable artifact. State +transition edges are not same-tick plan flow: compiler diagnostics identify +the graph kind and cycle class so a valid cross-tick state cycle is not rejected +as a dataflow loop. ### Task lifecycle @@ -858,15 +1047,25 @@ an over-budget diagnostic. It does not spin until completion. ### Driver pipeline -The server bot pipeline is: +The server AI pipeline is: 1. perception commits a memory snapshot; -2. goal selection chooses or keeps one goal; -3. the behaviour plan requests a route or action; +2. the AI controller consumes due acknowledgements and selects or holds one + declared state and goal; +3. the state selects a behaviour-plan entry point, which requests a route or + action; 4. navigation computes or follows the route; 5. local avoidance resolves preferred steering; -6. `BotController` writes one neutral `CharacterIntent`; -7. the character system consumes intent and reports actual progress next tick. +6. `BotController` writes one neutral `CharacterIntent` for character agents; +7. the character authority consumes intent and reports movement and action + acknowledgements for the following AI tick. + +At AI evaluation, only acknowledgements committed by the prior character phase +are visible. An action submitted this tick cannot complete its own task this +tick. + +An AI controller for a non-character agent produces that agent's declared +bounded action requests without `BotController` or a character component. The intent includes desired movement, facing, jump and action edges, source tick, sequence, and expiry as defined by the character plan. It contains no bot @@ -919,14 +1118,16 @@ The complete authority schedule is: 5. gather perception candidates and emit generic world queries; 6. physics resolves the bounded world-query batch; 7. reduce complete perception memories; -8. evaluate due goals and behaviour plans; +8. evaluate due goals, AI state transitions, and behaviour plans from the + committed fact and acknowledgement snapshot; 9. close and sort path requests; 10. solve the path batch, joining all worker jobs; 11. repair and advance route corridors; 12. solve local avoidance from one frozen crowd snapshot; 13. commit steering, route, perception, and behaviour state in stable order; 14. bot drivers resolve and publish character intent; -15. character controllers consume the intent; +15. character controllers consume the intent and publish action acknowledgements + for the next AI tick; 16. record profiling, overflow, and diagnostic counters. Structural ECS changes are queued and applied at the next allowed barrier. @@ -1126,6 +1327,12 @@ budget use, and failure diagnostics. Runtime source editing is a Studio or asset-authoring operation. Live games switch to another validated immutable plan by content identity at a barrier. +AI state machines expose the active parent chain and parallel regions, the +winning transition and priority, failed guards, state duration, source fact +revision, and bounded reason codes as copied diagnostic snapshots. Registered +nodes and script-authored requests use deterministic request/result phases; +script callbacks do not run inside a parallel gather or solver. + ### Binding parity All classes, properties, enums, methods, and events are registered once and @@ -1164,6 +1371,9 @@ Overlays may show: - avoidance radius, preferred velocity, and resolved velocity; - perception cones, candidates, occlusion rays, and remembered targets; - current goal and bounded behaviour task path. +- active state hierarchy, parallel regions, winning transition, failed guard, + action request id, character lease generation when applicable, and + acknowledgement reason. Overlay geometry is rebuilt only when its source signature changes. Hidden overlays and docks do no tessellation, upload, or query work. @@ -1174,6 +1384,8 @@ Studio uses the existing nodegraph library as a view and editing tool. The navigation module owns the domain schema and compiler. The editor provides: - searchable domain-specific nodes; +- named AI states, exclusive and parallel regions, Boolean conditions, guard + priorities, and transition-cycle diagnostics; - typed ports and inline bounded fields; - compile diagnostics attached to nodes and ports; - live but rate-limited inspection of one selected agent; @@ -1183,6 +1395,10 @@ navigation module owns the domain schema and compiler. The editor provides: The editor does not execute the graph. Closing it does not change AI behaviour. +The canonical source also exports SVG and self-contained HTML state diagrams. +An optional revision-matched active-state snapshot and read-only pan, zoom, and +collapse controls do not change runtime behavior. + ### Path probe An author can place origin and destination probes, choose a profile, and inspect @@ -1204,7 +1420,8 @@ bytes are hostile inputs. Validation must reject: - invalid polygon winding, indices, adjacency, and tile bounds; - negative edge or area costs; - links with missing endpoints, invalid worlds, or unbounded actions; -- behaviour cycles without a bounded retry node; +- combinational graph cycles and unbounded same-tick state re-entry; +- malformed state transitions, guards, parallel-region bounds, or node types; - undeclared blackboard keys or type mismatches; - plans whose aggregate depth or work exceeds engine limits; - compressed payloads whose declared output exceeds the limit. @@ -1227,6 +1444,8 @@ Hard settings cap: - perception candidates, world queries, hits, facts, and events per sensor; - goals, blackboard keys, behaviour operations, task depth, and retries per agent; +- state count and hierarchy depth, parallel regions, transitions, guard nodes, + transition candidates per tick, and action request/acknowledgement rows; - debug stream bytes and retained history. Every cap has a status and counter. Silent drop is allowed only for a declared @@ -1274,12 +1493,16 @@ include: - avoidance neighbours, constraints, stops, and overflows; - perception candidates, exact queries, visible targets, facts, and overflows; - goal switches, plan operations, active tasks, cancellations, and budget hits; +- state changes, guard evaluations, arbitration conflicts, node operations, + action acknowledgements, stale character lease results, and state budget + hits; - bot intents, neutralisations, and rejected lease writes. `ENGINE_PROFILE` scopes cover source collection, each bake stage, batch path search, corridor generation, dynamic overlay update, perception gather and -reduce, avoidance, behaviour evaluation, and bot intent publication. Worker -durations are reported through the existing reported-span path after join. +reduce, avoidance, AI state arbitration, behaviour evaluation, staged script +request preparation, and bot intent publication. Worker durations are reported +through the existing reported-span path after join. Logs use world name, request id, agent stable key, artifact content, and reason code. A dynamic log level may trace one agent without logging every crowd. @@ -1303,7 +1526,8 @@ The migration keeps the engine working after each phase. temporary direct-transform bot movement introduced during bring-up. 9. Add dynamic obstacles, route repair, and deterministic local avoidance. 10. Add perception facts and sensors through the generic world-query batch. -11. Add goal selection and the bounded domain-specific behaviour compiler. +11. Add goal selection, AI state machines, and the bounded domain-specific + behaviour compiler. 12. Add Studio baking, overlays, path probes, and behaviour editing. 13. Add tile asset delivery and world-streaming residency integration. 14. Add climb, jump, action, and portal links. Add swim and fly domains only @@ -1432,13 +1656,33 @@ Deliver: - typed blackboards and goals; - bounded goal scoring and hysteresis; -- domain-specific behaviour documents and compiler; +- one domain-specific source model for behaviour plans and AI state machines; +- exclusive state hierarchy, bounded parallel regions, declared initial and + fallback states, terminal states, and typed Boolean guards; +- registered condition, action, and task nodes with deterministic bounds; +- staged Luau and JavaScript request/result integration; +- correlated AI requests keyed by request id and agent generation, with + character actions additionally keyed by driver lease generation and consumed + on the following AI tick; - immutable runtime plans and task lifecycle; -- Studio graph editor and live selected-agent inspection. +- Studio graph editor, state inspector, and SVG plus self-contained HTML + state-tree and transition exports; +- live selected-agent inspection with revision-matched active-state snapshots. Gate: -- invalid cycles, types, bounds, and missing tasks cannot publish; +- dataflow cycles, unbounded same-tick re-entry, invalid types/bounds, and + missing nodes cannot publish, while declared cross-tick state cycles work; +- one transition per exclusive machine and one atomic decision per parallel + region are stable across worker counts; +- an acknowledgement from an old request or agent generation is ignored, and + character acknowledgements also reject stale driver lease generations; +- possession revocation cancels or suspends AI tasks without resetting + physical character or animation state; +- non-character agents run AI without `BotController` or a character component; +- script requests commit at declared barriers and never run in worker callbacks + or solvers; +- SVG/HTML exports are deterministic, self-contained, escaped, and read-only; - runtime uses no Studio nodegraph objects; - operation budgets suspend safely without losing task state; - goal state does not duplicate character or animation state; @@ -1546,6 +1790,22 @@ Gate: - explicit seeded choice and replayed sequence; - source document preserved when it contains an unknown node; - unknown node cannot publish executable content. +- valid cross-tick patrol/investigate cycles and invalid combinational cycles; +- same-tick re-entry refusal preserves the committed state; +- exclusive child changes and bounded parallel regions; +- atomic region arbitration, hierarchy-depth ties, and one transition per + region per tick; +- AND, OR, and NOT guards with stable priority and reason selection; +- initial, fallback, terminal, disable, and re-enable state behavior; +- state/goal phase direction and no duplicate active `BehaviourPlan` task; +- registered node bounds and staged script request/result visibility; +- every acknowledgement phase with matching and stale request ids and agent + generations, plus character lease generations; +- possession revocation suspends/cancels tasks without changing physical or + animation state; +- non-character agents without a character adapter; +- SVG/HTML exports escape authored labels and remain stable for a source + revision. ### Driver, script, and network tests @@ -1591,6 +1851,8 @@ Required runtime measurements: - avoidance time by agent density and neighbour cap; - perception candidate and exact-query time; - goal and behaviour operations per agent; +- state and guard evaluations, parallel-region arbitration, staged script rows, + and action acknowledgement rate; - full AI tick at target agent counts; - live, peak, and churn bytes; - replication and diagnostic bytes per second. @@ -1656,8 +1918,16 @@ The planned system is complete when: - walking routes, authored traversal links, dynamic obstacles, and local avoidance work without writing character state or transforms; - perception commits complete bounded facts before behaviour reads them; +- named AI state machines choose one transition per tick in a flat exclusive + machine, or one per active parallel region with an atomic commit; they use + the shared bounded `BehaviourPlan` lifecycle and expose active path/reason + through Studio and deterministic SVG/HTML exports; - typed goals and immutable bounded behaviour plans select actions without becoming a general virtual machine; +- character action acknowledgements match request ids and driver lease + generations, and possession loss suspends or cancels work without resetting + character or animation state; +- non-character AI agents evaluate without a character controller or player; - a server bot drives a player-independent character only through neutral `CharacterIntent` and relinquishes it atomically to another driver; - saved worlds reference immutable navigation and behaviour assets by stable diff --git a/docs/future-work/terrain-system.md b/docs/future-work/terrain-system.md index abf33da36..b4c697451 100644 --- a/docs/future-work/terrain-system.md +++ b/docs/future-work/terrain-system.md @@ -38,8 +38,9 @@ The system must provide: ### Saved world recipe -`scene::Terrain` is already a one-per-world ECS resource. It owns the authored -recipe, not generated chunks. Its saved fields are: +`Workspace.Terrain` is a generated, non-creatable singleton instance. Its +`scene::Terrain` component owns the saved recipe, not generated chunks. Its +fields are: - `Seed`; - stable generator `core::Name`; @@ -50,11 +51,13 @@ recipe, not generated chunks. Its saved fields are: - enabled state. The generator name serialises as text. Reads clamp chunk extent and resolution -to declared ceilings. A world with no resource behaves like terrain is disabled. -Workspace properties expose the recipe without creating a second copy. +to declared ceilings. A world with no Terrain instance behaves like terrain is disabled. Workspace +exposes the instance as `Workspace.Terrain`, and its properties edit the recipe +on that same component. Installing services creates the singleton and migrates +the older `scene::Terrain` resource into it. This remains the world-level entry point. New authored settings extend the -resource through versioned save and replication schemas. Generated samples, +component through versioned save and replication schemas. Generated samples, meshes, collision, and GPU allocations remain derived artifacts. ### Editable mesh bridge @@ -330,8 +333,8 @@ limits. A consumer asks for a name and handles absence explicitly. ### World recipe extensions -The existing `scene::Terrain` resource should grow only with world-wide authored -policy: +The `scene::Terrain` component on `Workspace.Terrain` should grow only with +world-wide authored policy: - graph asset name and seed; - exposed parameter overrides; @@ -346,10 +349,11 @@ policy: Large override maps and edit journals are referenced by stable asset or resource name instead of embedded into a fixed-size component. -`scene::Terrain` registers before `ecs::Components::Seal()` as a world resource, -not as a constructible `Terrain` instance. It holds the graph and seed that -describe terrain. Generated chunks remain derived artifacts owned by the terrain -runtime, never saved ECS rows or network payloads in place of their inputs. +`scene::Terrain` registers before `ecs::Components::Seal()` as the authored +component on the generated, non-creatable `Terrain` instance under Workspace. It +holds the graph and seed that describe terrain. Generated chunks remain derived +artifacts owned by the terrain runtime, never saved ECS rows or network payloads +in place of their inputs. ### Generation request diff --git a/docs/future-work/ui-system.md b/docs/future-work/ui-system.md index c70df23fb..b7cb3dc7a 100644 --- a/docs/future-work/ui-system.md +++ b/docs/future-work/ui-system.md @@ -88,6 +88,33 @@ routes input into that same world, and delivers resulting events to that world's runtime. Studio compiles `StarterGui` while editing and `PlayerGui` while running. This viewer policy remains part of the compile key. +### StarterGui templates and per-player copies + +`StarterGui` holds authored collector templates. When a player is initialized +or respawns, its `StarterGui` collectors are copied into that player's +`PlayerGui`. The server-owned rows remain the canonical source. Each client +maintains a predicted `ClientLocal` projection for its own player, and the GUI +compiler, input router, and client scripts use that player's projection rather +than drawing or mutating the canonical source rows. Client scripts cannot +observe the source row directly: resolving a source instance or traversing its +children redirects to the corresponding local copy. Server scripts continue +to address the canonical rows, while server-side script reads exclude the +client-local projection. + +`ResetOnSpawn` is a per-collector lifetime choice read from the local projected +collector. When it is enabled, respawn clears that projection and copies the +current source again. When disabled, the local copy keeps its entity identity +and local state across respawn, even if the server replaces the canonical source +entity. Later authored source changes still update the existing copy; local +settings and edits remain local. Non-collector containers such as a `Folder` +are not cleared by this collector lifetime setting. + +Client-created instances are predicted and tagged `ecs.ClientLocal`; server +script creation is authoritative unless it is parented under local ownership +or its class is runtime-local. Local ownership follows ancestry, so the +instance and its descendants stay out of authority replication and authored +game saves. Only predicted rows may be mutated as client-local state. + ### Existing limitations to remove The current system has deliberate provisional edges: diff --git a/docs/future-work/virtual-device-service.md b/docs/future-work/virtual-device-service.md new file mode 100644 index 000000000..ec530b476 --- /dev/null +++ b/docs/future-work/virtual-device-service.md @@ -0,0 +1,320 @@ +# VirtualDeviceService plan + +## Status and scope + +Future work only. None of the APIs or enums below exists yet. This is a general +device service for scripted controllers, accessibility inputs, tracking tools, +and external producers. It does not require VR, a headset, or a particular ML +library. It extends the [input system](input-system.md); the +[VR adapter](vr-system.md) uses the same normalized device and action contracts. + +The first acceptance example is an external Python process running MediaPipe or +another hand tracker. Luau receives its output through a host-approved transport, +queues it on a virtual device, optionally preprocesses it, and handles the +committed result through events or polling: + +```text +Python tracker -> transport bridge -> Luau receiver -> device:PushData(...) + -> fixed-tick pump -> optional PreprocessData -> typed validation + -> atomic sample commit -> device/action state -> OnDataReceived +``` + +Transport ingestion and inference are separate from device ownership. Current +`HttpService` provides JSON helpers, GUID generation, and URL encoding only; +`GetAsync`, `PostAsync`, and `RequestAsync` are absent. An HTTP example therefore +also needs an asynchronous ingress bridge. Do not document it as runnable today. +See [HttpService.cpp](../../mono.engine/script/src/HttpService.cpp). + +## Definitions and device instances + +A definition declares a stable name, one immutable schema, and multiplicity. +Instances share that definition but have independent queues, state, calibration, +callbacks, and connection status. + +| Proposed enum | Meaning | +|---|---| +| `Enum.VirtualDeviceDefinitions.Singleton` | At most one live instance per definition within a world and local-player scope | +| `Enum.VirtualDeviceDefinitions.Multiple` | Multiple named instances of the definition within the same scope | + +Singleton is a count constraint, not a global device shared across clients. +Scripts in the same scope resolve the same registry, so creating another VM or +calling from another script cannot bypass the constraint. A second creation +fails with `AlreadyExists`; callers explicitly retrieve the existing device. +An instance continues to occupy its slot while disconnected. Only destruction +frees it. Multiple instances require unique names within their definition and +scope. Both modes obey the separate overall live-device quota. + +Definitions and fields use stable string names in assets, profiles, and traces. +Runtime device handles carry generations; destroying and recreating an alias +cannot make a stale handle reach the new device. A conflicting redefinition is +refused. Replacing a schema requires a new revision and a controlled migration. + +## Typed values and limits + +Each definition declares between 1 and 32 named values. Every instance and +committed sample has that same maximum of 32 values. This is independent of the +input plan's 32 live devices and eight compatibility gamepad slots. + +Reuse the input action kinds through a proposed `Enum.VirtualDeviceValueType`: + +| Kind | Examples | +|---|---| +| `Boolean` | button, tracked flag, recognized gesture | +| `Scalar` | trigger, confidence, grip strength, throttle | +| `Vector2` | stick, touchpad, normalized pointer | +| `Vector3` | landmark, velocity, spatial direction | +| `Pose` | transform with position/orientation validity | + +A vector or pose occupies one declared value. Arbitrary nested arrays, strings, +and buffers are not typed controls and cannot hide unlimited values inside one +slot. Bounded raw transport data may contain records and arrays before +preprocessing. Text input remains on the input system's text path. + +Field descriptors specify kind, neutral/default value, optionality, and relevant +range, units, or coordinate-space metadata. Initial values are neutral. Every +commit replaces a complete sample: all required fields must be present and +missing optional fields reset to their declared defaults. Unknown fields, +wrong types, NaN, infinity, invalid transforms, and range violations refuse the +whole sample. There is no silent coercion or partial update. +Canonical field order is lexicographic by stable field name, independent of +Luau table traversal order. + +Provisional ceilings for implementation and burst testing: + +| Limit | Policy | +|---|---| +| declared values per definition/instance | hard maximum 32 | +| live instances | share the input runtime's 32-device ceiling, including disconnected instances | +| registered definitions | at most 32 per world/local-player scope, including unused definitions | +| pending samples | at most 32 per device and 256 per owning runtime | +| owned ingress data | at most 64 KiB per raw sample and 1 MiB pending per owning runtime | +| raw nesting | at most 8 levels and 1,024 entries per sample | +| names | at most 64 UTF-8 bytes, no empty names or control characters | + +Bound before copying or allocating. Define exact counting and encoded-size rules +in the neutral schema before implementation. Quota refusal returns a stable +reason and increments diagnostics; it never evicts another producer's device. + +## Proposed Luau surface + +Signatures are design contracts, not existing declarations: + +```text +VirtualDeviceService:DefineDevice(name, multiplicity, schema, options?) -> definition +VirtualDeviceService:GetDefinitions() -> ordered definition descriptors +VirtualDeviceService:GetDefinition(name) -> definition descriptor | nil +VirtualDeviceService:GetDevices(filter?) -> ordered observer handles +VirtualDeviceService:GetDevice(definitionName, instanceName?, localPlayer?) -> observer | nil +VirtualDeviceService.OnDeviceConnected(device, metadata) -> event +VirtualDeviceService.OnDeviceDisconnected(device, reason, metadata) -> event + +definition:CreateDevice(instanceName?, options?) -> producer handle +definition:Destroy() -> refuses while instances exist + +device:PushData(rawData, sourceMetadata?) -> queued, reason? +device.PreprocessData -> callback | nil +device:GetLatestSample() -> immutable sample snapshot | nil +device:GetValue(fieldName) -> typed value +device:GetStatus() -> status snapshot +device:GetDiagnostics() -> bounded counters +device:Disconnect(reason?) +device:Destroy() +device.OnDataReceived(sample, metadata) -> event +device.OnValueChanged(fieldName, newValue, oldValue, metadata) -> event +device.OnStatusChanged(status, reason, metadata) -> event +device.OnError(errorInfo) -> event +``` + +`PreprocessData(rawData, sourceMetadata)` returns a complete typed record or nil +to deliberately discard a sample. Nil callback means validate the submitted +record directly. It runs once per dequeued sample, on the owning VM thread, +under the script step budget. It cannot yield, perform I/O, or recursively pump +devices. Callback replacement takes effect at the next pump boundary. Errors, +budget exhaustion, and invalid output leave the last committed sample unchanged +and produce a bounded diagnostic and `OnError`; nil output is an intentional +drop, not an error. + +`PushData` copies and queues. A true return means queued, not processed. It +never calls preprocessing or subscribers inline. A handler that enqueues more +data schedules it for the next pump. Producers cannot modify committed samples +through a retained table; each event receives an immutable snapshot. Event +handlers may not yield and run within the same bounded delivery budget. A +failing subscriber does not prevent other subscribers or devices from running; +an error handler failure is logged without recursively firing `OnError`. + +The creator owns the write handle and callback. Enumeration returns observers +that can read and subscribe but cannot submit, replace callbacks, disconnect, +or destroy a device. Read access remains local to the permitted world/player +scope. `GetDevices` filters by definition, scope, and status and returns stable +creation order; `GetDefinitions` returns stable name order. Explicitly sharing +a producer capability is a later host decision, not an alias-based permission. +Definition destruction requires its creator's authority too. + +## Example: two hand trackers + +Proposed usage, after a transport has already delivered decoded data to Luau: + +```luau +local Devices = game:GetService("VirtualDeviceService") +local handDefinition = Devices:DefineDevice( + "TrackedHand", + Enum.VirtualDeviceDefinitions.Multiple, + { + Tracked = { Type = Enum.VirtualDeviceValueType.Boolean, Default = false }, + IndexTip = { Type = Enum.VirtualDeviceValueType.Vector3, Default = Vector3.zero }, + Pinch = { Type = Enum.VirtualDeviceValueType.Scalar, Default = 0, Min = 0, Max = 1 }, + } +) +local left = handDefinition:CreateDevice("Left", { StaleAfterTicks = 12 }) +local right = handDefinition:CreateDevice("Right", { StaleAfterTicks = 12 }) + +left.PreprocessData = function(raw, metadata) + return { + Tracked = raw.tracked, + IndexTip = Vector3.new(raw.index_tip.x, raw.index_tip.y, raw.index_tip.z), + Pinch = raw.pinch, + } +end + +left.OnDataReceived:Connect(function(sample, metadata) + if sample.Tracked then + -- Game code handles the accepted input here. + end +end) + +Devices.OnDeviceDisconnected:Connect(function(device, reason, metadata) + -- Game code releases gestures and updates its connection UI here. +end) + +local function onLeftHandPacket(decoded, sourceSequence) + return left:PushData(decoded, { SourceSequence = sourceSequence }) +end +``` + +The right-hand instance may install its own processor or accept already typed +records with a nil callback. An HTTP, WebSocket, local IPC, plugin, or replay +receiver can call the same function; these are adapter candidates, not claims +that those transports are script-accessible today. + +MediaPipe documents 21 landmarks per hand and distinguishes normalized image +coordinates from world landmarks. One device per hand can expose all 21 as +`Vector3` fields plus up to 11 derived controls. Two full hands do not fit in one +32-field device. The example uses only one landmark and expects the producer +to provide pinch strength; it does not claim MediaPipe returns that field. +Coordinate conversion, handedness/mirroring, origin, and scale must be explicit. +World landmarks alone do not establish a calibrated position in engine world +space. See the [Hand Landmarker guide](https://developers.google.com/edge/mediapipe/solutions/vision/hand_landmarker). + +## Pump, events, and lifecycle + +The host drains a bounded ingress batch at the start of each fixed-tick input +phase. It freezes that batch before any callbacks run and processes samples by +host admission sequence. Source timestamps are diagnostic, not scheduling +authority. Optional source sequence numbers reject duplicate or older packets +within an explicit source session; reconnect starts a new session generation. + +For each accepted sample, preprocess, validate, and commit all fields together. +Normalize its controls and evaluate affected action state before dispatching +events. The order is `OnDeviceConnected` on first valid data or recovery, then +`OnStatusChanged` if needed, `OnDataReceived`, and `OnValueChanged` for changed +fields in schema order. Subscribers run in connection order and observe the +committed snapshot. Equal samples still fire `OnDataReceived` because receipt +is meaningful; `OnValueChanged` fires only on changes. + +States are `Created`, `Connected`, `Stale`, `Disconnected`, and `Destroyed`. +Creation registers the instance but does not claim a working producer. The +first valid sample connects it. `StaleAfterTicks` is a finite positive option +with a documented host default; only a successfully committed sample resets +it. Rejected or intentionally dropped packets cannot keep an input alive. +Tracking validity is field/pose data, separate from transport connectivity. + +On timeout, explicit disconnect, focus loss, or source-session loss, atomically +neutralize controls, invalidate poses, cancel action contributions and output, +then emit `OnDeviceDisconnected` once for a previously connected device and +`OnStatusChanged`. Changed fields emit `OnValueChanged` with cancellation +metadata. Lifecycle cancellation does not fire `OnDataReceived` as if a packet +arrived. Focus recovery requires fresh data; old queued packets are discarded. +Pose validity loss likewise cancels its dependent actions even if the producer +remains connected. Reconnection needs a new valid sample and never replays old +button edges. + +`Disconnect` clears pending samples but retains the registered instance. +`Destroy` also removes it from enumeration, disconnects subscriptions, releases +callback refs and the quota slot, and invalidates its handles. VM teardown, +script-owner destruction, Studio Stop, and world exit perform the same cleanup. +Repeated disconnect or destruction is harmless. Destroying a device during a +callback cancels remaining delivery to it without invalidating the pump's walk. + +Keep ordered FIFO delivery initially. A full queue refuses the newest sample +and reports `QueueFull`. A later explicit latest-only mode may coalesce +continuous tracking frames, but must preserve digital transitions or declare +that those fields cannot use that mode. Do not silently lose button taps. + +## Integration and ownership + +The device layer can deliver events and snapshots before named actions ship; +it must not depend on completing the entire input roadmap. Action integration +then maps stable `virtual///` controls through the +normal processors, contexts, local-player assignment, and fixed-tick sampler. +Devices never write `ControllerState` to impersonate a physical gamepad. They +do not acquire a fake Player or bypass semantic character intent validation. + +Shared typed definitions, current samples, and status belong in ECS-owned +world state, separate from the pinned `InputState`. A client-only adapter owns +transport handles and opening devices. `script` declares neutral service and +event facts; Luau and JavaScript adapters own their callback references. Do not +widen the cross-world value codec to carry VM callbacks or device pointers. +Headless tests use copied ingress fixtures without SDL, Python, a model, or a +network. Synthetic server-side devices are possible only when explicitly +created in a server-local scope, never by writing a remote client's registry. + +Ordinary game scripts may create clearly marked virtual devices in their own +scope. This does not authorize hardware impersonation, OS input injection, +camera access, a listening socket, or arbitrary outbound requests. Transport +access is granted separately by the host. The first external bridge should be +local and explicit, with bounded requests/completions, source-session identity, +endpoint policy, cancellation, and reconnect. Polling Python over HTTP and +accepting pushed HTTP are different adapter designs; choose one before coding. +Use asynchronous completions admitted at the tick boundary, never blocking +network work inside `PreprocessData` or an event subscriber. + +Device definitions may be project content. Runtime handles, queues, callbacks, +and raw tracking frames are local and not saved or replicated automatically. +Only validated semantic gameplay intent uses the existing network path. Record +accepted typed samples with schema revision, source session, admission order, +and tick for input replay; replay injects committed samples without rerunning a +model, transport, or preprocessor. Record cancellation transitions too. Raw +ingress traces are a separate opt-in diagnostic and are not required for replay. + +## Useful extensions and validation + +Include these with the first device slice: status reason and last-data age, +per-device sequence and accepted/rejected/dropped counters, range diagnostics, +schema inspection, and a Studio monitor that performs no work while closed. +Use named profile settings for coordinate conversion, calibration, deadzones, +gesture hysteresis, and debounce; processed digital edges must remain tick +deterministic. Device output such as rumble stays on the separate bounded +capability-checked output path. Script-created devices do not claim physical +output capabilities. + +Deliver in this order: + +1. Neutral schemas, quotas, Singleton/Multiple registry, generation checks, + snapshots, lifecycle, and device enumeration with headless tests. +2. Luau and JavaScript pumps, preprocessing, signals, generated declarations, + budget/error isolation, and teardown tests using synthetic samples. +3. One approved external bridge and a Python hand-tracking example, with a + recorded fixture for automated checks and a live demo for manual validation. +4. Named-action binding, calibration profiles, diagnostics, and replay through + the input plan's existing seams. Physical controller coverage remains in + the input and VR plans, not inside the Python bridge. + +Acceptance tests cover exactly 32 values and refusal of 33; every kind and +range; neutral defaults; both multiplicities across two scripts/VMs; independent +left/right instances; stable enumeration and stale handles; nil and failing +preprocessors; immutable snapshots; FIFO order and callback-enqueued deferral; +event order; repeated equal samples; queue/byte limits; failed-sample atomicity; +duplicate and reordered source packets; stale/tracking/focus cancellation; +reconnect; destruction during delivery; owner/world teardown; language parity; +and deterministic replay without the external producer. Profile the pump and +callbacks separately under burst loads before fixing provisional budgets. diff --git a/docs/future-work/vr-system.md b/docs/future-work/vr-system.md new file mode 100644 index 000000000..94afbc83f --- /dev/null +++ b/docs/future-work/vr-system.md @@ -0,0 +1,361 @@ +# VR system plan + +## Status + +This document describes future work. It does not claim that the engine has an XR runtime, +headset support, eye tracking, optical focus control, or a VR input path today. The Rift S is a +requested validation target. Its current runtime availability and compatibility must be checked +when implementation begins. + +The plan separates headset integration, per-eye rendering, player intent, comfort, local vision +preferences, and shared-room safety. A client adapter owns XR session and device details. Shared +engine code receives copied poses, view descriptions, and action samples. A headless server has +no headset or runtime dependency. + +Far Cry VR and Warhammer 40,000: Space Marine VR - Defenders of Avarax at Zero Latency Adelaide +are reference experiences supplied for this plan. First-person POVs are expected later and have +not been reviewed here. Official pages describe group play and safety guidance for Far Cry VR, +and squad encounters and difficulty choices for Space Marine VR. These are study references, not +claims about this engine or verified Adelaide venue inventory ([Far Cry VR game information](https://zerolatencyvr.zendesk.com/hc/en-us/articles/360003503315-Far-Cry-VR-Game-Information), [Space Marine VR standard mode information](https://zerolatencyvr.zendesk.com/hc/en-us/articles/10613665200527-Space-Marine-VR-Standard-Mode-Game-Information)). + +## Product goal + +Build a comfortable, inspectable VR path that uses the engine's existing world, camera, input, +character, audio, physics, and rendering systems. + +The system should support: + +- headset session and frame lifecycle through a client platform adapter; +- runtime-provided view pose and asymmetric projection parameters per eye; +- head and controller actions translated into the common input path; +- configurable comfort and accessibility options; +- optional per-eye perceived-focus adjustments for users who need them; +- a separate, clearly named virtual magnifier for interface or world content; +- profile reset, calibration preview, and safe return to the game; +- shared-room sessions with physical origin and boundary safety rules; +- headless authoritative simulation and copied network messages; +- a small multiplayer experience that exercises movement, aim, audio, and recovery from tracking + or session interruptions. + +VR presentation does not own gameplay authority. The server commits gameplay on fixed ticks from +validated action intent. The client may predict visual motion and late-latch view pose for +rendering, but render-time pose updates do not write authoritative transforms or bypass movement +validation. + +## Existing foundation and references + +Extend the camera, input, character, navigation, audio, and session paths linked below. + +| Plan | VR connection | +|---|---| +| [Camera and cinematics](camera-and-cinematics.md) | Per-view camera output, tracked head pose, lens ownership, and comfort-aware transitions | +| [Input system](input-system.md) | XR action samples, focus loss, rebinding, and fixed-tick intent | +| [Virtual device service](virtual-device-service.md) | Bounded external and scripted device ingress through the shared device and action path | +| [Character system](character-system.md) | Character intent, possession, aim, and locomotion | +| [Navigation AI](navigation-ai-system.md) | Shared-room agents and bounded collision queries | +| [Audio system](audio-system.md) | Listener pose, spatial audio, and copied presentation state | +| [Session and social](session-and-social.md) | Joining, leaving, copied player state, and recovery | + +OpenXR supplies view poses and projection fields through `xrLocateViews`. Use those per-view +values when building and submitting projection views. Keep the poses and FOV data coherent with +the matrices and layer metadata for that frame ([OpenXR rendering specification](https://github.com/KhronosGroup/OpenXR-Docs/blob/main/specification/sources/chapters/rendering.adoc)). + +OpenXR core provides view and projection state, not a general setter for a headset's physical +lens focus. Treat physical per-eye focus as a vendor or device capability only when a runtime +exposes it. Do not imply all headsets support it or invent an OpenXR core call. + +## Non-negotiable design rules + +1. XR runtime headers and handles stay behind the client platform adapter. +2. No headset, controller, or runtime pointer crosses a world boundary. +3. The server and headless tools can run without an XR runtime or GPU. +4. Runtime view poses and FOV values are the baseline for each submitted view. +5. Submitted projection metadata must describe the projection used to render. +6. Per-eye preferences are local presentation settings, never game authority. +7. A game cannot silently change a player's vision profile. +8. User scale controls are not prescription or diopter measurements. +9. The runtime boundary is safety input, not a visual avatar or collision mesh. +10. Recenter and origin changes are explicit, versioned session events. +11. Tracking loss and session focus loss release held actions exactly once. +12. Render prediction never commits simulation state. +13. Query and report device features; unsupported options say unavailable. +14. Calibration and comfort checks must work before gameplay. +15. Bound every queue, device set, view family, and action sample. + +## Ownership and layer placement + +Start with a client adapter around the selected XR runtime. Keep reusable view, input, and +player-intent data in existing engine layers where their current owners fit. Do not add an +engine XR module before implementation has a concrete dependency set. If new modules or +cross-layer edges are needed, update and pass the repository architecture graph checks in the +implementation change. + +| Owner | Responsibility | +|---|---| +| Client platform adapter | Runtime discovery, instance/session lifecycle, frame timing, event pump, swapchains, and device capability reporting | +| `scene` and camera path | Copied tracked poses, per-view camera inputs, and presentation configuration | +| Input | XR action mapping, focus-loss release, and fixed-tick samples | +| Character and physics | Validated locomotion intent, collision, ground state, and authoritative movement | +| Render | Per-eye target setup, projection, submission, and diagnostics | +| Audio | Listener pose and spatial output from the final presentation view | +| Server | Fixed-tick authority, intent validation, room membership, and copied state | +| Studio | Optional authoring and diagnostics; no runtime ownership | + +Create the instance, session, reference space, and supported swapchains after +discovering a compatible runtime and view configuration. Session start and stop +are event-driven. Continue polling runtime events while idle. On `READY`, call +`xrBeginSession` before entering the frame loop. On `STOPPING`, leave that loop, +call `xrEndSession`, then return to event polling. On `EXITING` or +`LOSS_PENDING`, unwind session resources and exit or recover according to the +reported state ([OpenXR 1.1 specification](https://registry.khronos.org/OpenXR/specs/1.1-khr/html/xrspec.html)). + +Inside the active frame loop: + +1. wait for frame timing and begin the frame; +2. if rendering is requested, locate view poses and FOV for the predicted display time; +3. acquire and wait for images only when rendering is requested; +4. render and prepare projection views using the same pose/FOV contract, then complete GPU + access according to the graphics binding; +5. release acquired images, then end the frame. If rendering is not requested, skip image work + and still end the frame; +6. return to event polling before the next frame and handle focus, exit, or device loss. + +Every failure path must release acquired resources and move the session to a known state. The +exact API calls and graphics binding belong in the adapter implementation after runtime and +platform support are verified. + +## View and camera model + +Each eye is a render view with its own runtime pose and asymmetric FOV. The world camera remains +a shared logical view. The renderer combines that view with the tracked eye offset and runtime +projection parameters for submission. + +The camera plan's target-specific output remains the shared camera seam. The XR adapter supplies +copied view data; it does not create a second camera controller or write the authored camera +lens. The camera pose for gameplay is the declared head or aim policy, while eye projections +stay per-eye render data. + +Rules for projection and pose: + +- use runtime-located poses for the target display time; +- preserve the runtime's per-view asymmetric FOV values; +- keep rendered projection and submitted projection metadata coherent; +- treat display coverage and content magnification as separate choices; +- do not fake IPD, world scale, or head pose to imitate prescription optics; +- do not replace runtime eye separation with a mono camera copied twice; +- keep spectator and desktop views as separate consumers of camera output. + +An interface or region magnifier enlarges selected content while leaving the outer eye projection +and submitted FOV on the runtime baseline. Narrowing the submitted FOV alone changes display +coverage, not content magnification. An advanced full-view projection change must render with +and submit the same validated FOV and preserve compositor geometry and depth semantics. + +Portal and mirror views may use engine projection. Headset submissions follow runtime view +state. + +## Per-eye perceived-focus controls + +Calibration may offer separate left and right perceived-clarity controls for users who find that +one image appears softer or differently scaled. The UI must name these as software presentation +adjustments. Neutral strength is zero. Provide a linked-eyes control by default, a preview for +each eye, and an explicit binocular confirmation step. + +The first version should prefer a bounded clarity filter and readable UI options. A user may +disable depth of field or request a stable text treatment for accessibility. If an adjustment +changes image scale, label it as a visual fit control and show the binocular preview. Per-eye +unequal scale is an advanced option that stays off by default because it can impair binocular +fusion. + +Software sharpening, blur, depth of field, crop, zoom, or projection changes cannot move a +headset's fixed optical focal plane or replace prescription lenses. HoloLens guidance describes +fixed display distance and virtual convergence as separate factors. Its numerical advice is +device-specific and is not a universal VR setting ([Microsoft mixed-reality comfort guidance](https://learn.microsoft.com/en-us/windows/mixed-reality/design/comfort)). + +If a future headset exposes physical lens adjustment through a supported runtime extension or +vendor API, the adapter may report that capability and offer its documented control. Otherwise +the interface must say physical lens adjustment is unavailable. Do not convert subjective slider +values into diopters or infer a prescription from a user's calibration response. + +## Magnification and calibration + +Keep interface zoom and world magnification as different controls. Interface zoom may enlarge +menus, captions, reticles, and text while preserving their screen placement rules. World +magnification changes apparent scene scale and has greater comfort and aim risks. + +Initial values and behavior: + +- linked binocular magnification is the default; +- a dimensionless value of `1.0` means neutral magnification; +- store validated finite values within product-tested bounds; +- provide a one-action reset to the neutral profile; +- show the actual effect during calibration before saving; +- avoid claims that a value matches a physical prescription. + +Full-world stereo magnification is experimental. Gate it behind testing of head movement, +reprojection, vergence, depth judgment, and hand-to-world alignment. Do not commit to a +tangent-scaling formula or claim full-world magnification works before the render path proves it. A +bounded magnifier for UI or a small view region is the fallback if world scaling causes +discomfort or breaks interaction. + +Calibration should be reachable from the in-game menu and return to the previous game state +without losing the session. Provide a stationary grid, high-contrast text, and near, middle, and +far markers. The player previews the left eye, previews the right eye, then confirms the +binocular image. Controls remain linked unless the player enables independent adjustment. + +The flow must include cancel, reset, save, and restore behavior. Keep the player stationary +during visual calibration. Give clear IPD and headset-fit guidance, and point to runtime or +device setup for those settings. Do not fake IPD changes through world scale or camera movement. + +Calibration captures input through a local modal action context. Its confirm, cancel, reset, and +preview actions do not leak into gameplay; calibration haptics use that same context and remain +bounded. It does not pause the multiplayer world. The player moves to a safe lobby or room +according to the game's policy, while server authority and other players continue. + +## Local profile and persistence + +Store vision preferences in a local, versioned user profile. Keep values separate from save +games, world assets, replicated player state, and network messages. A multiplayer game may query +whether a player is ready, but it must not read or alter detailed vision settings. + +The profile may contain: + +- schema version and profile revision; +- linked or independent eye preference; +- validated per-eye clarity and optional scale values; +- interface magnification and world magnification choice; +- depth-of-field and text accessibility preferences; +- eyewear context selected by the user, if useful to the calibration flow; +- runtime and view-configuration fingerprint for stale-profile detection. + +On a schema or runtime-view mismatch, retain the old profile safely and ask the player to +reconfirm or reset. Do not auto-apply an old calibration to a changed view configuration. +Corrupt, missing, or non-finite values fall back to neutral settings and produce a local +diagnostic. + +## Input, comfort, and player control + +XR controls enter through the action system as named actions. The adapter translates runtime +events into bounded samples. Gameplay consumes one authoritative sample per fixed tick. Device +events, runtime handles, and render-time pose updates remain local to the client. + +Use the shared device and action path described by the [input system](input-system.md) and +[VirtualDeviceService plan](virtual-device-service.md); XR must not add a parallel gameplay +input channel. Check runtime profile availability for these proposed [OpenXR interaction +profile paths](https://raw.githubusercontent.com/KhronosGroup/OpenXR-Docs/main/specification/sources/chapters/semantic_paths.adoc): HTC Vive wands +(`/interaction_profiles/htc/vive_controller`), Oculus Touch used by Rift S +(`/interaction_profiles/oculus/touch_controller`), Valve Index +(`/interaction_profiles/valve/index_controller`), and the Khronos simple-controller fallback +(`/interaction_profiles/khr/simple_controller`). These are unverified targets, not a claim of +working hardware support. Availability and bindings depend on the active runtime. Treat Vive +Cosmos and Focus as separate future extension checks, not as Vive wand compatibility. + +Support explicit policies for: + +- head-directed or controller-directed aiming; +- handedness and tracked controller offsets; +- snap turn and smooth turn, with a comfortable default; +- teleport or continuous locomotion when the game declares support; +- seated or standing play mode where valid for the experience; +- pause, recenter, and session focus behavior; +- haptics requested through action output with bounded duration and strength. + +No cinematic may take control of the tracked head pose. A cutscene can move the virtual camera +subject or use a bounded transition, but it must preserve head tracking and offer a comfort-safe +skip path. The recenter action is explicit and records an origin generation so other systems can +react. + +Session focus loss, headset removal, tracking loss, or controller disconnect must release held +gameplay actions, stop unneeded haptics, pause or safely degrade the experience, and explain how +to resume. Returning focus must not replay stale button presses. If a device pose is invalid, +preserve the last safe state only for display continuity and mark it invalid for gameplay use. + +Acceptance checks cover profile discovery and bindings for buttons, axes and touchpad controls; +grip and aim poses with validity; haptics when exposed; tracking and session-focus loss; and +disconnect/reconnect without stuck actions or stale poses. + +## Shared-room and network rules + +Shared-room physical placement is separate from virtual presentation. A session owns an explicit +physical floor/origin mapping and a monotonically increasing origin generation. Recenter or room +remap updates that mapping as a copied event. Presentation offsets must never become authority +over physical player position. + +Use runtime boundary or guardian information when the platform exposes it. The game may add +warnings and conservative collision checks, but cannot rely on a visible avatar or a guessed +room polygon as the safety system. Never move a physical player by teleporting their tracked +pose. Virtual locomotion changes the game-space mapping under a declared policy and must remain +distinct from physical movement. + +Network messages carry copied, bounded intent and any pose data the game actually needs. The +server validates player ownership, tick order, finite values, action ranges, rate limits, and +movement against authoritative rules. It does not accept a client pose as proof of collision, +reach, or room safety. The renderer may predict and smooth remote poses, but simulation commits +only at its fixed tick. + +The first cooperative test experience should use an original small arena or range with two +players. It should exercise tracked aim, weapon offsets, handedness, reload actions, bounded +haptics, and basic spatial world audio. Add tracking interruption, room boundaries, and network +recovery. Record the chosen action and pose policy in the experience rather than hiding it in the +XR adapter. + +## Diagnostics and performance + +Expose runtime name, supported view configuration, session state, tracking validity, swapchain +dimensions and formats, frame timing, and dropped or skipped frame counts. Do not log personal +calibration values to shared telemetry. A local diagnostic view may show whether preferences are +neutral or active without exposing exact profile values to the game. + +Measure CPU and GPU frame time percentiles on named hardware, runtime, resolution, refresh rate, +and render scale. Track time spent waiting on the runtime separately from engine work. Report +per-eye render cost and any reprojection or missed-frame signal the runtime exposes. Do not +invent a performance budget or claim a measured result before implementation. + +## Delivery stages + +1. Verify target operating systems, runtime availability, Rift S compatibility, graphics + bindings, and license requirements. Record supported combinations. +2. Build an adapter prototype that opens a session, locates views, renders a neutral scene, and + handles orderly shutdown and focus changes. +3. Connect view data to the existing camera and render paths; preserve each runtime pose and FOV + through submission. +4. Map XR actions into the existing input and character intent path. Add tracking-loss release, + recenter generation, and explicit comfort settings. +5. Add the local calibration and profile flow with neutral defaults and per-eye preview. Keep + physical lens control capability-gated. +6. Add the cooperative range and validate copied network intent, audio, boundary handling, and + recovery under a headless authoritative server. +7. Evaluate advanced world magnification only after binocular and comfort tests pass. Keep it + opt-in and removable if evidence is poor. + +## Validation + +Headless tests should cover profile validation, version migration, finite and bounded values, +stale-runtime detection, neutral fallback, action release, and copied message validation. Render +tests should check asymmetric per-eye projections, matching submitted metadata, and consistent +pose sampling. + +Desktop and headless tests cannot verify optical comfort, physical focus, or binocular fusion. +Those require headset checks with the supported runtime. Validate the calibration grid and text, +per-eye adjustments, head motion, recenter, tracking loss, boundary warnings, and comfort +transitions with people using the target device. Do not treat a successful launch as evidence +that vision settings are safe or useful. + +Rift S is the named first validation target from the request. Before relying on it, verify that +a supported runtime and driver are available on the chosen development platform. Windows is the +first platform to investigate. Verify macOS and Linux runtime paths separately before listing +them as supported. + +## Reference experiences + +The intended reference list is: + +| Experience | Study question | Status | +|---|---|---| +| Far Cry VR at Zero Latency Adelaide | How group coordination, movement, weapons, and safety cues are presented | POVs pending | +| Warhammer 40,000: Space Marine VR - Defenders of Avarax at Zero Latency Adelaide | How squad encounters, aiming, reloads, and difficulty choices are presented | POVs pending | + +When POVs arrive, record timestamp, action, physical versus virtual movement, tracking cues, +comfort observations, proposed engine gap, and uncertainty. Mark observations separately from +official product facts, and record supplied venue and build context. A recording cannot +establish latency metrics or optical properties. Do not infer hidden implementation, headset +model, runtime, or lens controls from video alone. diff --git a/docs/schema-data.toml b/docs/schema-data.toml index 0f7d3489a..517c29edf 100644 --- a/docs/schema-data.toml +++ b/docs/schema-data.toml @@ -9,11 +9,11 @@ generated_by = "schemadump" source = "runtime registries" ["reference"."counts"] -components = 232 -classes = 162 -properties = 2103 -enums = 69 -functions = 107 +components = 245 +classes = 169 +properties = 2197 +enums = 72 +functions = 116 services = 18 service_methods = 92 @@ -32,6 +32,18 @@ padded = false wire_size = 0 described = false +["components"."ecs.ClientLocal"] +name = "ecs.ClientLocal" +kind = "Tag" +size = 0 +alignment = 1 +trivial = true +serialisable = false +raw_serialisation = false +padded = false +wire_size = 0 +described = false + ["components"."ecs.DirtyBits"] name = "ecs.DirtyBits" kind = "Data" @@ -80,6 +92,18 @@ padded = false wire_size = 0 described = false +["components"."ecs.InstanceProjection"] +name = "ecs.InstanceProjection" +kind = "Data" +size = 16 +alignment = 8 +trivial = true +serialisable = true +raw_serialisation = false +padded = true +wire_size = 0 +described = false + ["components"."ecs.NotArchivable"] name = "ecs.NotArchivable" kind = "Tag" @@ -740,6 +764,18 @@ padded = true wire_size = 0 described = false +["components"."gui.PlayerGuiTemplateOrigin"] +name = "gui.PlayerGuiTemplateOrigin" +kind = "Data" +size = 4 +alignment = 4 +trivial = true +serialisable = true +raw_serialisation = false +padded = false +wire_size = 0 +described = false + ["components"."gui.PresentationState"] name = "gui.PresentationState" kind = "Data" @@ -1124,11 +1160,11 @@ padded = false wire_size = 0 described = false -["components"."physics.Storm"] -name = "physics.Storm" +["components"."physics.observation-log"] +name = "physics.observation-log" kind = "Data" -size = 116 -alignment = 4 +size = 17688 +alignment = 8 trivial = true serialisable = true raw_serialisation = false @@ -1136,46 +1172,22 @@ padded = true wire_size = 0 described = false -["components"."physics.StormLink"] -name = "physics.StormLink" +["components"."playergui.Projection"] +name = "playergui.Projection" kind = "Data" -size = 20 -alignment = 4 -trivial = true +size = 40 +alignment = 8 +trivial = false serialisable = true -raw_serialisation = true +raw_serialisation = false padded = false wire_size = 0 described = false -["components"."physics.StormResponse"] -name = "physics.StormResponse" +["components"."playergui.Source"] +name = "playergui.Source" kind = "Data" size = 16 -alignment = 4 -trivial = true -serialisable = true -raw_serialisation = true -padded = false -wire_size = 0 -described = false - -["components"."physics.StormVegetation"] -name = "physics.StormVegetation" -kind = "Data" -size = 52 -alignment = 4 -trivial = true -serialisable = true -raw_serialisation = true -padded = false -wire_size = 0 -described = false - -["components"."physics.observation-log"] -name = "physics.observation-log" -kind = "Data" -size = 17688 alignment = 8 trivial = true serialisable = true @@ -1340,6 +1352,18 @@ padded = false wire_size = 0 described = false +["components"."scene.BloomEffect"] +name = "scene.BloomEffect" +kind = "Data" +size = 16 +alignment = 4 +trivial = true +serialisable = true +raw_serialisation = true +padded = false +wire_size = 0 +described = false + ["components"."scene.BodyIdentity"] name = "scene.BodyIdentity" kind = "Data" @@ -1604,10 +1628,22 @@ padded = false wire_size = 0 described = false +["components"."scene.DepthOfFieldEffect"] +name = "scene.DepthOfFieldEffect" +kind = "Data" +size = 20 +alignment = 4 +trivial = true +serialisable = true +raw_serialisation = true +padded = false +wire_size = 0 +described = false + ["components"."scene.EditableImage"] name = "scene.EditableImage" kind = "Data" -size = 56 +size = 64 alignment = 8 trivial = false serialisable = true @@ -1640,13 +1676,37 @@ padded = false wire_size = 0 described = false -["components"."scene.GpuParticleField"] -name = "scene.GpuParticleField" +["components"."scene.FogEffect"] +name = "scene.FogEffect" kind = "Data" -size = 72 +size = 24 +alignment = 4 +trivial = true +serialisable = true +raw_serialisation = true +padded = false +wire_size = 0 +described = false + +["components"."scene.GodRaysEffect"] +name = "scene.GodRaysEffect" +kind = "Data" +size = 16 alignment = 4 trivial = true serialisable = true +raw_serialisation = true +padded = false +wire_size = 0 +described = false + +["components"."scene.GpuParticleField"] +name = "scene.GpuParticleField" +kind = "Data" +size = 152 +alignment = 8 +trivial = false +serialisable = true raw_serialisation = false padded = false wire_size = 0 @@ -1676,6 +1736,18 @@ padded = false wire_size = 0 described = false +["components"."scene.ImageGraph"] +name = "scene.ImageGraph" +kind = "Data" +size = 48 +alignment = 8 +trivial = false +serialisable = true +raw_serialisation = false +padded = false +wire_size = 0 +described = false + ["components"."scene.InputState"] name = "scene.InputState" kind = "Data" @@ -1763,7 +1835,7 @@ described = false ["components"."scene.LightingService"] name = "scene.LightingService" kind = "Data" -size = 104 +size = 44 alignment = 4 trivial = true serialisable = true @@ -2319,7 +2391,7 @@ size = 4 alignment = 4 trivial = true serialisable = true -raw_serialisation = true +raw_serialisation = false padded = false wire_size = 0 described = false @@ -2355,7 +2427,7 @@ size = 4 alignment = 4 trivial = true serialisable = true -raw_serialisation = true +raw_serialisation = false padded = false wire_size = 0 described = false @@ -2540,6 +2612,90 @@ padded = false wire_size = 0 described = false +["components"."scene.WeatherAcceptedDefinition"] +name = "scene.WeatherAcceptedDefinition" +kind = "Data" +size = 256 +alignment = 8 +trivial = false +serialisable = true +raw_serialisation = false +padded = false +wire_size = 0 +described = false + +["components"."scene.WeatherClock"] +name = "scene.WeatherClock" +kind = "Data" +size = 136 +alignment = 8 +trivial = true +serialisable = true +raw_serialisation = false +padded = true +wire_size = 0 +described = false + +["components"."scene.WeatherClockEstimate"] +name = "scene.WeatherClockEstimate" +kind = "Data" +size = 200 +alignment = 8 +trivial = true +serialisable = true +raw_serialisation = false +padded = true +wire_size = 0 +described = false + +["components"."scene.WeatherClockInbox"] +name = "scene.WeatherClockInbox" +kind = "Data" +size = 5128 +alignment = 8 +trivial = true +serialisable = true +raw_serialisation = false +padded = true +wire_size = 0 +described = false + +["components"."scene.WeatherClockPublication"] +name = "scene.WeatherClockPublication" +kind = "Data" +size = 32 +alignment = 8 +trivial = true +serialisable = true +raw_serialisation = false +padded = true +wire_size = 0 +described = false + +["components"."scene.WeatherCompute"] +name = "scene.WeatherCompute" +kind = "Data" +size = 224 +alignment = 4 +trivial = true +serialisable = true +raw_serialisation = false +padded = true +wire_size = 0 +described = false + +["components"."scene.WeatherWorldPause"] +name = "scene.WeatherWorldPause" +kind = "Data" +size = 1 +alignment = 1 +trivial = true +serialisable = true +raw_serialisation = false +padded = false +wire_size = 0 +described = false + ["components"."scene.WeldConstraint"] name = "scene.WeldConstraint" kind = "Data" @@ -2819,6 +2975,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -2830,6 +2987,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -2841,6 +2999,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -2852,6 +3011,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -2863,6 +3023,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -2874,6 +3035,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -2892,6 +3054,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -2903,6 +3066,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -2914,6 +3078,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationClip"] writes = ["scene.AnimationClip"] @@ -2925,6 +3090,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationClip"] writes = ["scene.AnimationClip"] @@ -2936,6 +3102,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationClip"] writes = ["scene.AnimationClip"] @@ -2954,6 +3121,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -2965,6 +3133,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -2976,6 +3145,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationBuffer"] writes = [] @@ -2987,6 +3157,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationBuffer"] writes = [] @@ -3005,6 +3176,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3016,6 +3188,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3027,6 +3200,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3038,6 +3212,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3049,6 +3224,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3060,6 +3236,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3071,6 +3248,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3082,6 +3260,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3093,6 +3272,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3104,6 +3284,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] @@ -3115,6 +3296,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AnimationTrack"] writes = ["scene.AnimationTrack"] enum = "AnimationPriority" @@ -3134,6 +3316,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3145,6 +3328,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3156,6 +3340,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Animator"] writes = ["scene.Animator"] @@ -3167,6 +3352,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Animator"] writes = ["scene.Animator"] @@ -3178,6 +3364,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Animator"] writes = ["scene.Animator"] @@ -3189,6 +3376,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Animator"] writes = ["scene.Animator"] @@ -3207,6 +3395,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3218,6 +3407,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3229,6 +3419,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -3240,6 +3431,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -3251,6 +3443,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -3262,6 +3455,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -3273,6 +3467,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -3284,6 +3479,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -3295,6 +3491,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -3306,6 +3503,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ArcHandlesShape"] writes = ["gui.ArcHandlesShape"] @@ -3324,6 +3522,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3335,6 +3534,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3346,6 +3546,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3357,6 +3558,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3368,6 +3570,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3379,6 +3582,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3390,6 +3594,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3401,6 +3606,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3419,6 +3625,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3430,6 +3637,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3441,6 +3649,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3452,6 +3661,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3463,6 +3673,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3474,6 +3685,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3485,6 +3697,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3496,6 +3709,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3514,6 +3728,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3525,6 +3740,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3536,6 +3752,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3547,6 +3764,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3558,6 +3776,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3569,6 +3788,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3580,6 +3800,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3591,6 +3812,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Atmosphere"] writes = ["scene.Atmosphere"] @@ -3602,6 +3824,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AtmosphereProcedural"] writes = ["scene.AtmosphereProcedural"] @@ -3613,6 +3836,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AtmosphereProcedural"] writes = ["scene.AtmosphereProcedural"] @@ -3624,6 +3848,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AtmosphereProcedural"] writes = ["scene.AtmosphereProcedural"] @@ -3635,6 +3860,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AtmosphereProcedural"] writes = ["scene.AtmosphereProcedural"] @@ -3646,6 +3872,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AtmosphereProcedural"] writes = ["scene.AtmosphereProcedural"] @@ -3657,6 +3884,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AtmosphereProcedural"] writes = ["scene.AtmosphereProcedural"] enum = "AtmosphereProceduralShader" @@ -3669,6 +3897,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AtmosphereProcedural"] writes = ["scene.AtmosphereProcedural"] @@ -3687,6 +3916,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3698,6 +3928,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3709,6 +3940,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Attachment"] writes = ["scene.Attachment"] @@ -3720,6 +3952,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Attachment"] writes = ["scene.Attachment"] @@ -3731,6 +3964,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Attachment"] writes = [] @@ -3742,6 +3976,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Attachment"] writes = [] @@ -3760,6 +3995,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3771,6 +4007,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3782,6 +4019,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3793,6 +4031,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3804,6 +4043,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3815,6 +4055,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3826,6 +4067,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3837,6 +4079,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3848,6 +4091,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3859,6 +4103,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3870,6 +4115,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3881,6 +4127,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3892,6 +4139,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3903,6 +4151,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -3910,7 +4159,7 @@ writes = ["scene.Constraint"] name = "BasePart" creatable = false inherits = "PVInstance" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot", "scene.AuthoredAffordance"] +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot"] property_count = 40 ["classes"."BasePart"."properties"."Parent"] @@ -3921,6 +4170,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -3932,6 +4182,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -3943,6 +4194,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -3954,6 +4206,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -3965,6 +4218,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -3976,6 +4230,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -3987,6 +4242,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bounds"] writes = ["scene.Bounds", "scene.Collider"] @@ -3998,6 +4254,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -4009,6 +4266,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -4016,10 +4274,11 @@ writes = ["scene.Collider"] name = "AffordanceId" type = "Name" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -4027,10 +4286,11 @@ writes = ["scene.AuthoredAffordance"] name = "AffordanceKind" type = "Enum" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] enum = "AuthoredAffordanceKind" @@ -4039,10 +4299,11 @@ enum = "AuthoredAffordanceKind" name = "AffordanceEnabled" type = "Bool" value_size = 1 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -4054,6 +4315,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Simulated"] writes = ["scene.Motion", "scene.Simulated"] @@ -4065,6 +4327,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] writes = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] @@ -4076,6 +4339,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -4087,6 +4351,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -4098,6 +4363,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -4109,6 +4375,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -4120,6 +4387,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -4131,6 +4399,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -4142,6 +4411,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] enum = "ShapeKind" @@ -4154,6 +4424,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -4165,6 +4436,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -4176,6 +4448,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -4187,6 +4460,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -4198,6 +4472,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -4209,6 +4484,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -4220,6 +4496,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -4231,6 +4508,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody", "scene.Simulated", "scene.Collider", "scene.PhysicsProperties"] writes = [] @@ -4242,6 +4520,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -4253,6 +4532,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "AlphaMode" @@ -4265,6 +4545,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -4276,6 +4557,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -4287,6 +4569,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -4298,6 +4581,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "ResamplerMode" @@ -4310,6 +4594,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -4321,6 +4606,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.LocalTransparency"] writes = [] @@ -4332,6 +4618,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -4343,6 +4630,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -4354,6 +4642,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -4372,6 +4661,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -4383,6 +4673,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -4394,6 +4685,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4405,6 +4697,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4416,6 +4709,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4427,6 +4721,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4438,6 +4733,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4449,6 +4745,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4460,6 +4757,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4471,6 +4769,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4482,6 +4781,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4493,6 +4793,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4504,6 +4805,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4515,6 +4817,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4526,6 +4829,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4537,6 +4841,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4548,6 +4853,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Beam"] writes = ["effects.Beam"] @@ -4566,6 +4872,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -4577,6 +4884,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -4588,6 +4896,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -4599,6 +4908,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -4610,6 +4920,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -4621,6 +4932,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ThemeBinding"] writes = ["gui.ThemeBinding"] @@ -4632,6 +4944,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -4643,6 +4956,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -4654,6 +4968,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -4665,6 +4980,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "ZIndexBehavior" @@ -4677,6 +4993,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -4688,6 +5005,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "CollectorScaleMode" @@ -4700,6 +5018,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4711,6 +5030,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4722,6 +5042,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4733,6 +5054,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4744,6 +5066,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4755,6 +5078,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4766,6 +5090,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4777,6 +5102,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4788,6 +5114,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4799,6 +5126,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4810,6 +5138,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4821,6 +5150,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4832,6 +5162,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4843,6 +5174,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4854,6 +5186,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Billboard"] writes = ["gui.Billboard"] @@ -4865,6 +5198,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.SpatialCanvas"] writes = [] @@ -4883,6 +5217,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -4894,9 +5229,89 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."BloomEffect"] +name = "BloomEffect" +creatable = true +inherits = "Instance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.BloomEffect"] +property_count = 6 + +["classes"."BloomEffect"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."BloomEffect"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] +["classes"."BloomEffect"."properties"."Intensity"] +name = "Intensity" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.BloomEffect"] +writes = ["scene.BloomEffect"] + +["classes"."BloomEffect"."properties"."Threshold"] +name = "Threshold" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.BloomEffect"] +writes = ["scene.BloomEffect"] + +["classes"."BloomEffect"."properties"."Radius"] +name = "Radius" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.BloomEffect"] +writes = ["scene.BloomEffect"] + +["classes"."BloomEffect"."properties"."Enabled"] +name = "Enabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.BloomEffect"] +writes = ["scene.BloomEffect"] + ["classes"."Bone"] name = "Bone" creatable = true @@ -4912,6 +5327,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -4923,6 +5339,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -4934,6 +5351,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bone"] writes = ["scene.Bone"] @@ -4945,6 +5363,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bone"] writes = ["scene.Bone"] @@ -4956,6 +5375,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bone"] writes = ["scene.Bone"] @@ -4967,6 +5387,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bone"] writes = [] @@ -4985,6 +5406,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -4996,6 +5418,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5007,6 +5430,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.BoolValue"] writes = ["scene.BoolValue"] @@ -5025,6 +5449,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -5036,6 +5461,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5047,6 +5473,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -5058,6 +5485,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -5069,6 +5497,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -5080,6 +5509,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -5091,6 +5521,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -5102,6 +5533,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -5113,6 +5545,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -5124,6 +5557,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -5135,6 +5569,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -5146,6 +5581,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.BoxHandleShape"] writes = ["gui.BoxHandleShape"] @@ -5164,6 +5600,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -5175,6 +5612,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5186,6 +5624,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -5197,6 +5636,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -5208,6 +5648,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -5219,6 +5660,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -5237,6 +5679,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -5248,6 +5691,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5259,6 +5703,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CFrameValue"] writes = ["scene.CFrameValue"] @@ -5267,7 +5712,7 @@ name = "Camera" creatable = true inherits = "PVInstance" components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Camera", "scene.CameraSubject", "scene.Pivot"] -property_count = 18 +property_count = 19 ["classes"."Camera"."properties"."Parent"] name = "Parent" @@ -5277,6 +5722,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -5288,6 +5734,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5297,8 +5744,9 @@ type = "CFrame" value_size = 28 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -5308,8 +5756,9 @@ type = "Vector3" value_size = 12 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -5319,8 +5768,9 @@ type = "Vector3" value_size = 12 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -5332,6 +5782,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -5341,8 +5792,9 @@ type = "Float" value_size = 4 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5354,9 +5806,23 @@ kind = "Computed" writable = true predicted_writable = true scriptable = true +nullable = true reads = ["scene.CameraSubject"] writes = ["scene.CameraSubject"] +["classes"."Camera"."properties"."CameraType"] +name = "CameraType" +type = "Enum" +value_size = 4 +kind = "Resource" +writable = true +predicted_writable = true +scriptable = true +nullable = false +reads = ["scene.CameraController"] +writes = ["scene.CameraController"] +enum = "CameraType" + ["classes"."Camera"."properties"."CameraSubjectAutomatic"] name = "CameraSubjectAutomatic" type = "Bool" @@ -5365,6 +5831,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CameraSubject"] writes = ["scene.CameraSubject"] @@ -5376,6 +5843,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5387,6 +5855,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5398,6 +5867,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5409,6 +5879,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5420,6 +5891,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5431,6 +5903,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5442,6 +5915,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5453,6 +5927,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -5464,6 +5939,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -5482,6 +5958,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -5493,6 +5970,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5504,6 +5982,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -5515,6 +5994,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -5526,6 +6006,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -5537,6 +6018,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5548,6 +6030,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5559,6 +6042,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5570,6 +6054,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5581,6 +6066,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5592,6 +6078,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5603,6 +6090,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5614,6 +6102,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5625,6 +6114,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5636,6 +6126,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5647,6 +6138,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -5658,6 +6150,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -5669,6 +6162,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -5680,6 +6174,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -5691,6 +6186,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -5702,6 +6198,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -5713,6 +6210,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -5724,6 +6222,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -5736,6 +6235,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -5748,6 +6248,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -5759,6 +6260,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -5770,6 +6272,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -5781,6 +6284,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -5792,6 +6296,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -5804,6 +6309,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Group"] writes = ["gui.Group"] @@ -5815,6 +6321,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Group"] writes = ["gui.Group"] @@ -5833,6 +6340,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -5844,6 +6352,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5855,6 +6364,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -5867,6 +6377,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -5885,6 +6396,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -5896,6 +6408,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -5907,6 +6420,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -5918,6 +6432,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -5929,6 +6444,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -5940,6 +6456,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -5951,6 +6468,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -5962,6 +6480,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -5973,6 +6492,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] @@ -5984,6 +6504,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] @@ -5995,6 +6516,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] @@ -6006,6 +6528,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] @@ -6017,6 +6540,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] @@ -6028,6 +6552,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] @@ -6039,6 +6564,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] enum = "CloudComputeShader" @@ -6051,6 +6577,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CloudCompute"] writes = ["scene.CloudCompute"] @@ -6069,6 +6596,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6080,6 +6608,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6091,6 +6620,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6102,6 +6632,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6113,6 +6644,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6124,6 +6656,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6135,6 +6668,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6146,6 +6680,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6164,6 +6699,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6175,6 +6711,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6186,6 +6723,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6197,6 +6735,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6208,6 +6747,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6219,6 +6759,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6230,6 +6771,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6241,6 +6783,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Clouds"] writes = ["scene.Clouds"] @@ -6259,6 +6802,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6270,6 +6814,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6281,6 +6826,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Color3Value"] writes = ["scene.Color3Value"] @@ -6299,6 +6845,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6310,6 +6857,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6321,6 +6869,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6332,6 +6881,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6343,6 +6893,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6354,6 +6905,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6365,6 +6917,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6376,6 +6929,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6387,6 +6941,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -6398,6 +6953,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -6409,6 +6965,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -6420,6 +6977,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ConeHandleShape"] writes = ["gui.ConeHandleShape"] @@ -6431,6 +6989,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ConeHandleShape"] writes = ["gui.ConeHandleShape"] @@ -6442,6 +7001,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ConeHandleShape"] writes = ["gui.ConeHandleShape"] @@ -6460,6 +7020,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6471,6 +7032,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6482,6 +7044,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6493,6 +7056,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6504,6 +7068,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6515,6 +7080,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6526,6 +7092,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6537,6 +7104,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6548,6 +7116,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6559,6 +7128,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6570,6 +7140,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6581,6 +7152,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6592,6 +7164,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6603,6 +7176,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6621,6 +7195,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6632,6 +7207,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6643,6 +7219,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6654,6 +7231,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6665,6 +7243,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6676,6 +7255,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6687,6 +7267,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6698,6 +7279,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -6709,6 +7291,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -6720,6 +7303,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -6731,6 +7315,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -6742,6 +7327,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.CylinderHandleShape"] writes = ["gui.CylinderHandleShape"] @@ -6753,6 +7339,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.CylinderHandleShape"] writes = ["gui.CylinderHandleShape"] @@ -6764,6 +7351,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.CylinderHandleShape"] writes = ["gui.CylinderHandleShape"] @@ -6775,6 +7363,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.CylinderHandleShape"] writes = ["gui.CylinderHandleShape"] @@ -6793,6 +7382,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6804,6 +7394,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6815,6 +7406,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6826,6 +7418,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6837,6 +7430,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6848,6 +7442,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6859,6 +7454,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6870,6 +7466,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6881,6 +7478,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6892,6 +7490,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6903,6 +7502,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6914,6 +7514,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6925,6 +7526,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6936,6 +7538,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -6954,6 +7557,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -6965,6 +7569,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -6976,6 +7581,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Decal"] writes = ["effects.Decal"] @@ -6987,6 +7593,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Decal"] writes = ["effects.Decal"] @@ -6998,6 +7605,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Decal"] writes = ["effects.Decal"] @@ -7009,6 +7617,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Decal"] writes = ["effects.Decal"] @@ -7020,10 +7629,102 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Decal"] writes = ["effects.Decal"] enum = "NormalId" +["classes"."DepthOfFieldEffect"] +name = "DepthOfFieldEffect" +creatable = true +inherits = "Instance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.DepthOfFieldEffect"] +property_count = 7 + +["classes"."DepthOfFieldEffect"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."DepthOfFieldEffect"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."DepthOfFieldEffect"."properties"."Intensity"] +name = "Intensity" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.DepthOfFieldEffect"] +writes = ["scene.DepthOfFieldEffect"] + +["classes"."DepthOfFieldEffect"."properties"."FocusDistance"] +name = "FocusDistance" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.DepthOfFieldEffect"] +writes = ["scene.DepthOfFieldEffect"] + +["classes"."DepthOfFieldEffect"."properties"."FocusRange"] +name = "FocusRange" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.DepthOfFieldEffect"] +writes = ["scene.DepthOfFieldEffect"] + +["classes"."DepthOfFieldEffect"."properties"."Radius"] +name = "Radius" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.DepthOfFieldEffect"] +writes = ["scene.DepthOfFieldEffect"] + +["classes"."DepthOfFieldEffect"."properties"."Enabled"] +name = "Enabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.DepthOfFieldEffect"] +writes = ["scene.DepthOfFieldEffect"] + ["classes"."DockWidgetPluginGui"] name = "DockWidgetPluginGui" creatable = true @@ -7039,6 +7740,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7050,6 +7752,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -7061,6 +7764,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -7072,6 +7776,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -7083,6 +7788,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -7094,6 +7800,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ThemeBinding"] writes = ["gui.ThemeBinding"] @@ -7105,6 +7812,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -7116,6 +7824,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -7127,6 +7836,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -7138,6 +7848,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "ZIndexBehavior" @@ -7150,6 +7861,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -7161,6 +7873,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "CollectorScaleMode" @@ -7170,7 +7883,7 @@ name = "EditableImage" creatable = true inherits = "Instance" components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.EditableImage"] -property_count = 8 +property_count = 9 ["classes"."EditableImage"."properties"."Parent"] name = "Parent" @@ -7180,6 +7893,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7191,6 +7905,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -7202,6 +7917,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableImage"] writes = [] @@ -7213,9 +7929,22 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableImage"] writes = [] +["classes"."EditableImage"."properties"."ColorSpace"] +name = "ColorSpace" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.EditableImage"] +writes = ["scene.EditableImage"] + ["classes"."EditableImage"."properties"."PackingFormat"] name = "PackingFormat" type = "Name" @@ -7224,6 +7953,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableImage"] writes = ["scene.EditableImage"] @@ -7235,6 +7965,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableImage"] writes = ["scene.EditableImage"] @@ -7246,6 +7977,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableImage"] writes = ["scene.EditableImage"] @@ -7257,6 +7989,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableImage"] writes = ["scene.EditableImage"] @@ -7275,6 +8008,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7286,6 +8020,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -7297,6 +8032,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableMesh"] writes = [] @@ -7308,6 +8044,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableMesh"] writes = [] @@ -7319,6 +8056,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableMesh"] writes = [] @@ -7330,6 +8068,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableMesh"] writes = ["scene.EditableMesh"] @@ -7341,6 +8080,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableMesh"] writes = ["scene.EditableMesh"] @@ -7352,6 +8092,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableMesh"] writes = ["scene.EditableMesh"] @@ -7363,6 +8104,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.EditableMesh"] writes = ["scene.EditableMesh"] @@ -7381,6 +8123,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7392,9 +8135,89 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."FogEffect"] +name = "FogEffect" +creatable = true +inherits = "Instance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.FogEffect"] +property_count = 6 + +["classes"."FogEffect"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."FogEffect"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] +["classes"."FogEffect"."properties"."Color"] +name = "Color" +type = "Color3" +value_size = 12 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.FogEffect"] +writes = ["scene.FogEffect"] + +["classes"."FogEffect"."properties"."Start"] +name = "Start" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.FogEffect"] +writes = ["scene.FogEffect"] + +["classes"."FogEffect"."properties"."End"] +name = "End" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.FogEffect"] +writes = ["scene.FogEffect"] + +["classes"."FogEffect"."properties"."Enabled"] +name = "Enabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.FogEffect"] +writes = ["scene.FogEffect"] + ["classes"."Folder"] name = "Folder" creatable = true @@ -7410,6 +8233,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7421,6 +8245,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -7439,6 +8264,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7450,6 +8276,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -7461,6 +8288,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -7472,6 +8300,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -7483,6 +8312,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -7494,6 +8324,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7505,6 +8336,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7516,6 +8348,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7527,6 +8360,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7538,6 +8372,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7549,6 +8384,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7560,6 +8396,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7571,6 +8408,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7582,6 +8420,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7593,6 +8432,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7604,6 +8444,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -7615,6 +8456,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -7626,6 +8468,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -7637,6 +8480,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -7648,6 +8492,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -7659,6 +8504,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -7670,6 +8516,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -7681,6 +8528,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -7693,6 +8541,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -7705,6 +8554,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -7716,6 +8566,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -7727,6 +8578,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -7738,6 +8590,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -7749,16 +8602,96 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" +["classes"."GodRaysEffect"] +name = "GodRaysEffect" +creatable = true +inherits = "Instance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.GodRaysEffect"] +property_count = 6 + +["classes"."GodRaysEffect"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."GodRaysEffect"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."GodRaysEffect"."properties"."Intensity"] +name = "Intensity" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.GodRaysEffect"] +writes = ["scene.GodRaysEffect"] + +["classes"."GodRaysEffect"."properties"."Threshold"] +name = "Threshold" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.GodRaysEffect"] +writes = ["scene.GodRaysEffect"] + +["classes"."GodRaysEffect"."properties"."Radius"] +name = "Radius" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.GodRaysEffect"] +writes = ["scene.GodRaysEffect"] + +["classes"."GodRaysEffect"."properties"."Enabled"] +name = "Enabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.GodRaysEffect"] +writes = ["scene.GodRaysEffect"] + ["classes"."GpuParticleField"] name = "GpuParticleField" creatable = true -inherits = "Instance" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.GpuParticleField"] -property_count = 15 +inherits = "PVInstance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.Pivot", "scene.GpuParticleField"] +property_count = 13 ["classes"."GpuParticleField"."properties"."Parent"] name = "Parent" @@ -7768,6 +8701,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7779,9 +8713,58 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] +["classes"."GpuParticleField"."properties"."CFrame"] +name = "CFrame" +type = "CFrame" +value_size = 28 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Transform"] +writes = ["scene.Transform"] + +["classes"."GpuParticleField"."properties"."Position"] +name = "Position" +type = "Vector3" +value_size = 12 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Transform"] +writes = ["scene.Transform"] + +["classes"."GpuParticleField"."properties"."Orientation"] +name = "Orientation" +type = "Vector3" +value_size = 12 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Transform"] +writes = ["scene.Transform"] + +["classes"."GpuParticleField"."properties"."PivotOffset"] +name = "PivotOffset" +type = "CFrame" +value_size = 28 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Pivot"] +writes = ["scene.Pivot"] + ["classes"."GpuParticleField"."properties"."Enabled"] name = "Enabled" type = "Bool" @@ -7790,6 +8773,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.GpuParticleField"] writes = ["scene.GpuParticleField"] @@ -7801,6 +8785,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.GpuParticleField"] writes = ["scene.GpuParticleField"] @@ -7812,6 +8797,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.GpuParticleField"] writes = ["scene.GpuParticleField"] @@ -7823,105 +8809,43 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.GpuParticleField"] writes = ["scene.GpuParticleField"] -["classes"."GpuParticleField"."properties"."CondensationColor"] -name = "CondensationColor" -type = "Color3" +["classes"."GpuParticleField"."properties"."Bounds"] +name = "Bounds" +type = "Vector3" value_size = 12 kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.GpuParticleField"] writes = ["scene.GpuParticleField"] -["classes"."GpuParticleField"."properties"."RainColor"] -name = "RainColor" -type = "Color3" -value_size = 12 +["classes"."GpuParticleField"."properties"."VelocityResponse"] +name = "VelocityResponse" +type = "Float" +value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.GpuParticleField"] writes = ["scene.GpuParticleField"] -["classes"."GpuParticleField"."properties"."DebrisColor"] -name = "DebrisColor" -type = "Color3" -value_size = 12 +["classes"."GpuParticleField"."properties"."Definition"] +name = "Definition" +type = "String" +value_size = 32 kind = "Field" writable = true predicted_writable = false -scriptable = true -reads = ["scene.GpuParticleField"] -writes = ["scene.GpuParticleField"] - -["classes"."GpuParticleField"."properties"."CondensationAlpha"] -name = "CondensationAlpha" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.GpuParticleField"] -writes = ["scene.GpuParticleField"] - -["classes"."GpuParticleField"."properties"."RainAlpha"] -name = "RainAlpha" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.GpuParticleField"] -writes = ["scene.GpuParticleField"] - -["classes"."GpuParticleField"."properties"."DebrisAlpha"] -name = "DebrisAlpha" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.GpuParticleField"] -writes = ["scene.GpuParticleField"] - -["classes"."GpuParticleField"."properties"."CondensationSize"] -name = "CondensationSize" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.GpuParticleField"] -writes = ["scene.GpuParticleField"] - -["classes"."GpuParticleField"."properties"."RainSize"] -name = "RainSize" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.GpuParticleField"] -writes = ["scene.GpuParticleField"] - -["classes"."GpuParticleField"."properties"."DebrisSize"] -name = "DebrisSize" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true +scriptable = false +nullable = false reads = ["scene.GpuParticleField"] writes = ["scene.GpuParticleField"] @@ -7940,6 +8864,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -7951,6 +8876,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -7962,6 +8888,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -7973,6 +8900,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -7984,6 +8912,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -7995,6 +8924,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -8006,6 +8936,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8017,6 +8948,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8028,6 +8960,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8039,6 +8972,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8050,6 +8984,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8061,6 +8996,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8072,6 +9008,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8083,6 +9020,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] enum = "LensShape" @@ -8095,6 +9033,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8106,6 +9045,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8117,6 +9057,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -8135,6 +9076,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -8146,6 +9088,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -8164,6 +9107,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -8175,6 +9119,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -8186,6 +9131,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8197,6 +9143,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8208,6 +9155,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8226,6 +9174,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -8237,6 +9186,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -8255,6 +9205,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -8266,6 +9217,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -8277,6 +9229,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8288,6 +9241,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8299,6 +9253,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8310,6 +9265,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8321,6 +9277,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8332,6 +9289,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8343,6 +9301,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8354,6 +9313,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8365,6 +9325,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8376,6 +9337,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8387,6 +9349,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8398,6 +9361,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8409,6 +9373,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8420,6 +9385,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8431,6 +9397,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8442,6 +9409,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8453,6 +9421,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8464,6 +9433,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8475,6 +9445,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8486,6 +9457,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8497,6 +9469,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -8509,6 +9482,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -8521,6 +9495,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -8532,6 +9507,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -8543,6 +9519,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -8554,6 +9531,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -8565,6 +9543,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -8577,6 +9556,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Button"] writes = ["gui.Button"] @@ -8595,6 +9575,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -8606,6 +9587,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -8617,6 +9599,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8628,6 +9611,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8639,6 +9623,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8650,6 +9635,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8661,6 +9647,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8672,6 +9659,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8683,6 +9671,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8694,6 +9683,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8705,6 +9695,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8716,6 +9707,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8727,6 +9719,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8738,6 +9731,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8749,6 +9743,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8760,6 +9755,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8771,6 +9767,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8782,6 +9779,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8793,6 +9791,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8804,6 +9803,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8815,6 +9815,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8826,6 +9827,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -8837,6 +9839,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -8849,6 +9852,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -8861,6 +9865,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -8872,6 +9877,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -8883,6 +9889,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -8894,6 +9901,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -8905,6 +9913,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -8924,6 +9933,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -8935,6 +9945,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -8946,6 +9957,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8957,6 +9969,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8968,6 +9981,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -8979,6 +9993,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -8990,6 +10005,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9001,6 +10017,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9012,6 +10029,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9023,6 +10041,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9034,6 +10053,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9045,6 +10065,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9056,6 +10077,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9067,6 +10089,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9078,6 +10101,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9089,6 +10113,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9100,6 +10125,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -9111,6 +10137,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -9122,6 +10149,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -9133,6 +10161,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -9144,6 +10173,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -9155,6 +10185,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -9166,6 +10197,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -9178,6 +10210,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -9190,6 +10223,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -9201,6 +10235,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -9212,6 +10247,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -9223,6 +10259,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -9234,6 +10271,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -9253,6 +10291,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -9264,6 +10303,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -9275,6 +10315,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GuiServiceState"] writes = ["gui.GuiServiceState"] @@ -9286,6 +10327,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GuiServiceState"] writes = ["gui.GuiServiceState"] @@ -9297,6 +10339,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GuiServiceState"] writes = ["gui.GuiServiceState"] @@ -9315,6 +10358,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -9326,6 +10370,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -9337,6 +10382,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9348,6 +10394,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9359,6 +10406,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9370,6 +10418,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9381,6 +10430,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9392,6 +10442,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9403,6 +10454,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -9414,6 +10466,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -9425,6 +10478,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -9443,6 +10497,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -9454,6 +10509,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -9465,6 +10521,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9476,6 +10533,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9487,6 +10545,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9498,6 +10557,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9509,6 +10569,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9520,6 +10581,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -9531,6 +10593,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -9542,6 +10605,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandlesShape"] writes = ["gui.HandlesShape"] @@ -9560,6 +10624,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -9571,6 +10636,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -9582,6 +10648,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9593,6 +10660,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9604,6 +10672,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9615,6 +10684,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9626,6 +10696,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9637,6 +10708,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9648,6 +10720,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9659,6 +10732,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9670,6 +10744,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9681,6 +10756,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9692,6 +10768,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9703,6 +10780,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -9721,6 +10799,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -9732,6 +10811,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -9743,6 +10823,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9754,6 +10835,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9765,6 +10847,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9776,6 +10859,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9787,6 +10871,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9798,6 +10883,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9809,6 +10895,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9820,6 +10907,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9831,6 +10919,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = ["scene.Humanoid"] @@ -9842,6 +10931,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Humanoid"] writes = [] @@ -9860,6 +10950,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -9871,6 +10962,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -9882,6 +10974,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -9893,6 +10986,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -9904,6 +10998,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -9915,6 +11010,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9926,6 +11022,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9937,6 +11034,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9948,6 +11046,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9959,6 +11058,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9970,6 +11070,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9981,6 +11082,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -9992,6 +11094,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10003,6 +11106,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10014,6 +11118,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10025,6 +11130,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10036,6 +11142,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10047,6 +11154,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10058,6 +11166,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10069,6 +11178,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10080,6 +11190,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10091,6 +11202,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10102,6 +11214,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -10114,6 +11227,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -10126,6 +11240,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -10137,6 +11252,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -10148,6 +11264,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -10159,6 +11276,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -10170,6 +11288,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -10182,6 +11301,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Button"] writes = ["gui.Button"] @@ -10193,6 +11313,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10204,6 +11325,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture", "gui.StyleDirect"] writes = ["gui.Picture", "gui.StyleDirect"] @@ -10215,6 +11337,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture", "gui.StyleDirect"] writes = ["gui.Picture", "gui.StyleDirect"] @@ -10226,6 +11349,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10237,6 +11361,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10248,6 +11373,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10259,6 +11385,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10270,6 +11397,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10281,6 +11409,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] enum = "ScaleType" @@ -10293,6 +11422,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] enum = "ResamplerMode" @@ -10305,6 +11435,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10316,6 +11447,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10327,9 +11459,89 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] +["classes"."ImageGraph"] +name = "ImageGraph" +creatable = true +inherits = "Instance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.ImageGraph"] +property_count = 6 + +["classes"."ImageGraph"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."ImageGraph"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."ImageGraph"."properties"."InstanceKey"] +name = "InstanceKey" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.ImageGraph"] +writes = ["scene.ImageGraph"] + +["classes"."ImageGraph"."properties"."Graph"] +name = "Graph" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.ImageGraph"] +writes = ["scene.ImageGraph"] + +["classes"."ImageGraph"."properties"."Output"] +name = "Output" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.ImageGraph"] +writes = ["scene.ImageGraph"] + +["classes"."ImageGraph"."properties"."Inputs"] +name = "Inputs" +type = "String" +value_size = 32 +kind = "Field" +writable = true +predicted_writable = false +scriptable = false +nullable = false +reads = ["scene.ImageGraph"] +writes = ["scene.ImageGraph"] + ["classes"."ImageLabel"] name = "ImageLabel" creatable = true @@ -10345,6 +11557,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -10356,6 +11569,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -10367,6 +11581,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -10378,6 +11593,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -10389,6 +11605,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -10400,6 +11617,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10411,6 +11629,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10422,6 +11641,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10433,6 +11653,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10444,6 +11665,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10455,6 +11677,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10466,6 +11689,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10477,6 +11701,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10488,6 +11713,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10499,6 +11725,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10510,6 +11737,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -10521,6 +11749,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10532,6 +11761,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10543,6 +11773,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10554,6 +11785,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10565,6 +11797,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10576,6 +11809,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -10587,6 +11821,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -10599,6 +11834,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -10611,6 +11847,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -10622,6 +11859,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -10633,6 +11871,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -10644,6 +11883,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -10655,6 +11895,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -10667,6 +11908,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10678,6 +11920,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture", "gui.StyleDirect"] writes = ["gui.Picture", "gui.StyleDirect"] @@ -10689,6 +11932,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture", "gui.StyleDirect"] writes = ["gui.Picture", "gui.StyleDirect"] @@ -10700,6 +11944,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10711,6 +11956,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10722,6 +11968,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10733,6 +11980,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10744,6 +11992,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10755,6 +12004,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] enum = "ScaleType" @@ -10767,6 +12017,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] enum = "ResamplerMode" @@ -10779,6 +12030,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Picture"] writes = ["gui.Picture"] @@ -10796,6 +12048,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -10807,6 +12060,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -10825,6 +12079,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -10836,6 +12091,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -10847,6 +12103,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.IntValue"] writes = ["scene.IntValue"] @@ -10865,6 +12122,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -10876,6 +12134,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -10887,6 +12146,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.JointInstance"] writes = ["scene.JointInstance"] @@ -10898,6 +12158,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.JointInstance"] writes = ["scene.JointInstance"] @@ -10909,6 +12170,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.JointInstance"] writes = ["scene.JointInstance"] @@ -10920,6 +12182,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.JointInstance"] writes = ["scene.JointInstance"] @@ -10931,6 +12194,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.JointInstance"] writes = ["scene.JointInstance"] @@ -10942,6 +12206,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy", "scene.JointInstance"] writes = [] @@ -10960,6 +12225,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -10971,6 +12237,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -10982,6 +12249,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -10993,6 +12261,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -11004,6 +12273,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -11015,6 +12285,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ThemeBinding"] writes = ["gui.ThemeBinding"] @@ -11026,6 +12297,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -11037,6 +12309,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -11048,6 +12321,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -11059,6 +12333,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "ZIndexBehavior" @@ -11071,6 +12346,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -11082,6 +12358,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "CollectorScaleMode" @@ -11101,6 +12378,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11112,6 +12390,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11123,6 +12402,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderSource"] writes = ["scene.ShaderSource"] @@ -11134,6 +12414,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderSource"] writes = [] @@ -11152,6 +12433,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11163,6 +12445,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11174,6 +12457,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -11185,6 +12469,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -11196,6 +12481,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -11207,6 +12493,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -11218,6 +12505,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -11226,7 +12514,7 @@ name = "Lighting" creatable = false inherits = "Service" components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Service", "scene.LightingService"] -property_count = 25 +property_count = 12 ["classes"."Lighting"."properties"."Parent"] name = "Parent" @@ -11236,6 +12524,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11247,6 +12536,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11258,6 +12548,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -11270,6 +12561,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -11281,6 +12573,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LightingService"] writes = ["scene.LightingService"] @@ -11292,17 +12585,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."FogColor"] -name = "FogColor" -type = "Color3" -value_size = 12 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true +nullable = false reads = ["scene.LightingService"] writes = ["scene.LightingService"] @@ -11314,6 +12597,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LightingService"] writes = ["scene.LightingService"] @@ -11325,138 +12609,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."FogStart"] -name = "FogStart" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."FogEnd"] -name = "FogEnd" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."BloomThreshold"] -name = "BloomThreshold" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."BloomIntensity"] -name = "BloomIntensity" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."BloomRadius"] -name = "BloomRadius" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."DepthOfFieldIntensity"] -name = "DepthOfFieldIntensity" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."DepthOfFieldFocusDistance"] -name = "DepthOfFieldFocusDistance" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."DepthOfFieldFocusRange"] -name = "DepthOfFieldFocusRange" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."DepthOfFieldRadius"] -name = "DepthOfFieldRadius" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."GodRayIntensity"] -name = "GodRayIntensity" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."GodRayThreshold"] -name = "GodRayThreshold" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.LightingService"] -writes = ["scene.LightingService"] - -["classes"."Lighting"."properties"."GodRayRadius"] -name = "GodRayRadius" -type = "Float" -value_size = 4 -kind = "Field" -writable = true -predicted_writable = false -scriptable = true +nullable = false reads = ["scene.LightingService"] writes = ["scene.LightingService"] @@ -11468,6 +12621,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LightingService"] writes = ["scene.LightingService"] @@ -11479,6 +12633,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LightingService"] writes = ["scene.LightingService"] @@ -11490,6 +12645,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LightingService"] writes = ["scene.LightingService"] @@ -11501,6 +12657,7 @@ kind = "Resource" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PostProcessing"] writes = ["scene.PostProcessing"] @@ -11519,6 +12676,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11530,6 +12688,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11541,6 +12700,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -11552,6 +12712,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -11563,6 +12724,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -11574,6 +12736,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -11585,6 +12748,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -11596,6 +12760,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -11607,6 +12772,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -11618,6 +12784,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -11629,6 +12796,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -11640,6 +12808,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LineHandleShape"] writes = ["gui.LineHandleShape"] @@ -11651,6 +12820,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LineHandleShape"] writes = ["gui.LineHandleShape"] @@ -11669,6 +12839,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11680,6 +12851,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11691,6 +12863,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] writes = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] @@ -11702,6 +12875,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer"] writes = ["script.LuaSourceContainer"] @@ -11713,6 +12887,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.JavaScriptSourceContainer"] writes = ["script.JavaScriptSourceContainer"] @@ -11724,6 +12899,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.CodeSourceContainerSelector"] writes = ["script.CodeSourceContainerSelector"] enum = "ScriptLanguage" @@ -11736,6 +12912,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.Disabled"] writes = ["script.Disabled"] @@ -11754,6 +12931,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11765,6 +12943,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11776,6 +12955,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.TextContent"] writes = ["scene.TextContent"] @@ -11794,6 +12974,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11805,6 +12986,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11816,6 +12998,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] writes = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] @@ -11827,6 +13010,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer"] writes = ["script.LuaSourceContainer"] @@ -11838,6 +13022,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.JavaScriptSourceContainer"] writes = ["script.JavaScriptSourceContainer"] @@ -11849,6 +13034,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.CodeSourceContainerSelector"] writes = ["script.CodeSourceContainerSelector"] enum = "ScriptLanguage" @@ -11861,6 +13047,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.Disabled"] writes = ["script.Disabled"] @@ -11879,6 +13066,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11890,6 +13078,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11901,6 +13090,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.MaterialRef"] writes = ["scene.MaterialRef"] @@ -11912,6 +13102,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.MaterialRef"] writes = ["scene.MaterialRef"] @@ -11919,7 +13110,7 @@ writes = ["scene.MaterialRef"] name = "MeshPart" creatable = true inherits = "BasePart" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot", "scene.AuthoredAffordance"] +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot"] property_count = 88 ["classes"."MeshPart"."properties"."Parent"] @@ -11930,6 +13121,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -11941,6 +13133,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -11952,6 +13145,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -11963,6 +13157,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -11974,6 +13169,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -11985,6 +13181,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -11996,6 +13193,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bounds"] writes = ["scene.Bounds", "scene.Collider"] @@ -12007,6 +13205,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -12018,6 +13217,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -12025,10 +13225,11 @@ writes = ["scene.Collider"] name = "AffordanceId" type = "Name" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -12036,10 +13237,11 @@ writes = ["scene.AuthoredAffordance"] name = "AffordanceKind" type = "Enum" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] enum = "AuthoredAffordanceKind" @@ -12048,10 +13250,11 @@ enum = "AuthoredAffordanceKind" name = "AffordanceEnabled" type = "Bool" value_size = 1 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -12063,6 +13266,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Simulated"] writes = ["scene.Motion", "scene.Simulated"] @@ -12074,6 +13278,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] writes = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] @@ -12085,6 +13290,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12096,6 +13302,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12107,6 +13314,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12118,6 +13326,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12129,6 +13338,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -12140,6 +13350,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -12151,6 +13362,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] enum = "ShapeKind" @@ -12163,6 +13375,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -12174,6 +13387,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -12185,6 +13399,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -12196,6 +13411,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -12207,6 +13423,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -12218,6 +13435,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -12229,6 +13447,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -12240,6 +13459,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody", "scene.Simulated", "scene.Collider", "scene.PhysicsProperties"] writes = [] @@ -12251,6 +13471,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12262,6 +13483,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "AlphaMode" @@ -12274,6 +13496,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12285,6 +13508,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12296,6 +13520,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12307,6 +13532,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "ResamplerMode" @@ -12319,6 +13545,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12330,6 +13557,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.LocalTransparency"] writes = [] @@ -12341,6 +13569,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12352,6 +13581,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12363,6 +13593,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -12374,6 +13605,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -12385,6 +13617,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12396,6 +13629,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12407,6 +13641,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12418,6 +13653,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12429,6 +13665,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12440,6 +13677,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12451,6 +13689,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12462,6 +13701,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12473,6 +13713,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12484,6 +13725,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12495,6 +13737,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12506,6 +13749,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12517,6 +13761,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12528,6 +13773,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12539,6 +13785,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12550,6 +13797,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -12561,6 +13809,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12572,6 +13821,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12583,6 +13833,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12594,6 +13845,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12605,6 +13857,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12616,6 +13869,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12627,6 +13881,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12638,6 +13893,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12649,6 +13905,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODSettings"] writes = ["scene.LODSettings"] @@ -12660,6 +13917,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODSettings"] writes = ["scene.LODSettings"] @@ -12671,6 +13929,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODSettings"] writes = ["scene.LODSettings"] @@ -12682,6 +13941,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12693,6 +13953,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12704,6 +13965,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12715,6 +13977,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12726,6 +13989,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12737,6 +14001,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12748,6 +14013,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12759,6 +14025,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12770,6 +14037,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -12781,6 +14049,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] enum = "AutoMeshLODStrategy" @@ -12793,6 +14062,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12804,6 +14074,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12815,6 +14086,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12826,6 +14098,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12837,6 +14110,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12848,6 +14122,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12859,6 +14134,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12870,6 +14146,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12881,6 +14158,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -12892,6 +14170,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = [] @@ -12910,6 +14189,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -12921,6 +14201,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -12932,6 +14213,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -12943,6 +14225,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -12954,6 +14237,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -12965,6 +14249,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -12983,6 +14268,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -12994,6 +14280,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -13005,6 +14292,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] writes = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] @@ -13016,6 +14304,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer"] writes = ["script.LuaSourceContainer"] @@ -13027,6 +14316,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.JavaScriptSourceContainer"] writes = ["script.JavaScriptSourceContainer"] @@ -13038,6 +14328,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.CodeSourceContainerSelector"] writes = ["script.CodeSourceContainerSelector"] enum = "ScriptLanguage" @@ -13050,6 +14341,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.Disabled"] writes = ["script.Disabled"] @@ -13068,6 +14360,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -13079,6 +14372,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -13090,6 +14384,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -13101,6 +14396,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -13112,6 +14408,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -13123,6 +14420,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13134,6 +14432,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13145,6 +14444,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13156,6 +14456,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13167,6 +14468,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13178,6 +14480,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13189,6 +14492,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13200,6 +14504,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13211,6 +14516,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13222,6 +14528,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13233,6 +14540,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13244,6 +14552,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13255,6 +14564,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13266,6 +14576,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13277,6 +14588,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13288,6 +14600,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13299,6 +14612,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13310,6 +14624,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -13322,6 +14637,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -13334,6 +14650,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -13345,6 +14662,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -13356,6 +14674,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -13367,6 +14686,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -13378,6 +14698,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -13390,6 +14711,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvas"] writes = ["gui.NodeCanvas"] @@ -13401,6 +14723,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvas"] writes = ["gui.NodeCanvas"] @@ -13412,6 +14735,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvas"] writes = ["gui.NodeCanvas"] @@ -13423,6 +14747,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvas"] writes = ["gui.NodeCanvas"] @@ -13434,6 +14759,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvas"] writes = ["gui.NodeCanvas"] @@ -13445,6 +14771,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvas"] writes = ["gui.NodeCanvas"] @@ -13463,6 +14790,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -13474,6 +14802,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -13485,6 +14814,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -13496,6 +14826,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -13507,6 +14838,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -13518,6 +14850,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13529,6 +14862,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13540,6 +14874,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13551,6 +14886,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13562,6 +14898,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13573,6 +14910,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13584,6 +14922,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13595,6 +14934,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13606,6 +14946,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13617,6 +14958,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13628,6 +14970,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -13639,6 +14982,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13650,6 +14994,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13661,6 +15006,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13672,6 +15018,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13683,6 +15030,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13694,6 +15042,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -13705,6 +15054,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -13717,6 +15067,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -13729,6 +15080,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -13740,6 +15092,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -13751,6 +15104,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -13762,6 +15116,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -13773,6 +15128,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -13785,6 +15141,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasGroup"] writes = ["gui.NodeCanvasGroup"] @@ -13796,6 +15153,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasGroup"] writes = ["gui.NodeCanvasGroup"] @@ -13807,6 +15165,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasGroup"] writes = ["gui.NodeCanvasGroup"] @@ -13818,6 +15177,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasGroup"] writes = ["gui.NodeCanvasGroup"] enum = "NodeGroupLayout" @@ -13837,6 +15197,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -13848,6 +15209,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -13859,6 +15221,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] @@ -13870,6 +15233,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] @@ -13881,6 +15245,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] enum = "NodePortDirection" @@ -13893,6 +15258,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] @@ -13904,6 +15270,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] @@ -13915,6 +15282,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] enum = "NodePortDirection" @@ -13927,6 +15295,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] @@ -13938,6 +15307,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] @@ -13949,6 +15319,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasLink"] writes = ["gui.NodeCanvasLink"] @@ -13967,6 +15338,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -13978,6 +15350,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -13989,6 +15362,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -14000,6 +15374,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -14011,6 +15386,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -14022,6 +15398,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14033,6 +15410,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14044,6 +15422,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14055,6 +15434,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14066,6 +15446,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14077,6 +15458,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14088,6 +15470,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14099,6 +15482,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14110,6 +15494,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14121,6 +15506,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14132,6 +15518,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14143,6 +15530,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14154,6 +15542,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14165,6 +15554,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14176,6 +15566,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14187,6 +15578,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14198,6 +15590,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14209,6 +15602,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -14221,6 +15615,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -14233,6 +15628,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -14244,6 +15640,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -14255,6 +15652,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -14266,6 +15664,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -14277,6 +15676,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -14289,6 +15689,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14300,6 +15701,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14311,6 +15713,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14322,6 +15725,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14333,6 +15737,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] enum = "NodeBypassMode" @@ -14345,6 +15750,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14356,6 +15762,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14367,6 +15774,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14378,6 +15786,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] @@ -14389,6 +15798,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasNode"] writes = ["gui.NodeCanvasNode"] enum = "InputPortLayout" @@ -14408,6 +15818,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -14419,6 +15830,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -14430,6 +15842,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -14441,6 +15854,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -14452,6 +15866,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -14463,6 +15878,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14474,6 +15890,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14485,6 +15902,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14496,6 +15914,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14507,6 +15926,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14518,6 +15938,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14529,6 +15950,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14540,6 +15962,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14551,6 +15974,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14562,6 +15986,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14573,6 +15998,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -14584,6 +16010,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14595,6 +16022,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14606,6 +16034,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14617,6 +16046,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14628,6 +16058,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14639,6 +16070,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -14650,6 +16082,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -14662,6 +16095,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -14674,6 +16108,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -14685,6 +16120,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -14696,6 +16132,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -14707,6 +16144,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -14718,6 +16156,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -14730,6 +16169,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasPort"] writes = ["gui.NodeCanvasPort"] @@ -14741,6 +16181,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasPort"] writes = ["gui.NodeCanvasPort"] @@ -14752,6 +16193,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasPort"] writes = ["gui.NodeCanvasPort"] enum = "NodePortDirection" @@ -14764,6 +16206,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasPort"] writes = ["gui.NodeCanvasPort"] enum = "NodePortEdge" @@ -14776,6 +16219,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.NodeCanvasPort"] writes = ["gui.NodeCanvasPort"] @@ -14794,6 +16238,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -14805,6 +16250,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -14816,6 +16262,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.NumberValue"] writes = ["scene.NumberValue"] @@ -14834,6 +16281,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -14845,6 +16293,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -14856,6 +16305,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ObjectValue"] writes = ["scene.ObjectValue"] @@ -14874,6 +16324,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -14885,6 +16336,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -14896,6 +16348,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -14907,6 +16360,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -14918,6 +16372,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -14929,6 +16384,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -14940,6 +16396,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -14951,6 +16408,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -14962,6 +16420,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -14980,6 +16439,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -14991,6 +16451,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -15002,6 +16463,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -15013,6 +16475,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -15024,6 +16487,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -15035,6 +16499,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -15042,7 +16507,7 @@ writes = ["scene.Pivot"] name = "Part" creatable = true inherits = "BasePart" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot", "scene.AuthoredAffordance"] +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot"] property_count = 40 ["classes"."Part"."properties"."Parent"] @@ -15053,6 +16518,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -15064,6 +16530,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -15075,6 +16542,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -15086,6 +16554,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -15097,6 +16566,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -15108,6 +16578,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -15119,6 +16590,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bounds"] writes = ["scene.Bounds", "scene.Collider"] @@ -15130,6 +16602,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -15141,6 +16614,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -15148,10 +16622,11 @@ writes = ["scene.Collider"] name = "AffordanceId" type = "Name" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -15159,10 +16634,11 @@ writes = ["scene.AuthoredAffordance"] name = "AffordanceKind" type = "Enum" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] enum = "AuthoredAffordanceKind" @@ -15171,10 +16647,11 @@ enum = "AuthoredAffordanceKind" name = "AffordanceEnabled" type = "Bool" value_size = 1 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -15186,6 +16663,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Simulated"] writes = ["scene.Motion", "scene.Simulated"] @@ -15197,6 +16675,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] writes = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] @@ -15208,6 +16687,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -15219,6 +16699,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -15230,6 +16711,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -15241,6 +16723,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -15252,6 +16735,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -15263,6 +16747,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -15274,6 +16759,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] enum = "ShapeKind" @@ -15286,6 +16772,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -15297,6 +16784,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -15308,6 +16796,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -15319,6 +16808,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -15330,6 +16820,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -15341,6 +16832,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -15352,6 +16844,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -15363,6 +16856,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody", "scene.Simulated", "scene.Collider", "scene.PhysicsProperties"] writes = [] @@ -15374,6 +16868,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -15385,6 +16880,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "AlphaMode" @@ -15397,6 +16893,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -15408,6 +16905,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -15419,6 +16917,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -15430,6 +16929,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "ResamplerMode" @@ -15442,6 +16942,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -15453,6 +16954,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.LocalTransparency"] writes = [] @@ -15464,6 +16966,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -15475,6 +16978,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -15486,6 +16990,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -15504,6 +17009,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -15515,6 +17021,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -15526,6 +17033,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15537,6 +17045,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15548,6 +17057,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15559,6 +17069,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15570,6 +17081,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15581,6 +17093,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15592,6 +17105,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15603,6 +17117,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15614,6 +17129,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15625,6 +17141,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15636,6 +17153,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15647,6 +17165,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15658,6 +17177,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15669,6 +17189,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15680,6 +17201,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15691,6 +17213,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15702,6 +17225,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15713,6 +17237,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15724,6 +17249,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15735,6 +17261,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15746,6 +17273,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15757,6 +17285,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15768,6 +17297,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15779,6 +17309,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15790,6 +17321,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15801,6 +17333,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15812,6 +17345,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15823,6 +17357,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15834,6 +17369,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15845,6 +17381,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15856,6 +17393,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15867,6 +17405,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15878,6 +17417,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15889,6 +17429,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15900,6 +17441,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] @@ -15911,6 +17453,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] enum = "NormalId" @@ -15923,6 +17466,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] enum = "ParticleOrientation" @@ -15935,6 +17479,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] enum = "ParticleEmitterShape" @@ -15947,6 +17492,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] enum = "ParticleEmitterShapeStyle" @@ -15959,6 +17505,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] enum = "ParticleEmitterShapeInOut" @@ -15971,6 +17518,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] enum = "ParticleFlipbookLayout" @@ -15983,6 +17531,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.ParticleEmitter"] writes = ["effects.ParticleEmitter"] enum = "ParticleFlipbookMode" @@ -16002,6 +17551,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16013,6 +17563,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16024,6 +17575,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayerCharacter"] writes = ["scene.PlayerCharacter"] @@ -16035,6 +17587,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = [] writes = [] @@ -16046,6 +17599,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = [] writes = [] @@ -16057,6 +17611,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = [] writes = [] @@ -16068,6 +17623,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = [] writes = [] @@ -16079,6 +17635,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayerIdentity"] writes = [] @@ -16090,6 +17647,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayerIdentity"] writes = ["scene.PlayerIdentity"] @@ -16101,6 +17659,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayerIdentity"] writes = ["scene.PlayerIdentity"] @@ -16112,6 +17671,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayerNetworkComponent"] writes = ["scene.PlayerNetworkComponent"] @@ -16123,6 +17683,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayerTeam"] writes = ["scene.PlayerTeam"] @@ -16141,6 +17702,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16152,6 +17714,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16163,6 +17726,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -16175,6 +17739,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -16186,6 +17751,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = [] writes = [] @@ -16197,6 +17763,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = [] writes = [] @@ -16208,6 +17775,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayersService"] writes = ["scene.PlayersService"] @@ -16219,6 +17787,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayersService"] writes = ["scene.PlayersService"] @@ -16230,6 +17799,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PlayersService"] writes = ["scene.PlayersService"] @@ -16248,6 +17818,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16259,6 +17830,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16270,6 +17842,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -16281,6 +17854,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -16292,6 +17866,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -16303,6 +17878,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ThemeBinding"] writes = ["gui.ThemeBinding"] @@ -16314,6 +17890,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -16325,6 +17902,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -16336,6 +17914,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -16347,6 +17926,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "ZIndexBehavior" @@ -16359,6 +17939,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -16370,6 +17951,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "CollectorScaleMode" @@ -16389,6 +17971,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16400,6 +17983,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16411,6 +17995,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -16422,6 +18007,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -16433,6 +18019,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -16444,6 +18031,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -16455,6 +18043,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -16463,7 +18052,7 @@ name = "Portal" creatable = true inherits = "SurfaceCamera" components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.SurfaceCamera", "scene.Camera", "scene.CameraSubject", "scene.Pivot", "scene.Portal"] -property_count = 27 +property_count = 28 ["classes"."Portal"."properties"."Parent"] name = "Parent" @@ -16473,6 +18062,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16484,6 +18074,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16493,8 +18084,9 @@ type = "CFrame" value_size = 28 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -16504,8 +18096,9 @@ type = "Vector3" value_size = 12 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -16515,8 +18108,9 @@ type = "Vector3" value_size = 12 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -16528,6 +18122,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -16537,8 +18132,9 @@ type = "Float" value_size = 4 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16550,9 +18146,23 @@ kind = "Computed" writable = true predicted_writable = true scriptable = true +nullable = true reads = ["scene.CameraSubject"] writes = ["scene.CameraSubject"] +["classes"."Portal"."properties"."CameraType"] +name = "CameraType" +type = "Enum" +value_size = 4 +kind = "Resource" +writable = true +predicted_writable = true +scriptable = true +nullable = false +reads = ["scene.CameraController"] +writes = ["scene.CameraController"] +enum = "CameraType" + ["classes"."Portal"."properties"."CameraSubjectAutomatic"] name = "CameraSubjectAutomatic" type = "Bool" @@ -16561,6 +18171,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CameraSubject"] writes = ["scene.CameraSubject"] @@ -16572,6 +18183,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16583,6 +18195,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16594,6 +18207,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16605,6 +18219,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16616,6 +18231,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16627,6 +18243,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16638,6 +18255,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16649,6 +18267,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -16660,6 +18279,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -16671,6 +18291,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -16682,6 +18303,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -16693,6 +18315,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] enum = "NormalId" @@ -16705,6 +18328,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] enum = "SurfaceEffect" @@ -16717,6 +18341,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -16728,6 +18353,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Portal"] writes = ["scene.Portal"] @@ -16739,6 +18365,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Portal"] writes = ["scene.Portal"] @@ -16750,6 +18377,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Portal"] writes = ["scene.Portal"] @@ -16761,6 +18389,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Portal"] writes = ["scene.Portal"] @@ -16779,6 +18408,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16790,6 +18420,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16801,6 +18432,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16812,6 +18444,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16823,6 +18456,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16834,6 +18468,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16845,6 +18480,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16856,6 +18492,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16867,6 +18504,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16878,6 +18516,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16889,6 +18528,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16900,6 +18540,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16911,6 +18552,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16922,6 +18564,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -16940,6 +18583,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16951,6 +18595,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16969,6 +18614,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -16980,6 +18626,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -16991,6 +18638,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -17003,6 +18651,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -17021,6 +18670,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -17032,6 +18682,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -17043,6 +18694,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -17055,6 +18707,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -17073,6 +18726,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -17084,6 +18738,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -17095,6 +18750,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigKeypoint"] writes = ["scene.RigKeypoint"] @@ -17106,6 +18762,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigKeypoint"] writes = ["scene.RigKeypoint"] @@ -17117,6 +18774,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigKeypoint"] writes = ["scene.RigKeypoint"] @@ -17135,6 +18793,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -17146,6 +18805,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -17157,6 +18817,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17168,6 +18829,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17179,6 +18841,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17190,6 +18853,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17201,6 +18865,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17212,6 +18877,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17223,6 +18889,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17234,6 +18901,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17245,6 +18913,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17256,6 +18925,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17267,6 +18937,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17278,6 +18949,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -17296,6 +18968,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -17307,6 +18980,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -17318,6 +18992,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -17329,6 +19004,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -17340,6 +19016,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -17351,6 +19028,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ThemeBinding"] writes = ["gui.ThemeBinding"] @@ -17362,6 +19040,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -17373,6 +19052,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -17384,6 +19064,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -17395,6 +19076,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "ZIndexBehavior" @@ -17407,6 +19089,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -17418,6 +19101,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "CollectorScaleMode" @@ -17430,6 +19114,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -17448,6 +19133,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -17459,6 +19145,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -17470,6 +19157,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] writes = ["script.LuaSourceContainer", "script.JavaScriptSourceContainer", "script.CodeSourceContainerSelector"] @@ -17481,6 +19169,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.LuaSourceContainer"] writes = ["script.LuaSourceContainer"] @@ -17492,6 +19181,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = false +nullable = false reads = ["script.JavaScriptSourceContainer"] writes = ["script.JavaScriptSourceContainer"] @@ -17503,6 +19193,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.CodeSourceContainerSelector"] writes = ["script.CodeSourceContainerSelector"] enum = "ScriptLanguage" @@ -17515,6 +19206,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["script.Disabled"] writes = ["script.Disabled"] @@ -17533,6 +19225,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -17544,6 +19237,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -17555,6 +19249,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -17566,6 +19261,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -17577,6 +19273,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -17588,6 +19285,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17599,6 +19297,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17610,6 +19309,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17621,6 +19321,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17632,6 +19333,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17643,6 +19345,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17654,6 +19357,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17665,6 +19369,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17676,6 +19381,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17687,6 +19393,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17698,6 +19405,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -17709,6 +19417,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -17720,6 +19429,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -17731,6 +19441,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -17742,6 +19453,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -17753,6 +19465,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -17764,6 +19477,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -17775,6 +19489,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -17787,6 +19502,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -17799,6 +19515,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -17810,6 +19527,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -17821,6 +19539,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -17832,6 +19551,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -17843,6 +19563,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -17855,6 +19576,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17866,6 +19588,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17877,6 +19600,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17888,6 +19612,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17899,6 +19624,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17910,6 +19636,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17921,6 +19648,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17932,6 +19660,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17943,6 +19672,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] @@ -17954,6 +19684,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] enum = "ScrollingDirection" @@ -17966,6 +19697,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] enum = "AutomaticSize" @@ -17978,6 +19710,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] enum = "ElasticBehavior" @@ -17990,6 +19723,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] enum = "ScrollBarInset" @@ -18002,6 +19736,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] enum = "ScrollBarInset" @@ -18014,6 +19749,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scrolling"] writes = ["gui.Scrolling"] enum = "VerticalScrollBarPosition" @@ -18026,6 +19762,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.ScrollState"] writes = [] @@ -18037,6 +19774,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.ScrollState"] writes = [] @@ -18055,6 +19793,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18066,6 +19805,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18077,6 +19817,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18088,6 +19829,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18099,6 +19841,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18110,6 +19853,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18121,6 +19865,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18132,6 +19877,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18143,6 +19889,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -18154,6 +19901,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SelectionOutline"] writes = ["gui.SelectionOutline"] @@ -18165,6 +19913,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SelectionOutline"] writes = ["gui.SelectionOutline"] @@ -18176,6 +19925,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SelectionOutline"] writes = ["gui.SelectionOutline"] @@ -18194,6 +19944,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18205,6 +19956,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18216,6 +19968,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18227,6 +19980,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18238,6 +19992,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18249,6 +20004,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18260,6 +20016,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18271,6 +20028,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -18282,6 +20040,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -18293,6 +20052,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SelectionOutline"] writes = ["gui.SelectionOutline"] @@ -18304,6 +20064,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SelectionOutline"] writes = ["gui.SelectionOutline"] @@ -18315,6 +20076,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SelectionOutline"] writes = ["gui.SelectionOutline"] @@ -18333,6 +20095,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18344,6 +20107,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18355,6 +20119,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -18367,6 +20132,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -18385,6 +20151,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18396,6 +20163,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18407,6 +20175,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -18419,6 +20188,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -18437,6 +20207,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18448,6 +20219,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18459,6 +20231,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -18471,6 +20244,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -18489,6 +20263,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18500,6 +20275,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18511,6 +20287,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -18522,6 +20299,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -18533,6 +20311,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -18544,6 +20323,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -18555,6 +20335,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18566,6 +20347,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18577,6 +20359,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18588,6 +20371,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18599,6 +20383,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18610,6 +20395,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18621,6 +20407,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18632,6 +20419,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] enum = "LensShape" @@ -18644,6 +20432,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderLens"] writes = ["scene.ShaderLens"] @@ -18662,6 +20451,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18673,6 +20463,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18684,6 +20475,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderSource"] writes = ["scene.ShaderSource"] @@ -18695,6 +20487,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.ShaderSource"] writes = [] @@ -18702,7 +20495,7 @@ writes = [] name = "SkinnedMeshPart" creatable = true inherits = "MeshPart" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot", "scene.Skeleton", "scene.AuthoredAffordance"] +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot", "scene.Skeleton"] property_count = 90 ["classes"."SkinnedMeshPart"."properties"."Parent"] @@ -18713,6 +20506,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -18724,6 +20518,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -18735,6 +20530,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -18746,6 +20542,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -18757,6 +20554,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -18768,6 +20566,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -18779,6 +20578,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bounds"] writes = ["scene.Bounds", "scene.Collider"] @@ -18790,6 +20590,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -18801,6 +20602,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -18808,10 +20610,11 @@ writes = ["scene.Collider"] name = "AffordanceId" type = "Name" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -18819,10 +20622,11 @@ writes = ["scene.AuthoredAffordance"] name = "AffordanceKind" type = "Enum" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] enum = "AuthoredAffordanceKind" @@ -18831,10 +20635,11 @@ enum = "AuthoredAffordanceKind" name = "AffordanceEnabled" type = "Bool" value_size = 1 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -18846,6 +20651,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Simulated"] writes = ["scene.Motion", "scene.Simulated"] @@ -18857,6 +20663,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] writes = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] @@ -18868,6 +20675,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -18879,6 +20687,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -18890,6 +20699,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -18901,6 +20711,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -18912,6 +20723,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -18923,6 +20735,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -18934,6 +20747,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] enum = "ShapeKind" @@ -18946,6 +20760,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -18957,6 +20772,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -18968,6 +20784,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -18979,6 +20796,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -18990,6 +20808,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -19001,6 +20820,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -19012,6 +20832,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -19023,6 +20844,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody", "scene.Simulated", "scene.Collider", "scene.PhysicsProperties"] writes = [] @@ -19034,6 +20856,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19045,6 +20868,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "AlphaMode" @@ -19057,6 +20881,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19068,6 +20893,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19079,6 +20905,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19090,6 +20917,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "ResamplerMode" @@ -19102,6 +20930,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -19113,6 +20942,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.LocalTransparency"] writes = [] @@ -19124,6 +20954,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -19135,6 +20966,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -19146,6 +20978,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -19157,6 +20990,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -19168,6 +21002,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19179,6 +21014,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19190,6 +21026,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19201,6 +21038,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19212,6 +21050,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19223,6 +21062,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19234,6 +21074,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19245,6 +21086,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19256,6 +21098,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19267,6 +21110,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19278,6 +21122,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19289,6 +21134,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19300,6 +21146,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19311,6 +21158,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19322,6 +21170,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19333,6 +21182,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -19344,6 +21194,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19355,6 +21206,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19366,6 +21218,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19377,6 +21230,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19388,6 +21242,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19399,6 +21254,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19410,6 +21266,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19421,6 +21278,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19432,6 +21290,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODSettings"] writes = ["scene.LODSettings"] @@ -19443,6 +21302,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODSettings"] writes = ["scene.LODSettings"] @@ -19454,6 +21314,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODSettings"] writes = ["scene.LODSettings"] @@ -19465,6 +21326,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19476,6 +21338,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19487,6 +21350,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19498,6 +21362,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19509,6 +21374,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19520,6 +21386,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19531,6 +21398,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19542,6 +21410,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19553,6 +21422,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] @@ -19564,6 +21434,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODAuto"] writes = ["scene.LODAuto"] enum = "AutoMeshLODStrategy" @@ -19576,6 +21447,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19587,6 +21459,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19598,6 +21471,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19609,6 +21483,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19620,6 +21495,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19631,6 +21507,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19642,6 +21519,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19653,6 +21531,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19664,6 +21543,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.LODCustom"] writes = ["scene.LODCustom"] @@ -19675,6 +21555,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = [] @@ -19686,6 +21567,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Skeleton"] writes = ["scene.Skeleton"] @@ -19697,6 +21579,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Skeleton"] writes = ["scene.Skeleton"] @@ -19715,6 +21598,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -19726,6 +21610,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -19737,6 +21622,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] @@ -19748,6 +21634,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] @@ -19759,6 +21646,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] @@ -19770,6 +21658,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] @@ -19781,6 +21670,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] @@ -19792,6 +21682,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] @@ -19803,6 +21694,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] enum = "SkyboxComputeShader" @@ -19815,6 +21707,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxCompute"] writes = ["scene.SkyboxCompute"] @@ -19833,6 +21726,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -19844,6 +21738,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -19855,6 +21750,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxTextures"] writes = ["scene.SkyboxTextures"] @@ -19866,6 +21762,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxTextures"] writes = ["scene.SkyboxTextures"] @@ -19877,6 +21774,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxTextures"] writes = ["scene.SkyboxTextures"] @@ -19888,6 +21786,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxTextures"] writes = ["scene.SkyboxTextures"] @@ -19899,6 +21798,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxTextures"] writes = ["scene.SkyboxTextures"] @@ -19910,6 +21810,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxTextures"] writes = ["scene.SkyboxTextures"] @@ -19921,6 +21822,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SkyboxTextures"] writes = ["scene.SkyboxTextures"] @@ -19939,6 +21841,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -19950,6 +21853,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -19961,6 +21865,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Sound"] writes = ["scene.Sound"] @@ -19972,6 +21877,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Sound"] writes = ["scene.Sound"] @@ -19983,6 +21889,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Sound"] writes = ["scene.Sound"] @@ -19994,6 +21901,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Sound"] writes = ["scene.Sound"] @@ -20005,6 +21913,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Sound"] writes = ["scene.Sound"] @@ -20016,6 +21925,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Sound"] writes = ["scene.Sound"] @@ -20027,6 +21937,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Sound"] writes = ["scene.Sound"] @@ -20045,6 +21956,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -20056,6 +21968,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -20063,7 +21976,7 @@ writes = ["ecs.InstanceName"] name = "SpawnLocation" creatable = true inherits = "Part" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot", "scene.SpawnLocation", "scene.AuthoredAffordance"] +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.Bounds", "scene.RigidBody", "scene.Collider", "scene.Surface", "scene.PhysicsProperties", "scene.Visual", "scene.SurfaceAppearance", "scene.Tags", "scene.LocalTransparency", "scene.Pivot", "scene.SpawnLocation"] property_count = 44 ["classes"."SpawnLocation"."properties"."Parent"] @@ -20074,6 +21987,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -20085,6 +21999,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -20096,6 +22011,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -20107,6 +22023,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -20118,6 +22035,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -20129,6 +22047,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -20140,6 +22059,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Bounds"] writes = ["scene.Bounds", "scene.Collider"] @@ -20151,6 +22071,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -20162,6 +22083,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -20169,10 +22091,11 @@ writes = ["scene.Collider"] name = "AffordanceId" type = "Name" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -20180,10 +22103,11 @@ writes = ["scene.AuthoredAffordance"] name = "AffordanceKind" type = "Enum" value_size = 4 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] enum = "AuthoredAffordanceKind" @@ -20192,10 +22116,11 @@ enum = "AuthoredAffordanceKind" name = "AffordanceEnabled" type = "Bool" value_size = 1 -kind = "Field" +kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.AuthoredAffordance"] writes = ["scene.AuthoredAffordance"] @@ -20207,6 +22132,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Simulated"] writes = ["scene.Motion", "scene.Simulated"] @@ -20218,6 +22144,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] writes = ["scene.Motion", "scene.RigidBody", "scene.Simulated"] @@ -20229,6 +22156,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -20240,6 +22168,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -20251,6 +22180,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -20262,6 +22192,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -20273,6 +22204,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -20284,6 +22216,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RenderEffects"] writes = ["scene.RenderEffects"] @@ -20295,6 +22228,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] enum = "ShapeKind" @@ -20307,6 +22241,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -20318,6 +22253,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -20329,6 +22265,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -20340,6 +22277,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -20351,6 +22289,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.PhysicsProperties"] writes = ["scene.PhysicsProperties"] @@ -20362,6 +22301,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -20373,6 +22313,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody"] writes = ["scene.RigidBody"] @@ -20384,6 +22325,7 @@ kind = "Field" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.RigidBody", "scene.Simulated", "scene.Collider", "scene.PhysicsProperties"] writes = [] @@ -20395,6 +22337,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -20406,6 +22349,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "AlphaMode" @@ -20418,6 +22362,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -20429,6 +22374,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -20440,6 +22386,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] @@ -20451,6 +22398,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceAppearance"] writes = ["scene.SurfaceAppearance"] enum = "ResamplerMode" @@ -20463,6 +22411,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -20474,6 +22423,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.LocalTransparency"] writes = [] @@ -20485,6 +22435,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -20496,6 +22447,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Visual"] writes = ["scene.Visual"] @@ -20507,6 +22459,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Collider"] writes = ["scene.Collider"] @@ -20518,6 +22471,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SpawnLocation"] writes = ["scene.SpawnLocation"] @@ -20529,6 +22483,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SpawnLocation"] writes = ["scene.SpawnLocation"] @@ -20540,6 +22495,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SpawnLocation"] writes = ["scene.SpawnLocation"] @@ -20551,6 +22507,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SpawnLocation"] writes = ["scene.SpawnLocation"] @@ -20569,6 +22526,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -20580,6 +22538,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -20591,6 +22550,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -20602,6 +22562,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -20613,6 +22574,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -20624,6 +22586,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -20635,6 +22598,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -20646,6 +22610,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Adornment"] writes = ["gui.Adornment"] @@ -20657,6 +22622,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AdornmentInteraction"] writes = ["gui.AdornmentInteraction"] @@ -20668,6 +22634,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -20679,6 +22646,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.HandleShape"] writes = ["gui.HandleShape"] @@ -20690,6 +22658,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SphereHandleShape"] writes = ["gui.SphereHandleShape"] @@ -20708,6 +22677,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -20719,6 +22689,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -20730,6 +22701,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -20741,6 +22713,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -20752,6 +22725,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -20763,6 +22737,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -20774,6 +22749,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -20785,6 +22761,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -20796,6 +22773,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] enum = "NormalId" @@ -20815,6 +22793,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -20826,6 +22805,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -20837,6 +22817,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20848,6 +22829,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20859,6 +22841,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20870,6 +22853,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20881,6 +22865,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20892,6 +22877,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20903,6 +22889,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20914,6 +22901,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20925,6 +22913,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20936,6 +22925,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20947,6 +22937,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20958,6 +22949,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Constraint"] writes = ["scene.Constraint"] @@ -20976,6 +22968,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -20987,6 +22980,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -20998,6 +22992,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -21010,6 +23005,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -21028,6 +23024,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21039,6 +23036,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21050,6 +23048,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -21062,6 +23061,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -21080,6 +23080,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21091,6 +23092,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21102,6 +23104,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -21114,6 +23117,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -21132,6 +23136,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21143,6 +23148,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21154,6 +23160,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -21166,6 +23173,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -21184,6 +23192,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21195,6 +23204,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21206,6 +23216,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -21218,6 +23229,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] @@ -21236,6 +23248,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21247,6 +23260,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21258,6 +23272,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.TextContent"] writes = ["scene.TextContent"] @@ -21266,7 +23281,7 @@ name = "SurfaceCamera" creatable = true inherits = "Camera" components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.PreviousTransform", "scene.SurfaceCamera", "scene.Camera", "scene.CameraSubject", "scene.Pivot"] -property_count = 23 +property_count = 24 ["classes"."SurfaceCamera"."properties"."Parent"] name = "Parent" @@ -21276,6 +23291,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21287,6 +23303,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21296,8 +23313,9 @@ type = "CFrame" value_size = 28 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -21307,8 +23325,9 @@ type = "Vector3" value_size = 12 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -21318,8 +23337,9 @@ type = "Vector3" value_size = 12 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -21331,6 +23351,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -21340,8 +23361,9 @@ type = "Float" value_size = 4 kind = "Computed" writable = true -predicted_writable = false +predicted_writable = true scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21353,9 +23375,23 @@ kind = "Computed" writable = true predicted_writable = true scriptable = true +nullable = true reads = ["scene.CameraSubject"] writes = ["scene.CameraSubject"] +["classes"."SurfaceCamera"."properties"."CameraType"] +name = "CameraType" +type = "Enum" +value_size = 4 +kind = "Resource" +writable = true +predicted_writable = true +scriptable = true +nullable = false +reads = ["scene.CameraController"] +writes = ["scene.CameraController"] +enum = "CameraType" + ["classes"."SurfaceCamera"."properties"."CameraSubjectAutomatic"] name = "CameraSubjectAutomatic" type = "Bool" @@ -21364,6 +23400,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.CameraSubject"] writes = ["scene.CameraSubject"] @@ -21375,6 +23412,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21386,6 +23424,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21397,6 +23436,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21408,6 +23448,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21419,6 +23460,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21430,6 +23472,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21441,6 +23484,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21452,6 +23496,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -21463,6 +23508,7 @@ kind = "Structural" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -21474,6 +23520,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -21485,6 +23532,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -21496,6 +23544,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] enum = "NormalId" @@ -21508,6 +23557,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] enum = "SurfaceEffect" @@ -21520,6 +23570,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceCamera"] writes = ["scene.SurfaceCamera"] @@ -21538,6 +23589,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21549,6 +23601,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21560,6 +23613,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -21571,6 +23625,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -21582,6 +23637,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -21593,6 +23649,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ThemeBinding"] writes = ["gui.ThemeBinding"] @@ -21604,6 +23661,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -21615,6 +23673,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -21626,6 +23685,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -21637,6 +23697,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "ZIndexBehavior" @@ -21649,6 +23710,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] @@ -21660,6 +23722,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Layer"] writes = ["gui.Layer"] enum = "CollectorScaleMode" @@ -21672,6 +23735,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21683,6 +23747,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21694,6 +23759,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21705,6 +23771,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21716,6 +23783,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21727,6 +23795,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21738,6 +23807,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21749,6 +23819,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21760,6 +23831,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21771,6 +23843,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] @@ -21782,6 +23855,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] enum = "NormalId" @@ -21794,6 +23868,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Surface"] writes = ["gui.Surface"] enum = "SurfaceSizingMode" @@ -21813,6 +23888,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21824,6 +23900,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21835,6 +23912,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -21846,6 +23924,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -21857,6 +23936,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -21868,6 +23948,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -21879,6 +23960,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -21890,6 +23972,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] @@ -21901,6 +23984,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Light"] writes = ["scene.Light"] enum = "NormalId" @@ -21920,6 +24004,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21931,6 +24016,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21942,6 +24028,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Team"] writes = ["scene.Team"] @@ -21960,6 +24047,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -21971,6 +24059,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -21982,6 +24071,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = ["scene.Service"] enum = "ServiceScope" @@ -21994,9 +24084,125 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["scene.Service"] writes = [] +["classes"."Terrain"] +name = "Terrain" +creatable = false +inherits = "Instance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Terrain"] +property_count = 9 + +["classes"."Terrain"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."Terrain"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."Terrain"."properties"."Seed"] +name = "Seed" +type = "Int64" +value_size = 8 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Terrain"] +writes = ["scene.Terrain"] + +["classes"."Terrain"."properties"."Generator"] +name = "Generator" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Terrain"] +writes = ["scene.Terrain"] + +["classes"."Terrain"."properties"."Enabled"] +name = "Enabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Terrain"] +writes = ["scene.Terrain"] + +["classes"."Terrain"."properties"."ChunkExtent"] +name = "ChunkExtent" +type = "Float" +value_size = 4 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Terrain"] +writes = ["scene.Terrain"] + +["classes"."Terrain"."properties"."VerticalExtent"] +name = "VerticalExtent" +type = "Float" +value_size = 4 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Terrain"] +writes = ["scene.Terrain"] + +["classes"."Terrain"."properties"."ViewDistance"] +name = "ViewDistance" +type = "Float" +value_size = 4 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Terrain"] +writes = ["scene.Terrain"] + +["classes"."Terrain"."properties"."ChunkResolution"] +name = "ChunkResolution" +type = "Int32" +value_size = 4 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.Terrain"] +writes = ["scene.Terrain"] + ["classes"."TextBox"] name = "TextBox" creatable = true @@ -22012,6 +24218,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -22023,6 +24230,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -22034,6 +24242,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22045,6 +24254,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22056,6 +24266,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22067,6 +24278,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22078,6 +24290,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22089,6 +24302,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22100,6 +24314,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22111,6 +24326,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22122,6 +24338,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22133,6 +24350,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22144,6 +24362,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22155,6 +24374,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22166,6 +24386,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22177,6 +24398,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22188,6 +24410,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22199,6 +24422,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22210,6 +24434,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22221,6 +24446,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22232,6 +24458,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22243,6 +24470,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22254,6 +24482,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -22266,6 +24495,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -22278,6 +24508,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -22289,6 +24520,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -22300,6 +24532,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -22311,6 +24544,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -22322,6 +24556,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -22334,6 +24569,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22345,6 +24581,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LabelPresentation"] writes = ["gui.LabelPresentation"] @@ -22356,6 +24593,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LabelLocalizationArguments"] writes = ["gui.LabelLocalizationArguments"] @@ -22367,6 +24605,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label", "gui.StyleDirect"] writes = ["gui.Label", "gui.StyleDirect"] @@ -22378,6 +24617,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label", "gui.StyleDirect"] writes = ["gui.Label", "gui.StyleDirect"] @@ -22389,6 +24629,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22400,6 +24641,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22411,6 +24653,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22422,6 +24665,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22433,6 +24677,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22444,6 +24689,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22455,6 +24701,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22466,6 +24713,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22477,6 +24725,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = [] @@ -22488,6 +24737,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22499,6 +24749,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22510,6 +24761,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "Font" @@ -22522,6 +24774,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextXAlignment" @@ -22534,6 +24787,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextYAlignment" @@ -22546,6 +24800,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextTruncate" @@ -22558,6 +24813,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22569,6 +24825,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22580,6 +24837,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22591,6 +24849,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22602,6 +24861,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22613,6 +24873,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22624,6 +24885,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22635,6 +24897,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Entry"] writes = ["gui.Entry"] @@ -22653,6 +24916,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -22664,6 +24928,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -22675,6 +24940,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22686,6 +24952,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22697,6 +24964,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -22708,6 +24976,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22719,6 +24988,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22730,6 +25000,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22741,6 +25012,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22752,6 +25024,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22763,6 +25036,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22774,6 +25048,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22785,6 +25060,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22796,6 +25072,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22807,6 +25084,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22818,6 +25096,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -22829,6 +25108,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22840,6 +25120,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22851,6 +25132,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22862,6 +25144,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22873,6 +25156,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22884,6 +25168,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -22895,6 +25180,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -22907,6 +25193,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -22919,6 +25206,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -22930,6 +25218,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -22941,6 +25230,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -22952,6 +25242,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -22963,6 +25254,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -22975,6 +25267,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Button"] writes = ["gui.Button"] @@ -22986,6 +25279,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -22997,6 +25291,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LabelPresentation"] writes = ["gui.LabelPresentation"] @@ -23008,6 +25303,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LabelLocalizationArguments"] writes = ["gui.LabelLocalizationArguments"] @@ -23019,6 +25315,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label", "gui.StyleDirect"] writes = ["gui.Label", "gui.StyleDirect"] @@ -23030,6 +25327,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label", "gui.StyleDirect"] writes = ["gui.Label", "gui.StyleDirect"] @@ -23041,6 +25339,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23052,6 +25351,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23063,6 +25363,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23074,6 +25375,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23085,6 +25387,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23096,6 +25399,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23107,6 +25411,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23118,6 +25423,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23129,6 +25435,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = [] @@ -23140,6 +25447,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -23151,6 +25459,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -23162,6 +25471,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "Font" @@ -23174,6 +25484,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextXAlignment" @@ -23186,6 +25497,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextYAlignment" @@ -23198,6 +25510,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextTruncate" @@ -23217,6 +25530,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -23228,6 +25542,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -23239,6 +25554,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -23250,6 +25566,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -23261,6 +25578,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -23272,6 +25590,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23283,6 +25602,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23294,6 +25614,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23305,6 +25626,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23316,6 +25638,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23327,6 +25650,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23338,6 +25662,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23349,6 +25674,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23360,6 +25686,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23371,6 +25698,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23382,6 +25710,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -23393,6 +25722,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -23404,6 +25734,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -23415,6 +25746,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -23426,6 +25758,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -23437,6 +25770,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -23448,6 +25782,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -23459,6 +25794,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -23471,6 +25807,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -23483,6 +25820,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -23494,6 +25832,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -23505,6 +25844,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -23516,6 +25856,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -23527,6 +25868,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -23539,6 +25881,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23550,6 +25893,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LabelPresentation"] writes = ["gui.LabelPresentation"] @@ -23561,6 +25905,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.LabelLocalizationArguments"] writes = ["gui.LabelLocalizationArguments"] @@ -23572,6 +25917,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label", "gui.StyleDirect"] writes = ["gui.Label", "gui.StyleDirect"] @@ -23583,6 +25929,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label", "gui.StyleDirect"] writes = ["gui.Label", "gui.StyleDirect"] @@ -23594,6 +25941,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23605,6 +25953,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23616,6 +25965,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23627,6 +25977,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23638,6 +25989,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23649,6 +26001,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23660,6 +26013,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23671,6 +26025,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] @@ -23682,6 +26037,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = [] @@ -23693,6 +26049,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -23704,6 +26061,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -23715,6 +26073,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "Font" @@ -23727,6 +26086,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextXAlignment" @@ -23739,6 +26099,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextYAlignment" @@ -23751,6 +26112,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Label"] writes = ["gui.Label"] enum = "TextTruncate" @@ -23770,6 +26132,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -23781,6 +26144,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -23792,6 +26156,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23803,6 +26168,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23814,6 +26180,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23825,6 +26192,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23836,6 +26204,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23847,6 +26216,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23858,6 +26228,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23869,6 +26240,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] @@ -23880,6 +26252,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Texture"] writes = ["effects.Texture"] enum = "NormalId" @@ -23899,6 +26272,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -23910,6 +26284,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -23921,6 +26296,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -23932,6 +26308,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -23943,6 +26320,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -23954,6 +26332,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -23965,6 +26344,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Tool"] writes = ["scene.Tool"] @@ -23983,6 +26363,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -23994,6 +26375,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24005,6 +26387,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24016,6 +26399,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24027,6 +26411,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24038,6 +26423,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24049,6 +26435,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24060,6 +26447,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24071,6 +26459,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24082,6 +26471,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24093,6 +26483,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24104,6 +26495,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["effects.Trail"] writes = ["effects.Trail"] @@ -24122,6 +26514,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24133,6 +26526,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24144,6 +26538,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AnimationPlayback"] writes = ["gui.AnimationPlayback"] @@ -24155,6 +26550,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AnimationPlayback"] writes = ["gui.AnimationPlayback"] @@ -24173,6 +26569,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24184,6 +26581,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24195,6 +26593,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AspectRatio"] writes = ["gui.AspectRatio"] @@ -24206,6 +26605,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AspectRatio"] writes = ["gui.AspectRatio"] enum = "AspectType" @@ -24218,6 +26618,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.AspectRatio"] writes = ["gui.AspectRatio"] enum = "DominantAxis" @@ -24237,6 +26638,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24248,6 +26650,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24266,6 +26669,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24277,6 +26681,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24288,6 +26693,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Binding"] writes = ["gui.Binding"] @@ -24299,6 +26705,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Binding"] writes = ["gui.Binding"] @@ -24310,6 +26717,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Binding"] writes = ["gui.Binding"] @@ -24321,6 +26729,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Binding"] writes = ["gui.Binding"] @@ -24332,6 +26741,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.BindingOutput"] writes = [] @@ -24343,6 +26753,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.BindingOutput"] writes = [] @@ -24361,6 +26772,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24372,6 +26784,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24390,6 +26803,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24401,6 +26815,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24419,6 +26834,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24430,6 +26846,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24441,6 +26858,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Corner"] writes = ["gui.Corner"] @@ -24459,6 +26877,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24470,6 +26889,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24481,6 +26901,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.DragDetector"] writes = ["gui.DragDetector"] @@ -24492,6 +26913,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.DragDetector"] writes = ["gui.DragDetector"] @@ -24503,6 +26925,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.DragDetector"] writes = ["gui.DragDetector"] @@ -24514,6 +26937,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.DragDetector"] writes = ["gui.DragDetector"] @@ -24525,6 +26949,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.DragDetector"] writes = ["gui.DragDetector"] @@ -24536,6 +26961,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.DragDetector"] writes = ["gui.DragDetector"] enum = "UIDragDetectorDragStyle" @@ -24548,6 +26974,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.DragDetector"] writes = ["gui.DragDetector"] enum = "UIDragDetectorDragStyleResponse" @@ -24567,6 +26994,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24578,6 +27006,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24589,6 +27018,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.FlexItem"] writes = ["gui.FlexItem"] @@ -24600,6 +27030,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.FlexItem"] writes = ["gui.FlexItem"] @@ -24611,6 +27042,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.FlexItem"] writes = ["gui.FlexItem"] enum = "UIFlexMode" @@ -24623,6 +27055,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.FlexItem"] writes = ["gui.FlexItem"] enum = "ItemLineAlignment" @@ -24642,6 +27075,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24653,6 +27087,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24664,6 +27099,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Gradient"] writes = ["gui.Gradient"] @@ -24675,6 +27111,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Gradient"] writes = ["gui.Gradient"] @@ -24686,6 +27123,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Gradient"] writes = ["gui.Gradient"] @@ -24697,6 +27135,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Gradient"] writes = ["gui.Gradient"] @@ -24708,6 +27147,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Gradient"] writes = ["gui.Gradient"] @@ -24726,6 +27166,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24737,6 +27178,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24748,6 +27190,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] @@ -24759,6 +27202,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] @@ -24770,6 +27214,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] @@ -24781,6 +27226,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] enum = "FillDirection" @@ -24793,6 +27239,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] enum = "StartCorner" @@ -24805,6 +27252,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] enum = "HorizontalAlignment" @@ -24817,6 +27265,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] enum = "VerticalAlignment" @@ -24829,6 +27278,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.GridLayout"] writes = ["gui.GridLayout"] enum = "SortOrder" @@ -24848,6 +27298,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24859,6 +27310,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24877,6 +27329,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -24888,6 +27341,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -24899,6 +27353,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] @@ -24910,6 +27365,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] @@ -24921,6 +27377,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] enum = "FillDirection" @@ -24933,6 +27390,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] enum = "HorizontalAlignment" @@ -24945,6 +27403,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] enum = "VerticalAlignment" @@ -24957,6 +27416,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] enum = "SortOrder" @@ -24969,6 +27429,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] enum = "UIFlexAlignment" @@ -24981,6 +27442,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] enum = "UIFlexAlignment" @@ -24993,6 +27455,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ListLayout"] writes = ["gui.ListLayout"] enum = "ItemLineAlignment" @@ -25012,6 +27475,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25023,6 +27487,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25034,6 +27499,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Mask"] writes = ["gui.Mask"] @@ -25045,6 +27511,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Mask"] writes = ["gui.Mask"] @@ -25063,6 +27530,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25074,6 +27542,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25085,6 +27554,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.ModalScope"] writes = ["gui.ModalScope"] @@ -25103,6 +27573,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25114,6 +27585,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25125,6 +27597,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Padding"] writes = ["gui.Padding"] @@ -25136,6 +27609,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Padding"] writes = ["gui.Padding"] @@ -25147,6 +27621,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Padding"] writes = ["gui.Padding"] @@ -25158,6 +27633,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Padding"] writes = ["gui.Padding"] @@ -25176,6 +27652,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25187,6 +27664,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25198,6 +27676,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] @@ -25209,6 +27688,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] @@ -25220,6 +27700,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] @@ -25231,6 +27712,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] enum = "FillDirection" @@ -25243,6 +27725,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] enum = "SortOrder" @@ -25255,6 +27738,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] @@ -25266,6 +27750,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] @@ -25277,6 +27762,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] enum = "EasingStyle" @@ -25289,6 +27775,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.PageLayout"] writes = ["gui.PageLayout"] enum = "EasingDirection" @@ -25308,6 +27795,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25319,6 +27807,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25330,6 +27819,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Scale"] writes = ["gui.Scale"] @@ -25348,6 +27838,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25359,6 +27850,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25370,6 +27862,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SizeLimits"] writes = ["gui.SizeLimits"] @@ -25381,6 +27874,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.SizeLimits"] writes = ["gui.SizeLimits"] @@ -25399,6 +27893,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25410,6 +27905,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25421,6 +27917,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Stroke"] writes = ["gui.Stroke"] @@ -25432,6 +27929,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Stroke"] writes = ["gui.Stroke"] @@ -25443,6 +27941,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Stroke"] writes = ["gui.Stroke"] @@ -25454,6 +27953,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Stroke"] writes = ["gui.Stroke"] @@ -25465,6 +27965,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Stroke"] writes = ["gui.Stroke"] enum = "ApplyStrokeMode" @@ -25477,6 +27978,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Stroke"] writes = ["gui.Stroke"] enum = "LineJoinMode" @@ -25489,6 +27991,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Stroke"] writes = ["gui.Stroke"] enum = "StrokeSizingMode" @@ -25508,6 +28011,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25519,6 +28023,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25537,6 +28042,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25548,6 +28054,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25559,6 +28066,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TableLayout"] writes = ["gui.TableLayout"] @@ -25570,6 +28078,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TableLayout"] writes = ["gui.TableLayout"] @@ -25581,6 +28090,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TableLayout"] writes = ["gui.TableLayout"] @@ -25592,6 +28102,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TableLayout"] writes = ["gui.TableLayout"] enum = "FillDirection" @@ -25604,6 +28115,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TableLayout"] writes = ["gui.TableLayout"] enum = "HorizontalAlignment" @@ -25616,6 +28128,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TableLayout"] writes = ["gui.TableLayout"] enum = "VerticalAlignment" @@ -25628,6 +28141,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TableLayout"] writes = ["gui.TableLayout"] enum = "SortOrder" @@ -25647,6 +28161,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25658,6 +28173,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25669,6 +28185,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TextSizeLimits"] writes = ["gui.TextSizeLimits"] @@ -25680,6 +28197,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.TextSizeLimits"] writes = ["gui.TextSizeLimits"] @@ -25698,6 +28216,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25709,6 +28228,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25727,6 +28247,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25738,6 +28259,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25749,6 +28271,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.VirtualCollection"] writes = ["gui.VirtualCollection"] @@ -25760,6 +28283,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.VirtualCollection"] writes = ["gui.VirtualCollection"] @@ -25771,6 +28295,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.VirtualCollection"] writes = ["gui.VirtualCollection"] @@ -25789,6 +28314,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25800,6 +28326,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25818,6 +28345,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25829,6 +28357,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25840,6 +28369,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Vector3Value"] writes = ["scene.Vector3Value"] @@ -25858,6 +28388,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -25869,6 +28400,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -25880,6 +28412,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -25891,6 +28424,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -25902,6 +28436,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -25913,6 +28448,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -25924,6 +28460,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField2D"] writes = ["scene.VectorField2D"] @@ -25935,6 +28472,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField2D"] writes = ["scene.VectorField2D"] @@ -25946,6 +28484,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField2D"] writes = ["scene.VectorField2D"] @@ -25957,6 +28496,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField2D"] writes = ["scene.VectorField2D"] @@ -25968,6 +28508,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField2D"] writes = ["scene.VectorField2D"] @@ -25979,6 +28520,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField2D"] writes = ["scene.VectorField2D"] @@ -25997,6 +28539,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -26008,6 +28551,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -26019,6 +28563,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -26030,6 +28575,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -26041,6 +28587,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -26052,6 +28599,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -26063,6 +28611,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField3D"] writes = ["scene.VectorField3D"] @@ -26074,6 +28623,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField3D"] writes = ["scene.VectorField3D"] @@ -26085,6 +28635,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField3D"] writes = ["scene.VectorField3D"] @@ -26096,6 +28647,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField3D"] writes = ["scene.VectorField3D"] @@ -26107,6 +28659,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField3D"] writes = ["scene.VectorField3D"] @@ -26118,6 +28671,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField3D"] writes = ["scene.VectorField3D"] @@ -26129,6 +28683,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.VectorField3D"] writes = ["scene.VectorField3D"] @@ -26147,6 +28702,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -26158,6 +28714,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -26169,6 +28726,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -26180,6 +28738,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -26191,6 +28750,7 @@ kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["gui.Resolved"] writes = [] @@ -26202,6 +28762,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26213,6 +28774,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26224,6 +28786,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26235,6 +28798,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26246,6 +28810,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26257,6 +28822,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26268,6 +28834,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26279,6 +28846,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26290,6 +28858,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26301,6 +28870,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26312,6 +28882,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] @@ -26323,6 +28894,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -26334,6 +28906,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -26345,6 +28918,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -26356,6 +28930,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -26367,6 +28942,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -26378,6 +28954,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Selection"] writes = ["gui.Selection"] @@ -26389,6 +28966,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "SizeConstraint" @@ -26401,6 +28979,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Element"] writes = ["gui.Element"] enum = "AutomaticSize" @@ -26413,6 +28992,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -26424,6 +29004,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background", "gui.StyleDirect"] writes = ["gui.Background", "gui.StyleDirect"] @@ -26435,6 +29016,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -26446,6 +29028,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] @@ -26457,6 +29040,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Background"] writes = ["gui.Background"] enum = "BorderMode" @@ -26469,6 +29053,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26480,6 +29065,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26491,6 +29077,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26502,6 +29089,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26513,6 +29101,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26524,6 +29113,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26535,6 +29125,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26546,6 +29137,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] enum = "ViewportUpdateMode" @@ -26558,6 +29150,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26569,6 +29162,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["gui.Viewport"] writes = ["gui.Viewport"] @@ -26587,6 +29181,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -26598,6 +29193,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -26609,6 +29205,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -26620,6 +29217,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -26631,6 +29229,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -26642,6 +29241,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -26653,6 +29253,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26664,6 +29265,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26675,6 +29277,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26686,6 +29289,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26697,6 +29301,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26708,6 +29313,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26719,6 +29325,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26730,6 +29337,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26741,6 +29349,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26752,6 +29361,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] @@ -26763,6 +29373,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] enum = "VolumeShape" @@ -26775,17 +29386,18 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Volume"] writes = ["scene.Volume"] -["classes"."Weld"] -name = "Weld" +["classes"."WeatherCompute"] +name = "WeatherCompute" creatable = true -inherits = "JointInstance" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.JointInstance"] -property_count = 8 +inherits = "CloudCompute" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Clouds", "scene.CloudCompute", "scene.WeatherCompute"] +property_count = 69 -["classes"."Weld"."properties"."Parent"] +["classes"."WeatherCompute"."properties"."Parent"] name = "Parent" type = "Reference" value_size = 8 @@ -26793,10 +29405,11 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] -["classes"."Weld"."properties"."Name"] +["classes"."WeatherCompute"."properties"."Name"] name = "Name" type = "Name" value_size = 4 @@ -26804,145 +29417,998 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] -["classes"."Weld"."properties"."Part0"] -name = "Part0" -type = "Reference" -value_size = 8 +["classes"."WeatherCompute"."properties"."Color"] +name = "Color" +type = "Color3" +value_size = 12 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.JointInstance"] -writes = ["scene.JointInstance"] +nullable = false +reads = ["scene.Clouds"] +writes = ["scene.Clouds"] -["classes"."Weld"."properties"."Part1"] -name = "Part1" -type = "Reference" -value_size = 8 +["classes"."WeatherCompute"."properties"."Cover"] +name = "Cover" +type = "Float" +value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.JointInstance"] -writes = ["scene.JointInstance"] +nullable = false +reads = ["scene.Clouds"] +writes = ["scene.Clouds"] -["classes"."Weld"."properties"."C0"] -name = "C0" -type = "CFrame" -value_size = 28 +["classes"."WeatherCompute"."properties"."Density"] +name = "Density" +type = "Float" +value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.JointInstance"] -writes = ["scene.JointInstance"] +nullable = false +reads = ["scene.Clouds"] +writes = ["scene.Clouds"] -["classes"."Weld"."properties"."C1"] -name = "C1" -type = "CFrame" -value_size = 28 +["classes"."WeatherCompute"."properties"."WindSpeed"] +name = "WindSpeed" +type = "Float" +value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.JointInstance"] -writes = ["scene.JointInstance"] +nullable = false +reads = ["scene.Clouds"] +writes = ["scene.Clouds"] -["classes"."Weld"."properties"."Enabled"] -name = "Enabled" -type = "Bool" -value_size = 1 +["classes"."WeatherCompute"."properties"."WindDirection"] +name = "WindDirection" +type = "Vector2" +value_size = 8 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.JointInstance"] -writes = ["scene.JointInstance"] +nullable = false +reads = ["scene.Clouds"] +writes = ["scene.Clouds"] -["classes"."Weld"."properties"."Active"] -name = "Active" +["classes"."WeatherCompute"."properties"."Enabled"] +name = "Enabled" type = "Bool" value_size = 1 -kind = "Computed" -writable = false +kind = "Field" +writable = true predicted_writable = false scriptable = true -reads = ["ecs.Hierarchy", "scene.JointInstance"] -writes = [] +nullable = false +reads = ["scene.Clouds"] +writes = ["scene.Clouds"] -["classes"."WeldConstraint"] -name = "WeldConstraint" -creatable = true -inherits = "Instance" -components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.WeldConstraint"] -property_count = 6 +["classes"."WeatherCompute"."properties"."CellSize"] +name = "CellSize" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.CloudCompute"] +writes = ["scene.CloudCompute"] -["classes"."WeldConstraint"."properties"."Parent"] -name = "Parent" -type = "Reference" -value_size = 8 -kind = "Computed" +["classes"."WeatherCompute"."properties"."Detail"] +name = "Detail" +type = "Float" +value_size = 4 +kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["ecs.Hierarchy"] -writes = ["ecs.Hierarchy"] +nullable = false +reads = ["scene.CloudCompute"] +writes = ["scene.CloudCompute"] -["classes"."WeldConstraint"."properties"."Name"] -name = "Name" -type = "Name" +["classes"."WeatherCompute"."properties"."Height"] +name = "Height" +type = "Float" value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["ecs.InstanceName"] -writes = ["ecs.InstanceName"] +nullable = false +reads = ["scene.CloudCompute"] +writes = ["scene.CloudCompute"] -["classes"."WeldConstraint"."properties"."Part0"] -name = "Part0" -type = "Reference" -value_size = 8 +["classes"."WeatherCompute"."properties"."Thickness"] +name = "Thickness" +type = "Float" +value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.WeldConstraint"] -writes = ["scene.WeldConstraint"] +nullable = false +reads = ["scene.CloudCompute"] +writes = ["scene.CloudCompute"] -["classes"."WeldConstraint"."properties"."Part1"] -name = "Part1" -type = "Reference" -value_size = 8 +["classes"."WeatherCompute"."properties"."Seed"] +name = "Seed" +type = "Int32" +value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.WeldConstraint"] -writes = ["scene.WeldConstraint"] +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] -["classes"."WeldConstraint"."properties"."Enabled"] -name = "Enabled" -type = "Bool" -value_size = 1 +["classes"."WeatherCompute"."properties"."Steps"] +name = "Steps" +type = "Int32" +value_size = 4 kind = "Field" writable = true predicted_writable = false scriptable = true -reads = ["scene.WeldConstraint"] -writes = ["scene.WeldConstraint"] +nullable = false +reads = ["scene.CloudCompute"] +writes = ["scene.CloudCompute"] -["classes"."WeldConstraint"."properties"."Active"] -name = "Active" +["classes"."WeatherCompute"."properties"."Shader"] +name = "Shader" +type = "Enum" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.CloudCompute"] +writes = ["scene.CloudCompute"] +enum = "CloudComputeShader" + +["classes"."WeatherCompute"."properties"."ComputeEnabled"] +name = "ComputeEnabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.CloudCompute"] +writes = ["scene.CloudCompute"] + +["classes"."WeatherCompute"."properties"."BoundaryX"] +name = "BoundaryX" +type = "Enum" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] +enum = "WeatherBoundary" + +["classes"."WeatherCompute"."properties"."BoundaryZ"] +name = "BoundaryZ" +type = "Enum" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] +enum = "WeatherBoundary" + +["classes"."WeatherCompute"."properties"."TopBoundary"] +name = "TopBoundary" +type = "Enum" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] +enum = "WeatherTopBoundary" + +["classes"."WeatherCompute"."properties"."TerrainRevision"] +name = "TerrainRevision" +type = "Int32" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."GroundVapourFluxKilogramsPerSquareMetreSecond"] +name = "GroundVapourFluxKilogramsPerSquareMetreSecond" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."RainFallSpeedMetresPerSecond"] +name = "RainFallSpeedMetresPerSecond" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."CellSizeMetres"] +name = "CellSizeMetres" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."BaseHeightMetres"] +name = "BaseHeightMetres" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ThicknessMetres"] +name = "ThicknessMetres" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ExtentMetres"] +name = "ExtentMetres" +type = "Vector3" +value_size = 12 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."Coverage"] +name = "Coverage" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."CondensateScale"] +name = "CondensateScale" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."VapourMixingRatio"] +name = "VapourMixingRatio" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."VapourScale"] +name = "VapourScale" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."BaseTemperatureCelsius"] +name = "BaseTemperatureCelsius" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."BasePressureHectopascals"] +name = "BasePressureHectopascals" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."TemperatureLapseCelsiusPerKilometre"] +name = "TemperatureLapseCelsiusPerKilometre" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."TemperatureVariationCelsius"] +name = "TemperatureVariationCelsius" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."PressureVariationHectopascals"] +name = "PressureVariationHectopascals" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."TurbulenceMetresPerSecond"] +name = "TurbulenceMetresPerSecond" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ShearMetresPerSecond"] +name = "ShearMetresPerSecond" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."LiftMetresPerSecond"] +name = "LiftMetresPerSecond" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."FrontContrast"] +name = "FrontContrast" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."GrowthRate"] +name = "GrowthRate" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."TimeScale"] +name = "TimeScale" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."MaintenanceSeconds"] +name = "MaintenanceSeconds" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."LodError"] +name = "LodError" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ShadowStrength"] +name = "ShadowStrength" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ShadowDistanceMetres"] +name = "ShadowDistanceMetres" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ShadowUpdateSeconds"] +name = "ShadowUpdateSeconds" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."AtmosphereDensityStrength"] +name = "AtmosphereDensityStrength" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."AtmosphereHazeStrength"] +name = "AtmosphereHazeStrength" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."AtmosphereGlareSuppression"] +name = "AtmosphereGlareSuppression" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."FogStrength"] +name = "FogStrength" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."PrecipitationRate"] +name = "PrecipitationRate" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."IceFraction"] +name = "IceFraction" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."StormIntensity"] +name = "StormIntensity" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."HailIntensity"] +name = "HailIntensity" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."LightningRate"] +name = "LightningRate" +type = "Float" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."WindMetresPerSecond"] +name = "WindMetresPerSecond" +type = "Vector3" +value_size = 12 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."FeatureCells"] +name = "FeatureCells" +type = "Int32" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."TickRate"] +name = "TickRate" +type = "Int32" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."Paused"] +name = "Paused" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."MaximumResidentBricks"] +name = "MaximumResidentBricks" +type = "Int32" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."MaximumLod"] +name = "MaximumLod" +type = "Int32" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ShadowsEnabled"] +name = "ShadowsEnabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ShadowResolution"] +name = "ShadowResolution" +type = "Int32" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."ShadowCascades"] +name = "ShadowCascades" +type = "Int32" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."WeatherEnabled"] +name = "WeatherEnabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."LayerName"] +name = "LayerName" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] + +["classes"."WeatherCompute"."properties"."Mode"] +name = "Mode" +type = "Enum" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = ["scene.WeatherCompute"] +enum = "WeatherMode" + +["classes"."WeatherCompute"."properties"."AlgorithmVersion"] +name = "AlgorithmVersion" +type = "Int32" +value_size = 4 +kind = "Field" +writable = false +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = [] + +["classes"."WeatherCompute"."properties"."DefinitionRevision"] +name = "DefinitionRevision" +type = "Int32" +value_size = 4 +kind = "Field" +writable = false +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeatherCompute"] +writes = [] + +["classes"."Weld"] +name = "Weld" +creatable = true +inherits = "JointInstance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.JointInstance"] +property_count = 8 + +["classes"."Weld"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."Weld"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."Weld"."properties"."Part0"] +name = "Part0" +type = "Reference" +value_size = 8 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.JointInstance"] +writes = ["scene.JointInstance"] + +["classes"."Weld"."properties"."Part1"] +name = "Part1" +type = "Reference" +value_size = 8 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.JointInstance"] +writes = ["scene.JointInstance"] + +["classes"."Weld"."properties"."C0"] +name = "C0" +type = "CFrame" +value_size = 28 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.JointInstance"] +writes = ["scene.JointInstance"] + +["classes"."Weld"."properties"."C1"] +name = "C1" +type = "CFrame" +value_size = 28 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.JointInstance"] +writes = ["scene.JointInstance"] + +["classes"."Weld"."properties"."Enabled"] +name = "Enabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.JointInstance"] +writes = ["scene.JointInstance"] + +["classes"."Weld"."properties"."Active"] +name = "Active" +type = "Bool" +value_size = 1 +kind = "Computed" +writable = false +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy", "scene.JointInstance"] +writes = [] + +["classes"."WeldConstraint"] +name = "WeldConstraint" +creatable = true +inherits = "Instance" +components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.WeldConstraint"] +property_count = 6 + +["classes"."WeldConstraint"."properties"."Parent"] +name = "Parent" +type = "Reference" +value_size = 8 +kind = "Computed" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.Hierarchy"] +writes = ["ecs.Hierarchy"] + +["classes"."WeldConstraint"."properties"."Name"] +name = "Name" +type = "Name" +value_size = 4 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["ecs.InstanceName"] +writes = ["ecs.InstanceName"] + +["classes"."WeldConstraint"."properties"."Part0"] +name = "Part0" +type = "Reference" +value_size = 8 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeldConstraint"] +writes = ["scene.WeldConstraint"] + +["classes"."WeldConstraint"."properties"."Part1"] +name = "Part1" +type = "Reference" +value_size = 8 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeldConstraint"] +writes = ["scene.WeldConstraint"] + +["classes"."WeldConstraint"."properties"."Enabled"] +name = "Enabled" +type = "Bool" +value_size = 1 +kind = "Field" +writable = true +predicted_writable = false +scriptable = true +nullable = false +reads = ["scene.WeldConstraint"] +writes = ["scene.WeldConstraint"] + +["classes"."WeldConstraint"."properties"."Active"] +name = "Active" type = "Bool" value_size = 1 kind = "Computed" writable = false predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy", "scene.WeldConstraint"] writes = [] @@ -26951,7 +30417,7 @@ name = "Workspace" creatable = false inherits = "WorldRoot" components = ["ecs.Hierarchy", "ecs.InstanceClass", "ecs.InstanceName", "scene.Transform", "scene.Pivot", "scene.Service"] -property_count = 14 +property_count = 10 ["classes"."Workspace"."properties"."Parent"] name = "Parent" @@ -26961,6 +30427,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -26972,6 +30439,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -26983,6 +30451,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -26994,6 +30463,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27005,6 +30475,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27016,6 +30487,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -27027,6 +30499,7 @@ kind = "Resource" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Camera"] writes = ["scene.Camera"] @@ -27038,6 +30511,7 @@ kind = "Resource" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceBounces"] writes = ["scene.SurfaceBounces"] @@ -27049,63 +30523,21 @@ kind = "Resource" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.SurfaceLimit"] writes = ["scene.SurfaceLimit"] -["classes"."Workspace"."properties"."TerrainEnabled"] -name = "TerrainEnabled" -type = "Bool" -value_size = 1 -kind = "Resource" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.Terrain"] -writes = ["scene.Terrain"] - -["classes"."Workspace"."properties"."TerrainGenerator"] -name = "TerrainGenerator" -type = "Name" -value_size = 4 -kind = "Resource" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.Terrain"] -writes = ["scene.Terrain"] - -["classes"."Workspace"."properties"."TerrainSeed"] -name = "TerrainSeed" -type = "Int64" +["classes"."Workspace"."properties"."Terrain"] +name = "Terrain" +type = "Reference" value_size = 8 -kind = "Resource" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.Terrain"] -writes = ["scene.Terrain"] - -["classes"."Workspace"."properties"."TerrainChunkSize"] -name = "TerrainChunkSize" -type = "Float" -value_size = 4 -kind = "Resource" -writable = true -predicted_writable = false -scriptable = true -reads = ["scene.Terrain"] -writes = ["scene.Terrain"] - -["classes"."Workspace"."properties"."TerrainViewDistance"] -name = "TerrainViewDistance" -type = "Float" -value_size = 4 -kind = "Resource" -writable = true +kind = "Computed" +writable = false predicted_writable = false scriptable = true -reads = ["scene.Terrain"] -writes = ["scene.Terrain"] +nullable = false +reads = ["ecs.Hierarchy"] +writes = [] ["classes"."WorldModel"] name = "WorldModel" @@ -27122,6 +30554,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -27133,6 +30566,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -27144,6 +30578,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27155,6 +30590,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27166,6 +30602,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27177,6 +30614,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -27195,6 +30633,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.Hierarchy"] writes = ["ecs.Hierarchy"] @@ -27206,6 +30645,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["ecs.InstanceName"] writes = ["ecs.InstanceName"] @@ -27217,6 +30657,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27228,6 +30669,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27239,6 +30681,7 @@ kind = "Computed" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Transform"] writes = ["scene.Transform"] @@ -27250,6 +30693,7 @@ kind = "Field" writable = true predicted_writable = false scriptable = true +nullable = false reads = ["scene.Pivot"] writes = ["scene.Pivot"] @@ -27463,6 +30907,13 @@ kind = "Method" source = "neutral" scriptable = true +["classes"."Instance"."functions"."FromBase64"] +name = "FromBase64" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + ["classes"."Instance"."functions"."FromBuffer"] name = "FromBuffer" owner = "Instance" @@ -27470,6 +30921,13 @@ kind = "Method" source = "neutral" scriptable = true +["classes"."Instance"."functions"."FromEncodedBuffer"] +name = "FromEncodedBuffer" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + ["classes"."Instance"."functions"."GetAngularVelocity"] name = "GetAngularVelocity" owner = "Instance" @@ -27561,6 +31019,20 @@ kind = "Method" source = "neutral" scriptable = true +["classes"."Instance"."functions"."GetImage"] +name = "GetImage" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + +["classes"."Instance"."functions"."GetInput"] +name = "GetInput" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + ["classes"."Instance"."functions"."GetLinearVelocity"] name = "GetLinearVelocity" owner = "Instance" @@ -27722,6 +31194,13 @@ kind = "Method" source = "neutral" scriptable = true +["classes"."Instance"."functions"."Sample"] +name = "Sample" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + ["classes"."Instance"."functions"."SetAngularVelocity"] name = "SetAngularVelocity" owner = "Instance" @@ -27771,6 +31250,20 @@ kind = "Method" source = "neutral" scriptable = true +["classes"."Instance"."functions"."SetInput"] +name = "SetInput" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + +["classes"."Instance"."functions"."SetLayer"] +name = "SetLayer" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + ["classes"."Instance"."functions"."SetLinearVelocity"] name = "SetLinearVelocity" owner = "Instance" @@ -27813,6 +31306,13 @@ kind = "Method" source = "neutral" scriptable = true +["classes"."Instance"."functions"."SetSpawnSamples"] +name = "SetSpawnSamples" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + ["classes"."Instance"."functions"."SetVertexColor"] name = "SetVertexColor" owner = "Instance" @@ -27848,6 +31348,13 @@ kind = "Method" source = "neutral" scriptable = true +["classes"."Instance"."functions"."ToBase64"] +name = "ToBase64" +owner = "Instance" +kind = "Method" +source = "neutral" +scriptable = true + ["classes"."Instance"."functions"."ToBuffer"] name = "ToBuffer" owner = "Instance" @@ -28807,7 +32314,7 @@ items = ["Outline", "Middle", "Inset"] ["enums"."CameraType"] name = "CameraType" -items = ["Classic", "LockFirstPerson", "ShiftLock", "Scriptable"] +items = ["Classic", "LockFirstPerson", "ShiftLock", "Scriptable", "Custom"] ["enums"."CloudComputeShader"] name = "CloudComputeShader" @@ -29041,6 +32548,18 @@ items = ["OnChange", "EveryFrame", "FixedRate", "Manual"] name = "VolumeShape" items = ["Box", "Ellipsoid"] +["enums"."WeatherBoundary"] +name = "WeatherBoundary" +items = ["Periodic", "Closed", "Open"] + +["enums"."WeatherMode"] +name = "WeatherMode" +items = ["Procedural", "Stateful"] + +["enums"."WeatherTopBoundary"] +name = "WeatherTopBoundary" +items = ["Closed", "Escape"] + ["enums"."ZIndexBehavior"] name = "ZIndexBehavior" items = ["Global", "Sibling"] diff --git a/docs/v025-TORNADOSIM-PORT.md b/docs/v025-TORNADOSIM-PORT.md index c829f8387..b9b5da1c5 100644 --- a/docs/v025-TORNADOSIM-PORT.md +++ b/docs/v025-TORNADOSIM-PORT.md @@ -1,36 +1,27 @@ -# TornadoSim engine port plan +# TornadoSim demo and GPU particle field -## Target +## Scope -Port the C++ program at `/home/declan/Documents/GitHub/TornadoSim` as closely as the engine renderer and hardware allow. Keep its analytical wind field, simulation behavior, storm controls, audio, and visual layers. The wind and damage systems must be reusable by ordinary engine scenes. The reference's buildings, vegetation, vehicles, and terrain belong to a built-in Luau scripted `.aworld` demo, loaded like `BladeborneDemo.aworld`. Its controls appear in an in-game panel. +The original port plan targeted a close native port of a C++ tornado simulation: reusable analytical wind, fixed-tick body and joint damage, cloud and audio layers, and reference captures. The current implementation is a scripted `.aworld` demonstration with a generic GPU particle field. The old plan's proposed engine-wide storm model and native physics components are not the interface the demo uses. -The existing `TornadoSim.luau` is a smaller demonstration. It has three EF presets, a simplified field, particle emitters, placed volumes, clouds, rain, lightning, and a short status panel. It does not implement the reference's full EF0 to EF5 and Q0 to Q5 controls, two-cell field, structure connectivity, material damage, spatial collision, cloud density octree, spatial audio, environment streaming, or million-scale GPU particle simulation. +## Current demo -## Implementation +[`TornadoSim.aworld`](../mono.engine/examples/assets/worlds/TornadoSim.aworld) carries its server, client, shared Luau modules, authored scene, and controls. `StormControls` defines presets and parameter bounds. `StormField` owns the script-side storm state and sampling functions. The server validates control requests, advances the field, applies body forces and scenery damage through script component schemas, and publishes `Tornado.State` on the authored storm anchor. The world marks that schema as replicated. The client uses the replicated state for presentation, field visualization, audio, camera response, and controls. -1. Record the reference baseline. Build the C++ repository, run its CTest and smoke tests, capture its default and mature-funnel views, and record the 1M and available larger-preset profiles on the current GPU. Keep generated profiles under build directories. -2. Add the reusable storm model under `mono.engine`: sanitized parameters, EF and Q presets, a prepared two-cell analytical field, lifecycle, visibility and damage queries, and deterministic turbulence. Match the reference equations and tests. Expose authored storm parameters and read-only field queries to Luau so the scene script can configure and query them while the engine runs fixed-tick physics. -3. Connect the field to engine physics and effects. Apply mass, area, and drag-based forces to affected bodies at a fixed tick; implement attachment failure, material joints, structure connectivity, broadphase contacts, bounces, and vegetation bend. Keep the simulation deterministic and avoid world-crossing pointers. -4. Port the visible storm layers. Use engine particle emitters for rain, dirt, debris, and mist; use placed fog volumes and cloud/atmosphere lighting for condensation and the anvil. Add a reusable GPU compute particle field for the reference's optional 262k through 50M cosmetic presets, 12 depth slices, and device-local simulation without CPU readback. The default remains 1M. Failed allocation retains the previous working preset; integrated GPUs may use the reference's phased background update. Keep all backend work in the engine's SDL GPU path. -5. Port cloud density generation as sparse, adaptive data that can feed the renderer and gameplay visibility queries. Reuse the same analytical wind sample for clouds, rain, debris, damage, the vector inset, and audio. Add procedural wind, rain, debris, circulation, and delayed thunder audio through the engine audio graph. -6. Add `TornadoSim.aworld` with embedded server, client, and shared Luau sources in the same format as `BladeborneDemo.aworld`. The scripts author the reference scene and its in-game controls: EF0 to EF5, Q0 to Q5, Custom, parameter sliders, layer switches, pause/reset/lifecycle, camera movement and shake, streamed scenery, three material-aware buildings, trees, signs, roof panels, vehicles, and a field/vector inset. Preserve the original's default camera and storm composition for visual comparison. Retire the smaller standalone `TornadoSim.luau` after the world replaces it. +The demo's force, joint, and vegetation records are ordinary script-defined components named `Tornado.Response`, `Tornado.Link`, and `Tornado.Vegetation`. Luau reads and writes those records directly; the world does not depend on native storm component registration or a native storm force pass. -## Validation +## Generic GPU particles -- Compare field samples, presets, lifecycle, damage, cloud density, and fixed-step outcomes against the C++ reference with deterministic fixtures. -- Test overlapping local volumes, clouds, sun rays, lightning, rain, and debris in scene captures. Compile and execute the compute shader path, including preset resizing, failure fallback, and zero readback. -- Run headless smoke and GPU tests at supported presets, plus the existing reference visual capture and matched engine camera captures. Compare the funnel shape, motion, cloud deck, rain veil, ground mist, lightning, and scenery in default and mature views. -- Add a `just` job for every new benchmark, print benchmark results to the terminal, and keep build artifacts under the build directory. Measure CPU fixed-step, collision scaling, GPU compute, frame time, and memory in `release` with the device and preset named. -- Use Studio to open, edit, run, and play the completed demo. Exercise storm controls and object classes, then fix issues the session reproduces. +The storm visuals use the general `scene::GpuParticleField` component and its `GpuParticleField` instance class. The API accepts a layer mask, requested population, local bounds, velocity response, and three generic visual styles. Each style has a colour, opacity, size, and constant acceleration. -## Review gates +`SetSpawnSamples` accepts a packed buffer of bounded initial conditions: local-space position, lifetime, velocity, and layer index. These samples seed and recycle the device-local population. The authored samples and style settings are saved; live particle positions stay on the GPU and are not written into world snapshots. The same API can drive effects unrelated to tornadoes. -The original uses direct Vulkan while the engine uses SDL GPU. The same appearance and behavior are the target, but exact pixels and identical GPU timings are not portable across these renderers. The 50M preset requires about 1.6 GiB in the reference and must stay optional with a clear allocation failure path. +## Validation -The user approved this plan. Lighting capabilities and their stress tests are tracked separately. +The world-level suite `engine.examples.tornado-sim` checks that the authored asset carries its script sources, controls, scenery, audio, and GPU field setup. `engine.scene.gpuparticlefield` covers authored field validation, spawn-sample encoding, and supported population presets. `engine.render.gpuparticlefieldgpu` covers device execution and rendering behavior. -## Verification record +GPU population size depends on device memory. The demo exposes fixed presets and the field retains its previous working population if a requested allocation cannot be made. Visual comparison with the original standalone Vulkan program remains renderer- and hardware-dependent. -The C++ reference passes all three CTest suites. Engine fixtures cover field samples, EF and Q presets, lifecycle, damage, and the 1M default. The Vulkan particle test covers depth-sliced drawing, preset resizing, and a forced 50M allocation failure that retains the previous working field without a CPU particle readback. +## Historical comparison note -Default and mature funnel captures were compared; the matched mature capture used 1200 frames at 1440 by 900 pixels. The mature engine camera was aligned to the reference horizon and funnel framing. Bounded, depth-ordered condensation drawing and broader billow blending removed the detached cap and made the middle of the funnel more continuous. The remaining silhouette texture and scenery differ between the SDL GPU engine scene and the direct Vulkan reference. +An earlier comparison recorded a 1200-frame mature-funnel capture at 1440 by 900 pixels. It found differences in silhouette texture and scenery between the standalone Vulkan reference and the engine renderer. That note records the earlier comparison target; it does not claim pixel parity for the current scripted world. diff --git a/mono.build/CompilerCache.cmake b/mono.build/CompilerCache.cmake new file mode 100644 index 000000000..e986d9faa --- /dev/null +++ b/mono.build/CompilerCache.cmake @@ -0,0 +1,52 @@ +# Compiler launcher for ccache. Arguments follow `--` without shell expansion. +if(CMAKE_ARGC LESS 7 OR NOT CMAKE_ARGV5 STREQUAL "--") + message(FATAL_ERROR "CompilerCache.cmake expects: -- [arguments]") +endif() + +set(ENV{CCACHE_SLOPPINESS} "pch_defines,time_macros") +set(ENV{CCACHE_BASEDIR} "${CMAKE_ARGV4}") +set(ENV{CCACHE_NOHASHDIR} "true") +set(ENV{CCACHE_DEPEND} "true") + +# Lists can merge arguments containing unmatched brackets or trailing backslashes. +# Quote each argument in the CMake call itself, preserving its exact boundary. +function(append_argument argument) + string(REPLACE "\\" "\\\\" quoted "${argument}") + string(REPLACE "\"" "\\\"" quoted "${quoted}") + string(REPLACE "$" "\\$" quoted "${quoted}") + set(cacheCommand "${cacheCommand} \"${quoted}\"" PARENT_SCOPE) +endfunction() + +set(cacheCommand "execute_process(COMMAND") +append_argument("${CMAKE_ARGV3}") +append_argument("${CMAKE_ARGV6}") +set(previousArgument "") +set(createsPch FALSE) +set(pchOutput "") +if(CMAKE_ARGC GREATER 7) + math(EXPR lastArgument "${CMAKE_ARGC} - 1") + foreach(index RANGE 7 ${lastArgument}) + set(argument "${CMAKE_ARGV${index}}") + if(previousArgument STREQUAL "-x" AND + (argument STREQUAL "c++-header" OR argument STREQUAL "c-header")) + set(createsPch TRUE) + elseif(previousArgument STREQUAL "-o") + set(pchOutput "${argument}") + endif() + set(previousArgument "${argument}") + append_argument("${argument}") + endforeach() +endif() + +# GCC's -include finds the previous .gch while rebuilding that same output. +# ccache then hashes its own output as an input and rejects every regeneration. +# Ninja has already selected this compile, so discard only its stale PCH output. +if(createsPch AND pchOutput MATCHES "\\.gch$") + file(REMOVE "${pchOutput}") +endif() + +string(APPEND cacheCommand " RESULT_VARIABLE cacheStatus)") +cmake_language(EVAL CODE "${cacheCommand}") +if(NOT cacheStatus STREQUAL "0") + message(FATAL_ERROR "Compiler cache command failed (${cacheStatus}).") +endif() diff --git a/mono.build/MonoLibrary.cmake b/mono.build/MonoLibrary.cmake index 779a2c61a..edf65250c 100644 --- a/mono.build/MonoLibrary.cmake +++ b/mono.build/MonoLibrary.cmake @@ -132,9 +132,13 @@ function(_mono_add_shaders name target defines) foreach(shader IN LISTS sources) get_filename_component(shader_name "${shader}" NAME) set(spv "${stage}/${shader_name}.spv") + get_source_file_property(shader_options "${shader}" MONO_GLSLC_OPTIONS) + if(shader_options STREQUAL "NOTFOUND") + set(shader_options "") + endif() add_custom_command( OUTPUT "${spv}" - COMMAND ${MONO_GLSLC} ${define_flags} -I "${source_dir}" "${shader}" -o "${spv}" + COMMAND ${MONO_GLSLC} ${define_flags} ${shader_options} -I "${source_dir}" "${shader}" -o "${spv}" # The compiler is a dependency, not just a command. Without it a # shaderc bump leaves every .spv on disk stale, and the mismatch # surfaces as a pipeline that fails to create. The `.glsl` fragments diff --git a/mono.build/MonoLinker.cmake b/mono.build/MonoLinker.cmake new file mode 100644 index 000000000..c7018f524 --- /dev/null +++ b/mono.build/MonoLinker.cmake @@ -0,0 +1,79 @@ +# Native Linux links can use LLD without changing the compiler or object files. +include_guard(GLOBAL) + +set(MONO_LINKER "auto" CACHE STRING "First-party linker: auto, system or lld") +set_property(CACHE MONO_LINKER PROPERTY STRINGS auto system lld) +set(MONO_LINK_JOBS "2" CACHE STRING "Maximum concurrent first-party Ninja links") + +if(NOT MONO_LINKER MATCHES "^(auto|system|lld)$") + message(FATAL_ERROR "MONO_LINKER is '${MONO_LINKER}'. It is auto, system or lld.") +endif() +if(NOT MONO_LINK_JOBS MATCHES "^[1-9][0-9]*$") + message(FATAL_ERROR "MONO_LINK_JOBS must be a positive integer.") +endif() + +# LLD used 6.4 GB for the dev Studio test link. Bound simultaneous links even +# though each link has its own workers; callers can supply their own pool. +if(CMAKE_GENERATOR MATCHES "Ninja" AND NOT DEFINED CMAKE_JOB_POOL_LINK) + # Setting the property hides CMAKE_JOB_POOLS, including caller compile pools. + get_property(hasJobPools GLOBAL PROPERTY JOB_POOLS SET) + if(NOT hasJobPools AND DEFINED CMAKE_JOB_POOLS) + set_property(GLOBAL PROPERTY JOB_POOLS "${CMAKE_JOB_POOLS}") + endif() + set_property(GLOBAL APPEND PROPERTY JOB_POOLS mono_link=${MONO_LINK_JOBS}) + set(CMAKE_JOB_POOL_LINK mono_link) +endif() + +if(MONO_LINKER STREQUAL "system") + message(STATUS "first-party linker: system") + return() +endif() + +# Keep platform and cross toolchain choices intact until they are measured. +if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_CROSSCOMPILING OR + NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if(MONO_LINKER STREQUAL "lld") + message(FATAL_ERROR "MONO_LINKER=lld requires a native GCC/Linux build.") + endif() + message(STATUS "first-party linker: system (auto supports native GCC/Linux)") + return() +endif() + +# Ubuntu can install only a versioned PATH entry (ld.lld-21). GCC needs the +# unversioned ld.lld beside the actual LLVM tools, found here without pinning a version. +file(GLOB llvmLinkers "/usr/lib/llvm-*/bin/ld.lld") +list(SORT llvmLinkers COMPARE NATURAL ORDER DESCENDING) +set(llvmDirectories "") +foreach(linker IN LISTS llvmLinkers) + get_filename_component(linkerDirectory "${linker}" DIRECTORY) + list(APPEND llvmDirectories "${linkerDirectory}") +endforeach() +find_program(MONO_LLD NAMES ld.lld HINTS ${llvmDirectories} + NO_CACHE DOC "LLVM ELF linker used by MONO_LINKER") + +if(MONO_LLD AND EXISTS "${MONO_LLD}") + get_filename_component(linkerDirectory "${MONO_LLD}" DIRECTORY) + file(TIMESTAMP "${MONO_LLD}" linkerTimestamp UTC) + # -B is a link-only driver option. Applying it during compilation would also + # change GCC's header and assembler search paths. + # Keep hot, unlikely and startup sections grouped rather than interleaved by object. + set(lldOptions + "-B${linkerDirectory}" -fuse-ld=lld "LINKER:--threads=4" "LINKER:-z,keep-text-section-prefix" + ) + include(CheckLinkerFlag) + # Recheck when the selected linker, compiler version or options change. + string(SHA256 linkerCheck "${CMAKE_CXX_COMPILER};${CMAKE_CXX_COMPILER_VERSION};${linkerTimestamp};${lldOptions}") + check_linker_flag(CXX "${lldOptions}" MONO_LLD_SUPPORTED_${linkerCheck}) + if(MONO_LLD_SUPPORTED_${linkerCheck}) + # Four workers kept the dev Studio test link at 1.74 s versus BFD's 9.70 s, + # with 5.54 CPU-seconds versus unbounded LLD's 11.09 on this 24-thread host. + add_link_options(${lldOptions}) + message(STATUS "first-party linker: ${MONO_LLD} (4 threads)") + return() + endif() +endif() + +if(MONO_LINKER STREQUAL "lld") + message(FATAL_ERROR "MONO_LINKER=lld requested, but no working LLD was found. Set MONO_LLD to ld.lld.") +endif() +message(STATUS "first-party linker: system (LLD unavailable)") diff --git a/mono.build/MonoVendor.cmake b/mono.build/MonoVendor.cmake index a9e91a14e..abd9caaea 100644 --- a/mono.build/MonoVendor.cmake +++ b/mono.build/MonoVendor.cmake @@ -214,26 +214,39 @@ if(MONO_BUILD_CLIENT) message(FATAL_ERROR "mono.vendor/accesskit-c is missing. Run `just setup`.") endif() find_program(MONO_CARGO cargo REQUIRED) + set(MONO_ACCESSKIT_RUST_TARGET "" CACHE STRING + "Rust target triple for AccessKit C (empty for the host target)") set(MONO_ACCESSKIT_TARGET "${CMAKE_BINARY_DIR}/vendor/accesskit-c") + set(MONO_ACCESSKIT_ARTIFACT_DIR "${MONO_ACCESSKIT_TARGET}") + set(MONO_ACCESSKIT_CARGO_ENV "CARGO_TARGET_DIR=${MONO_ACCESSKIT_TARGET}") + set(MONO_ACCESSKIT_TARGET_FLAG) + if(MONO_ACCESSKIT_RUST_TARGET) + set(MONO_ACCESSKIT_ARTIFACT_DIR "${MONO_ACCESSKIT_TARGET}/${MONO_ACCESSKIT_RUST_TARGET}") + set(MONO_ACCESSKIT_TARGET_FLAG --target "${MONO_ACCESSKIT_RUST_TARGET}") + string(TOUPPER "${MONO_ACCESSKIT_RUST_TARGET}" MONO_ACCESSKIT_TARGET_ENV) + string(REGEX REPLACE "[^A-Z0-9]" "_" MONO_ACCESSKIT_TARGET_ENV "${MONO_ACCESSKIT_TARGET_ENV}") + list(APPEND MONO_ACCESSKIT_CARGO_ENV + "CARGO_TARGET_${MONO_ACCESSKIT_TARGET_ENV}_LINKER=${CMAKE_C_COMPILER}") + endif() set(MONO_ACCESSKIT_PROFILE debug) set(MONO_ACCESSKIT_RELEASE_FLAG) if(MONO_OPTIMISE) set(MONO_ACCESSKIT_PROFILE release) set(MONO_ACCESSKIT_RELEASE_FLAG --release) endif() - if(WIN32) + if(MSVC) set(MONO_ACCESSKIT_LIBRARY_NAME accesskit.lib) else() set(MONO_ACCESSKIT_LIBRARY_NAME libaccesskit.a) endif() - set(MONO_ACCESSKIT_LIBRARY "${MONO_ACCESSKIT_TARGET}/${MONO_ACCESSKIT_PROFILE}/${MONO_ACCESSKIT_LIBRARY_NAME}") + set(MONO_ACCESSKIT_LIBRARY "${MONO_ACCESSKIT_ARTIFACT_DIR}/${MONO_ACCESSKIT_PROFILE}/${MONO_ACCESSKIT_LIBRARY_NAME}") file(GLOB_RECURSE MONO_ACCESSKIT_SOURCES CONFIGURE_DEPENDS "${MONO_VENDOR}/accesskit-c/src/*.rs" "${MONO_VENDOR}/accesskit-c/build.rs") add_custom_command( OUTPUT "${MONO_ACCESSKIT_LIBRARY}" - COMMAND ${CMAKE_COMMAND} -E env "CARGO_TARGET_DIR=${MONO_ACCESSKIT_TARGET}" - ${MONO_CARGO} build --locked ${MONO_ACCESSKIT_RELEASE_FLAG} + COMMAND ${CMAKE_COMMAND} -E env ${MONO_ACCESSKIT_CARGO_ENV} + ${MONO_CARGO} build --locked ${MONO_ACCESSKIT_RELEASE_FLAG} ${MONO_ACCESSKIT_TARGET_FLAG} --manifest-path "${MONO_VENDOR}/accesskit-c/Cargo.toml" DEPENDS "${MONO_VENDOR}/accesskit-c/Cargo.toml" "${MONO_VENDOR}/accesskit-c/Cargo.lock" ${MONO_ACCESSKIT_SOURCES} WORKING_DIRECTORY "${MONO_VENDOR}/accesskit-c" @@ -247,6 +260,19 @@ if(MONO_BUILD_CLIENT) if(UNIX AND NOT APPLE) target_link_libraries(vendor_accesskit_c_static INTERFACE Threads::Threads ${CMAKE_DL_LIBS} m) endif() + if(APPLE) + # Rust's --print=native-static-libs reports these; the compiler supplies c, System and m. + find_library(MONO_ACCESSKIT_APPKIT AppKit REQUIRED) + find_library(MONO_ACCESSKIT_FOUNDATION Foundation REQUIRED) + find_library(MONO_ACCESSKIT_OBJC objc REQUIRED) + target_link_libraries(vendor_accesskit_c_static INTERFACE + ${MONO_ACCESSKIT_APPKIT} ${MONO_ACCESSKIT_FOUNDATION} ${MONO_ACCESSKIT_OBJC}) + endif() + if(WIN32) + # Rust's --print=native-static-libs reports this order for the pinned crate. + target_link_libraries(vendor_accesskit_c_static INTERFACE + kernel32 ntdll userenv ws2_32 dbghelp) + endif() add_library(Vendor::accesskit-c ALIAS vendor_accesskit_c_static) mono_vendor_system(vendor_accesskit_c_static) endif() diff --git a/mono.build/Toolchain-mingw64.cmake b/mono.build/Toolchain-mingw64.cmake index 1f812c1a6..e261a5e88 100644 --- a/mono.build/Toolchain-mingw64.cmake +++ b/mono.build/Toolchain-mingw64.cmake @@ -24,6 +24,7 @@ # --- What it needs -------------------------------------------------------- # # Debian and Ubuntu: apt install mingw-w64 wine +# Rust: rustup target add x86_64-pc-windows-gnu # # **A native `glslc`, passed in as `MONO_GLSLC`.** The vendored shaderc is built # for the target, so a cross build produces a `glslc.exe` that cannot run on the @@ -35,17 +36,16 @@ # # --- Why wine is in here -------------------------------------------------- # -# `shadercross` is the second build-time tool, and unlike glslc it is ours: the -# shader rules run it on every `.spv` to write the `.msl` beside it. It has no -# equivalent of `MONO_VENDORED_GLSLC` because it has never had a reason to be -# anything but the one just built. +# `shadercross` and `assetc` are Windows build-time tools. Shader rules use the +# first to write `.msl` beside each `.spv`; example staging uses the second to +# bake packaged assets. # # `CMAKE_CROSSCOMPILING_EMULATOR` is the answer CMake provides, and it fits # because of how those rules are spelled: CMake prepends the emulator to an # `add_custom_command` COMMAND that names an executable *target*, which -# `COMMAND shadercross` is. Note that it would not fit glslc even if that were -# built here - `MONO_GLSLC` holds `$`, a generator -# expression rather than a target name, and CMake leaves those alone. +# `COMMAND shadercross` and `COMMAND assetc` do. It would not fit glslc even if +# that were built here: `MONO_GLSLC` holds `$`, a +# generator expression rather than a target name, and CMake leaves those alone. set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_PROCESSOR x86_64) @@ -61,6 +61,8 @@ set(CMAKE_CXX_COMPILER ${prefix}-g++-posix) set(CMAKE_RC_COMPILER ${prefix}-windres) set(CMAKE_AR ${prefix}-ar) set(CMAKE_RANLIB ${prefix}-ranlib) +set(MONO_ACCESSKIT_RUST_TARGET x86_64-pc-windows-gnu CACHE STRING + "Rust target triple for AccessKit C") # Libraries and headers come from the target sysroot; programs come from the # host, because the programs CMake looks for are the ones it intends to run. @@ -82,7 +84,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_EXE_LINKER_FLAGS_INIT "-static") set(CMAKE_SHARED_LINKER_FLAGS_INIT "-static-libgcc -static-libstdc++") -# See the header. Only `shadercross` goes through this. +# See the header. `shadercross` and `assetc` go through this. find_program(MONO_WINE wine REQUIRED DOC "Runs the Windows build-time tools during a cross build") set(CMAKE_CROSSCOMPILING_EMULATOR "${MONO_WINE}") diff --git a/mono.build/tests/CompilerCache.cmake b/mono.build/tests/CompilerCache.cmake new file mode 100644 index 000000000..2e9bdb303 --- /dev/null +++ b/mono.build/tests/CompilerCache.cmake @@ -0,0 +1,129 @@ +# Exercise GCC PCH regeneration through the real launcher and an isolated cache. +if(DEFINED MONO_CACHE_ARGUMENT_PROBE) + file(WRITE "${MONO_CACHE_ARGUMENT_PROBE}" "") + set(recording FALSE) + math(EXPR lastArgument "${CMAKE_ARGC} - 1") + foreach(index RANGE 0 ${lastArgument}) + set(argument "${CMAKE_ARGV${index}}") + if(recording) + string(LENGTH "${argument}" length) + file(APPEND "${MONO_CACHE_ARGUMENT_PROBE}" "${length}:${argument}\n") + elseif(argument STREQUAL "--") + set(recording TRUE) + endif() + endforeach() + return() +endif() + +if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + message(STATUS "compiler-cache-check: GCC/Linux fixture skipped on this platform") + return() +endif() +find_program(cache NAMES ccache) +find_program(compiler NAMES g++) +if(NOT cache OR NOT compiler) + message(STATUS "compiler-cache-check: fixture skipped (requires ccache and g++)") + return() +endif() +if(NOT DEFINED MONO_TEST_ROOT) + message(FATAL_ERROR "Set MONO_TEST_ROOT to a directory under the selected build tree") +endif() + +get_filename_component(sourceRoot "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) +get_filename_component(testRoot "${MONO_TEST_ROOT}/compiler-cache-test" ABSOLUTE) +file(MAKE_DIRECTORY "${testRoot}/path with spaces") + +# The launcher must retain argument boundaries before it can be trusted with flags. +execute_process( + COMMAND "${CMAKE_COMMAND}" -P "${sourceRoot}/mono.build/CompilerCache.cmake" + "${CMAKE_COMMAND}" "${sourceRoot}" -- + "-DMONO_CACHE_ARGUMENT_PROBE=${testRoot}/arguments.txt" + -P "${CMAKE_CURRENT_LIST_FILE}" -- + "one\\" "two" "[first" "second]" "a;b" "a\"b" "\${literal}" "" + RESULT_VARIABLE argumentStatus) +file(READ "${testRoot}/arguments.txt" arguments) +set(expectedArguments "4:one\\\n3:two\n6:[first\n7:second]\n3:a;b\n3:a\"b\n10:\${literal}\n0:\n") +if(NOT argumentStatus STREQUAL "0" OR NOT arguments STREQUAL expectedArguments) + message(FATAL_ERROR "Launcher changed arguments:\n${arguments}") +endif() + +set(ENV{CCACHE_DIR} "${testRoot}/cache") +set(ENV{CCACHE_STATSLOG} "${testRoot}/stats.log") +file(REMOVE "$ENV{CCACHE_STATSLOG}") +set(header "${testRoot}/path with spaces/Probe.hpp") +set(pch "${header}.gch") +set(source "${testRoot}/Probe.cpp") +set(pchSource "${testRoot}/Probe.hpp.cpp") +file(WRITE "${header}" "#include \n") +file(WRITE "${source}" "int Count() { return std::vector{1, 2, 3}.size(); }\n") +file(WRITE "${pchSource}" "/* Headers are supplied with -include. */\n") +# Input mtimes must precede the first ccache invocation, even on coarse filesystems. +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) +set(probeStandard "c++20") + +function(compile_probe output compileSource) + execute_process( + COMMAND "${CMAKE_COMMAND}" -P "${sourceRoot}/mono.build/CompilerCache.cmake" + "${cache}" "${sourceRoot}" -- "${compiler}" "-std=${probeStandard}" ${ARGN} + -MD -MF "${testRoot}/Probe.d" -o "${output}" -c "${compileSource}" + RESULT_VARIABLE result + OUTPUT_VARIABLE standardOutput ERROR_VARIABLE standardError) + if(NOT result STREQUAL "0") + message(FATAL_ERROR "Probe compile failed: ${standardOutput}${standardError}") + endif() +endfunction() + +compile_probe("${pch}" "${pchSource}" -x c++-header -include "${header}") +compile_probe("${testRoot}/Probe.o" "${source}" -include "${header}") +file(SHA256 "${pch}" firstPch) +# The old output still exists here, reproducing a normal Ninja regeneration. +file(REMOVE "${testRoot}/Probe.o") +compile_probe("${pch}" "${pchSource}" -x c++-header -include "${header}") +file(SHA256 "${pch}" restoredPch) +compile_probe("${testRoot}/Probe.o" "${source}" -include "${header}") +if(NOT firstPch STREQUAL restoredPch) + message(FATAL_ERROR "PCH regeneration changed bytes instead of restoring the cached PCH") +endif() +file(READ "$ENV{CCACHE_STATSLOG}" stats) +string(REGEX MATCHALL "\ndirect_cache_hit\n" hits "${stats}") +list(LENGTH hits hitCount) +if(hitCount LESS 2 OR stats MATCHES "modified_input_file") + message(FATAL_ERROR "Expected direct hits for PCH and consumer regeneration:\n${stats}") +endif() + +# SDL generates a C PCH through the same launcher. +find_program(cCompiler NAMES gcc REQUIRED) +set(compiler "${cCompiler}") +set(probeStandard "c17") +set(header "${testRoot}/path with spaces/Probe.h") +set(pch "${header}.gch") +set(source "${testRoot}/Probe.c") +set(pchSource "${testRoot}/Probe.h.c") +file(WRITE "${header}" "#include \n") +file(WRITE "${source}" "uint32_t Count(void) { return 3; }\n") +file(WRITE "${pchSource}" "/* Headers are supplied with -include. */\n") +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) +compile_probe("${pch}" "${pchSource}" -x c-header -include "${header}") +compile_probe("${testRoot}/ProbeC.o" "${source}" -include "${header}") +file(SHA256 "${pch}" firstPch) +compile_probe("${pch}" "${pchSource}" -x c-header -include "${header}") +file(SHA256 "${pch}" restoredPch) +compile_probe("${testRoot}/ProbeC.o" "${source}" -include "${header}") +file(READ "$ENV{CCACHE_STATSLOG}" stats) +string(REGEX MATCHALL "\ndirect_cache_hit\n" hits "${stats}") +list(LENGTH hits hitCount) +if(NOT firstPch STREQUAL restoredPch OR hitCount LESS 4 OR stats MATCHES "modified_input_file") + message(FATAL_ERROR "Expected unchanged C PCH and direct hits for both languages:\n${stats}") +endif() + +# A warm cache must still notice edits and refuse invalid source. +file(WRITE "${source}" "#error intentional compiler-cache-check failure\n") +execute_process( + COMMAND "${CMAKE_COMMAND}" -P "${sourceRoot}/mono.build/CompilerCache.cmake" + "${cache}" "${sourceRoot}" -- "${compiler}" -include "${header}" + -MD -MF "${testRoot}/Probe.d" -o "${testRoot}/Probe.o" -c "${source}" + RESULT_VARIABLE failure OUTPUT_VARIABLE standardOutput ERROR_VARIABLE standardError) +if(failure STREQUAL "0" OR NOT standardError MATCHES "intentional compiler-cache-check failure") + message(FATAL_ERROR "Launcher hid a compilation failure: ${standardOutput}${standardError}") +endif() +message(STATUS "compiler-cache-check: argument boundaries, C/C++ PCH hits, unchanged bytes and errors verified") diff --git a/mono.build/tests/Linker.cmake b/mono.build/tests/Linker.cmake new file mode 100644 index 000000000..6792f1147 --- /dev/null +++ b/mono.build/tests/Linker.cmake @@ -0,0 +1,140 @@ +# Configure and link a real executable through each linker-selection path. +if(NOT DEFINED MONO_TEST_ROOT) + message(FATAL_ERROR "Set MONO_TEST_ROOT to a directory under the selected build tree") +endif() +get_filename_component(sourceRoot "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) +get_filename_component(testRoot "${MONO_TEST_ROOT}/linker-test" ABSOLUTE) +set(fixture "${testRoot}/source with spaces") +file(MAKE_DIRECTORY "${fixture}") +file(WRITE "${fixture}/main.cpp" [=[ +#if defined(__GNUC__) && defined(__ELF__) +#define PROBE_SECTION(name) __attribute__((section(name), noinline)) +#else +#define PROBE_SECTION(name) +#endif + +PROBE_SECTION(".text.hot.probe") int Hot() { return 1; } +PROBE_SECTION(".text.unlikely.probe") int Unlikely() { return 2; } +PROBE_SECTION(".text.startup.probe") int Startup() { return 3; } + +int main() { + return Hot() + Unlikely() + Startup() == 6 ? 0 : 1; +} +]=]) +file(WRITE "${fixture}/CMakeLists.txt" [=[ +cmake_minimum_required(VERSION 3.24) +project(LinkerProbe LANGUAGES CXX) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +if(PROBE_CROSS) + set(CMAKE_CROSSCOMPILING TRUE) +endif() +if(PROBE_CUSTOM_POOL) + set_property(GLOBAL PROPERTY JOB_POOLS custom_link=1) + set(CMAKE_JOB_POOL_LINK custom_link) +endif() +if(PROBE_VARIABLE_POOL) + set(CMAKE_JOB_POOLS caller_compile=1) + set(CMAKE_JOB_POOL_COMPILE caller_compile) +endif() +include("${MONO_SOURCE_ROOT}/mono.build/MonoLinker.cmake") +add_executable(probe main.cpp) +get_target_property(linkPool probe JOB_POOL_LINK) +file(WRITE "${CMAKE_BINARY_DIR}/link-pool.txt" "${linkPool}") +]=]) + +function(configure_probe name expectedStatus) + set(probeBuild "${testRoot}/${name}") + execute_process(COMMAND "${CMAKE_COMMAND}" -S "${fixture}" -B "${probeBuild}" -G Ninja + "-DMONO_SOURCE_ROOT=${sourceRoot}" ${ARGN} + RESULT_VARIABLE configureStatus OUTPUT_VARIABLE output ERROR_VARIABLE error) + if(expectedStatus STREQUAL "pass") + if(NOT configureStatus STREQUAL "0") + message(FATAL_ERROR "${name} configure failed:\n${output}${error}") + endif() + else() + if(configureStatus STREQUAL "0" OR NOT "${output}${error}" MATCHES "${expectedStatus}") + message(FATAL_ERROR "${name}: expected ${expectedStatus}, got ${configureStatus}:\n${output}${error}") + endif() + return() + endif() + + execute_process(COMMAND "${CMAKE_COMMAND}" --build "${probeBuild}" + RESULT_VARIABLE buildStatus OUTPUT_VARIABLE output ERROR_VARIABLE error) + if(NOT buildStatus STREQUAL "0") + message(FATAL_ERROR "${name} link failed:\n${output}${error}") + endif() + if(NOT CMAKE_HOST_WIN32) + execute_process(COMMAND "${probeBuild}/probe" RESULT_VARIABLE runStatus) + if(NOT runStatus STREQUAL "0") + message(FATAL_ERROR "${name} executable failed: ${runStatus}") + endif() + endif() + file(READ "${probeBuild}/compile_commands.json" compileCommands) + if(compileCommands MATCHES "-fuse-ld=|-B[^ ]*llvm|--threads=|keep-text-section-prefix") + message(FATAL_ERROR "Linker options leaked into compilation:\n${compileCommands}") + endif() +endfunction() + +function(check_lld_sections name) + set(probeBuild "${testRoot}/${name}") + file(READ "${probeBuild}/build.ninja" linkCommands) + if(NOT linkCommands MATCHES "keep-text-section-prefix") + message(FATAL_ERROR "${name} link command omitted keep-text-section-prefix") + endif() + + find_program(probeReadelf NAMES llvm-readelf readelf) + if(probeReadelf) + execute_process(COMMAND "${probeReadelf}" -SW "${probeBuild}/probe" + RESULT_VARIABLE inspectStatus OUTPUT_VARIABLE sections ERROR_VARIABLE error) + elseif(CMAKE_OBJDUMP) + execute_process(COMMAND "${CMAKE_OBJDUMP}" -h "${probeBuild}/probe" + RESULT_VARIABLE inspectStatus OUTPUT_VARIABLE sections ERROR_VARIABLE error) + else() + message(FATAL_ERROR "No readelf or CMAKE_OBJDUMP is available to inspect the LLD probe") + endif() + if(NOT inspectStatus STREQUAL "0") + message(FATAL_ERROR "${name} section inspection failed:\n${error}") + endif() + foreach(section IN ITEMS hot unlikely startup) + if(NOT sections MATCHES "\\.text\\.${section}[ \t]") + message(FATAL_ERROR "${name} executable lacks .text.${section}:\n${sections}") + endif() + endforeach() +endfunction() + +configure_probe(system pass -DMONO_LINKER=system) +file(READ "${testRoot}/system/link-pool.txt" linkPool) +if(NOT linkPool STREQUAL "mono_link") + message(FATAL_ERROR "First-party links did not join their bounded pool: ${linkPool}") +endif() +configure_probe(custom-pool pass -DMONO_LINKER=system -DPROBE_CUSTOM_POOL=ON) +file(READ "${testRoot}/custom-pool/link-pool.txt" linkPool) +if(NOT linkPool STREQUAL "custom_link") + message(FATAL_ERROR "Caller-supplied link pool was replaced: ${linkPool}") +endif() +configure_probe(variable-pool pass -DMONO_LINKER=system -DPROBE_VARIABLE_POOL=ON) +configure_probe(auto-missing pass -DMONO_LINKER=auto "-DMONO_LLD=${testRoot}/missing/ld.lld") +configure_probe(invalid-mode "MONO_LINKER is" -DMONO_LINKER=invalid) +configure_probe(invalid-jobs "MONO_LINK_JOBS must" -DMONO_LINK_JOBS=0) +configure_probe(lld-missing "MONO_LINKER=lld" -DMONO_LINKER=lld "-DMONO_LLD=${testRoot}/missing/ld.lld") +configure_probe(cross-auto pass -DMONO_LINKER=auto -DPROBE_CROSS=ON) +configure_probe(cross-lld "requires a native GCC/Linux build" -DMONO_LINKER=lld -DPROBE_CROSS=ON) + +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(brokenLinker "${testRoot}/broken linker/ld.lld") + file(WRITE "${brokenLinker}" "#!/bin/sh\nexit 1\n") + file(CHMOD "${brokenLinker}" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) + configure_probe(auto-broken pass -DMONO_LINKER=auto "-DMONO_LLD=${brokenLinker}") + configure_probe(lld-broken "MONO_LINKER=lld" -DMONO_LINKER=lld "-DMONO_LLD=${brokenLinker}") +endif() + +configure_probe(auto pass -DMONO_LINKER=auto) +file(READ "${testRoot}/auto/build.ninja" autoBuild) +if(autoBuild MATCHES "-fuse-ld=lld") + check_lld_sections(auto) + configure_probe(lld pass -DMONO_LINKER=lld) + check_lld_sections(lld) +else() + message(STATUS "linker-check: real LLD path skipped (not available on this host/compiler)") +endif() +message(STATUS "linker-check: system, auto, explicit LLD, fallback, pools and compile flags verified") diff --git a/mono.cdn/tests/fixtures/McpContract.json b/mono.cdn/tests/fixtures/McpContract.json index 078ba1d5e..0308b2269 100644 --- a/mono.cdn/tests/fixtures/McpContract.json +++ b/mono.cdn/tests/fixtures/McpContract.json @@ -519,6 +519,12 @@ "name": "AGENTS.md (engine/gui)", "uri": "atomic://agents/engine/gui" }, + "atomic://agents/engine/imagegraph": { + "description": "The invariants specific to engine/imagegraph. AGENTS.md rule: read this before changing anything in it.", + "mimeType": "text/markdown", + "name": "AGENTS.md (engine/imagegraph)", + "uri": "atomic://agents/engine/imagegraph" + }, "atomic://agents/engine/input": { "description": "The invariants specific to engine/input. AGENTS.md rule: read this before changing anything in it.", "mimeType": "text/markdown", @@ -609,6 +615,12 @@ "name": "AGENTS.md (engine/ui)", "uri": "atomic://agents/engine/ui" }, + "atomic://agents/engine/weather": { + "description": "The invariants specific to engine/weather. AGENTS.md rule: read this before changing anything in it.", + "mimeType": "text/markdown", + "name": "AGENTS.md (engine/weather)", + "uri": "atomic://agents/engine/weather" + }, "atomic://agents/engine/world": { "description": "The invariants specific to engine/world. AGENTS.md rule: read this before changing anything in it.", "mimeType": "text/markdown", diff --git a/mono.client/CMakeLists.txt b/mono.client/CMakeLists.txt index fb694a204..81347e270 100644 --- a/mono.client/CMakeLists.txt +++ b/mono.client/CMakeLists.txt @@ -34,6 +34,7 @@ mono_add_library(client # the render node kinds. Undeclared until v0.19, arriving through # `Engine::render`. Engine::graph + Engine::imagegraph Engine::render @@ -49,6 +50,7 @@ mono_add_library(client # `render::ParticleBatch`es - see `client/Scene.hpp`, which explains why # that conversion is here rather than in `effects`. Engine::effects + Engine::weather # L8, `shared`. Named because `client/src/Scene.cpp` includes # `physics/Characters.hpp` and `physics/Query.hpp` and calls diff --git a/mono.client/app/main.cpp b/mono.client/app/main.cpp index b168458a1..543a9c4f7 100644 --- a/mono.client/app/main.cpp +++ b/mono.client/app/main.cpp @@ -73,7 +73,8 @@ int main(int argc, char **argv) { arguments.Flag("stats", "Open the F3 statistics panel at startup"); arguments.Flag("net", "Open the F4 network panel at startup (needs --connect)"); arguments.Flag("graph", "Open the F5 frame graph at startup"); - arguments.Flag("uncapped", "Present without waiting for vblank"); + arguments.Flag("uncapped", "Present without waiting for vblank (default); overrides configured VSync"); + arguments.Flag("vsync", "Wait for vblank instead of uncapped presentation; ignores --max-fps"); arguments.Value("frames-in-flight", "N", "Frames the CPU may queue ahead of the GPU: 1 (default) to 3"); arguments.Value( "texture-budget-mib", @@ -90,7 +91,7 @@ int main(int argc, char **argv) { "presentation-world", "NAME", "Serve one game world's portal images on an inherited driver link" ); arguments.Value("presentation-session", "N", "Fresh driver-assigned session for the presentation host"); - arguments.Value("max-fps", "N", "Cap presentation FPS. Needs --uncapped; 0 presents every update"); + arguments.Value("max-fps", "N", "Cap presentation FPS (default 0, no cap). Ignored with --vsync"); arguments.Flag("verbose", "Log at trace level"); // Value-taking and absent by default. The conventional number remains in // one constant, while any valid port supplied here is used as written. @@ -222,6 +223,10 @@ int main(int argc, char **argv) { std::fputs(arguments.Describe().c_str(), stdout); return 0; } + if (arguments.Has("uncapped") && arguments.Has("vsync")) { + std::fputs("--uncapped and --vsync cannot be combined.\n", stderr); + return 2; + } // **`--verbose` before the settings, so it reaches the settings' own // complaints.** It is the one option that has to act before anything can be @@ -294,13 +299,12 @@ int main(int argc, char **argv) { options.SurfaceBounces = static_cast(arguments.GetInteger("surface-bounces", options.SurfaceBounces)); - // **`|=` rather than `=`, because these four are bare flags.** An absent - // `--stats` is silence and not "off", so assigning would make a command line - // with no panel flags on it overrule a config file that asked for one. + // An absent panel flag preserves a config file that asked for the panel. options.ShowStatistics = options.ShowStatistics || arguments.Has("stats"); options.ShowNetwork = options.ShowNetwork || arguments.Has("net"); options.ShowFrameGraph = options.ShowFrameGraph || arguments.Has("graph"); - options.Uncapped = options.Uncapped || arguments.Has("uncapped"); + if (arguments.Has("uncapped")) options.Uncapped = true; + if (arguments.Has("vsync")) options.Uncapped = false; options.FramesInFlight = static_cast(arguments.GetInteger("frames-in-flight", options.FramesInFlight)); if (arguments.Has("texture-budget-mib")) { diff --git a/mono.client/benchmarks/Frame.cpp b/mono.client/benchmarks/Frame.cpp index 2bae5989c..d0b933db4 100644 --- a/mono.client/benchmarks/Frame.cpp +++ b/mono.client/benchmarks/Frame.cpp @@ -48,13 +48,17 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include @@ -139,6 +143,68 @@ namespace frame_bench { return built.back(); } + // Ten furnished worlds with no drawable instances model an idle editor. + // Nonvisual descendants expose service lookup cost separately from drawing. + struct IdlePresented { + size_t FoldersPerWorld = 0; + std::array Worlds; + }; + + IdlePresented &IdleWorlds(size_t folders) { + static std::vector> built; + for (const auto &held : built) + if (held->FoldersPerWorld == folders) return *held; + + engine::scene::RegisterSceneClasses(); + auto made = std::make_unique(); + made->FoldersPerWorld = folders; + const auto folderClass = engine::ecs::Classes::Find(engine::core::Name("Folder")); + for (Presented &world : made->Worlds) { + world.World = std::make_unique("client.bench.frame.idle"); + world.Systems = std::make_unique(); + engine::scene::InstallServices(*world.World); + const Entity workspace = engine::scene::WorkspaceOf(*world.World); + for (size_t index = 0; index < folders; ++index) { + const Entity folder = world.World->CreateInstance(folderClass); + if (!world.World->SetParent(folder, workspace)) + throw std::runtime_error("idle benchmark folder could not be parented"); + } + client::InstallPresentation(*world.World, *world.Systems, 1); + (void)client::WantedContentRevision(*world.World); + world.Systems->RunPhases(*world.World, Phase::PreRender, Phase::PreRender); + if (engine::scene::SyncRendered(*world.World) != 0) + throw std::runtime_error("idle benchmark unexpectedly contains drawable instances"); + const auto *draw = world.World->Resource(); + if (draw == nullptr || !draw->Instances.empty()) + throw std::runtime_error("idle benchmark unexpectedly produced draw geometry"); + } + built.push_back(std::move(made)); + return *built.back(); + } + + void IdleDemand(size_t folders) { + IdlePresented &scene = IdleWorlds(folders); + for (size_t iteration = 0; iteration < 1000; ++iteration) + for (Presented &world : scene.Worlds) + Consume(client::WantedContentRevision(*world.World)); + } + + void IdleVisibility(size_t folders) { + IdlePresented &scene = IdleWorlds(folders); + for (size_t iteration = 0; iteration < 1000; ++iteration) + for (Presented &world : scene.Worlds) + Consume(engine::scene::SyncRendered(*world.World)); + } + + void IdlePreRender(size_t folders) { + IdlePresented &scene = IdleWorlds(folders); + for (size_t iteration = 0; iteration < 100; ++iteration) + for (Presented &world : scene.Worlds) { + world.Systems->RunPhases(*world.World, Phase::PreRender, Phase::PreRender); + Consume(world.World->Resource()->Instances.size()); + } + } + // A world whose particles are running, built once per emitter count. // // **Emitters rather than particles, because since v0.17 the device owns the @@ -221,6 +287,30 @@ BENCH("PreRender · 100,000 parts", 1) { Consume(Present(Scene(MEDIUM))); } +BENCH("Idle demand revision · 10 furnished worlds", 1000) { + IdleDemand(0); +} + +BENCH("Idle demand revision · 10 worlds with 1,000 folders each", 1000) { + IdleDemand(1000); +} + +BENCH("Idle visibility sync · 10 furnished worlds", 1000) { + IdleVisibility(0); +} + +BENCH("Idle visibility sync · 10 worlds with 1,000 folders each", 1000) { + IdleVisibility(1000); +} + +BENCH("Idle PreRender · 10 furnished worlds", 100) { + IdlePreRender(0); +} + +BENCH("Idle PreRender · 10 worlds with 1,000 folders each", 100) { + IdlePreRender(1000); +} + // --- what runs beside it ------------------------------------------------------ BENCH("CollectParticleBatches · a world with no emitters", 10'000) { diff --git a/mono.client/docs/FramePacing.md b/mono.client/docs/FramePacing.md new file mode 100644 index 000000000..44473bda2 --- /dev/null +++ b/mono.client/docs/FramePacing.md @@ -0,0 +1,21 @@ +# Client frame pacing + +The client defaults to uncapped presentation and requests immediate mode from +the GPU backend. The fixed simulation rate remains 60 Hz by default and can be +set separately with `--tick-rate`. + +- `--max-fps 144` limits presentation to 144 FPS. Zero removes the cap. +- `--vsync` requests display pacing and ignores the presentation cap. +- `--uncapped` overrides configured VSync. Combining it with `--vsync` is an error. + +Persistent settings are `client.uncapped` (default `true`) and `client.max-fps` +(default `0`). Config files, environment variables and `--flag` establish their +values; explicit `--uncapped`, `--vsync` and `--max-fps` options override them. + +Startup logs report the requested present mode and effective cap. If immediate +mode is unsupported, the renderer warns and retains the supported present mode. +An unchanged image submits no presentation. + +Headless data-factory and inherited presentation hosts keep a 60 FPS service +cadence unless `--max-fps` supplies a nonzero rate. This does not change their +fixed simulation rate. diff --git a/mono.client/include/client/Client.hpp b/mono.client/include/client/Client.hpp index b64697250..57dca33ff 100644 --- a/mono.client/include/client/Client.hpp +++ b/mono.client/include/client/Client.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -63,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -134,6 +136,7 @@ namespace client { // failed. A client that presented a black screen instead would // leave somebody wondering why. bool BuildDemoWorlds(); + void LoadBundledInterfaceFonts(); // Loads an `.agame` or `.aworld` from `--game` and starts its scripts in // both roles. @@ -289,6 +292,7 @@ namespace client { void IndexPackagedAudio(); void LoadPackagedAudio(engine::ecs::Store &store); void PumpContent(ContentSession &content, std::span worlds); + void RefreshImageGraphs(ContentSession &, std::span); // Hands the session's worlds the mesh names its store published. // @@ -503,6 +507,7 @@ namespace client { // the viewer, and `--worlds N` places four *views* rather than four // overlays. engine::render::InterfacePass Interface; + bool BundledFontsAttempted = false; engine::render::ViewportFrames ViewportImages; // Whether the interface pass has been given its image resolver. Set @@ -838,39 +843,40 @@ namespace client { // receipt, asset, pose and capacity fact needed for live presentation. std::shared_ptr Readiness; std::optional EmptyContentDemandRevision; + uint64_t EmptyContentResourceRevision = 0; size_t UndeliverableAssetNames = 0; // Capture-only snapshot of the facts that kept a crossed successor image-only. std::shared_ptr CapturedReadiness; std::shared_ptr CapturedReadinessDecision; - // Capture diagnostics for the destination eye prepared during a handoff. + // Captured IDs and slot state used to explain which portal eye was probed. struct EyeProbe { - // World selected for the eye view. + // World chosen by the successor route. std::string SelectedWorld; - // Authored destination resolved by the eye's camera route. + // World resolved for the eye being captured. std::string EyeWorld; - // Camera key used to look up the retained eye image. + // Key used to address the eye's retained image. std::string ImageKey; - // World bound to the prepared eye view. + // World currently associated with that image slot. std::string BoundWorld; - // Whether the destination eye view was prepared. + // Whether the slot was prepared for capture. bool Prepared = false; - // Viewport slot used for eye image lookup. + // Retained portal image slot. size_t Slot = 0; - // Image handle selected for display, including a composed body when present. + // Image selected when the probe was captured. uint64_t Image = 0; - // Current image handle published for this camera key. + // Image currently published by the slot. uint64_t CurrentImage = 0; - // Imported image handle from the latest accepted capture. + // Image observed when capture was requested. uint64_t CaptureImage = 0; - // Producer world tick of the latest accepted capture. + // World tick associated with the capture. uint64_t CaptureTick = 0; - // Requests submitted for the probed eye view. + // Number of producer submissions observed by the probe. size_t Submitted = 0; - // Whether the resolved producer world id is valid. + // Whether the image producer passed its validity checks. bool ProducerValid = false; - // Retained image handles for the two neighbouring eye views. + // Retained images for the two viewport destinations. std::array ViewportImages{}; - // Authored destinations corresponding to those neighbouring images. + // Destination worlds associated with the viewport images. std::array ViewportDestinations{}; }; std::optional CapturedEyeProbe; @@ -974,6 +980,27 @@ namespace client { std::vector Pending; std::vector Issued; std::unordered_set Asked; + engine::imagegraph::Content GraphContent; + // Reader caches, rebuilt from content-bearing ECS columns when they change. + std::unordered_map> GraphReferences; + // Snapshot used to avoid reapplying unchanged image graph content. + struct AppliedGraph { + // World that owns the graph. + engine::core::Name Owner; + // Graph name within its owner. + engine::core::Name Name; + // Content asset backing the graph. + engine::core::Name Asset; + // Content revision last applied. + uint64_t ContentRevision = 0; + // Input revision last applied. + uint64_t InputRevision = 0; + // Outputs requested from the graph. + std::vector Outputs; + // Whether this graph appeared in the latest scan. + bool Seen = false; + }; + std::unordered_map AppliedGraphs; std::unordered_map ScannedAtRevision; std::vector Wanted; std::vector Owners; @@ -1008,6 +1035,8 @@ namespace client { // inside its own store, so a single stage across two worlds would // collide on both counts. std::unordered_map Stages; + // Thunder bindings remain listener-local and independent of authored sounds. + std::unordered_map WeatherStages; // The busiest frame's counters, for the run's closing line. See where // they are folded for why the *last* frame's would be zero. diff --git a/mono.client/include/client/ContentDemand.hpp b/mono.client/include/client/ContentDemand.hpp index b317c6d26..ff4ed9fd4 100644 --- a/mono.client/include/client/ContentDemand.hpp +++ b/mono.client/include/client/ContentDemand.hpp @@ -59,7 +59,7 @@ namespace client { // A cheap fingerprint of every ECS column that can name content. // // The first call starts the ECS's component-specific change channels. Later - // calls are constant in entity count: a version and row count per component. + // calls read mutation and membership epochs per component, without counting rows. // This is what lets a host avoid rediscovering identical texture names just // because particles advanced or another viewport asked to draw the world. uint64_t WantedContentRevision(engine::ecs::Store &store); diff --git a/mono.client/include/client/DataScriptPackage.hpp b/mono.client/include/client/DataScriptPackage.hpp deleted file mode 100644 index f579db983..000000000 --- a/mono.client/include/client/DataScriptPackage.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -namespace client { - using engine::control::AddDataScriptPackageTool; - using engine::control::DataScriptPackageExecutor; -} diff --git a/mono.client/include/client/DataScriptPackageTransaction.hpp b/mono.client/include/client/DataScriptPackageTransaction.hpp deleted file mode 100644 index d36c0adae..000000000 --- a/mono.client/include/client/DataScriptPackageTransaction.hpp +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include - -namespace client { - using engine::script::DataScriptPackageAdmission; - using engine::script::DataScriptPackageRuntimeFactory; - using engine::script::DataScriptPackageSystems; - using engine::script::DataScriptPackageTransactionDependencies; - using engine::script::DataScriptRuntimeDiscard; - using engine::script::DataScriptRuntimeLookup; - using engine::script::ExecuteDataScriptPackageTransaction; -} diff --git a/mono.client/include/client/Options.hpp b/mono.client/include/client/Options.hpp index 9c9f663da..0e7f664c5 100644 --- a/mono.client/include/client/Options.hpp +++ b/mono.client/include/client/Options.hpp @@ -149,9 +149,9 @@ namespace client { // it. engine::render::ProfilerTab Tab = engine::render::ProfilerTab::Frame; - // Present without waiting for vblank, to measure the frame rather than - // the display. - bool Uncapped = false; + // Present without waiting for vblank by default. MaximumFrameRate may + // limit presentation independently of the fixed simulation rate. + bool Uncapped = true; // How many frames the CPU may queue ahead of the GPU, 1 to 3. // @@ -195,11 +195,13 @@ namespace client { // off the vblank wait lets simulation and entity work continue without // the display pacing them. This number limits only how often prepared // visual state may claim and present a swapchain image. The update loop - // never sleeps for it, and an unchanged image submits nothing. + // continues between presentation deadlines, and an unchanged image + // submits nothing. // // Ignored when the vblank wait is on: the display is already the // limiter, and a second one fighting it produces judder rather than a - // lower number. + // lower number. Headless data-factory and inherited presentation hosts + // use this as their service rate, defaulting to 60 when it is zero. uint32_t MaximumFrameRate = 0; // Seconds to wait for a Tracy profiler to attach before starting. @@ -507,16 +509,16 @@ namespace client { float DuplicateChance = 0.0f; // Probability that a received packet is delayed behind a later packet. float ReorderChance = 0.0f; - // Seed making packet impairment decisions repeatable. + // Seed used to make impairment decisions repeatable. uint32_t Seed = 0; - // Whether any setting changes packet delivery. + // Whether any impairment setting changes packet delivery. bool Active() const { return RoundTripSeconds > 0.0 || JitterSeconds > 0.0 || LossChance > 0.0f || DuplicateChance > 0.0f || ReorderChance > 0.0f; } }; - // Network conditions applied at this client's receive boundary. + // Network conditions applied by the acceptance-run receive path. NetworkImpairment Impairment; }; } diff --git a/mono.client/include/client/Scene.hpp b/mono.client/include/client/Scene.hpp index 216b1aa75..c525113ab 100644 --- a/mono.client/include/client/Scene.hpp +++ b/mono.client/include/client/Scene.hpp @@ -132,21 +132,24 @@ namespace client { std::vector *joints = nullptr ); + // Resolves authored destinations through this product's replica policy. Viewer + // rows precede foreground clone attachment. Refresh caller spans after this + // appends portal claims and removes legacy surfaces; restore animation time + // before rendering the source view. Only explicitly named worlds were presented. + // TopologyOwner follows the same lifetime policy as ResolveCameraPortalWorld. + // True once every demanded portal has a retained image for this viewport. // An explicitly admitted, snapshot-ready replica may replace its remote // producer. Merely discovering or staging a replica does not select it. struct PortalImageWorldSelection { - // World retaining discovered portal topology, with the camera route's lifetime. + // World used to resolve portal topology and authored destinations. engine::world::WorldId TopologyOwner; - // Snapshot-ready destination permitted to replace its remote image producer. + // Destination admitted for presentation after its snapshot is ready. engine::world::WorldId AdmittedDestination; - // Destination whose completed presentation the image producer may reuse. + // Destination actually selected for this viewport. engine::world::WorldId PresentedDestination; }; - // Resolves authored destinations through this product's replica policy. Viewer - // rows precede foreground clone attachment. Refresh caller spans after this - // appends portal claims and removes legacy surfaces; restore animation time - // before rendering the source view. Only explicitly named worlds are presented. - // True once every demanded portal has a retained image for this viewport. + // Updates retained portal images and appends their view claims for one viewport. + // Caller spans must be refreshed after this function changes the portal lists. bool UpdatePortalImages( engine::world::Universe &universe, engine::render::PortalImageHost &images, diff --git a/mono.client/include/client/WeatherSounds.hpp b/mono.client/include/client/WeatherSounds.hpp new file mode 100644 index 000000000..389006a1c --- /dev/null +++ b/mono.client/include/client/WeatherSounds.hpp @@ -0,0 +1,61 @@ +#pragma once + +// Listener-local thunder uses accepted layer clocks and the mixer's sample deadlines. +// Mixer handles remain in this adapter; the ECS owns storm history and arrival queues. + +#include +#include +#include + +#include + +namespace engine::ecs { + class Store; +} + +namespace client { + class SoundCatalogue; + // Prepares copied listener arrivals without opening an audio device. + // Expired waveform arrivals remain consumed. Returns true for an active + // accepted layer with an audible tail or thunder within the sample horizon. + [[nodiscard]] bool WeatherThunderDueSoon( + engine::ecs::Store &store, engine::core::Vector3 listener, double horizonSeconds = 0.25 + ); + // One active or scheduled sound and its accepted copied event identity. + struct WeatherSoundVoice { + // Provider is a local lookup handle, never a serialized event identity. + engine::ecs::Entity Provider; + // Stable event receipt guard and mixer resource binding. + //@{ + engine::weather::StormEvent Event; + engine::audio::NodeId Player; + // Exact first output sample; late arrivals seek into their source waveform. + uint64_t StartSample = 0; + // Exact end of the remaining source tail, excluding any propagation delay. + uint64_t EndSample = 0; + // Retried until terminal commands are accepted, even if the old deadline passes meanwhile. + bool Retiring = false; + //@} + }; + // Mixer ownership for one world. Refused queue writes remain retryable. + struct WeatherSoundStage { + // Bounded resource bindings, retired after their sound has completed. + std::vector Voices; + // Reusable deterministic thunder waveform, generated outside the callback. + engine::audio::SoundRef Thunder; + // Counters report actual accepted starts and queue refusals. + //@{ + uint64_t Starts = 0; + uint64_t Refused = 0; + //@} + // Collects copied events and schedules playback at an exact sample deadline. + void Sync( + engine::ecs::Store &store, + engine::audio::AudioMixer &mixer, + engine::core::Vector3 listener, + SoundCatalogue &catalogue + ); + // Retries terminal mixer removals; returns true once all nodes were retired. + [[nodiscard]] bool Clear(engine::audio::AudioMixer &mixer); + }; +} diff --git a/mono.client/src/Client.cpp b/mono.client/src/Client.cpp index 8d9c376ba..09810c8c2 100644 --- a/mono.client/src/Client.cpp +++ b/mono.client/src/Client.cpp @@ -2,8 +2,11 @@ #include "DataCaptureDriver.hpp" #include "DataFactoryPausedPresentation.hpp" #include "DisplayedSceneView.hpp" +#include "GuiActions.hpp" #include "NamedCaptureView.hpp" #include "PortalReadiness.hpp" +#include "PresentationPacing.hpp" +#include "WorldSystems.hpp" #include #include @@ -53,9 +56,12 @@ #include #include #include +#include #include +#include #include #include +#include #include #include @@ -68,11 +74,7 @@ #include #include #include -#include -#include -#include #include -#include #include #include #include @@ -305,17 +307,10 @@ namespace client { Shutdown(); } - bool Client::Initialise(const Options &options) { - ENGINE_PROFILE("client.initialise"); - Settings = options; - Input.EnablePresentationInput(); - SubmittedMoveTick = 0; - InputLocalEpoch = InputSequenceEpoch = 0; - if (!std::isfinite(Settings.InterfaceScale) || Settings.InterfaceScale <= 0.0f || - !std::isfinite(Settings.TextScale) || Settings.TextScale <= 0.0f) { - ENGINE_ERROR("interface and text scales must be finite and positive"); - return false; - } + void Client::LoadBundledInterfaceFonts() { + if (BundledFontsAttempted) return; + BundledFontsAttempted = true; + engine::gui::FontPackage interfaceFonts; size_t fontPackageBytes = 0; { @@ -343,6 +338,21 @@ namespace client { if (interfaceFonts.Faces().empty()) { ENGINE_WARN("no GUI font package; text shaping uses the fallback path"); } + Interface.SetFontPackage(std::move(interfaceFonts)); + } + + bool Client::Initialise(const Options &options) { + ENGINE_PROFILE("client.initialise"); + BundledFontsAttempted = false; + Settings = options; + Input.EnablePresentationInput(); + SubmittedMoveTick = 0; + InputLocalEpoch = InputSequenceEpoch = 0; + if (!std::isfinite(Settings.InterfaceScale) || Settings.InterfaceScale <= 0.0f || + !std::isfinite(Settings.TextScale) || Settings.TextScale <= 0.0f) { + ENGINE_ERROR("interface and text scales must be finite and positive"); + return false; + } if (!Settings.RenderPipelineFile.empty()) { if (!Settings.GameFile.empty()) { ENGINE_ERROR("--render-pipeline applies to demo worlds; --game owns its rendering profiles"); @@ -377,17 +387,7 @@ namespace client { return false; } } - // A headless data-factory host has no swapchain wait to pace idle service - // frames. Keep its normal idle path near the simulation rate, while an - // explicit uncapped request keeps its existing rate selection. - constexpr uint32_t DATA_FACTORY_HEADLESS_FRAME_RATE = 60; - Presentations.SetRate( - Settings.PresentationSession != 0 - ? (Settings.MaximumFrameRate != 0 ? Settings.MaximumFrameRate : 60) - : (Settings.DataFactory && Settings.Headless && !Settings.Uncapped - ? DATA_FACTORY_HEADLESS_FRAME_RATE - : (Settings.Uncapped ? Settings.MaximumFrameRate : 0)) - ); + Presentations.SetRate(PresentationRateOf(Settings)); // **Said at startup rather than at the first refusal**, so "my texture // never arrives" and "this client was told not to fetch GIFs" are one @@ -410,7 +410,7 @@ namespace client { ENGINE_INFO("scene from {}", Settings.ScriptPath); } - if (!SDL_SetAppMetadata("Atomic Client", nullptr, "atomic-client")) { + if (!SDL_SetAppMetadata("Atomic Client", nullptr, "io.github.spookexe.atomicgameengine.client")) { ENGINE_WARN("SDL_SetAppMetadata: {}", SDL_GetError()); } @@ -482,7 +482,6 @@ namespace client { if (!Interface.Initialise(backend.Device, backend.ColourFormat)) { ENGINE_WARN("no interface pass; a ScreenGui will not be drawn"); } - Interface.SetFontPackage(std::move(interfaceFonts)); } if (Window != nullptr && !SDL_ShowWindow(Window)) { @@ -491,8 +490,20 @@ namespace client { // **Only with a window**, because a present mode belongs to a swapchain // and a headless run has none. - if (Window != nullptr && !Renderer.SetVerticalSync(!Settings.Uncapped)) { - ENGINE_WARN("client could not select {} present mode", Settings.Uncapped ? "immediate" : "vsync"); + if (Window != nullptr) { + ENGINE_INFO("presentation: {} mode requested", Settings.Uncapped ? "immediate" : "vsync"); + if (!Renderer.SetVerticalSync(!Settings.Uncapped)) { + ENGINE_WARN( + "client could not select {} present mode", Settings.Uncapped ? "immediate" : "vsync" + ); + } + } + if (Presentations.Rate() != 0) { + ENGINE_INFO("presentation: {} FPS cap", Presentations.Rate()); + } else { + ENGINE_INFO( + "presentation: {}", Window != nullptr && !Settings.Uncapped ? "display paced" : "no FPS cap" + ); } // **The configured count wins, and zero means work it out.** A machine @@ -506,6 +517,14 @@ namespace client { engine::world::UniverseSettings interactiveWorlds; interactiveWorlds.MaximumCatchUpTicks = engine::world::INTERACTIVE_CATCH_UP_TICKS; Universe_ = std::make_unique(interactiveWorlds); + (void)Universe_->OnState([](engine::world::WorldId, + engine::ecs::Store &store, + engine::world::WorldState state) { + (void)engine::weather::SetWeatherWorldPaused( + store, + state == engine::world::WorldState::Suspended || state == engine::world::WorldState::Faulted + ); + }); if (Settings.DataFactory) { if (Settings.Worlds != 1 || !Settings.ConnectAddress.empty() || Settings.PresentationSession != 0 || !Settings.PresentationWorld.empty()) { @@ -558,7 +577,7 @@ namespace client { return nlohmann::json(nullptr); } const auto resourceName = [&](engine::graph::ResourceId id) -> nlohmann::json { - const auto *resource = graph->Graph.FindResource(id); + const auto *resource = graph->Graph.FindResourceDesc(id); return resource == nullptr ? nlohmann::json(nullptr) : nlohmann::json(resource->Name.Text()); }; @@ -628,7 +647,7 @@ namespace client { nlohmann::json resources = nlohmann::json::array(); for (uint32_t value = 1; value <= graph->Graph.ResourceCount(); ++value) { const engine::graph::ResourceId id{value}; - const auto *resource = graph->Graph.FindResource(id); + const auto *resource = graph->Graph.FindResourceDesc(id); const auto *profile = profileFor(id); if (resource != nullptr && profile != nullptr) { const engine::graph::ResourceId allocation = graph->Aliases.AllocationOf(id); @@ -1099,16 +1118,28 @@ namespace client { return; } - // The scripts before the camera, so a scene that aimed one of - // its own keeps it - see `InstallDefaultCamera`. + // Startup source can control the local eye or replace CurrentCamera. + InstallDefaultCamera(store, systems); Runtimes.emplace_back( id, engine::game::StartWorldScripts( store, systems, limits, failure, nullptr, worldSettings.ScriptTickRate ) ); - (void)engine::gui::ResetPlayerGui(store, localPlayer); - InstallDefaultCamera(store, systems); + (void)engine::script::ResetPlayerGui(store, localPlayer); + + // Startup scripts get the first say over `Players.CharacterAutoLoads`. + // Match the server join path, but only for this local authority world; + // a replica learns its character from the snapshot instead. + if (!engine::world::Postbox(store).IsReplica()) { + const engine::ecs::Entity players = engine::scene::PlayersOf(store); + const auto *settings = store.Get(players); + const bool autoLoads = settings == nullptr || settings->CharacterAutoLoads; + if (autoLoads && + engine::scene::CharacterOf(store, localPlayer) == engine::ecs::NULL_ENTITY) { + (void)engine::scene::LoadCharacter(store, localPlayer); + } + } }); if (!failure.empty()) { @@ -1455,6 +1486,7 @@ namespace client { // null device and stages before it may publish another observation. DataAudio->Clear(clock.InstanceId); Stages.clear(); + WeatherStages.clear(); Sound = std::unique_ptr(engine::audio::OpenNullDevice({})); if (Sound == nullptr) return; DataAudio->ResetTickClock(clock, Sound->Format().SampleRate); @@ -1470,6 +1502,13 @@ namespace client { entry.second.Clear(Sound->Mixer()); return entry.second.PendingCloses() == 0; }); + std::erase_if(WeatherStages, [&](auto &entry) { + const engine::world::WorldId world{entry.first}; + if (world == Replicated || + std::find(Simulated.begin(), Simulated.end(), world) != Simulated.end()) + return false; + return entry.second.Clear(Sound->Mixer()); + }); // The listener is the composed camera's position, which is **last // frame's**. One frame of latency on an ear is inaudible; reading a live @@ -1491,6 +1530,7 @@ namespace client { Universe_->Enter(id, [&](engine::ecs::Store &store) { LoadPackagedAudio(store); stage.Sync(store, Sound->Mixer(), Audible, ear, rate); + WeatherStages[id.Index].Sync(store, Sound->Mixer(), ear, Audible); }); }; @@ -1749,6 +1789,7 @@ namespace client { // crash but a lock taken on a mutex that no longer exists, and the // process hangs having already run, reported and returned 0. Interface.Shutdown(); + Interface.SetFontPackage({}); if (PresentationLink && PortalImages) { PortalImages->Clear(); (void)PresentationLink->PublishPresentationDirectory(Universe_->LocalPresentationDirectory()); @@ -2062,6 +2103,8 @@ namespace client { Connection = std::make_unique( *Socket, *server, engine::core::Clock::Seconds(), connector ); + Connection->OnTiming(engine::scene::SynchronizeWeatherClocks); + Connection->OnUserState(engine::scene::AcceptWeatherClockUpdate); ResetPlayPresentation(); // **Which player is this client's, which nothing else can tell it.** @@ -4170,6 +4213,7 @@ namespace client { const auto owner = Universe_->NameOf(InterfaceWorld()); engine::render::InterfaceImage image; image.Texture = Renderer.TextureHandle(name, owner); + image.SampledSRGB = Renderer.TextureSamplesSRGB(name, owner); if (image.Texture == nullptr) { return image; } @@ -4199,6 +4243,7 @@ namespace client { // press was picked correctly, produced the right event, and was handed to // a VM that was not the one the button's script was in. const engine::world::WorldId interfaceWorld = InterfaceWorld(); + bool editableImagesChanged = false; const auto prepareEditable = [&](engine::world::WorldId world) { const auto owner = Universe_->NameOf(world); Universe_->Enter(world, [&](engine::ecs::Store &store) { @@ -4207,6 +4252,7 @@ namespace client { : EditableMeshes.RefreshLods(store, Renderer, owner); const auto images = Settings.EnableEditableImages ? EditableImages.Refresh(store, Renderer, owner) : 0; + editableImagesChanged = images > 0 || editableImagesChanged; VisualResourcesChanged = meshes > 0 || images > 0 || VisualResourcesChanged; }); }; @@ -4216,6 +4262,7 @@ namespace client { prepareEditable(world); if (ReportedJoin) prepareEditable(Replicated); } + if (editableImagesChanged) RefreshImageGraphs(*ContentState, ContentWorlds); if (interfaceWorld.IsValid() && DataFactoryRenderOnly.AllowsInteractiveGui(factoryPaused)) { ENGINE_HEAP_SCOPE("client.interface"); @@ -4255,7 +4302,6 @@ namespace client { request.Display.DevicePixelRatio = request.Display.FramebufferScale; request.Display.InterfaceScale = Settings.InterfaceScale; request.Display.TextScale = Settings.TextScale; - request.Fonts = Interface.FontPackageForCompile(); request.ScreenGuis = engine::gui::ScreenGuiSource::PlayerGui; // Fed back from the previous frame's routing, deliberately: the @@ -4265,6 +4311,9 @@ namespace client { request.Pressed = InterfaceRouter.Pressed(); Universe_->Enter(interfaceWorld, [&](engine::ecs::Store &store) { + if (!BundledFontsAttempted && store.CountMatching() > 0) + LoadBundledInterfaceFonts(); + request.Fonts = Interface.FontPackageForCompile(); request.Catalogue = InterfaceLocalization.Refresh(store); request.Locale = Settings.Locale; // **Before the layout, and that order is the whole of it.** A @@ -4823,7 +4872,8 @@ namespace client { view.CameraTemporalId.clear(); Renderer.SetAnimationTime(AnimationSeconds); } else if (!namedCaptureBound && !PresentationLink && PortalImages && Windowed) { - if (!ReportedJoin) { + // Sequence capture already prepared this native eye before returning to the displayed view. + if (!ReportedJoin && Settings.CaptureSequence.empty()) { auto sourceView = view; sourceView.Instances = Views.Instances(); sourceView.JointFrames = Views.JointFrames(); @@ -4884,7 +4934,7 @@ namespace client { engine::render::ScenePresentationState{ .Lighting = visualLighting, .Animation = Renderer.TextureAnimationSignature(visualSeconds), - .Resources = spatialSignature, + .Resources = spatialSignature ^ Renderer.ResourceRevision(), .SurfaceBounces = visualSurfaceBounces, .SurfaceLimit = visualSurfaceLimit, .PostProcess = LastPostProcessShader, @@ -4896,7 +4946,8 @@ namespace client { const bool gameInterfacePresent = hook != nullptr && !InterfaceList.Commands().Commands.empty(); const engine::render::PresentationSignatures presentationSignatures{ .Scene = scenePresentationSignatures, - .GameInterface = gameInterfacePresent ? InterfaceList.Signature() : 0, + .GameInterface = + gameInterfacePresent ? InterfaceList.Signature() ^ Renderer.ResourceRevision() : 0, .HostInterface = 0, .Viewport = viewportSignature, }; @@ -4911,9 +4962,11 @@ namespace client { ); damage.Objects = damage.Objects || VisualResourcesChanged; const bool portalUploadsPending = PortalImages && PortalImages->HasPendingUploads(); + const bool weatherWorkPending = Renderer.HasPendingWeatherWork(view.World); + damage.Environment = damage.Environment || weatherWorkPending; damage.Portals = damage.Portals || portalUploadsPending; - damage.Scene = - damage.Scene || damage.Objects || portalUploadsPending || diagnosticFrame || PresentedImages < 2; + damage.Scene = damage.Scene || damage.Objects || portalUploadsPending || weatherWorkPending || + diagnosticFrame || PresentedImages < 2; damage.GameInterface = damage.GameInterface || diagnosticFrame || interfaceContinuous || PresentedImages < 2; damage.Overlay = Overlay.IsDirty(); diff --git a/mono.client/src/ClientContent.cpp b/mono.client/src/ClientContent.cpp index c890977bb..d17f41631 100644 --- a/mono.client/src/ClientContent.cpp +++ b/mono.client/src/ClientContent.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -319,6 +320,7 @@ namespace client { } } if (!content.Client) { + RefreshImageGraphs(content, worlds); return; } @@ -427,7 +429,15 @@ namespace client { const engine::core::Name name(asset->Name); engine::core::ByteReader reader(asset->Bytes); - if (asset->Kind == engine::assets::AssetKind::Mesh) { + if (asset->Kind == engine::assets::AssetKind::ImageGraph) { + engine::imagegraph::Diagnostic diagnostic; + const std::string_view encoded( + reinterpret_cast(asset->Bytes.data()), asset->Bytes.size() + ); + if (!content.GraphContent.Admit(asset->Name, asset->Root.ToHex(), encoded, diagnostic) && + !diagnostic.Message.empty()) + ENGINE_WARN("content: graph {} refused: {}", asset->Name, diagnostic.Message); + } else if (asset->Kind == engine::assets::AssetKind::Mesh) { engine::assets::MeshData mesh; { ENGINE_PROFILE_CAT("mesh decode", engine::core::ProfileCategory::Assets); @@ -456,6 +466,8 @@ namespace client { if (uploaded) { VisualResourcesChanged = true; ContentMeshes++; + // Newly admitted submesh references must join the next ECS demand scan. + content.ScannedAtRevision.clear(); const auto generated = engine::render::BuildAutomaticMeshLods(*Universe_, worlds, name, mesh); @@ -704,6 +716,7 @@ namespace client { } } } + RefreshImageGraphs(content, worlds); content.Pending.resize(kept); // Appended after the walk, never during it. See `RequestTexture`. @@ -774,7 +787,8 @@ namespace client { return; } - Universe_->Enter(world, [&content, world](engine::ecs::Store &store) { + const auto owner = Universe_->NameOf(world); + Universe_->Enter(world, [&content, world, owner](engine::ecs::Store &store) { // **The gate, and it is a small fixed set of integer compares.** // `CollectWantedContent` // is several walks of the store, and this used to run all of them on @@ -782,7 +796,7 @@ namespace client { // explicit that this is work that should not happen rather than // work to parallelise. `WantedContentRevision` watches only columns // that can carry an asset name. Its monotonic component versions survive - // `ClearChanges`, and live row counts cover removals, so the reader + // `ClearChanges`, and membership epochs cover removals, so the reader // cannot miss a write between pumps. Particle simulation, transforms, // ticks, and additional cameras leave it unchanged. const uint64_t revision = WantedContentRevision(store); @@ -793,6 +807,7 @@ namespace client { content.ScannedAtRevision[world.Index] = revision; CollectWantedContent(store, content.Wanted); + content.GraphReferences[owner.Id()].clear(); }); } @@ -815,7 +830,22 @@ namespace client { void Client::RequestAsset( ContentSession &content, const engine::core::Name &texture, engine::core::Name requestingOwner ) { - if (!content.Client || !texture.IsValid()) return; + if (!texture.IsValid()) return; + if (engine::imagegraph::IsEditableImageReference(texture.Text())) return; + if (engine::imagegraph::IsReference(texture.Text())) { + engine::imagegraph::Reference reference; + if (!engine::imagegraph::ParseReference(texture.Text(), reference)) return; + for (const auto owner : content.Owners) { + if (requestingOwner.IsValid() && owner != requestingOwner) continue; + auto &references = content.GraphReferences[owner.Id()]; + if (std::find(references.begin(), references.end(), texture) == references.end()) + references.push_back(texture); + } + if (reference.Kind == engine::imagegraph::ReferenceKind::Asset) + RequestAsset(content, engine::core::Name(reference.Name), requestingOwner); + return; + } + if (!content.Client) return; // Attempts are remembered per owner, including failures. A later world can // demand an already-seen name without making old worlds fetch it again. const auto alreadyAsked = [&](engine::core::Name owner) { diff --git a/mono.client/src/ClientImageGraph.cpp b/mono.client/src/ClientImageGraph.cpp new file mode 100644 index 000000000..f3fd2ad24 --- /dev/null +++ b/mono.client/src/ClientImageGraph.cpp @@ -0,0 +1,168 @@ +#include +#include +#include + +#include +#include + +namespace client { + void Client::RefreshImageGraphs(ContentSession &content, std::span worlds) { + ENGINE_PROFILE_CAT("content.imagegraphs", engine::core::ProfileCategory::Assets); + using namespace engine; + struct Demand { + core::Name Owner; + core::Name Name; + core::Name Asset; + std::vector Outputs; + std::vector Inputs; + uint64_t Revision = 0; + }; + std::vector demands; + std::erase_if(content.GraphReferences, [&](const auto &entry) { + return std::none_of(worlds.begin(), worlds.end(), [&](const auto world) { + return Universe_->NameOf(world).Id() == entry.first; + }); + }); + for (auto &[key, applied] : content.AppliedGraphs) + applied.Seen = false; + for (const auto world : worlds) { + const auto owner = Universe_->NameOf(world); + const auto references = content.GraphReferences.find(owner.Id()); + if (references != content.GraphReferences.end()) { + for (const auto uri : references->second) { + imagegraph::Reference reference; + if (!imagegraph::ParseReference(uri.Text(), reference) || + reference.Kind != imagegraph::ReferenceKind::Asset) + continue; + const core::Name graphName("imagegraph://" + reference.Name); + auto found = std::find_if(demands.begin(), demands.end(), [&](const Demand &demand) { + return demand.Owner == owner && demand.Name == graphName; + }); + if (found == demands.end()) { + demands.push_back({owner, graphName, core::Name(reference.Name), {uri}, {}, 0}); + } else + found->Outputs.push_back(uri); + } + } + // Copy controls while entering the world. GPU work runs after leaving it. + Universe_->Enter(world, [&](ecs::Store &store) { + store.Observe(); + const uint64_t inputVersion = store.ComponentChangeVersion(); + store.Each([&](ecs::Entity, const scene::ImageGraph &graph) { + if (!imagegraph::IsReferenceToken(graph.InstanceKey.Text()) || + !imagegraph::IsRuntimeAsset(graph.Graph.Text())) + return; + Demand demand{ + owner, + core::Name("imagegraph-instance://" + std::string(graph.InstanceKey.Text())), + graph.Graph, + {}, + {}, + inputVersion + }; + if (references != content.GraphReferences.end()) { + for (const auto uri : references->second) { + imagegraph::Reference reference; + if (imagegraph::ParseReference(uri.Text(), reference) && + reference.Kind == imagegraph::ReferenceKind::Instance && + reference.Name == graph.InstanceKey.Text()) + demand.Outputs.push_back(uri); + } + } + if (demand.Outputs.empty()) return; + for (const auto &input : graph.Inputs) { + imagegraph::InputValue value; + switch (input.Kind) { + case scene::ImageGraphInputKind::Number: + value = input.Number; + break; + case scene::ImageGraphInputKind::Boolean: + value = input.Boolean; + break; + case scene::ImageGraphInputKind::Colour: + value = input.Colour; + break; + case scene::ImageGraphInputKind::String: + value = input.String; + break; + } + demand.Inputs.push_back({std::string(input.Name.Text()), std::move(value)}); + } + demands.push_back(std::move(demand)); + }); + }); + } + for (Demand &demand : demands) { + std::sort(demand.Outputs.begin(), demand.Outputs.end(), [](auto a, auto b) { + return a.Id() < b.Id(); + }); + demand.Outputs.erase( + std::unique(demand.Outputs.begin(), demand.Outputs.end()), demand.Outputs.end() + ); + RequestAsset(content, demand.Asset, demand.Owner); + const uint64_t key = (uint64_t(demand.Owner.Id()) << 32) | demand.Name.Id(); + auto &applied = content.AppliedGraphs[key]; + applied.Seen = true; + applied.Owner = demand.Owner; + applied.Name = demand.Name; + const auto *record = content.GraphContent.Find(demand.Asset.Text()); + if (!record || std::count_if(demands.begin(), demands.end(), [&](const Demand &other) { + return other.Owner == demand.Owner && other.Name == demand.Name; + }) != 1) + continue; + + imagegraph::Diagnostic diagnostic; + if (applied.Asset != demand.Asset || applied.ContentRevision != record->Revision || + applied.InputRevision != demand.Revision || applied.Outputs != demand.Outputs) { + imagegraph::Document resolved; + std::vector sources; + std::vector selectedOutputs; + for (const auto uri : demand.Outputs) { + const auto text = uri.Text(); + selectedOutputs.push_back(text.substr(text.find('#') + 1)); + } + if (!imagegraph::ResolveInputs(record->Authored, demand.Inputs, resolved, diagnostic) || + !imagegraph::RuntimeSources(resolved, sources, diagnostic, selectedOutputs)) + continue; + for (const auto &source : sources) { + const core::Name texture(source); + RequestAsset(content, texture, demand.Owner); + } + // Each output admits its own sources; an unavailable cone must not stall another. + std::vector bindings; + for (const auto &node : resolved.Nodes) { + const auto *source = std::get_if(&node.Value); + if (!source || std::any_of(bindings.begin(), bindings.end(), [&](const auto &binding) { + return binding.Path == source->Path && + binding.Interpretation == source->Interpretation; + })) + continue; + bindings.push_back( + {source->Path, core::Name(source->Path), demand.Owner, source->Interpretation} + ); + } + if (!Renderer.SetImageGraph(demand.Owner, demand.Name, resolved, bindings, diagnostic)) + continue; + applied.Asset = demand.Asset; + applied.ContentRevision = record->Revision; + applied.InputRevision = demand.Revision; + applied.Outputs = demand.Outputs; + } + for (const auto output : demand.Outputs) { + imagegraph::Reference reference; + if (!imagegraph::ParseReference(output.Text(), reference)) continue; + if (Renderer.EvaluateImageGraph( + demand.Owner, demand.Name, reference.Output, output, diagnostic + ) == render::ImageGraphEvaluation::Updated) + VisualResourcesChanged = true; + } + } + std::erase_if(content.AppliedGraphs, [&](const auto &entry) { + const auto &applied = entry.second; + if (applied.Seen) return false; + VisualResourcesChanged = + Renderer.DropImageGraph(applied.Owner, applied.Name) || VisualResourcesChanged; + return true; + }); + } +} diff --git a/mono.client/src/ClientPortal.cpp b/mono.client/src/ClientPortal.cpp index d586c4706..8acac1ede 100644 --- a/mono.client/src/ClientPortal.cpp +++ b/mono.client/src/ClientPortal.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -147,6 +148,7 @@ namespace client { const auto owner = Universe_->NameOf(world); render::InterfaceImage image; image.Texture = Renderer.TextureHandle(name, owner); + image.SampledSRGB = Renderer.TextureSamplesSRGB(name, owner); image.Cell = Renderer.TextureCell(name, captured->Frame.Seconds, owner); Renderer.TextureSize(name, image.Width, image.Height, owner); return image; @@ -158,11 +160,13 @@ namespace client { const core::Vector2 extent{float(width), float(height)}; uint64_t nativeEyeRig = 0; uint64_t storeIdentity = 0; + bool editableImagesChanged = false; const auto entered = Universe_->Enter(world, [&](ecs::Store &store) { const auto owner = Universe_->NameOf(world); storeIdentity = store.Identity(); const auto images = Settings.EnableEditableImages ? EditableImages.Refresh(store, Renderer, owner) : 0; + editableImagesChanged = images > 0; const auto meshes = Settings.EnableEditableMeshes ? EditableMeshes.Refresh(store, Renderer, owner) : EditableMeshes.RefreshLods(store, Renderer, owner); @@ -185,6 +189,12 @@ namespace client { packet.SurfaceLimit = uint32_t(std::max(scene::SurfaceLimitOf(store), 0)); }); if (entered != world::WorldStatus::Ok) return false; + if (editableImagesChanged) { + if (PortalPrevious && PortalPrevious->World == world && PortalPrevious->Content) + RefreshImageGraphs(*PortalPrevious->Content, std::span(&world, 1)); + if (PortalNext && PortalNext->World == world && PortalNext->Content) + RefreshImageGraphs(*PortalNext->Content, std::span(&world, 1)); + } auto &frame = packet.Frame; const size_t nativeRows = frame.Instances.size(); AppendForeignPortalClones(*Universe_, world, frame.Instances, &frame.Joints); @@ -970,6 +980,8 @@ namespace client { approach.Connection = std::make_unique( *approach.Socket, approach.Endpoint, nowSeconds, connecting ); + approach.Connection->OnTiming(scene::SynchronizeWeatherClocks); + approach.Connection->OnUserState(scene::AcceptWeatherClockUpdate); approach.Content = std::make_unique(); approach.Content->RelayName = approach.Endpoint.Text(); approach.Content->Relay = std::make_unique( @@ -1066,6 +1078,7 @@ namespace client { next.CapturedReadiness.reset(); next.CapturedReadinessDecision.reset(); next.EmptyContentDemandRevision.reset(); + next.EmptyContentResourceRevision = 0; next.UndeliverableAssetNames = 0; next.Failure.clear(); next.ReconnectAt = nowSeconds + .5; @@ -1145,6 +1158,8 @@ namespace client { connecting.Quic.BytesPerTick = connecting.Session.Link.BytesPerTick; next.Connection = std::make_unique(*next.Socket, next.Endpoint, nowSeconds, connecting); + next.Connection->OnTiming(scene::SynchronizeWeatherClocks); + next.Connection->OnUserState(scene::AcceptWeatherClockUpdate); next.Content = std::make_unique(); if (next.Readiness) { // Reserve the destination and return images plus content/upload headroom @@ -1312,16 +1327,26 @@ namespace client { evidence.ResidentAssetRevision = evidence.AssetsResident ? scanned->second : 0; } if (!next.Content->Client) { - // A game with no content origin can still have an asset-free successor. - // Prove that from the replicated rows, and repeat only when their asset - // references change. A named asset without a client remains image-only. + // Embedded images must reach owner-scoped residency before adoption; + // no external origin is needed to upload their replicated pixels. Universe_->Enter(next.World, [&](ecs::Store &store) { + const auto owner = Universe_->NameOf(next.World); + if (Settings.EnableEditableImages) + VisualResourcesChanged = + EditableImages.Refresh(store, Renderer, owner) > 0 || VisualResourcesChanged; const uint64_t revision = WantedContentRevision(store); - if (next.EmptyContentDemandRevision != revision) { + const uint64_t resourceRevision = Renderer.ResourceRevision(); + if (next.EmptyContentDemandRevision != revision || + next.EmptyContentResourceRevision != resourceRevision) { std::vector wanted; CollectWantedContent(store, wanted); - next.UndeliverableAssetNames = wanted.size(); + next.UndeliverableAssetNames = static_cast( + std::count_if(wanted.begin(), wanted.end(), [&](core::Name name) { + return !OriginFreePortalContentResident(name, Renderer, owner); + }) + ); next.EmptyContentDemandRevision = revision; + next.EmptyContentResourceRevision = resourceRevision; } (void)ApplyAssetlessReadiness(evidence, revision, next.UndeliverableAssetNames); }); diff --git a/mono.client/src/ContentDemand.cpp b/mono.client/src/ContentDemand.cpp index 19c75a2d2..981f462a8 100644 --- a/mono.client/src/ContentDemand.cpp +++ b/mono.client/src/ContentDemand.cpp @@ -5,6 +5,9 @@ #include #include #include +#include +#include +#include #include #include @@ -20,9 +23,9 @@ namespace client { template void ObserveRevision(engine::ecs::Store &store, uint64_t &revision) { store.Observe(); revision = Fold(revision, store.ComponentChangeVersion()); - // Removal changes the answer too. The change channel records writes and - // additions; the live count covers a row that disappeared entirely. - revision = Fold(revision, store.CountMatching()); + // Membership epochs include removals, destruction and replacements + // with unchanged counts, without querying matching archetypes. + revision = Fold(revision, store.ComponentMembershipVersion()); } // Appends one name if it is a name at all. @@ -44,6 +47,10 @@ namespace client { ObserveRevision(store, revision); ObserveRevision(store, revision); ObserveRevision(store, revision); + ObserveRevision(store, revision); + ObserveRevision(store, revision); + ObserveRevision(store, revision); + ObserveRevision(store, revision); ObserveRevision(store, revision); ObserveRevision(store, revision); ObserveRevision(store, revision); @@ -68,9 +75,21 @@ namespace client { } } - store.Each([&out, &seen]( - engine::ecs::Entity, const engine::scene::Visual &visual - ) { Want(out, seen, visual.Mesh); }); + store.Each( + [&out, &seen](engine::ecs::Entity, const engine::scene::ImageGraph &graph) { + Want(out, seen, graph.Graph); + } + ); + + const auto *meshes = store.Resource(); + store.Each( + [&out, &seen, meshes](engine::ecs::Entity, const engine::scene::Visual &visual) { + Want(out, seen, visual.Mesh); + if (meshes) + for (const auto texture : meshes->Sheets(visual.Mesh)) + Want(out, seen, texture); + } + ); store.Each( [&out, &seen](engine::ecs::Entity, const engine::scene::MaterialRef &material) { @@ -114,6 +133,22 @@ namespace client { } ); + store.Each( + [&out, &seen](engine::ecs::Entity, const engine::gui::Scrolling &scrolling) { + Want(out, seen, scrolling.TopImage); + Want(out, seen, scrolling.MidImage); + Want(out, seen, scrolling.BottomImage); + } + ); + store.Each([&out, &seen]( + engine::ecs::Entity, const engine::scene::LODAuto &lod + ) { Want(out, seen, lod.Billboard); }); + store.Each( + [&out, &seen](engine::ecs::Entity, const engine::scene::LODCustom &lod) { + Want(out, seen, lod.Billboard); + } + ); + store.Each( [&out, &seen](engine::ecs::Entity, const engine::effects::ParticleEmitter &emitter) { Want(out, seen, emitter.Texture); diff --git a/mono.client/src/ControlHooks.cpp b/mono.client/src/ControlHooks.cpp index a0df01fa9..1c05e8ff5 100644 --- a/mono.client/src/ControlHooks.cpp +++ b/mono.client/src/ControlHooks.cpp @@ -5,10 +5,13 @@ #include "DataCaptureDriver.hpp" #include "DataFactoryPausedPresentation.hpp" #include "DisplayedSceneView.hpp" +#include "GuiActions.hpp" #include "NamedCaptureView.hpp" +#include "WorldSystems.hpp" #include #include +#include #include #include #include @@ -58,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -72,11 +76,7 @@ #include #include #include -#include -#include -#include #include -#include #include #include #include @@ -426,11 +426,11 @@ namespace client { .Dependencies = {"client.data-factory-lifecycle"}, .Limits = {}}, [dataFactoryContext](engine::control::HookRegistration &) { - AddDataScriptPackageTool( + engine::control::AddDataScriptPackageTool( dataFactoryContext.Surface, [dataFactoryContext](const engine::script::DataScriptRequest &request) { Client &host = dataFactoryContext.Host; - return ExecuteDataScriptPackageTransaction( + return engine::script::ExecuteDataScriptPackageTransaction( { .Universe = dataFactoryContext.Universe, .Session = dataFactoryContext.Session, diff --git a/mono.client/src/DataFactoryRehydrator.cpp b/mono.client/src/DataFactoryRehydrator.cpp index e5e5afbc5..fddf27fb1 100644 --- a/mono.client/src/DataFactoryRehydrator.cpp +++ b/mono.client/src/DataFactoryRehydrator.cpp @@ -1,3 +1,5 @@ +#include "WorldSystems.hpp" + #include #include #include @@ -8,7 +10,6 @@ #include #include #include -#include namespace client { DataFactoryRehydrator::DataFactoryRehydrator( diff --git a/mono.client/src/EffectsPresentation.hpp b/mono.client/src/EffectsPresentation.hpp new file mode 100644 index 000000000..df0d1ce01 --- /dev/null +++ b/mono.client/src/EffectsPresentation.hpp @@ -0,0 +1,11 @@ +#pragma once + +namespace engine::ecs { + class Store; + class Scheduler; +} + +namespace client { + // Device particle requests and local trail/ribbon presentation, without physics. + void InstallEffectsPresentation(engine::ecs::Store &store, engine::ecs::Scheduler &scheduler); +} diff --git a/mono.client/src/GuiActions.cpp b/mono.client/src/GuiActions.cpp index d25394afc..a0da5ce4c 100644 --- a/mono.client/src/GuiActions.cpp +++ b/mono.client/src/GuiActions.cpp @@ -1,4 +1,4 @@ -#include +#include "GuiActions.hpp" namespace client { diff --git a/mono.client/include/client/GuiActions.hpp b/mono.client/src/GuiActions.hpp similarity index 100% rename from mono.client/include/client/GuiActions.hpp rename to mono.client/src/GuiActions.hpp diff --git a/mono.client/src/PortalReadiness.hpp b/mono.client/src/PortalReadiness.hpp index 3fe2244ec..6ad78139d 100644 --- a/mono.client/src/PortalReadiness.hpp +++ b/mono.client/src/PortalReadiness.hpp @@ -4,7 +4,10 @@ // Bounded client-side evidence required before a portal may replace its retained image with local geometry. +#include #include +#include +#include #include #include @@ -91,7 +94,33 @@ namespace client { }; // An origin-free world may promote only after a demand scan proves it names no - // external assets. The scanned revision is the evidence; zero is not one. + // unresolved assets. Runtime images and builtins still need exact residency. + enum class PortalOriginFreeContent { External, Mesh, Texture }; + inline PortalOriginFreeContent OriginFreePortalContent(std::string_view name) { + engine::assets::BuiltinMesh mesh; + if (engine::assets::BuiltinFromName(name, mesh)) return PortalOriginFreeContent::Mesh; + engine::assets::BuiltinTexture texture; + if (engine::assets::BuiltinFromName(name, texture)) return PortalOriginFreeContent::Texture; + if (engine::imagegraph::IsEditableImageReference(name)) return PortalOriginFreeContent::Texture; + engine::imagegraph::Reference reference; + if (engine::imagegraph::ParseReference(name, reference)) return PortalOriginFreeContent::Texture; + return PortalOriginFreeContent::External; + } + inline bool OriginFreePortalContentResident( + engine::core::Name name, const engine::render::Renderer &renderer, engine::core::Name owner + ) { + switch (OriginFreePortalContent(name.Text())) { + case PortalOriginFreeContent::Mesh: + return renderer.MeshRevision(name, owner) != 0; + case PortalOriginFreeContent::Texture: + return renderer.TextureHandle(name, owner) != nullptr; + case PortalOriginFreeContent::External: + return false; + } + return false; + } + + // The scanned revision is the evidence; zero is not one. inline bool ApplyAssetlessReadiness(PortalReadinessEvidence &evidence, uint64_t scannedRevision, size_t namedAssets) { if (scannedRevision == 0 || namedAssets != 0) return false; diff --git a/mono.client/src/PresentationPacing.hpp b/mono.client/src/PresentationPacing.hpp new file mode 100644 index 000000000..96bff349d --- /dev/null +++ b/mono.client/src/PresentationPacing.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include + +namespace client { + + // Hosts without display pacing retain a bounded service cadence. Ordinary + // clients use the requested cap only when presentation is independent of VSync. + [[nodiscard]] inline uint32_t PresentationRateOf(const Options &settings) { + if (settings.PresentationSession != 0 || (settings.DataFactory && settings.Headless)) { + return settings.MaximumFrameRate != 0 ? settings.MaximumFrameRate : 60; + } + return settings.Uncapped ? settings.MaximumFrameRate : 0; + } +} diff --git a/mono.client/src/Replicated.cpp b/mono.client/src/Replicated.cpp index 173624f39..a4fce7d4d 100644 --- a/mono.client/src/Replicated.cpp +++ b/mono.client/src/Replicated.cpp @@ -1,9 +1,14 @@ +#include "EffectsPresentation.hpp" + #include #include #include #include +#include #include #include +#include +#include #include #include #include @@ -23,6 +28,7 @@ #include #include #include +#include #include #include @@ -56,6 +62,18 @@ namespace client { using engine::scene::Visual; namespace { + void ParentReplicaCamera(Store &store) { + const auto *active = store.Resource(); + if (active == nullptr || !store.Alive(active->Entity) || !Store::IsPredicted(active->Entity) || + !store.Has(active->Entity) || + !store.Has(active->Entity) || + store.ClassOf(active->Entity) != engine::scene::CameraClass()) + return; + const Entity workspace = engine::scene::WorkspaceOf(store); + if (workspace != engine::ecs::NULL_ENTITY && store.ParentOf(active->Entity) != workspace) + store.SetParent(active->Entity, workspace); + } + // Local prediction is transient client state. A saved replica must // restart from an authority tick instead of resuming a stale input run. void WriteLocalPlayerPredictions(engine::core::ByteWriter &, const void *, size_t) {} @@ -552,6 +570,8 @@ namespace client { // the walls the authority sent. The broadphase is derived presentation // state here: it indexes received colliders and never moves a body. engine::physics::PreparePhysicsWorld(store); + engine::weather::RegisterWeatherClockSystem(scheduler); + engine::game::RegisterWeatherGroundSystem(scheduler); // **The two resources that make a replica somewhere a player stands // rather than somewhere they watch.** Both are on @@ -563,25 +583,9 @@ namespace client { store.SetResource(engine::scene::ControllerState{}); store.SetResource(engine::scene::CameraController{}); - // **First in the phase, because everything below is derived from it.** - // A replica never ticks a simulation, so the `PreSimulation` copy every - // other host installs has nothing to hang off - this is the replica's - // only resolve, and without it `Attachment::WorldFrame` stayed at the - // identity for the whole session. What that looked like was a - // `PointLight` parented to an attachment lighting the world origin - // rather than the lamp it hangs from: `engine::render::CollectLights` reads the - // cache and there was nobody to fill it. The script surface was never - // affected - `Attachment.WorldCFrame` is a computed property that - // resolves on the spot - but its *change signal* was, for the reason - // `server::PrepareSimulation` gives. - // - // **Resolved again here rather than trusted from the wire.** The - // authority's answer arrives a tick old and against uninterpolated - // transforms; this world draws from interpolated ones, so a lamp placed - // from the wire would sit where its part was at the last snapshot. - scheduler.Add("resolve-attachments", Phase::PreRender, [](Store &store) { - (void)engine::scene::ResolveAttachments(store); - }); + // Scripts create local emitters and trails here. Use the same device + // requests and attachment/ribbon passes as other displayed worlds. + InstallEffectsPresentation(store, scheduler); // PreRender derives draw data and mirror aim; the replica does not simulate. // @@ -591,6 +595,7 @@ namespace client { // the body that arrived over the wire - a client never calls // `LoadCharacter`, so there is no spawn moment for it to hook. scheduler.Add("replica-camera", Phase::PreRender, [](Store &store) { + ParentReplicaCamera(store); AdvancePositionCorrection(store); (void)engine::scene::UpdateCameraControl(store); (void)engine::scene::FollowOwnCharacter(store); @@ -639,6 +644,11 @@ namespace client { // before the join. scheduler.Add("replica-gui-services", Phase::PreSimulation, [](Store &world) { (void)engine::gui::InstallGuiServices(world); + const auto *local = world.Resource(); + if (local != nullptr) + (void)engine::gui::RefreshPlayerGuiProjection( + world, local->Instance, engine::scene::CharacterOf(world, local->Instance) + ); }); // **A client's VM, over a world it does not own.** The role is what @@ -670,6 +680,7 @@ namespace client { // `RunService.Heartbeat` in time to be beaten on the same tick, which is // the ordering every other loader already gives. scheduler.Add("replica-scripts", Phase::PreSimulation, [runtime](Store &world) { + ParentReplicaCamera(world); (void)runtime->RunNewScripts(engine::script::ClientScriptsIn(world)); }); @@ -681,22 +692,24 @@ namespace client { Entity camera = active != nullptr ? active->Entity : engine::ecs::NULL_ENTITY; if (camera == engine::ecs::NULL_ENTITY || !store.Alive(camera)) { - // **Predicted, not authoritative.** The high range is the client's - // own and the authority never allocates from it, so this camera - // cannot become the same entity as something the server made. - camera = store.CreatePredictedInstance(engine::scene::CameraClass(), "ReplicaViewer"); + // The reserved local range cannot collide with received authored rows. + camera = store.CreatePredictedInstance(engine::scene::CameraClass(), "Camera"); if (camera == engine::ecs::NULL_ENTITY) { return camera; } + store.Set(camera, engine::ecs::ClientLocal{}); + store.Set(camera, engine::scene::TransientComponent{}); store.Set(camera, engine::scene::Transform{frame}); store.Set(camera, lens); engine::scene::ActiveCamera live; live.Entity = camera; store.SetResource(live); + ParentReplicaCamera(store); return camera; } + ParentReplicaCamera(store); // The local world's pose is only a fallback while automatic follow waits // for a subject. Explicit selections and scripted cameras own their pose. diff --git a/mono.client/src/Scene.cpp b/mono.client/src/Scene.cpp index 3cc544455..edbf1c185 100644 --- a/mono.client/src/Scene.cpp +++ b/mono.client/src/Scene.cpp @@ -1,3 +1,5 @@ +#include "EffectsPresentation.hpp" + #include #include #include @@ -5,12 +7,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -27,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +45,10 @@ #include #include #include +#include #include +#include +#include #include #include @@ -109,6 +117,14 @@ namespace client { return; } + const auto *control = store.Resource(); + if (control != nullptr && control->Mode == engine::scene::CameraMode::Scriptable) { + return; + } + if (engine::scene::CameraSubjectRoot(store, active->Entity) != engine::ecs::NULL_ENTITY) { + return; + } + // Read out before anything is written: `Set` may move the row this // resource's entity handle resolves to, and holding a pointer // across that is holding a pointer into storage that moved. @@ -210,7 +226,16 @@ namespace client { namespace { Entity InstallCamera(Store &store) { - const Entity camera = store.Create(); + const Entity camera = store.CreatePredictedInstance(engine::scene::CameraClass(), "Camera"); + if (camera == engine::ecs::NULL_ENTITY) { + return camera; + } + store.Set(camera, engine::ecs::ClientLocal{}); + store.Set(camera, engine::scene::TransientComponent{}); + const Entity workspace = engine::scene::WorkspaceOf(store); + if (workspace != engine::ecs::NULL_ENTITY) { + store.SetParent(camera, workspace); + } store.Set(camera, Transform{}); store.Set(camera, engine::scene::Camera{}); store.Set(camera, {}); @@ -366,7 +391,6 @@ namespace client { using namespace engine; scene::CameraPortalView history; ecs::Entity camera = ecs::NULL_ENTITY; - std::optional carriedArm; std::optional armInput; bool subjectFollowing = false; universe.Enter(inputWorld, [&](Store &store) { @@ -394,7 +418,6 @@ namespace client { if ((placed.Position - eye.Position).Magnitude() < .001f && placed.LookVector().Dot(eye.LookVector()) > .9999f && placed.UpVector().Dot(eye.UpVector()) > .9999f) { - carriedArm = pane; // **The mapped arm, and the reason is the guard above.** The // comparison only passes when `PlaceCamera` already produced // exactly this pose, so the authored input for the route has to @@ -425,9 +448,9 @@ namespace client { (leftAtOrigin.Position - rightAtOrigin.Position).Magnitude() < .001f && std::abs(glm::dot(leftAtOrigin.Rotation(), rightAtOrigin.Rotation())) > .9999f; }; - // A physical blocker can shorten a local arm before it reaches a pane. With no - // active route that eye belongs with its subject, rather than a stale projection. - if (subjectFollowing && !carriedArm && history.Route.empty() && history.Started && + // Following placement has already resolved its arm. After body continuation, + // an empty local route must drop its old map instead of carrying that eye twice. + if (subjectFollowing && history.Route.empty() && history.Started && history.World == authored.Text() && !sameMap(history.FromInput, {})) history = {}; // A route can start before a replica learns its authored name, and then @@ -947,6 +970,10 @@ namespace client { constexpr uint32_t MAXIMUM_PARTICLE_POOL = 1048576; } + void InstallEffectsPresentation(Store &store, Scheduler &scheduler) { + InstallEffects(store, scheduler, DEFAULT_PARTICLE_POOL, MAXIMUM_PARTICLE_POOL); + } + bool BuildScriptedWorld( Store &store, Scheduler &scheduler, @@ -990,13 +1017,47 @@ namespace client { // argument. InstallInputResources(store); + // Startup source receives the same local eye as a replicated client. + Entity startupFallback = engine::ecs::NULL_ENTITY; + const auto *initial = store.Resource(); + if (initial == nullptr || initial->Entity == engine::ecs::NULL_ENTITY || + !store.Alive(initial->Entity)) { + const Entity camera = InstallCamera(store); + if (camera == engine::ecs::NULL_ENTITY) { + ENGINE_ERROR("could not establish the local camera"); + return false; + } + store.SetResource(ActiveCamera{camera}); + startupFallback = camera; + } + // The scene, the components and the systems that move it are the // engine's and every program's. What follows is the client's half. std::string error; - if (!engine::examples::LoadScene(store, scheduler, path, error, runtime, limits)) { + engine::script::RuntimeLimits standalone; + standalone.Role = engine::script::HostRole::OfBoth(); + if (!engine::examples::LoadScene( + store, scheduler, path, error, runtime, limits != nullptr ? limits : &standalone + )) { ENGINE_ERROR("script '{}' failed:\n{}", path, error); return false; } + if (const auto *active = store.Resource(); + startupFallback != engine::ecs::NULL_ENTITY && active != nullptr && + active->Entity != startupFallback && store.Has(startupFallback)) { + bool retained = false; + const auto scripts = store.FindFirstChild(localPlayer, "PlayerScripts"); + const auto companion = store.FindFirstChild(scripts, "DemoCamera"); + store.EachChild(companion, [&](Entity marker) { + Entity published{}; + if (store.InstanceNameOf(marker) == engine::core::Name("PublishedCamera") && + store.GetProperty(marker, engine::core::Name("Value"), &published, sizeof(published))) + retained |= published == startupFallback; + }); + // Only this call's temporary native eye is retired. A companion may + // explicitly retain it among named views even while another is active. + if (!retained) store.DestroyInstance(startupFallback); + } // A standalone scripted client is an authority, not a passive replica. // The studio and game-file paths already furnish their worlds with these @@ -1009,6 +1070,8 @@ namespace client { engine::scene::PrepareGravity(store); engine::scene::RegisterGravitySystem(scheduler); engine::scene::RegisterOwnershipSystem(scheduler); + engine::weather::RegisterWeatherClockSystem(scheduler); + engine::game::RegisterWeatherGroundSystem(scheduler); // The script has now finished authoring `StarterGui`. Clone that completed // template rather than the empty service that existed before it ran. An @@ -1021,21 +1084,13 @@ namespace client { store.EachChild(starterGui, [&hasTemplate](Entity) { hasTemplate = true; }); } if (hasTemplate) { - (void)engine::gui::ResetPlayerGui(store, localPlayer); + (void)engine::script::ResetPlayerGui(store, localPlayer); } const float extent = store.Resource()->HalfExtent; - // **A scene that placed its own camera keeps it.** `MoveCamera` is this - // client's placeholder - it orbits whatever `ActiveCamera` names so that - // a scene with no camera of its own is still looked at from somewhere - - // and running it beside a script that aimed one is two things writing - // one `Transform`, the second winning silently every tick. - // - // That is not hypothetical: `Mirrors-1-world.luau` computes its - // reflection camera from where the eye stands, so an orbiting eye makes - // the reflection correct for a position the viewer is no longer at. The - // mirror looked broken and the camera was the reason. + // Scripts can replace the initial local eye. Only the marked native + // fallback receives orbit updates, and Scriptable mode suspends them. const auto *existing = store.Resource(); const bool scripted = existing != nullptr && existing->Entity != engine::ecs::NULL_ENTITY && store.Alive(existing->Entity); @@ -1043,7 +1098,7 @@ namespace client { const Entity camera = scripted ? existing->Entity : InstallCamera(store); InstallResources(store, camera, extent, std::max(reserve, 1)); - if (!scripted) { + if (store.Has(camera)) { store.SetResource( FallbackCameraState{ engine::scene::FindSpawn(store).Position != Vector3::Zero, @@ -1078,7 +1133,7 @@ namespace client { // phase", `physics::RegisterCharacterSystems` says the pose runs before // the draw list is built, and `camera-control` says `PlaceCamera` sees // this frame's distance. - InstallEffects(store, scheduler, DEFAULT_PARTICLE_POOL, MAXIMUM_PARTICLE_POOL); + InstallEffectsPresentation(store, scheduler); InstallControls(store, scheduler); scheduler.Add("advance-animation-tracks", Phase::Simulation, [](Store &world) { (void)engine::scene::AdvanceAnimationTracks(world); @@ -1127,6 +1182,9 @@ namespace client { ActiveCamera live; live.Entity = InstallCamera(store); + if (live.Entity == engine::ecs::NULL_ENTITY) { + return false; + } store.SetResource(live); store.SetResource( FallbackCameraState{ @@ -1199,6 +1257,7 @@ namespace client { } void RegisterClientComponents() { + engine::weather::RegisterWeatherRuntimeComponents(); // **The simulation's components, registered here because this program // was the only one not doing it.** `mono.server` calls this from // `Simulation.cpp` and `mono.studio` from `Editor.cpp`; the client @@ -1238,6 +1297,7 @@ namespace client { void InstallPresentation(Store &store, Scheduler &scheduler, uint32_t reserve) { RegisterClientComponents(); + store.Observe(); // Game-file and studio worlds need the same built-in metadata. RecordBuiltinMeshes(store); @@ -1341,7 +1401,7 @@ namespace client { // **And before the collection, for the reason `BuildScriptedWorld` // gives at length**: what these install in `PreRender` is what the draw // list is built from. The collection dependencies state that order. - InstallEffects(store, scheduler, DEFAULT_PARTICLE_POOL, MAXIMUM_PARTICLE_POOL); + InstallEffectsPresentation(store, scheduler); InstallControls(store, scheduler); scheduler.Add("advance-animation-tracks", Phase::Simulation, [](Store &world) { (void)engine::scene::AdvanceAnimationTracks(world); diff --git a/mono.client/src/Settings.cpp b/mono.client/src/Settings.cpp index a730db851..597438fd2 100644 --- a/mono.client/src/Settings.cpp +++ b/mono.client/src/Settings.cpp @@ -50,9 +50,13 @@ namespace client { built.Integer( "client.max-fps", defaults.MaximumFrameRate, - "Cap presentation FPS. Needs client.uncapped; 0 presents every update" + "Cap presentation FPS while client.uncapped is true (default); 0 means no cap" + ); + built.Boolean( + "client.uncapped", + defaults.Uncapped, + "Present without waiting for vblank; false enables VSync" ); - built.Boolean("client.uncapped", defaults.Uncapped, "Present without waiting for vblank"); built.Boolean( "client.show-statistics", diff --git a/mono.client/src/WeatherSounds.cpp b/mono.client/src/WeatherSounds.cpp new file mode 100644 index 000000000..af2542478 --- /dev/null +++ b/mono.client/src/WeatherSounds.cpp @@ -0,0 +1,299 @@ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace client { + namespace { + constexpr double THUNDER_SECONDS = 2.0; + constexpr float MAX_THUNDER_GAIN = 0.3f; + constexpr double SCHEDULE_HORIZON_SECONDS = 0.25; + constexpr uint64_t DEADLINE_CORRECTION_SAMPLES = 1; + + std::optional SourceOffsetSeconds( + const engine::weather::ThunderArrival &arrival, const engine::scene::WeatherClock &clock + ) { + if (!std::isfinite(arrival.DelaySeconds) || arrival.DelaySeconds < 0 || clock.TickRate == 0) + return {}; + const auto age = engine::weather::WeatherEventAgeSeconds( + arrival.Event, clock.ElapsedSeconds, clock.ElapsedFractionQ32, clock.Fraction / clock.TickRate + ); + // A copied event may precede its clock sample. Wait until emission is on the accepted timeline. + return age ? std::optional(*age - arrival.DelaySeconds) : std::nullopt; + } + + std::optional StartSample(double offsetSeconds, uint64_t sampleClock, uint32_t sampleRate) { + if (offsetSeconds >= THUNDER_SECONDS || offsetSeconds < -SCHEDULE_HORIZON_SECONDS) return {}; + const auto frames = + static_cast(std::llround(std::max(0.0, -offsetSeconds) * sampleRate)); + return frames > UINT64_MAX - sampleClock ? std::nullopt : std::optional(sampleClock + frames); + } + + void ExpireArrivals( + engine::ecs::Store &store, + const engine::weather::WeatherRuntimeCache &runtime, + engine::weather::ThunderQueue &queue + ) { + std::erase_if(queue.Pending, [&](const auto &arrival) { + const auto layer = + std::find_if(runtime.Layers.begin(), runtime.Layers.end(), [&](const auto &candidate) { + return candidate.Layer == arrival.Event.Layer; + }); + if (layer == runtime.Layers.end()) return true; + if (!store.Has(layer->Provider)) return false; + const auto clock = engine::scene::WeatherClockOf(store, layer->Provider); + if (arrival.Event.Id.Epoch < clock.Epoch) return true; + if (arrival.Event.Id.Epoch > clock.Epoch) return false; + const auto offset = SourceOffsetSeconds(arrival, clock); + // Its receipt cursor remains consumed, so a retained journal cannot resurrect expired audio. + return offset && *offset >= THUNDER_SECONDS; + }); + } + + engine::audio::SoundRef BuildThunder(engine::audio::AudioFormat format) { + ENGINE_PROFILE("weather thunder waveform"); + auto samples = std::make_shared( + format, static_cast(std::ceil(THUNDER_SECONDS * format.SampleRate)) + ); + float low = 0, slower = 0; + uint32_t random = 0x54484e44u; + for (size_t frame = 0; frame < samples->Frames(); ++frame) { + random = engine::weather::Hash(random + 1u); + const float noise = float(random >> 8u) * (2.0f / 16777216.0f) - 1; + low += (noise - low) * 0.035f; + slower += (low - slower) * 0.01f; + const float age = float(frame) / format.SampleRate; + const float envelope = std::min(1.0f, age * 80.0f) * std::exp(-2.8f * age); + const float sample = std::clamp((low * 2.0f + slower * 3.0f) * envelope, -1.0f, 1.0f); + for (uint16_t channel = 0; channel < format.Channels; ++channel) + samples->Data()[frame * format.Channels + channel] = sample; + } + engine::core::Metrics::Count( + "weather.thunder.waveform_bytes", samples->Data().size() * sizeof(float) + ); + return samples; + } + + bool Close(engine::audio::AudioMixer &mixer, const WeatherSoundVoice &voice) { + auto &queue = mixer.Commands(); + if (queue.Free() < 2) return false; + engine::audio::Command command; + command.AtSample = mixer.Clock(); + command.Target = voice.Player; + command.Kind = engine::audio::CommandKind::Stop; + (void)queue.Post(command); + command.Kind = engine::audio::CommandKind::RemoveNode; + (void)queue.Post(command); + return true; + } + } + + bool WeatherThunderDueSoon( + engine::ecs::Store &store, engine::core::Vector3 listenerPosition, double horizonSeconds + ) { + if (!std::isfinite(horizonSeconds) || horizonSeconds < 0) return false; + engine::weather::PrepareWeatherRuntime(store); + if (!store.HasResource()) + store.SetResource(engine::weather::WeatherListener{}); + auto &listener = *store.ResourceMutable(); + listener.PositionMetres = listenerPosition; + const auto environment = engine::scene::EnvironmentOf(store); + if (environment.HasWeatherCompute) { + if (const auto air = + engine::weather::QueryWeather(store, environment.CloudProvider, listenerPosition)) + listener.TemperatureCelsius = air->Air.TemperatureCelsius; + } + const auto *runtime = store.Resource(); + if (!runtime) return false; + ExpireArrivals(store, *runtime, listener.Thunder); + bool due = false; + for (const auto &layer : runtime->Layers) { + const auto *controls = engine::scene::WeatherControlsOf(store, layer.Provider); + if (controls == nullptr || !controls->Enabled || + !store.Has(layer.Provider)) + continue; + const auto clock = engine::scene::WeatherClockOf(store, layer.Provider); + if (const auto *events = store.Get(layer.Provider)) { + for (const auto &event : events->Events) + (void)engine::weather::QueueThunder( + listener.Thunder, event, listenerPosition, listener.TemperatureCelsius, clock.Tick + ); + } + if (clock.Paused || clock.WorldPaused || clock.TimeScaleQ16 == 0) continue; + for (const auto &arrival : listener.Thunder.Pending) { + const auto &event = arrival.Event; + if (event.Layer != layer.Layer || event.Id.Epoch != clock.Epoch || event.TickRate == 0) + continue; + const auto offset = SourceOffsetSeconds(arrival, clock); + due |= offset && *offset < THUNDER_SECONDS && *offset >= -horizonSeconds; + } + } + ExpireArrivals(store, *runtime, listener.Thunder); + return due; + } + + void WeatherSoundStage::Sync( + engine::ecs::Store &store, + engine::audio::AudioMixer &mixer, + engine::core::Vector3 listenerPosition, + SoundCatalogue &catalogue + ) { + ENGINE_PROFILE("weather thunder sync"); + (void)WeatherThunderDueSoon(store, listenerPosition); + auto &listener = *store.ResourceMutable(); + const uint64_t sampleClock = mixer.Clock(); + // Consume begun arrivals before retiring bindings, including a sync which + // skips the whole waveform. Otherwise its copied event could play twice. + std::erase_if(listener.Thunder.Pending, [&](const auto &arrival) { + return std::any_of(Voices.begin(), Voices.end(), [&](const auto &voice) { + return voice.Event.Layer == arrival.Event.Layer && voice.Event.Id == arrival.Event.Id && + !voice.Retiring && sampleClock >= voice.StartSample; + }); + }); + std::erase_if(Voices, [&](WeatherSoundVoice &voice) { + const auto *controls = engine::scene::WeatherControlsOf(store, voice.Provider); + const auto clock = engine::scene::WeatherClockOf(store, voice.Provider); + const bool retired = + controls == nullptr || !controls->Enabled || clock.Epoch != voice.Event.Id.Epoch; + bool cancelFuture = false; + if (sampleClock < voice.StartSample) { + const auto arrival = std::find_if( + listener.Thunder.Pending.begin(), + listener.Thunder.Pending.end(), + [&](const auto &candidate) { + return candidate.Event.Layer == voice.Event.Layer && + candidate.Event.Id == voice.Event.Id; + } + ); + const auto offset = arrival == listener.Thunder.Pending.end() + ? std::nullopt + : SourceOffsetSeconds(*arrival, clock); + const auto corrected = + offset ? StartSample(*offset, sampleClock, mixer.Format().SampleRate) : std::nullopt; + const uint64_t correction = !corrected ? 0 + : *corrected >= voice.StartSample + ? *corrected - voice.StartSample + : voice.StartSample - *corrected; + cancelFuture = clock.Paused || clock.WorldPaused || clock.TimeScaleQ16 == 0 || + !store.Has(voice.Provider) || !corrected || + correction > DEADLINE_CORRECTION_SAMPLES; + } + if (!voice.Retiring && !retired && !cancelFuture && sampleClock < voice.EndSample) return false; + voice.Retiring = true; + if (Close(mixer, voice)) return true; + ++Refused; + return false; + }); + const auto *runtime = store.Resource(); + if (!runtime) return; + for (const auto &layer : runtime->Layers) { + const auto *controls = engine::scene::WeatherControlsOf(store, layer.Provider); + if (controls == nullptr || !controls->Enabled || + !store.Has(layer.Provider)) + continue; + const auto clock = engine::scene::WeatherClockOf(store, layer.Provider); + if (clock.Paused || clock.WorldPaused || clock.TimeScaleQ16 == 0) continue; + for (const auto &arrival : listener.Thunder.Pending) { + const auto &event = arrival.Event; + if (event.Layer != layer.Layer || event.Id.Epoch != clock.Epoch || event.TickRate == 0) + continue; + const auto existing = std::find_if(Voices.begin(), Voices.end(), [&](const auto &voice) { + return voice.Event.Layer == event.Layer && voice.Event.Id == event.Id; + }); + if (existing != Voices.end()) continue; + const auto offset = SourceOffsetSeconds(arrival, clock); + const auto startSample = + offset ? StartSample(*offset, sampleClock, mixer.Format().SampleRate) : std::nullopt; + if (!startSample || Voices.size() >= engine::weather::MAX_WEATHER_EVENTS) continue; + auto &queue = mixer.Commands(); + if (queue.Free() < 6) { + ++Refused; + continue; + } + if (!Thunder || Thunder->Format() != mixer.Format()) { + const engine::core::Name name( + "builtin.weather.thunder." + std::to_string(mixer.Format().SampleRate) + "." + + std::to_string(mixer.Format().Channels) + ); + Thunder = catalogue.Find(name); + if (!Thunder) { + Thunder = BuildThunder(mixer.Format()); + // Retaining a catalogue reference prevents terminal mixer + // commands from freeing a waveform on the audio callback. + if (!catalogue.Add(name, Thunder)) { + Thunder.reset(); + continue; + } + } + } + const double sourceFrames = std::max(0.0, *offset) * mixer.Format().SampleRate; + if (sourceFrames >= Thunder->Frames()) continue; + const auto remainingFrames = + static_cast(std::ceil(Thunder->Frames() - sourceFrames)); + if (remainingFrames > UINT64_MAX - *startSample) continue; + WeatherSoundVoice voice; + voice.Provider = layer.Provider; + voice.Event = event; + voice.Player = queue.Allocate(); + voice.StartSample = *startSample; + voice.EndSample = voice.StartSample + remainingFrames; + engine::audio::Command command; + command.AtSample = sampleClock; + command.Target = voice.Player; + command.Kind = engine::audio::CommandKind::AddNode; + command.Node = engine::audio::NodeKind::Player; + (void)queue.Post(command); + command.Kind = engine::audio::CommandKind::Connect; + command.Second = mixer.Graph().Output(); + (void)queue.Post(command); + command.Kind = engine::audio::CommandKind::SetSound; + command.Sound = Thunder; + (void)queue.Post(command); + command.Kind = engine::audio::CommandKind::SetGain; + command.Sound.reset(); + command.Value = MAX_THUNDER_GAIN / (1.0f + float(arrival.DelaySeconds) * 0.25f); + (void)queue.Post(command); + command.Kind = engine::audio::CommandKind::Seek; + command.CursorFrames = sourceFrames; + (void)queue.Post(command); + command.Kind = engine::audio::CommandKind::Play; + command.AtSample = voice.StartSample; + command.RetainDeadline = true; + (void)queue.Post(command); + Voices.push_back(std::move(voice)); + ++Starts; + engine::core::Metrics::Count("weather.thunder.starts", 1); + } + } + // Keep future arrivals in ECS so suspension can cancel their queued Play + // and resume it against the accepted clock without accepting the event twice. + std::erase_if(listener.Thunder.Pending, [&](const auto &arrival) { + return std::any_of(Voices.begin(), Voices.end(), [&](const auto &voice) { + return voice.Event.Layer == arrival.Event.Layer && voice.Event.Id == arrival.Event.Id && + !voice.Retiring && sampleClock >= voice.StartSample; + }); + }); + } + + bool WeatherSoundStage::Clear(engine::audio::AudioMixer &mixer) { + std::erase_if(Voices, [&](auto &voice) { + voice.Retiring = true; + if (Close(mixer, voice)) return true; + ++Refused; + return false; + }); + if (Voices.empty()) Thunder.reset(); + return Voices.empty(); + } +} diff --git a/mono.client/src/WorldSystems.cpp b/mono.client/src/WorldSystems.cpp index fe56f9fbf..23c7f3a57 100644 --- a/mono.client/src/WorldSystems.cpp +++ b/mono.client/src/WorldSystems.cpp @@ -1,11 +1,13 @@ +#include "WorldSystems.hpp" + #include #include +#include #include #include #include #include - -#include +#include namespace client { void InstallClientWorldSystems( @@ -23,5 +25,7 @@ namespace client { engine::scene::PrepareGravity(store); engine::scene::RegisterGravitySystem(systems); engine::scene::RegisterOwnershipSystem(systems); + engine::weather::RegisterWeatherClockSystem(systems); + engine::game::RegisterWeatherGroundSystem(systems); } } diff --git a/mono.client/include/client/WorldSystems.hpp b/mono.client/src/WorldSystems.hpp similarity index 100% rename from mono.client/include/client/WorldSystems.hpp rename to mono.client/src/WorldSystems.hpp diff --git a/mono.client/tests/Camera.cpp b/mono.client/tests/Camera.cpp new file mode 100644 index 000000000..5194b5199 --- /dev/null +++ b/mono.client/tests/Camera.cpp @@ -0,0 +1,136 @@ +// The native local eye is available before startup source and respects its mode. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +TEST_SUITE_ID("client.camera") +TEST_DEPENDS("engine.scene.part") +TEST_DEPENDS("engine.ecs.scheduler") + +namespace { + struct LocalCameraScript { + std::filesystem::path Path; + std::filesystem::path Companion; + + LocalCameraScript(bool javascript, bool replaceFallback = false) { + engine::parallel::Jobs::Start(1); + Path = engine::core::Paths::Base() / (javascript ? "local-camera.js" : "local-camera.luau"); + Companion = Path.parent_path() / "client" / "DemoCameras" / + (javascript ? "local-camera.client.js" : "local-camera.client.luau"); + std::filesystem::create_directories(Companion.parent_path()); + std::ofstream source(Path); + REQUIRE(source); + source + << (javascript ? "// The builder deliberately leaves camera control to its LocalScript.\n" + : "-- The builder deliberately leaves camera control to its LocalScript.\n"); + std::ofstream camera(Companion); + REQUIRE(camera); + if (replaceFallback) { + camera + << (javascript ? "const camera = Instance.new('Camera', workspace);\ncamera.Name = " + "'Camera';\nworkspace.CurrentCamera = camera;\n" + : "local camera = Instance.new('Camera', workspace)\ncamera.Name = " + "'Camera'\nworkspace.CurrentCamera = camera\n"); + } else { + camera + << (javascript ? "const camera = workspace.CurrentCamera;\n" + : "local camera = workspace.CurrentCamera\n"); + } + camera + << (javascript ? R"( +if (!camera || camera.Name !== 'Camera') throw new Error('missing local camera'); +camera.CameraType = Enum.CameraType.Scriptable; +camera.CFrame = CFrame.new(80, 90, 100); +camera.FieldOfView = 55; +)" + : R"( +assert(camera and camera.Name == 'Camera') +camera.CameraType = Enum.CameraType.Scriptable +camera.CFrame = CFrame.new(80, 90, 100) +camera.FieldOfView = 55 +)"); + } + + ~LocalCameraScript() { + std::filesystem::remove(Path); + std::filesystem::remove(Companion); + engine::parallel::Jobs::Stop(); + } + }; +} + +TEST_CASE("standalone camera companions retire the unused native fallback", "[client][camera][script]") { + const bool javascript = GENERATE(false, true); + const LocalCameraScript source(javascript, true); + engine::ecs::Store store("local-camera-replacement"); + engine::ecs::Scheduler systems; + REQUIRE(client::BuildScriptedWorld(store, systems, source.Path.string(), 1)); + const auto *active = store.Resource(); + REQUIRE(active != nullptr); + CHECK(engine::ecs::Store::IsPredicted(active->Entity)); + CHECK(engine::ecs::IsClientLocalInstance(store, active->Entity)); + CHECK( + store.Get(active->Entity)->Frame.Position == + engine::core::Vector3{80, 90, 100} + ); + size_t cameras = 0; + store.Each([&](engine::ecs::Entity, const engine::scene::Camera &) { + ++cameras; + }); + CHECK(cameras == 1); + for (int tick = 0; tick < 3; ++tick) + systems.Tick(store, 1.0f / 60); + cameras = 0; + store.Each([&](engine::ecs::Entity, const engine::scene::Camera &) { + ++cameras; + }); + CHECK(cameras == 1); +} + +TEST_CASE("standalone startup source controls the native local camera", "[client][camera][script]") { + const bool javascript = GENERATE(false, true); + const LocalCameraScript source(javascript); + engine::ecs::Store store("local-camera-startup"); + engine::ecs::Scheduler systems; + std::shared_ptr runtime; + REQUIRE(client::BuildScriptedWorld(store, systems, source.Path.string(), 1, &runtime)); + REQUIRE(runtime != nullptr); + CHECK(runtime->LastError().empty()); + const auto *active = store.Resource(); + REQUIRE(active != nullptr); + const auto camera = active->Entity; + REQUIRE(store.Alive(camera)); + CHECK(store.ClassOf(camera) == engine::scene::CameraClass()); + CHECK(store.InstanceNameOf(camera) == engine::core::Name("Camera")); + CHECK(engine::ecs::Store::IsPredicted(camera)); + CHECK(store.Has(camera)); + CHECK(store.Has(camera)); + CHECK(store.ParentOf(camera) == engine::scene::WorkspaceOf(store)); + CHECK(store.Resource()->Mode == engine::scene::CameraMode::Scriptable); + + for (int tick = 0; tick < 30; ++tick) { + systems.Tick(store, 1.0f / 60); + } + CHECK(store.Get(camera)->Frame.Position == engine::core::Vector3{80, 90, 100}); + const engine::core::Name custom("Custom"); + REQUIRE(store.SetProperty(camera, engine::core::Name("CameraType"), &custom, sizeof(custom))); + systems.Tick(store, 1.0f / 60); + CHECK(store.Get(camera)->Frame.Position != engine::core::Vector3{80, 90, 100}); +} diff --git a/mono.client/tests/CharacterStartupRender.cpp b/mono.client/tests/CharacterStartupRender.cpp new file mode 100644 index 000000000..f5634b272 --- /dev/null +++ b/mono.client/tests/CharacterStartupRender.cpp @@ -0,0 +1,455 @@ +// The real --game path owns its initial local character and camera follow. + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +TEST_SUITE_ID("client.character-startup.render") +TEST_DEPENDS("client.scene.tick") +TEST_DEPENDS("engine.examples.scene") + +namespace { + using namespace engine; + + enum class StartupCase { + Automatic, + Disabled, + Preloaded, + }; + + struct TemporaryWorlds { + std::filesystem::path Root = core::Paths::Base() / "character-startup-render"; + ~TemporaryWorlds() { + std::error_code ignored; + std::filesystem::remove_all(Root, ignored); + } + }; + + struct TemporaryAssetsOverride { + std::filesystem::path Previous = core::Paths::Assets(); + TemporaryAssetsOverride() { + core::Paths::SetAssetsOverride(core::Paths::Base()); + } + ~TemporaryAssetsOverride() { + core::Paths::SetAssetsOverride(Previous); + } + }; + + std::string ReadText(const std::filesystem::path &path) { + std::ifstream input(path, std::ios::binary); + REQUIRE(input); + return {std::istreambuf_iterator(input), {}}; + } + + void ReplaceOnce(std::string &text, std::string_view before, std::string_view after) { + const size_t offset = text.find(before); + REQUIRE(offset != std::string::npos); + text.replace(offset, before.size(), after); + } + + std::string ProbeSource(StartupCase scenario) { + const std::string expected = scenario == StartupCase::Disabled ? "none" + : scenario == StartupCase::Preloaded ? "preloaded" + : "automatic"; + return R"( +local Players = game:GetService("Players") +local RunService = game:GetService("RunService") +local player = assert(Players.LocalPlayer) +local camera = assert(workspace.CurrentCamera) +local playerGui = assert(player:WaitForChild("PlayerGui", 20)) +local gui = Instance.new("ScreenGui") +gui.Name = "CharacterStartupProbe" +gui.DisplayOrder = 10000 +gui.IgnoreGuiInset = true +gui.Parent = playerGui +local result = Instance.new("TextLabel") +result.Name = "Result" +result.Size = UDim2.new(1, 0, 1, 0) +result.BackgroundTransparency = 0 +result.BackgroundColor3 = Color3.new(1, 0, 0) +result.BorderSizePixel = 0 +result.Text = "" +result.Parent = gui + +local scenario = ")" + + expected + R"(" +local ticks = 0 +local settled = false +local function finish(ok) + if ok and scenario == "none" then + result.BackgroundColor3 = Color3.new(0, 0, 1) + else + result.BackgroundColor3 = if ok then Color3.new(0, 1, 0) else Color3.new(1, 0, 0) + end + settled = true +end + +RunService.Heartbeat:Connect(function() + if settled then return end + ticks += 1 + if scenario == "none" then + if ticks >= 6 then finish(player.Character == nil) end + return + end + if ticks < 2 then return end + local character = player.Character + local humanoid = character and character:FindFirstChildOfClass("Humanoid") + local count = 0 + for _, child in workspace:GetChildren() do + if (child.Name == player.Name or child.Name == "PreloadedCharacter") and + child:FindFirstChildOfClass("Humanoid") ~= nil then + count += 1 + end + end + local root = character and character:FindFirstChild("HumanoidRootPart") + local distance = root and (camera.CFrame.Position - root.Position).Magnitude or math.huge + local ok = character ~= nil and humanoid ~= nil and camera.CameraSubject == humanoid and count == 1 + and root ~= nil and root.Position.X > 20 and distance < 30 + if scenario == "preloaded" then + ok = ok and character.Name == "PreloadedCharacter" + end + if ok then + finish(true) + elseif ticks >= 10 then + finish(false) + end +end) +)"; + } + + std::string ServerSource(StartupCase scenario) { + std::string source = R"( +local Players = game:GetService("Players") +local player = assert(Players:GetPlayers()[1]) +local function moveCharacter(character) + local root = assert(character:WaitForChild("HumanoidRootPart", 20)) + root.CFrame = CFrame.new(25, 4, 8) +end +)"; + if (scenario == StartupCase::Disabled) source += "Players.CharacterAutoLoads = false\n"; + if (scenario == StartupCase::Preloaded) { + source += R"( +local character = assert(player:LoadCharacter()) +character.Name = "PreloadedCharacter" +moveCharacter(character) +)"; + } + source += R"( +player.CharacterAdded:Connect(moveCharacter) +if player.Character ~= nil then moveCharacter(player.Character) end +)"; + return source; + } + + std::filesystem::path WriteFixture( + const std::filesystem::path &root, const std::filesystem::path &sourceWorld, StartupCase scenario + ) { + std::string document = ReadText(sourceWorld); + constexpr std::string_view probePath = "scripts/client/CharacterStartupProbe.client.luau"; + constexpr std::string_view serverPath = "scripts/server/CharacterAutoLoads.server.luau"; + const std::string sourceEntry = "\t\t\n"; + ReplaceOnce(document, "\t", sourceEntry + "\t"); + + const std::string localScript = + "\t\t\t\n" + "\t\t\t\t" + + std::string(probePath) + "\n\t\t\t\n"; + ReplaceOnce( + document, + "\t\t\t\n\t\t\n\t\n\t\n" + localScript + "\t\t\n\t\n\t\n"; + ReplaceOnce(document, "\t", serverEntry + "\t"); + const std::string serverScript = + "\t\t\n" + "\t\t\t" + + std::string(serverPath) + "\n\t\t\n"; + ReplaceOnce(document, "\t\n", serverScript + "\t\n"); + } + + std::filesystem::create_directories(root); + const auto output = root / (scenario == StartupCase::Automatic ? "automatic.aworld" + : scenario == StartupCase::Disabled ? "disabled.aworld" + : "preloaded.aworld"); + std::ofstream file(output, std::ios::binary); + REQUIRE(file); + file << document; + REQUIRE(file.good()); + return output; + } + + bool HasProbeColour(const std::filesystem::path &path, StartupCase scenario) { + std::unique_ptr image( + SDL_LoadBMP(path.string().c_str()), SDL_DestroySurface + ); + REQUIRE(image); + const auto isSuccess = [scenario](Uint8 red, Uint8 green, Uint8 blue) { + if (scenario == StartupCase::Disabled) return blue > 140 && red < 80 && green < 100; + return green > 140 && red < 80 && blue < 100; + }; + size_t matching = 0; + for (int y = 0; y < image->h; ++y) { + for (int x = 0; x < image->w; ++x) { + Uint8 red = 0, green = 0, blue = 0, alpha = 0; + REQUIRE(SDL_ReadSurfacePixel(image.get(), x, y, &red, &green, &blue, &alpha)); + matching += isSuccess(red, green, blue); + } + } + return matching > static_cast(image->w * image->h) / 2; + } + + std::filesystem::path + WriteScript(const std::filesystem::path &root, std::string_view name, std::string_view source) { + std::filesystem::create_directories(root); + const auto path = root / std::string(name); + std::ofstream output(path, std::ios::binary); + REQUIRE(output); + output << source; + REQUIRE(output.good()); + return path; + } + + std::string FontDemandSource(bool delayed) { + std::string source = R"( +local Players = game:GetService("Players") +local player = assert(Players.LocalPlayer) +local screen = Instance.new("ScreenGui") +screen.Name = "FontDemand" +screen.IgnoreGuiInset = true +screen.DisplayOrder = 10000 +screen.Parent = player:WaitForChild("PlayerGui") + +local background = Instance.new("Frame") +background.Size = UDim2.new(1, 0, 1, 0) +background.BackgroundColor3 = Color3.new(0, 0, 0) +background.BorderSizePixel = 0 +background.ZIndex = 1 +background.Parent = screen + +local function authorText() + local label = Instance.new("TextLabel") + label.Name = "FontDemandText" + label.Position = UDim2.new(0, 12, 0, 12) + label.Size = UDim2.new(0, 296, 0, 64) + label.BackgroundTransparency = 1 + label.BorderSizePixel = 0 + label.Text = "office AV café" + label.TextColor3 = Color3.new(1, 1, 1) + label.TextSize = 28 + label.TextScaled = false + label.TextWrapped = false + label.TextTransparency = 0 + label.RichText = false + label.TextXAlignment = Enum.TextXAlignment.Left + label.TextYAlignment = Enum.TextYAlignment.Top + label.ZIndex = 2 + label.Parent = screen +end +)"; + if (!delayed) { + source += "\nauthorText()\n"; + return source; + } + source += R"( +local RunService = game:GetService("RunService") +local ticks = 0 +local connection +connection = RunService.Heartbeat:Connect(function() + ticks += 1 + if ticks >= 10 then + connection:Disconnect() + authorText() + end +end) +)"; + return source; + } + + struct FontPackageHeap { + uint64_t TotalBytes = 0; + int64_t LiveBytes = 0; + }; + + FontPackageHeap ReadFontPackageHeap() { + FontPackageHeap result; + for (uint32_t index = 0; index < core::HeapProfile::NodeCount(); index++) { + const core::HeapNodeView node = core::HeapProfile::Node(index); + if (node.Name != "client.font package") continue; + result.TotalBytes += node.TotalBytes; + result.LiveBytes += node.LiveBytes; + } + return result; + } + + uint64_t BundledFontPayloadBytes() { + uint64_t total = 0; + for (const char *file : {"Inter.ttf", "Roboto.ttf", "NotoSans.ttf", "JetBrainsMono.ttf"}) { + const auto path = core::Paths::Fonts() / file; + CAPTURE(path.string()); + REQUIRE(std::filesystem::is_regular_file(path)); + total += static_cast(std::filesystem::file_size(path)); + } + return total; + } + + struct GlyphCrop { + std::vector> Pixels; + size_t NonBlack = 0; + }; + + GlyphCrop ReadGlyphCrop(const std::filesystem::path &path) { + std::unique_ptr image( + SDL_LoadBMP(path.string().c_str()), SDL_DestroySurface + ); + REQUIRE(image); + REQUIRE(image->w == 320); + REQUIRE(image->h == 160); + GlyphCrop crop; + for (int y = 8; y < 88; y++) { + for (int x = 8; x < 312; x++) { + Uint8 red = 0, green = 0, blue = 0, alpha = 0; + REQUIRE(SDL_ReadSurfacePixel(image.get(), x, y, &red, &green, &blue, &alpha)); + crop.Pixels.push_back({red, green, blue}); + crop.NonBlack += red > 8 || green > 8 || blue > 8; + } + } + return crop; + } +} + +TEST_CASE( + "headless --game startup respects automatic character loading and follows the resulting character", + "[client][gpu][camera][character][.]" +) { + const auto demo = examples::DemosLoader().Find(examples::DemoKind::World, "BladeborneDemo.aworld"); + REQUIRE(demo.has_value()); + + TemporaryWorlds temporary; + std::filesystem::remove_all(temporary.Root); + for (const StartupCase scenario : + {StartupCase::Automatic, StartupCase::Disabled, StartupCase::Preloaded}) { + CAPTURE(static_cast(scenario)); + const auto game = WriteFixture(temporary.Root, demo->Path, scenario); + const auto captures = temporary.Root / "captures" / game.stem(); + client::Options options; + options.Headless = true; + options.Width = 160; + options.Height = 120; + options.MaximumFrames = 40; + options.Uncapped = true; + options.MaximumFrameRate = 60; + options.GameFile = game; + options.CaptureSequence = captures; + client::Client player; + REQUIRE(player.Initialise(options)); + REQUIRE(player.Run() == 0); + CHECK(HasProbeColour(captures / "39.bmp", scenario)); + } +} + +TEST_CASE( + "bundled GUI fonts load on text demand and render the same after delayed authoring", + "[client][gpu][interface][.]" +) { + TemporaryWorlds temporary; + TemporaryAssetsOverride assets; + std::filesystem::remove_all(temporary.Root); + const auto scripts = temporary.Root / "scripts"; + const auto empty = WriteScript(scripts, "empty.luau", "\n"); + const auto immediate = WriteScript(scripts, "immediate.luau", FontDemandSource(false)); + const auto delayed = WriteScript(scripts, "delayed.luau", FontDemandSource(true)); + const auto immediateCaptures = temporary.Root / "immediate-captures"; + const auto delayedCaptures = temporary.Root / "delayed-captures"; + const uint64_t fontPayloadBytes = BundledFontPayloadBytes(); + const bool heapProfiled = core::HeapProfile::IsCompiledIn(); + struct FontRunHeap { + FontPackageHeap Before; + FontPackageHeap AfterInitialise; + FontPackageHeap AfterRun; + FontPackageHeap AfterShutdown; + }; + auto run = [&](const std::filesystem::path &script, const std::filesystem::path &captures) { + FontRunHeap heap; + heap.Before = ReadFontPackageHeap(); + client::Client player; + client::Options options; + options.Headless = true; + options.Width = 320; + options.Height = 160; + options.MaximumFrames = 40; + options.MaximumFrameRate = 60; + options.Uncapped = true; + options.ScriptPath = script.string(); + options.CaptureSequence = captures; + REQUIRE(player.Initialise(options)); + heap.AfterInitialise = ReadFontPackageHeap(); + REQUIRE(player.Run() == 0); + heap.AfterRun = ReadFontPackageHeap(); + player.Shutdown(); + heap.AfterShutdown = ReadFontPackageHeap(); + return heap; + }; + auto checkEmptyRun = [&](const FontRunHeap &heap) { + if (!heapProfiled) return; + CHECK(heap.AfterInitialise.TotalBytes == heap.Before.TotalBytes); + CHECK(heap.AfterInitialise.LiveBytes == heap.Before.LiveBytes); + CHECK(heap.AfterRun.TotalBytes == heap.Before.TotalBytes); + CHECK(heap.AfterRun.LiveBytes == heap.Before.LiveBytes); + }; + + checkEmptyRun(run(empty, {})); + const FontRunHeap immediateHeap = run(immediate, immediateCaptures); + const FontPackageHeap &beforeImmediate = immediateHeap.Before; + const FontPackageHeap &afterImmediate = immediateHeap.AfterRun; + if (heapProfiled) { + CHECK(afterImmediate.TotalBytes - beforeImmediate.TotalBytes < 3 * fontPayloadBytes); + CHECK(afterImmediate.LiveBytes - beforeImmediate.LiveBytes >= static_cast(fontPayloadBytes)); + } + const GlyphCrop immediateCrop = ReadGlyphCrop(immediateCaptures / "39.bmp"); + CHECK(immediateCrop.NonBlack > 100); + if (heapProfiled) + CHECK( + afterImmediate.LiveBytes - immediateHeap.AfterShutdown.LiveBytes >= + static_cast(fontPayloadBytes) + ); + + const FontRunHeap delayedHeap = run(delayed, delayedCaptures); + const FontPackageHeap &beforeDelayed = delayedHeap.Before; + const FontPackageHeap &afterDelayed = delayedHeap.AfterRun; + if (heapProfiled) { + CHECK(afterDelayed.TotalBytes - beforeDelayed.TotalBytes < 3 * fontPayloadBytes); + CHECK(afterDelayed.LiveBytes - beforeDelayed.LiveBytes >= static_cast(fontPayloadBytes)); + } + const GlyphCrop delayedCrop = ReadGlyphCrop(delayedCaptures / "39.bmp"); + CHECK(delayedCrop.NonBlack > 100); + CHECK(delayedCrop.Pixels == immediateCrop.Pixels); + if (heapProfiled) + CHECK( + afterDelayed.LiveBytes - delayedHeap.AfterShutdown.LiveBytes >= + static_cast(fontPayloadBytes) + ); + + checkEmptyRun(run(empty, {})); +} diff --git a/mono.client/tests/ContentDemand.cpp b/mono.client/tests/ContentDemand.cpp index 15fb75c12..7166bf61c 100644 --- a/mono.client/tests/ContentDemand.cpp +++ b/mono.client/tests/ContentDemand.cpp @@ -24,7 +24,10 @@ #include #include #include +#include +#include #include +#include #include #include #include @@ -148,6 +151,40 @@ TEST_CASE("every place content can be named is collected", "[client][contentdema CHECK(Holds(wanted, "walk.aanim")); } +TEST_CASE( + "scrollbar and LOD image references join demand and change its revision", "[client][contentdemand]" +) { + Store store = Fresh("contentdemand.additional.images"); + const auto scroll = store.Create(); + engine::gui::Scrolling scrolling; + scrolling.TopImage = Name("imagegraph://scroll.aimagegraph#top"); + scrolling.MidImage = Name("imagegraph://scroll.aimagegraph#middle"); + scrolling.BottomImage = Name("imagegraph://scroll.aimagegraph#bottom"); + store.Set(scroll, scrolling); + const auto automatic = store.Create(); + engine::scene::LODAuto generated; + generated.Billboard = Name("imagegraph://lod.aimagegraph#automatic"); + store.Set(automatic, generated); + const auto custom = store.Create(); + engine::scene::LODCustom authored; + authored.Billboard = Name("imagegraph://lod.aimagegraph#custom"); + store.Set(custom, authored); + std::vector wanted; + client::CollectWantedContent(store, wanted); + CHECK(wanted.size() == 5); + CHECK(Holds(wanted, "imagegraph://scroll.aimagegraph#top")); + CHECK(Holds(wanted, "imagegraph://scroll.aimagegraph#middle")); + CHECK(Holds(wanted, "imagegraph://scroll.aimagegraph#bottom")); + CHECK(Holds(wanted, "imagegraph://lod.aimagegraph#automatic")); + CHECK(Holds(wanted, "imagegraph://lod.aimagegraph#custom")); + const auto before = client::WantedContentRevision(store); + store.GetMutable(scroll)->MidImage = Name("replacement.atex"); + const auto changed = client::WantedContentRevision(store); + CHECK(changed != before); + store.GetMutable(custom)->Billboard = Name("replacement-lod.atex"); + CHECK(client::WantedContentRevision(store) != changed); +} + TEST_CASE("a world names nothing it does not use", "[client][contentdemand]") { // **The property the whole change rests on.** A store of two thousand assets // and a scene that uses three must ask for three - anything else is the @@ -251,6 +288,42 @@ TEST_CASE("removing a content-bearing row advances demand revision", "[client][c CHECK(client::WantedContentRevision(store) != before); } +TEST_CASE("demand revisions cover destruction and equal-count replacement", "[client][contentdemand]") { + Store store = Fresh("contentdemand.revision.membership"); + const Entity first = store.Create(); + engine::effects::ParticleEmitter settings; + settings.Texture = Name("first.atex"); + store.Set(first, settings); + const uint64_t initial = client::WantedContentRevision(store); + const uint64_t writes = store.ComponentChangeVersion(); + store.Destroy(first); + store.ClearChanges(); + CHECK(store.ComponentChangeVersion() == writes); + CHECK(client::WantedContentRevision(store) != initial); + std::vector wanted; + client::CollectWantedContent(store, wanted); + CHECK(wanted.empty()); + + const Entity second = store.Create(); + store.Set(second, settings); + const uint64_t restored = client::WantedContentRevision(store); + const auto count = store.CountMatching(); + const Entity replacement = store.Create(); + settings.Texture = Name("replacement.atex"); + store.Remove(second); + store.Set(replacement, settings); + store.ClearChanges(); + REQUIRE(store.CountMatching() == count); + CHECK(client::WantedContentRevision(store) != restored); + client::CollectWantedContent(store, wanted); + REQUIRE(wanted.size() == 1); + CHECK(Holds(wanted, "replacement.atex")); + CHECK_FALSE(Holds(wanted, "first.atex")); + const uint64_t settled = client::WantedContentRevision(store); + store.ClearChanges(); + CHECK(client::WantedContentRevision(store) == settled); +} + TEST_CASE("many emitters share one demanded texture name", "[client][contentdemand]") { Store store = Fresh("contentdemand.shared.texture"); for (size_t index = 0; index < 4096; index++) { @@ -351,3 +424,46 @@ TEST_CASE( CHECK(Holds(wanted, "replacement.ashader")); CHECK_FALSE(Holds(wanted, "material.ashader")); } + +TEST_CASE("mesh submesh image references survive reconstruction of demand", "[client][contentdemand]") { + Store store = Fresh("contentdemand.mesh.images"); + const auto entity = store.Create(); + engine::scene::Visual visual; + visual.Mesh = Name("mesh.amesh"); + store.Set(entity, visual); + const Name sheet("imagegraph://material.aimagegraph#image"); + REQUIRE(engine::scene::RecordMesh(store, visual.Mesh, 2, std::span(&sheet, 1))); + std::vector wanted; + client::CollectWantedContent(store, wanted); + CHECK(Holds(wanted, "imagegraph://material.aimagegraph#image")); + wanted.clear(); + client::CollectWantedContent(store, wanted); + CHECK(Holds(wanted, "imagegraph://material.aimagegraph#image")); +} + +TEST_CASE( + "image graph instance source assets and wire input replacements invalidate demand", + "[client][contentdemand]" +) { + Store store = Fresh("contentdemand.graph.instance"); + const auto entity = store.Create(); + engine::scene::ImageGraph graph; + graph.InstanceKey = Name("instance"); + graph.Graph = Name("live.aimagegraph"); + store.Set(entity, graph); + std::vector wanted; + client::CollectWantedContent(store, wanted); + CHECK(Holds(wanted, "live.aimagegraph")); + const auto before = client::WantedContentRevision(store); + graph.Inputs.push_back( + {.Name = Name("opacity"), + .Kind = engine::scene::ImageGraphInputKind::Number, + .Number = 0.25, + .Boolean = false, + .Colour = {}, + .String = {}} + ); + store.Set(entity, graph); + CHECK(graph.Revision == 0); + CHECK(client::WantedContentRevision(store) != before); +} diff --git a/mono.client/tests/DataScriptPackage.cpp b/mono.client/tests/DataScriptPackage.cpp index 0239c774c..454ebbce8 100644 --- a/mono.client/tests/DataScriptPackage.cpp +++ b/mono.client/tests/DataScriptPackage.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -12,7 +13,6 @@ #include #include -#include #include #include #include @@ -34,7 +34,7 @@ namespace { std::array{engine::control::test::Custom( "client.data-script-package.test", [execute = std::move(execute)](engine::control::Surface &owner) mutable { - client::AddDataScriptPackageTool(owner, std::move(execute)); + engine::control::AddDataScriptPackageTool(owner, std::move(execute)); } )} ); diff --git a/mono.client/tests/DataScriptPackageTransaction.cpp b/mono.client/tests/DataScriptPackageTransaction.cpp index 2bd3e908b..d568ede15 100644 --- a/mono.client/tests/DataScriptPackageTransaction.cpp +++ b/mono.client/tests/DataScriptPackageTransaction.cpp @@ -1,3 +1,5 @@ +#include "WorldSystems.hpp" + #include #include #include @@ -11,6 +13,8 @@ #include #include #include +#include +#include #include #include #include @@ -19,7 +23,6 @@ #include #include -#include #include #include #include @@ -175,13 +178,30 @@ namespace { }); } - engine::script::DataScriptPackageTransactionDependencies ProductDependencies() { + engine::script::DataScriptPackageTransactionDependencies + ProductDependencies(std::string cameraProgram = {}) { auto dependencies = Dependencies(); - dependencies.InstallSystems = [](engine::ecs::Store &store, engine::ecs::Scheduler &systems) { + dependencies.InstallSystems = [cameraProgram = std::move(cameraProgram)]( + engine::ecs::Store &store, engine::ecs::Scheduler &systems + ) { client::InstallPresentation(store, systems); (void)client::RestoreDefaultCameraMovement(store, systems); (void)client::InstallDefaultCamera(store, systems); client::InstallClientWorldSystems(store, systems); + if (!cameraProgram.empty()) { + const engine::core::Name path("package-viewer.client.luau"); + if (!store.HasResource()) + store.SetResource(engine::script::SourceCache{}); + store.ResourceMutable()->Set(path, cameraProgram); + const auto source = + store.CreatePredictedInstance(engine::script::LocalScriptClass(), "PackageViewer"); + store.Set(source, engine::ecs::ClientLocal{}); + engine::script::SetSourcePath(store, source, path); + const auto runtime = engine::script::MakeRuntime(store, engine::script::Language::Luau); + const bool ran = runtime->RunInstance(source); + INFO(runtime->LastError()); + REQUIRE(ran); + } }; return dependencies; } @@ -384,12 +404,12 @@ TEST_CASE( } TEST_CASE( - "client transaction leaves a package-authored active camera fixed after system install", + "client transaction installs a local presentation camera after authoritative package work", "[client][data-script-package]" ) { Fixture fixture; fixture.PrepareClientWorld(); - const std::string source = R"( + const std::string cameraProgram = R"( local workspace = game:GetService("Workspace") local camera = Instance.new("Camera") camera.CFrame = CFrame.new(1, 2, 3) @@ -399,7 +419,7 @@ workspace.CurrentCamera = camera return )"; const DataScriptResult result = engine::script::ExecuteDataScriptPackageTransaction( - fixture.ProductDependencies(), fixture.Request(source, true) + fixture.ProductDependencies(cameraProgram), fixture.Request("return", true) ); REQUIRE(result.Ran); fixture.Worlds.Enter( @@ -412,7 +432,8 @@ return CHECK(before->Frame.Position.X == 1.0f); CHECK(before->Frame.Position.Y == 2.0f); CHECK(before->Frame.Position.Z == 3.0f); - CHECK_FALSE(systems.HasSystem("move-camera", engine::ecs::Phase::Simulation)); + CHECK(store.IsPredicted(active->Entity)); + CHECK(engine::ecs::IsClientLocalInstance(store, active->Entity)); systems.Tick(store, 1.0f / 60.0f); const auto *after = store.Get(active->Entity); @@ -430,13 +451,16 @@ TEST_CASE( ) { Fixture fixture; fixture.PrepareClientWorld(); - const std::string source = R"( + const std::string cameraProgram = R"( local workspace = game:GetService("Workspace") local camera = Instance.new("Camera") camera.CFrame = CFrame.new(4, 5, 6) camera.Parent = workspace workspace.CurrentCamera = camera - +return +)"; + const std::string source = R"( +local workspace = game:GetService("Workspace") local part = Instance.new("Part") part.Name = "FencePart" part.CFrame = CFrame.new(1, 2, 3) @@ -447,8 +471,9 @@ part.Parent = workspace return )"; const DataScriptRequest request = fixture.Request(source, true); - const DataScriptResult result = - engine::script::ExecuteDataScriptPackageTransaction(fixture.ProductDependencies(), request); + const DataScriptResult result = engine::script::ExecuteDataScriptPackageTransaction( + fixture.ProductDependencies(cameraProgram), request + ); REQUIRE(result.Ran); CHECK(result.Lifecycle.Clock.Tick == request.ExpectedTick); diff --git a/mono.client/tests/GuiActions.cpp b/mono.client/tests/GuiActions.cpp index 1549cec5f..6af3c4410 100644 --- a/mono.client/tests/GuiActions.cpp +++ b/mono.client/tests/GuiActions.cpp @@ -1,9 +1,9 @@ +#include "GuiActions.hpp" + #include #include -#include - TEST_SUITE_ID("client.gui_actions") TEST_CASE("keyboard and gamepad edges normalize to the same GUI actions", "[client][gui][input]") { diff --git a/mono.client/tests/McpContract.cpp b/mono.client/tests/McpContract.cpp index efd0436c2..62e762b53 100644 --- a/mono.client/tests/McpContract.cpp +++ b/mono.client/tests/McpContract.cpp @@ -91,7 +91,9 @@ namespace { const json expected = Fixture()[factory ? "factory" : "normal"]; const uint16_t port = FreePort(); engine::parallel::Process child; - std::vector arguments{"--headless", "--mcp-port", std::to_string(port)}; + std::vector arguments{ + "--headless", "--width", "320", "--height", "180", "--mcp-port", std::to_string(port) + }; if (factory) arguments.push_back("--data-factory"); else @@ -182,9 +184,18 @@ TEST_CASE("client MCP listener restarts with its reviewed normal manifest", "[cl const json expected = Fixture()["normal"]; const uint16_t port = FreePort(); const auto run = [&](engine::parallel::Process &child) { - REQUIRE( - child.Start(Program(), {"--headless", "--mcp-port", std::to_string(port), "--frames", "600"}) - ); + REQUIRE(child.Start( + Program(), + {"--headless", + "--width", + "320", + "--height", + "180", + "--mcp-port", + std::to_string(port), + "--frames", + "600"} + )); asio::io_context context; asio::ip::tcp::socket socket(context); diff --git a/mono.client/tests/NonEuclideanRender.cpp b/mono.client/tests/NonEuclideanRender.cpp index 626224258..020b8bd4c 100644 --- a/mono.client/tests/NonEuclideanRender.cpp +++ b/mono.client/tests/NonEuclideanRender.cpp @@ -56,9 +56,16 @@ namespace { return {std::istreambuf_iterator(input), {}}; } - void WriteAngleTour(const std::filesystem::path &path, int sample) { - std::string source = - ReadText(core::Paths::Base().parent_path() / "assets/examples/scripts/NonEuclidean.luau"); + void WriteAngleTour( + const std::filesystem::path &builderPath, const std::filesystem::path &cameraPath, int sample + ) { + const auto scripts = core::Paths::Base().parent_path() / "assets/examples/scripts"; + std::ofstream builderOutput(builderPath); + REQUIRE(builderOutput); + builderOutput << ReadText(scripts / "NonEuclidean.luau"); + REQUIRE(builderOutput); + + std::string source = ReadText(scripts / "client/DemoCameras/NonEuclidean.client.luau"); const auto mode = source.find("view:SetAttribute(\"TourMode\", \"overview\")"); REQUIRE(mode != std::string::npos); source.replace( @@ -73,7 +80,7 @@ namespace { std::string_view("view:SetAttribute(\"TourSample\", -1)").size(), "view:SetAttribute(\"TourSample\", " + std::to_string(sample) + ")" ); - std::ofstream output(path); + std::ofstream output(cameraPath); REQUIRE(output); output << source; REQUIRE(output); @@ -130,13 +137,16 @@ TEST_CASE( const auto root = core::Paths::Base() / "non-euclidean-render"; std::filesystem::remove_all(root); std::filesystem::create_directories(root); + const auto cameraScripts = root / "client/DemoCameras"; + std::filesystem::create_directories(cameraScripts); std::vector fingerprints; for (const Shot &shot : SHOTS) { CAPTURE(shot.Name, shot.Sample); const auto script = root / (std::string(shot.Name) + ".luau"); + const auto cameraScript = cameraScripts / (std::string(shot.Name) + ".client.luau"); const auto captureDirectory = root / shot.Name; - WriteAngleTour(script, shot.Sample); + WriteAngleTour(script, cameraScript, shot.Sample); client::Options options; options.Headless = true; @@ -153,3 +163,54 @@ TEST_CASE( std::sort(fingerprints.begin(), fingerprints.end()); CHECK(std::adjacent_find(fingerprints.begin(), fingerprints.end()) == fingerprints.end()); } + +TEST_CASE( + "an unjoined two-world capture sequence writes every image with one claim per portal", + "[client][gpu][portal][non-euclidean][.]" +) { + const auto root = core::Paths::Base() / "cross-world-capture-sequence"; + std::filesystem::remove_all(root); + client::Options options; + options.Headless = true; + options.Worlds = 2; + options.ViewSpacing = 0; + options.Width = WIDTH; + options.Height = HEIGHT; + options.MaximumFrames = 24; + options.MaximumFrameRate = 30; + options.ScriptPath = + (core::Paths::Base().parent_path() / "assets/examples/scripts/CrossWorldSeam.luau").string(); + options.CaptureSequence = root; + client::Client client; + REQUIRE(client.Initialise(options)); + REQUIRE(client.Run() == 0); + for (int frame = 0; frame < options.MaximumFrames; ++frame) { + CAPTURE(frame); + const auto stem = root / std::to_string(frame); + std::ifstream metadataFile(stem.string() + ".json"); + REQUIRE(metadataFile); + const nlohmann::json metadata = nlohmann::json::parse(metadataFile); + CHECK(metadata.at("frame") == frame); + CHECK(metadata.at("view_world") == "client.world"); + const auto &portals = metadata.at("portal_views"); + CHECK(metadata.at("portals") == portals.size()); + std::vector claimedIndices; + for (const auto &portal : portals) + claimedIndices.push_back(portal.at("index").get()); + std::sort(claimedIndices.begin(), claimedIndices.end()); + CHECK(std::adjacent_find(claimedIndices.begin(), claimedIndices.end()) == claimedIndices.end()); + if (frame == options.MaximumFrames - 1) { + REQUIRE(portals.size() == 1); + CHECK(portals[0].at("external") == true); + CHECK(portals[0].at("key") == "Workspace.PortalBlock.Hole"); + CHECK(portals[0].at("image").get() != 0); + CHECK(portals[0].at("capture").is_object()); + } + std::unique_ptr image( + SDL_LoadBMP((stem.string() + ".bmp").c_str()), SDL_DestroySurface + ); + REQUIRE(image); + CHECK(image->w == WIDTH); + CHECK(image->h == HEIGHT); + } +} diff --git a/mono.client/tests/PortalReadiness.cpp b/mono.client/tests/PortalReadiness.cpp index 82d81634c..b8824b6d7 100644 --- a/mono.client/tests/PortalReadiness.cpp +++ b/mono.client/tests/PortalReadiness.cpp @@ -3,10 +3,13 @@ #include #include #include +#include #include +#include #include #include +#include #include #include @@ -110,6 +113,77 @@ TEST_CASE("An origin-free portal promotes empty demand but refuses named assets" CHECK(readiness.Evaluate(evidence).ImageOnly == client::PortalImageOnlyReason::Assets); } +TEST_CASE("origin-free content accepts only canonical local references", "[client][portalreadiness]") { + using client::PortalOriginFreeContent; + CHECK(client::OriginFreePortalContent("engine.Cube") == PortalOriginFreeContent::Mesh); + CHECK(client::OriginFreePortalContent("editable-image://4294967322") == PortalOriginFreeContent::Texture); + CHECK( + client::OriginFreePortalContent("imagegraph-instance://live#colour") == + PortalOriginFreeContent::Texture + ); + CHECK( + client::OriginFreePortalContent("imagegraph://graphs/live.aimagegraph#colour") == + PortalOriginFreeContent::Texture + ); + for (const char *name : + {"remote.atex", + "remote.amesh", + "engine.Unknown", + "editable-image://0", + "editable-image://01", + "editable-image://x", + "imagegraph-instance://live", + "imagegraph-instance://../live#colour", + "imagegraph-instance://live#", + "imagegraph://../live.aimagegraph#colour"}) { + CAPTURE(name); + CHECK(client::OriginFreePortalContent(name) == PortalOriginFreeContent::External); + } +} + +TEST_CASE( + "origin-free portal images require actual owner-scoped residency", "[client][portalreadiness][gpu][.]" +) { + using namespace engine; + REQUIRE(SDL_Init(SDL_INIT_VIDEO)); + struct QuitVideo { + ~QuitVideo() { + SDL_QuitSubSystem(SDL_INIT_VIDEO); + } + } quitVideo; + render::Renderer renderer; + REQUIRE(renderer.Initialise(nullptr)); + scene::RegisterSceneClasses(); + ecs::Store store("portal.runtime-assets"); + const auto entity = store.CreateInstance(scene::EditableImageClass(), "image"); + const auto name = scene::EditableImageContentName(store, entity); + const core::Name owner("portal.runtime-owner"), otherOwner("portal.other-owner"); + CHECK_FALSE(client::OriginFreePortalContentResident(name, renderer, owner)); + CHECK_FALSE(client::OriginFreePortalContentResident(core::Name("editable-image://0"), renderer, owner)); + CHECK(client::OriginFreePortalContentResident(core::Name("engine.Cube"), renderer, owner)); + scene::EditableImage image; + image.Width = image.Height = 2; + image.Pixels.assign(16, 255); + store.Set(entity, image); + render::EditableImageUploader uploader; + const uint64_t beforeUpload = renderer.ResourceRevision(); + REQUIRE(uploader.Refresh(store, renderer, owner) == 1); + CHECK(renderer.ResourceRevision() != beforeUpload); + CHECK(client::OriginFreePortalContentResident(name, renderer, owner)); + CHECK_FALSE(client::OriginFreePortalContentResident(name, renderer, otherOwner)); + CHECK_FALSE(client::OriginFreePortalContentResident(core::Name("remote.atex"), renderer, owner)); + const core::Name graph("imagegraph-instance://live#colour"); + CHECK_FALSE(client::OriginFreePortalContentResident(graph, renderer, owner)); + REQUIRE(renderer.AddTexture(graph, render::BuildTextureData(image), owner)); + CHECK(client::OriginFreePortalContentResident(graph, renderer, owner)); + CHECK_FALSE(client::OriginFreePortalContentResident(graph, renderer, otherOwner)); + const uint64_t beforeDrop = renderer.ResourceRevision(); + renderer.DropContentOwner(owner); + CHECK(renderer.ResourceRevision() != beforeDrop); + CHECK_FALSE(client::OriginFreePortalContentResident(name, renderer, owner)); + CHECK_FALSE(client::OriginFreePortalContentResident(graph, renderer, owner)); +} + TEST_CASE("Arrived portal eye uses bound geometry or a completed foreign image") { CHECK_FALSE(client::PortalArrivedEyeBlocked(false, false, 0)); CHECK_FALSE(client::PortalArrivedEyeBlocked(true, true, 0)); diff --git a/mono.client/tests/PortalSession.cpp b/mono.client/tests/PortalSession.cpp index d34da6340..81e958cf5 100644 --- a/mono.client/tests/PortalSession.cpp +++ b/mono.client/tests/PortalSession.cpp @@ -45,6 +45,7 @@ static void RunPortalSuccessor(int outcome) { const bool readinessExpiry = outcome == 7; const bool readinessDisconnect = outcome == 8; const bool delayedDestination = outcome == 16; + const bool returnSeam = renderContent && !delayedDestination; const bool withheldSnapshot = readinessExpiry || readinessDisconnect; const bool retryRefusal = outcome == 1 || lostCancellationAck || withheldSnapshot; CAPTURE(outcome); @@ -61,6 +62,8 @@ static void RunPortalSuccessor(int outcome) { const auto pane = scene::MakePart(source, part); part.Frame = core::CFrame({0, 3, -30}); const auto exit = scene::MakePart(source, part); + REQUIRE(source.SetInstanceName(pane, "Pane")); + REQUIRE(source.SetInstanceName(exit, "Exit")); REQUIRE(source.SetParent(pane, scene::WorkspaceOf(source))); REQUIRE(source.SetParent(exit, scene::WorkspaceOf(source))); const auto portal = source.CreateInstance(ecs::Classes::Find(core::Name("Portal")), "Window"); @@ -125,6 +128,7 @@ static void RunPortalSuccessor(int outcome) { offer.Through = scene::SeamMapping(seams.front()); } std::optional sourcePeer; + std::optional sourceIdentity; std::vector> sourceReplies, destinationReplies; bool proceeded = false, resumed = false, committed = false, destinationInput = false; @@ -238,6 +242,54 @@ static void RunPortalSuccessor(int outcome) { store.GetMutable(part)->ColourMap = core::Name(published.Name); }; if (renderContent) contentWall(destination, destinationContent); + if (outcome == 0) { + // The arrival eye may look back through the far endpoint. Keep that route + // paired with the source seam instead of advertising an empty destination. + scene::PartDesc part; + part.Frame = core::CFrame({0, 3, -30}); + part.Size = {40, 40, .4f}; + const auto pane = scene::MakePart(destination, part); + part.Frame = core::CFrame({0, 3, -5}); + const auto exit = scene::MakePart(destination, part); + REQUIRE(destination.SetInstanceName(pane, "Exit")); + REQUIRE(destination.SetInstanceName(exit, "Pane")); + REQUIRE(destination.SetParent(pane, scene::WorkspaceOf(destination))); + REQUIRE(destination.SetParent(exit, scene::WorkspaceOf(destination))); + const auto portal = destination.CreateInstance(ecs::Classes::Find(core::Name("Portal")), "Window"); + REQUIRE(destination.SetParent(portal, pane)); + destination.Set(portal, scene::Portal{exit, core::Name("source")}); + std::vector sourceSeams, destinationSeams; + REQUIRE(scene::GatherPortalSeams(source, sourceSeams) == 1); + REQUIRE(scene::GatherPortalSeams(destination, destinationSeams) == 1); + const auto sourceToDestination = scene::SeamMapping(sourceSeams.front()); + const auto destinationToSource = scene::SeamMapping(destinationSeams.front()); + const core::Vector3 samplePoint{2, 5, -8}; + const core::Vector3 sampleDirection{.3f, .5f, -.8f}; + CHECK( + (destinationToSource.Point(sourceToDestination.Point(samplePoint)) - samplePoint).Magnitude() < + 0.01f + ); + CHECK( + (destinationToSource.Rotate(sourceToDestination.Rotate(sampleDirection)) - sampleDirection) + .Magnitude() < 0.001f + ); + } + if (returnSeam) { + // The source observation remains live only while the successor has a + // linked return seam. Keep it outside the camera's prewarm radius so this + // content test retains the source without adding another eye request. + scene::PartDesc paneDesc; + paneDesc.Frame = core::CFrame({1000, 3, -5}); + paneDesc.Size = {40, 40, .4f}; + const auto pane = scene::MakePart(destination, paneDesc); + paneDesc.Frame = core::CFrame({1100, 3, -5}); + const auto exit = scene::MakePart(destination, paneDesc); + REQUIRE(destination.SetParent(pane, scene::WorkspaceOf(destination))); + REQUIRE(destination.SetParent(exit, scene::WorkspaceOf(destination))); + const auto portal = destination.CreateInstance(ecs::Classes::Find(core::Name("Portal")), "Return"); + REQUIRE(destination.SetParent(portal, pane)); + destination.Set(portal, scene::Portal{exit, core::Name("source")}); + } bool destinationContentRequestedBeforeAdoption = false; const auto contentRequest = [&](ContentPublication &published, replication::ClientId peer, std::span bytes) { @@ -310,11 +362,33 @@ static void RunPortalSuccessor(int outcome) { reply.Message.Sequence = ++topologySequence; reply.Message.Correlation = frame.Message.Correlation; std::string failure; - REQUIRE( - scene::EncodeCameraPortalTopology( - {frame.Message.To.World, 1, {}}, reply.Message.Payload, failure - ) + scene::CameraPortalTopology topology{frame.Message.To.World, topologySequence, {}}; + ecs::Store *owner = nullptr; + if (frame.Message.To.World == "source") { + owner = &source; + } else if (frame.Message.To.World == offer.Claim.Destination) { + owner = &destination; + } + if (owner != nullptr) { + std::vector seams; + scene::GatherPortalSeams(*owner, seams); + for (const auto &seam : seams) { + if (!seam.Crosses) continue; + scene::CameraPortalMouth mouth; + REQUIRE( + scene::CopyCameraPortalMouth( + owner->GetFullName(seam.Camera), seam, mouth, failure + ) + ); + topology.Mouths.push_back(std::move(mouth)); + } + } + std::sort( + topology.Mouths.begin(), + topology.Mouths.end(), + [](const auto &left, const auto &right) { return left.Name < right.Name; } ); + REQUIRE(scene::EncodeCameraPortalTopology(topology, reply.Message.Payload, failure)); REQUIRE(stream.Queue(reply) == world::PresentationStatus::Ok); continue; } @@ -391,6 +465,8 @@ static void RunPortalSuccessor(int outcome) { if (request.Kind == game::PortalSessionKind::Fresh) { sourceFresh++; sourcePeer = peer; + sourceIdentity = from.IdentityOf(peer); + REQUIRE(sourceIdentity.has_value()); game::PortalSessionMessage ready; ready.Kind = game::PortalSessionKind::Ready; ready.Attempt = request.Attempt; @@ -435,7 +511,7 @@ static void RunPortalSuccessor(int outcome) { CHECK(now - *offerSentAt >= 15); CHECK(request.Diagnostic == "destination connection or snapshot did not become ready"); REQUIRE(destinationPeer.has_value()); - CHECK(to->IdentityOf(*destinationPeer) == from.IdentityOf(*sourcePeer)); + CHECK(to->IdentityOf(*destinationPeer) == sourceIdentity); } if (readinessDisconnect) { CHECK(transportLost); @@ -459,7 +535,7 @@ static void RunPortalSuccessor(int outcome) { } if (receivePresentation(*destinationPresentation, destinationConsumers, bytes)) { destinationPeer = peer; - CHECK(to->IdentityOf(peer) == from.IdentityOf(*sourcePeer)); + CHECK(to->IdentityOf(peer) == sourceIdentity); if (delayedDestination && !destinationLatencyAppliedAt) { REQUIRE(to->SetSimulatedLatency(peer, 150)); destinationLatencyAppliedAt = now; @@ -486,7 +562,7 @@ static void RunPortalSuccessor(int outcome) { } CHECK(request.Claim == offer.Claim); CHECK(request.Attempt == offer.Attempt); - CHECK(to->IdentityOf(peer) == from.IdentityOf(*sourcePeer)); + CHECK(to->IdentityOf(peer) == sourceIdentity); if (delayedDestination && request.Kind == game::PortalSessionKind::Resume) delayedResumeReceivedAt = now; if (delayedDestination && request.Kind == game::PortalSessionKind::Commit) @@ -709,8 +785,7 @@ end) if (observeContent) { CHECK(lateContentAuthored); CHECK(sourceManifestWaited); - // The delayed successor resolves its own camera after adoption. With no - // return seam visible, the old source eye creates no late content demand. + // Delayed admission does not request the source bundle. CHECK(sourceContent.BundleRequests == (delayedDestination ? 0 : 1)); if (renderContent) { CHECK(destinationContentRequestedBeforeAdoption); @@ -810,12 +885,13 @@ end) if (outcome >= 2) CHECK(sourceInputsDuringContinuation > 0); CHECK(sourceFresh == 1); CHECK(destinationFresh == 0); - CHECK_FALSE(sourceConsumers.Endpoints.empty()); + const bool portalConsumersExpected = outcome == 0 || delayedDestination || returnSeam; + CHECK(sourceConsumers.Endpoints.empty() == !portalConsumersExpected); CHECK(destinationConsumers.Revision != 0); - CHECK(destinationConsumers.Endpoints.empty() == (outcome != 0 && !delayedDestination)); + CHECK(destinationConsumers.Endpoints.empty() == !portalConsumersExpected); CHECK(destinationConsumers.Session == sourceConsumers.Session); CHECK(requestedImage == (outcome == 0)); - CHECK(requestedEye == (outcome == 0 || delayedDestination)); + CHECK(requestedEye == (outcome == 0)); CHECK(refusalSeen == retryRefusal); CHECK(destinationRefusalSeen == (outcome == 2 || outcome == 3)); CHECK(transportLost == (outcome == 4 || outcome == 5 || readinessDisconnect)); diff --git a/mono.client/tests/PortalWalk.cpp b/mono.client/tests/PortalWalk.cpp index 9f1d44831..ddbcb7fd6 100644 --- a/mono.client/tests/PortalWalk.cpp +++ b/mono.client/tests/PortalWalk.cpp @@ -1003,15 +1003,26 @@ end) const auto &capture = portals.at(0).at("capture"); REQUIRE(capture.is_object()); if (markerFrame != frame) { - CHECK(capture.at("producer") == "walk.destination"); - CHECK(capture.at("scope") == "opaque-lighting"); - CHECK(capture.at("spatial_overlay_image").get() != 0); - if (roomShader == RoomShader::Lens) { - CHECK(capture.at("lens_count") == 1); - REQUIRE(capture.at("lenses").size() == 1); - CHECK(capture.at("lenses").at(0).at("shader") == "RoomLens"); - CHECK(capture.at("lenses").at(0).at("program_hash") != std::string(64, '0')); - CHECK(std::isfinite(capture.at("lens_time").get())); + const auto &handoff = previousSample->at("portal_handoff"); + if (handoff.at("proceed_eye_source_remote").get()) { + CHECK(capture.at("producer") == "walk.destination"); + CHECK(capture.at("scope") == "opaque-lighting"); + CHECK(capture.at("spatial_overlay_image").get() != 0); + if (roomShader == RoomShader::Lens) { + CHECK(capture.at("lens_count") == 1); + REQUIRE(capture.at("lenses").size() == 1); + CHECK(capture.at("lenses").at(0).at("shader") == "RoomLens"); + CHECK(capture.at("lenses").at(0).at("program_hash") != std::string(64, '0')); + CHECK(std::isfinite(capture.at("lens_time").get())); + } + } else { + // Local replicas bake spatial UI and lenses into the complete capture. + CHECK(capture.at("producer") == handoff.at("proceed_eye_source")); + CHECK(capture.at("producer") == sample.at("input_world")); + CHECK(capture.at("scope") == "complete-world"); + CHECK(capture.at("spatial_overlay_image").get() == 0); + CHECK(capture.at("lens_count") == 0); + CHECK(capture.at("lenses").empty()); } } const auto &position = capture.at("position"); @@ -1039,7 +1050,7 @@ end) // Destination shifts right, then the eye world's lens shifts the portal left. const int shift = roomShader == RoomShader::Lens - ? image->w / 16 - (markerSample.value("eye_world", "") == "server.world" + ? image->w / 16 - (markerSample.at("presented_eye_world") == "server.world" ? image->w / 32 : 0) : 0; diff --git a/mono.client/tests/Presentation.cpp b/mono.client/tests/Presentation.cpp index 8dbda747d..b0c17b9a9 100644 --- a/mono.client/tests/Presentation.cpp +++ b/mono.client/tests/Presentation.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -234,27 +233,29 @@ TEST_CASE("active scenes submit a collected GPU particle field", "[client][activ using namespace engine; effects::RegisterEffectComponents(); scene::RegisterSceneClasses(); - physics::RegisterStormComponents(); render::RegisterPresentationComponents(); Universe worlds({.Mode = world::ExecutionMode::WorldParallel}); - const auto stormWorld = worlds.Create({.Name = Name("Storm")}); - worlds.Enter(stormWorld, [](Store &store) { + const auto fieldWorld = worlds.Create({.Name = Name("Field")}); + worlds.Enter(fieldWorld, [](Store &store) { const auto camera = store.CreateInstance(scene::CameraClass(), "Eye"); store.Set(camera, scene::Transform{core::CFrame(Vector3{0, 80, 240})}); store.Set(camera, scene::Camera{}); store.SetResource(scene::ActiveCamera{camera}); store.SetResource(render::DrawList{}); - physics::Storm storm; - storm.State.Position = {12, 0, -8}; - storm.State.ElapsedSeconds = 42.0f; - physics::SetStorm(store, storm); - const auto field = store.CreateInstance(ecs::Classes::Find(Name("GpuParticleField")), "Funnel"); - store.Set(field, scene::GpuParticleField{.RequestedCount = 262'144, .Seed = 73}); + const auto field = store.CreateInstance(ecs::Classes::Find(Name("GpuParticleField")), "Particles"); + store.Set(field, scene::Transform{core::CFrame(Vector3{12, 0, -8})}); + scene::GpuParticleField particles{}; + particles.RequestedCount = 262'144; + particles.Seed = 73; + particles.SpawnSamples.push_back( + {.Position = {1, 2, 3}, .Lifetime = 4, .Velocity = {0, 5, 0}, .Layer = 0} + ); + store.Set(field, particles); }); client::ActiveSceneCollector collector; const std::array demands{ - client::ActiveSceneDemand{world::Presentation{stormWorld, .016f, .25f}, Name("storm-pipeline")}, + client::ActiveSceneDemand{world::Presentation{fieldWorld, .016f, .25f}, Name("field-pipeline")}, }; REQUIRE(collector.Collect(worlds, demands, {960, 540}) == 1); const client::ActiveScene &scene = collector.Scenes().front(); @@ -262,10 +263,11 @@ TEST_CASE("active scenes submit a collected GPU particle field", "[client][activ REQUIRE(scene.View.GpuParticles.has_value()); CHECK(scene.View.GpuParticles->Field.Seed == 73); CHECK(scene.View.GpuParticles->Field.RequestedCount == 262'144); - CHECK(scene.View.GpuParticles->Centre == Vector3{12, 0, -8}); - CHECK(scene.View.GpuParticles->Seconds == 42.0f); + CHECK(scene.View.GpuParticles->Frame.Position == Vector3{12, 0, -8}); + REQUIRE(scene.View.GpuParticles->Field.SpawnSamples.size() == 1); + CHECK(scene.View.GpuParticles->Field.SpawnSamples.front().Position == Vector3{1, 2, 3}); - collector.SubmitBatch(stormWorld, scene.View, 960, 540, false, {}, [](std::span views) { + collector.SubmitBatch(fieldWorld, scene.View, 960, 540, false, {}, [](std::span views) { REQUIRE(views.size() == 1); REQUIRE(views.front().GpuParticles.has_value()); CHECK(views.front().GpuParticles->Field.Seed == 73); @@ -279,18 +281,16 @@ TEST_CASE( using namespace engine; client::ActiveScene activeScene; activeScene.Frame = std::make_unique(); - activeScene.Frame->GpuParticles = render::GpuParticleFieldView{ - .Field = {.RequestedCount = 262'144, .Seed = 73}, - .Storm = scene::EfPreset(scene::EfCategory::EF3), - .Centre = {12, 0, -8}, - .Seconds = 42.0f, - }; + render::GpuParticleFieldView particles{}; + particles.Field.RequestedCount = 262'144; + particles.Field.Seed = 73; + particles.Frame = core::CFrame(Vector3{12, 0, -8}); + activeScene.Frame->GpuParticles = particles; render::View view; client::BindDisplayedSceneFields(&activeScene, view); REQUIRE(view.GpuParticles.has_value()); CHECK(view.GpuParticles->Field.Seed == 73); - CHECK(view.GpuParticles->Centre == Vector3{12, 0, -8}); - CHECK(view.GpuParticles->Seconds == 42.0f); + CHECK(view.GpuParticles->Frame.Position == Vector3{12, 0, -8}); client::BindDisplayedSceneFields(nullptr, view); CHECK_FALSE(view.GpuParticles.has_value()); @@ -2004,6 +2004,7 @@ TEST_CASE("foreground portal bodies come from the viewer's replica", "[client][p } TEST_CASE("a mapped follow arm keeps the pose the camera already has", "[client][camera-portal-world]") { + const bool rebased = GENERATE(false, true); // **The arm and the eye are one decision, and this is where they came apart.** // A follow camera whose subject has just walked through a same-world mouth // swings its arm back out through the mouth it came in by, and `PlaceCamera` @@ -2026,13 +2027,25 @@ TEST_CASE("a mapped follow arm keeps the pose the camera already has", "[client] REQUIRE(engine::scene::GatherPortalSeams(store, seams) == 2); REQUIRE(engine::scene::PlaceCamera(store)); placed = store.Get(pair.Camera)->Frame; + if (rebased) { + engine::scene::CameraPortalView history; + REQUIRE( + engine::scene::StepCameraPortalView( + history, universe.NameOf(pair.World).Text(), placed, {} + ) == engine::scene::CameraPortalStep::Settled + ); + REQUIRE( + engine::scene::RebaseCameraPortalView(history, engine::scene::SeamMapping(seams.front())) + ); + REQUIRE(history.Route.empty()); + REQUIRE((history.FromInput.Place({}).Position).Magnitude() > 1.0f); + store.Set(pair.Camera, history); + } }); // The arm really did cross, and the map is what carried it: the eye is in // the plain's chart, twelve studs out from the mouth, rather than up the // corridor where the orbit was. A case that stopped here would prove nothing. - const engine::core::CFrame orbit = placed * engine::core::CFrame{}.Inverse(); - (void)orbit; CHECK(placed.Position.X == Catch::Approx(0.0f).margin(0.5f)); CHECK(placed.Position.Z == Catch::Approx(12.0f).margin(0.5f)); @@ -2043,7 +2056,7 @@ TEST_CASE("a mapped follow arm keeps the pose the camera already has", "[client] resolved = client::ResolveCameraPortalWorld(universe, pair.World, pair.World, eye, lens); // The world is unchanged - one world holds both charts - and the pose is - // untouched, because the route has no map of its own to compose onto it. + // untouched. A body-rebased empty route must discard its previous input map. CHECK(resolved == pair.World); CHECK(eye.FuzzyEq(placed, .0001f)); } diff --git a/mono.client/tests/PresentationPacing.cpp b/mono.client/tests/PresentationPacing.cpp new file mode 100644 index 000000000..2d18b0718 --- /dev/null +++ b/mono.client/tests/PresentationPacing.cpp @@ -0,0 +1,73 @@ +#include "PresentationPacing.hpp" + +#include +#include + +#include + +TEST_SUITE_ID("client.presentation-pacing") +TEST_DEPENDS("engine.render.presentation-schedule") + +using engine::render::PresentationSchedule; +using namespace std::chrono_literals; + +TEST_CASE("the default client has a presentation opportunity on every update", "[client][presentation]") { + const client::Options settings; + REQUIRE(settings.Uncapped); + PresentationSchedule schedule; + schedule.SetRate(client::PresentationRateOf(settings)); + const PresentationSchedule::TimePoint start; + REQUIRE(schedule.Due(start)); + schedule.Consume(start); + CHECK(schedule.Due(start + 1ns)); + CHECK(schedule.Remaining(start + 1ns) == 0ns); +} + +TEST_CASE( + "an explicit FPS cap schedules presentation independently of simulation", "[client][presentation]" +) { + client::Options settings; + settings.MaximumFrameRate = 100; + PresentationSchedule schedule; + schedule.SetRate(client::PresentationRateOf(settings)); + const PresentationSchedule::TimePoint start; + REQUIRE(schedule.Due(start)); + schedule.Consume(start); + CHECK_FALSE(schedule.Due(start + 9ms)); + CHECK(schedule.Due(start + 10ms)); + CHECK(settings.TickRate == 60.0); + + settings.Uncapped = false; + schedule.SetRate(client::PresentationRateOf(settings)); + CHECK(schedule.Rate() == 0); + CHECK(schedule.Due(start + 1ns)); +} + +TEST_CASE( + "headless service hosts retain a bounded cadence with uncapped defaults", "[client][presentation]" +) { + for (const bool presentationHost : {false, true}) { + CAPTURE(presentationHost); + client::Options settings; + settings.Headless = true; + settings.DataFactory = !presentationHost; + settings.PresentationSession = presentationHost ? 1 : 0; + PresentationSchedule schedule; + schedule.SetRate(client::PresentationRateOf(settings)); + REQUIRE(schedule.Rate() == 60); + const PresentationSchedule::TimePoint start; + REQUIRE(schedule.Due(start)); + schedule.Consume(start); + CHECK_FALSE(schedule.Due(start + 1ms)); + CHECK(schedule.Due(start + 17ms)); + + settings.MaximumFrameRate = 240; + CHECK(client::PresentationRateOf(settings) == 240); + settings.Uncapped = false; + CHECK(client::PresentationRateOf(settings) == 240); + } + + client::Options ordinaryHeadless; + ordinaryHeadless.Headless = true; + CHECK(client::PresentationRateOf(ordinaryHeadless) == 0); +} diff --git a/mono.client/tests/ReplicaArrival.cpp b/mono.client/tests/ReplicaArrival.cpp index e9d8efd6b..a1f1f01c6 100644 --- a/mono.client/tests/ReplicaArrival.cpp +++ b/mono.client/tests/ReplicaArrival.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -255,13 +254,11 @@ namespace { return found; } - // What the client's scripts wrote down, which is the only thing a - // replica can say without writing a property. + // grug reads results from the script's private client-owned row. std::string Log() { engine::ecs::AttributeValue value; - if (!engine::ecs::GetAttribute( - Replica, engine::scene::WorkspaceOf(Replica), Name("log"), value - )) { + const Entity log = Replica.FindFirstChild(engine::scene::WorkspaceOf(Replica), "ClientScriptLog"); + if (!engine::ecs::GetAttribute(Replica, log, Name("log"), value)) { return {}; } return value.String; @@ -490,7 +487,9 @@ TEST_CASE("a LocalScript authored on the authority runs on the client", "[client link.Program( "Authored", link.ContainerOf(engine::scene::PLAYER_SCRIPTS_NAME), - "workspace:SetAttribute('log', 'ran')\n" + "local log = Instance.new('Folder', workspace)\n" + "log.Name = 'ClientScriptLog'\n" + "log:SetAttribute('log', 'ran')\n" ); REQUIRE(link.Join()); @@ -498,6 +497,14 @@ TEST_CASE("a LocalScript authored on the authority runs on the client", "[client INFO(link.ReplicaScripts->LastError()); CHECK(link.Log() == "ran"); + const Entity log = + link.Replica.FindFirstChild(engine::scene::WorkspaceOf(link.Replica), "ClientScriptLog"); + REQUIRE(log != NULL_ENTITY); + CHECK(Store::IsPredicted(log)); + CHECK(engine::ecs::IsClientLocalInstance(link.Replica, log)); + CHECK( + link.World.FindFirstChild(engine::scene::WorkspaceOf(link.World), "ClientScriptLog") == NULL_ENTITY + ); } TEST_CASE("the program crosses and not a path the client could open", "[client][replication][scripting]") { @@ -554,7 +561,9 @@ TEST_CASE("a disabled script arrives disabled", "[client][replication][scripting const Entity off = link.Program( "Stopped", link.ContainerOf(engine::scene::PLAYER_SCRIPTS_NAME), - "workspace:SetAttribute('log', 'ran')\n" + "local log = Instance.new('Folder', workspace)\n" + "log.Name = 'ClientScriptLog'\n" + "log:SetAttribute('log', 'ran')\n" ); link.World.Set(off, engine::script::Disabled{}); @@ -880,38 +889,43 @@ TEST_CASE( CHECK(link.Client->Forgotten().empty()); } -TEST_CASE("a server storm reaches replica scripts as authoritative state", "[client][replication][storm]") { +TEST_CASE( + "a script-authored field reaches replica scripts as authoritative state", "[client][replication][ecs]" +) { Link link; - engine::physics::Storm storm; - storm.State.Position = {37.0f, 4.0f, -12.0f}; - storm.State.ElapsedSeconds = 9.5f; - storm.State.Parameters.Energy = 0.8f; - storm.State.LifecycleEnabled = true; - engine::physics::SetStorm(link.World, storm); - + REQUIRE(link.WorldScripts->Run(R"( + assert(World:DefineComponent("WeatherTest.State", { + Position = "Vector3", ElapsedSeconds = "number", Energy = "number", Enabled = "boolean", + })) + assert(World:SetComponentTags("WeatherTest.State", {"replicated"})) + local anchor = Instance.new("Part") + anchor.Name = "WeatherAnchor" + anchor.Parent = workspace + anchor:SetComponent("WeatherTest.State", { + Position = Vector3.new(37, 4, -12), ElapsedSeconds = 9.5, Energy = 0.8, Enabled = true, + }) + )")); REQUIRE(link.Join()); link.Settle(); + REQUIRE(link.ReplicaScripts->Run(R"( + local state = workspace.WeatherAnchor:GetComponent("WeatherTest.State") + assert(state ~= nil and state.Enabled) + assert(state.Position == Vector3.new(37, 4, -12)) + assert(state.ElapsedSeconds == 9.5 and math.abs(state.Energy - 0.8) < 1e-5) + )")); - const engine::physics::Storm *arrived = engine::physics::StormOf(link.Replica); - REQUIRE(arrived != nullptr); - CHECK(arrived->State.Position.FuzzyEq(storm.State.Position)); - CHECK(arrived->State.ElapsedSeconds == storm.State.ElapsedSeconds); - CHECK(arrived->State.Parameters.Energy == storm.State.Parameters.Energy); - - storm.State.Position.X = 51.0f; - storm.State.ElapsedSeconds = 10.0f; - engine::physics::SetStorm(link.World, storm); + link.Tick([&] { + REQUIRE(link.WorldScripts->Run(R"( + workspace.WeatherAnchor:SetComponent("WeatherTest.State", { + Position = Vector3.new(51, 4, -12), ElapsedSeconds = 10, + }) + )")); + }); link.Settle(); - - arrived = engine::physics::StormOf(link.Replica); - REQUIRE(arrived != nullptr); - CHECK(arrived->State.Position.FuzzyEq(storm.State.Position)); - CHECK(arrived->State.ElapsedSeconds == storm.State.ElapsedSeconds); - REQUIRE(link.ReplicaScripts != nullptr); - CHECK(link.ReplicaScripts->Run(R"( - local state = Storm.Snapshot() + REQUIRE(link.ReplicaScripts->Run(R"( + local state = workspace.WeatherAnchor:GetComponent("WeatherTest.State") assert(state.Position == Vector3.new(51, 4, -12)) - assert(state.ElapsedSeconds == 10 and math.abs(state.Parameters.Energy - 0.8) < 1e-5) + assert(state.ElapsedSeconds == 10 and math.abs(state.Energy - 0.8) < 1e-5) )")); } diff --git a/mono.client/tests/ReplicaScripts.cpp b/mono.client/tests/ReplicaScripts.cpp index c9fb15157..b972ef2c1 100644 --- a/mono.client/tests/ReplicaScripts.cpp +++ b/mono.client/tests/ReplicaScripts.cpp @@ -61,17 +61,15 @@ using engine::script::Runtime; namespace { constexpr float FRAME_SECONDS = 1.0f / 60.0f; - // The two spellings of "append to the log", which is all the programs below - // differ by. `engine.script.guisurface`'s trick: a chunk's globals are its - // own and `Run` reports whether it ran rather than what it evaluated to, so - // the answer crosses as an attribute on the `Workspace`. - // - // **An attribute rather than a property, and that is not a workaround.** - // `ecs::SetAttribute` writes a table on the world; `Store::SetProperty` is - // refused in a replica. A client script that could log through the second one - // would mean the trust boundary was not there. - const char *NOTE = "local function note(mark)\n" - " workspace:SetAttribute('log', (workspace:GetAttribute('log') or '') .. mark)\n" + // Script results stay on a client-created row. grug must not use logging + // to give a LocalScript permission to change authoritative Workspace data. + const char *NOTE = "local log = workspace:FindFirstChild('ClientScriptLog')\n" + "if not log then\n" + "log = Instance.new('Folder', workspace)\n" + "log.Name = 'ClientScriptLog'\n" + "end\n" + "local function note(mark)\n" + "log:SetAttribute('log', (log:GetAttribute('log') or '') .. mark)\n" "end\n"; // A client's replica: the VM opens over an empty world, the world arrives, @@ -156,18 +154,13 @@ namespace { } std::string Log() { - engine::ecs::AttributeValue value; - if (!engine::ecs::GetAttribute(World, engine::scene::WorkspaceOf(World), Name("log"), value)) { - return {}; - } - return value.String; + return Read("log"); } std::string Read(const char *attribute) { engine::ecs::AttributeValue value; - if (!engine::ecs::GetAttribute( - World, engine::scene::WorkspaceOf(World), Name(attribute), value - )) { + const Entity log = World.FindFirstChild(engine::scene::WorkspaceOf(World), "ClientScriptLog"); + if (!engine::ecs::GetAttribute(World, log, Name(attribute), value)) { return {}; } return value.String; @@ -390,11 +383,15 @@ TEST_CASE( "Writer", mine, true, - "local ok, err = pcall(function() workspace.Rock.Transparency = 0.5 end)\n" - "workspace:SetAttribute('refused', tostring(not ok))\n" - "workspace:SetAttribute('why', tostring(err))\n" - "local made = pcall(function() Instance.new('Part', workspace) end)\n" - "workspace:SetAttribute('minted', tostring(made))\n" + std::string(NOTE) + + "local ok, err = pcall(function() workspace.Rock.Transparency = 0.5 end)\n" + "log:SetAttribute('refused', tostring(not ok))\n" + "log:SetAttribute('why', tostring(err))\n" + "local attribute = pcall(function() workspace:SetAttribute('authority', true) end)\n" + "log:SetAttribute('attributeRefused', tostring(not attribute))\n" + "local made = Instance.new('Part', workspace)\n" + "made.Name = 'Minted'\n" + "made.Transparency = 0.25\n" ); replica.Adopt(); @@ -405,16 +402,26 @@ TEST_CASE( // delta, so the refusal has to arrive as an error at the line that made it. CHECK(replica.Read("refused") == "true"); CHECK(replica.Read("why").find("replica") != std::string::npos); + CHECK(replica.Read("attributeRefused") == "true"); + engine::ecs::AttributeValue authorityAttribute; + CHECK_FALSE( + engine::ecs::GetAttribute( + replica.World, engine::scene::WorkspaceOf(replica.World), Name("authority"), authorityAttribute + ) + ); // And the value did not move. const auto *visual = replica.World.Get(part); REQUIRE(visual != nullptr); CHECK(visual->Transparency == 0.0f); - // `Instance.new` answers a null entity in an adopt-only store, which the - // binding turns into an error of its own - a client script cannot mint a row - // the authority is also handing indices out for. - CHECK(replica.Read("minted") == "false"); + const Entity minted = replica.World.FindFirstChild(engine::scene::WorkspaceOf(replica.World), "Minted"); + REQUIRE(minted != NULL_ENTITY); + CHECK(Store::IsPredicted(minted)); + CHECK(engine::ecs::IsClientLocalInstance(replica.World, minted)); + const auto *mintedVisual = replica.World.Get(minted); + REQUIRE(mintedVisual != nullptr); + CHECK(mintedVisual->Transparency == 0.25f); } TEST_CASE("tearing a replica down leaves no runtime alive", "[client][replication][scripting]") { diff --git a/mono.client/tests/Replicated.cpp b/mono.client/tests/Replicated.cpp index 1f05d5149..5428cb90e 100644 --- a/mono.client/tests/Replicated.cpp +++ b/mono.client/tests/Replicated.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -551,6 +552,10 @@ TEST_CASE("a replica keeps its third-person camera inside received walls", "[cli const Entity camera = client::AimReplicaViewer(replica.World, CFrame{}, engine::scene::Camera{}); REQUIRE(camera != engine::ecs::NULL_ENTITY); CHECK(replica.World.ClassOf(camera) == engine::ecs::Classes::Find(engine::core::Name("Camera"))); + CHECK(Store::IsPredicted(camera)); + CHECK(replica.World.InstanceNameOf(camera) == engine::core::Name("Camera")); + CHECK(replica.World.Has(camera)); + CHECK(replica.World.Has(camera)); auto *controller = replica.World.ResourceMutable(); REQUIRE(controller != nullptr); diff --git a/mono.client/tests/SceneTick.cpp b/mono.client/tests/SceneTick.cpp index 7109cbfe3..9629cf5b5 100644 --- a/mono.client/tests/SceneTick.cpp +++ b/mono.client/tests/SceneTick.cpp @@ -10,6 +10,8 @@ // testable on a machine with no GPU, and drawing the line there is what keeps // the suite runnable everywhere. +#include "WorldSystems.hpp" + #include #include #include @@ -28,14 +30,17 @@ #include #include #include +#include #include -#include #include #include +#include #include #include #include #include +#include +#include #include #include #include @@ -43,11 +48,14 @@ #include #include #include +#include #include #include +#include #include #include #include +#include #include #include @@ -63,6 +71,7 @@ #include #include #include +#include TEST_SUITE_ID("client.scene.tick") TEST_DEPENDS("engine.ecs.scheduler") @@ -78,6 +87,8 @@ TEST_DEPENDS("engine.gui.compile") TEST_DEPENDS("engine.gui.input") TEST_DEPENDS("engine.gui.typing") TEST_DEPENDS("engine.game.roundtrip") +TEST_DEPENDS("engine.weather.runtime") +TEST_DEPENDS("engine.weather.consumers") using Catch::Approx; using engine::core::FrameGraph; @@ -96,8 +107,11 @@ using engine::scene::WorldBounds; namespace { constexpr uint32_t ENTITIES = 512; constexpr float STEP = 1.0f / 60.0f; + // The authored world has one server script, one StarterPlayerScript, and + // its local-player copy in a combined host. + constexpr size_t BLADEBORNE_STARTUP_SCRIPT_COUNT = 2; // The world loader puts each child in this cache. - constexpr size_t BLADEBORNE_SOURCE_COUNT = 15; + constexpr size_t BLADEBORNE_SOURCE_COUNT = 14; // A world and the scheduler that ticks it. Nothing else - which is the // point: after the scene loads, everything the tick reads and writes is @@ -318,23 +332,44 @@ TEST_CASE("GuiInteraction routes client controls into visible scripted state", " } TEST_CASE( - "a GUI weather preset reaches the resident emitter before its next step", "[client][gui][particles]" + "a GUI weather preset changes authored controls before the next accepted precipitation boundary", + "[client][gui][particles][weather]" ) { Session session("Weather.luau"); Store &store = session.World; session.Tick(1); - const engine::ecs::Entity workspace = engine::scene::WorkspaceOf(store); - const engine::ecs::Entity emitter = FirstNamedDescendant(store, workspace, "Weather Rain"); - const engine::ecs::Entity clear = FirstGuiElement(store, "Weather CLEAR"); - REQUIRE(emitter != engine::ecs::NULL_ENTITY); + const auto environment = engine::scene::EnvironmentOf(store); + REQUIRE(environment.HasWeatherCompute); + const auto provider = environment.CloudProvider; + REQUIRE(provider != engine::ecs::NULL_ENTITY); + CHECK(store.InstanceNameOf(provider) == engine::core::Name("Weather Clouds")); + const auto clear = FirstGuiElement(store, "Weather Preset CLEAR"); REQUIRE(clear != engine::ecs::NULL_ENTITY); - const auto *slot = store.Get(emitter); - REQUIRE(slot != nullptr); - REQUIRE(slot->Index != engine::effects::NO_SLOT); - auto *particles = store.ResourceMutable(); - REQUIRE(particles != nullptr); - CHECK(particles->RuntimeStates[slot->Index].ContinuousRate > 0.0f); + REQUIRE(store.Get(provider)); + CHECK(store.Get(provider)->PrecipitationRate == Approx(38)); + engine::render::WeatherEffectsFrame precipitation; + engine::effects::RibbonBuffer ribbons; + std::vector lights; + const auto collectPrecipitation = [&] { + const auto *active = store.Resource(); + REQUIRE(active); + const auto *transform = store.Get(active->Entity); + REQUIRE(transform); + engine::render::View view; + view.World = store.Identity(); + view.WorldName = engine::core::Name(store.Name()); + view.CameraFrame = transform->Frame; + view.Lighting = engine::scene::LightingOf(store); + view.Instances = session.Drawn(); + engine::render::CollectWeatherEffects(store, view, precipitation, ribbons, lights); + }; + collectPrecipitation(); + REQUIRE(precipitation.Precipitation); + CHECK(precipitation.Precipitation->Source == provider); + CHECK(engine::scene::ValidGpuParticleField(precipitation.Precipitation->Field)); + CHECK_FALSE(precipitation.Precipitation->Field.SpawnSamples.empty()); + const auto wetDefinition = precipitation.Definition; engine::gui::CompileRequest request; request.Display = { @@ -369,11 +404,26 @@ TEST_CASE( frame(false); frame(true); + const auto clickTick = store.Time().Tick; frame(false); - - particles = store.ResourceMutable(); - CHECK(particles->RuntimeStates[slot->Index].ContinuousRate == 0.0f); - CHECK(particles->RuntimeStates[slot->Index].DeviceRetiring); + CHECK(store.Time().Tick == clickTick + 1); + CHECK(store.Get(provider)->PrecipitationRate == 0); + // GUI handlers run after the clock pass. The accepted definition drains its + // existing tick before the next boundary admits the authored preset. + REQUIRE(engine::scene::WeatherControlsOf(store, provider)); + CHECK(engine::scene::WeatherControlsOf(store, provider)->PrecipitationRate == Approx(38)); + collectPrecipitation(); + REQUIRE(precipitation.Precipitation); + CHECK(precipitation.Definition == wetDefinition); + session.Tick(1); + CHECK(engine::scene::WeatherControlsOf(store, provider)->PrecipitationRate == 0); + collectPrecipitation(); + REQUIRE(precipitation.Sample); + CHECK(precipitation.Sample->Precipitation.LiquidMillimetresPerHour == 0); + CHECK(precipitation.Sample->Precipitation.SnowMillimetresPerHour == 0); + CHECK(precipitation.Sample->Precipitation.HailMillimetresPerHour == 0); + CHECK_FALSE(precipitation.Precipitation); + CHECK(precipitation.Definition != wetDefinition); } TEST_CASE("data capture driver ticket transition is paused, strict, and terminal", "[client][data-capture]") { @@ -951,13 +1001,10 @@ TEST_CASE("alpha zero draws the previous tick exactly", "[demo]") { // boundary sits. const auto drawn = session.Drawn()[3].Frame.Position; - engine::core::Vector3 previous; - int seen = 0; - session.World.Each([&](engine::ecs::Entity, const PreviousTransform &transform) { - if (seen++ == 3) { - previous = transform.Frame.Position; - } - }); + const engine::ecs::Entity rendered(session.Drawn()[3].Source); + const auto *previousTransform = session.World.Get(rendered); + REQUIRE(previousTransform != nullptr); + const auto previous = previousTransform->Frame.Position; REQUIRE(drawn.X == Approx(previous.X).margin(1e-4)); REQUIRE(drawn.Z == Approx(previous.Z).margin(1e-4)); @@ -1118,118 +1165,21 @@ TEST_CASE("the panels render a real tick's data", "[demo]") { for (const auto &timing : session.Systems.Timings()) { timings.push_back({timing.Name, timing.Milliseconds}); } - // capture-previous, script-heartbeat, move-camera, sync-rendered, - // aim-surface-cameras, collect-instances. `sync-rendered` arrived at v0.7 - // with the render gate: it is what keeps `scene::Rendered` in step with the - // `Workspace` subtree, and it is structural. `aim-surface-cameras` arrived - // beside it and places every surface camera parented to a part - see - // `scene/SurfaceCameras.hpp`. - // - // **Ten more at v0.10**, from two installers. `InstallEffects` adds - // resolve-attachments in `PreSimulation`, then refreshes attachments and - // emitters after `script-heartbeat` and before step-particles in `Simulation`; - // record-trails also runs in `Simulation`, and build-ribbons in `PreRender`. - // `InstallControls` adds character-control in `PreSimulation` and - // camera-control in `PreRender`, and `physics::RegisterCharacterSystems` - // adds character.control in `PreSimulation` - that moved out of this file's - // installer at v0.14, so that a dedicated server grounds its characters too. - // - // Only two of the ten are presentation; the rest are simulation and are here - // because this count is over every phase rather than over one. - // - // The question this assertion exists to force was asked and answered: - // **a world that only presents still does the right thing.** The studio's - // suspended scene runs `PreRender` and not `Simulation`, so it builds ribbons - // from whatever the trails last recorded and steps no particles - a frozen - // effect rather than a missing one, which is what a suspended world should - // look like. - // - // **A count rather than a list, and it is worth keeping as one.** It fails - // whenever a system is added to the presentation phase, which is exactly - // when somebody should be asked whether a world that only presents - the - // studio's suspended scene - still does the right thing. - // - // **Sixteen since v0.10's `resolve-materials`, and the question it forces was - // answered.** It runs in `PreSimulation`, so a suspended scene does not run - // it - which is right: a `Material` instance's texture is already on the part - // from the last tick that did, so a frozen world keeps the material it was - // frozen with rather than losing it. - // - // **Seventeen since v0.14's `character.pose`, and its question has the - // friendliest answer of the three.** It is presentation, so a suspended - // scene *does* run it - and that is exactly right: a character's limbs are a - // product of where its root is, so a frozen world shows a character standing - // still rather than one whose arms are wherever they were when the world - // stopped. - // - // **Eighteen since `character.link`, and its answer is the same as - // `resolve-materials`'.** It runs in `PreSimulation`, so a suspended scene - // does not run it - which is right: the link between a player and the model - // they drive is state, not presentation, and a frozen world showing the - // character it was frozen with is exactly what it should show. - // - // **Eighteen since v0.14's `character.portal`.** It is `PostSimulation`, so - // a suspended scene does not run it, and that is right for a stronger reason - // than the others: a crossing is the segment between where a body started - // the tick and where it finished one, and a world that is not ticking has no - // such segment. Running it on a frozen world would compare the same pair of - // identical positions every frame and find nothing, for ever. - // - // **Nineteen since `character.link`**, which rebuilds a rig a client - // received over the wire. `PreSimulation`, so a suspended scene does not run - // it - and a scene nobody is playing has no client to have received one. - // - // **And eighteen again once the wake, the ground query and the step became - // one `character.control`.** They were two systems in two phases and the - // second shared `Simulation` with `physics.simulation`, which the scheduler - // leaves unordered - so the velocity a key press produced was written after - // the integrator that would have moved it, and thrown away with the - // `scene::Motion` when the resting body lost it. Composed, the way - // `physics.contacts` composes its four steps and for the same reason. - // - // **And nineteen again for `portal.open`**, which turns a portal's pane into - // a trigger so a body can be inside the hole rather than stopped on its - // picture. `PreSimulation`, and it is the one system here that a suspended - // scene genuinely does not need to run: what it writes is a property of the - // scene rather than of the tick, so a world that resumes gets it on the - // first tick it takes and nothing in between could have walked anywhere. - // - // **And twenty-one for the pair that holds a body up in one.** `portal.open` - // lets a body be inside a pane and nothing then had it standing on anything: - // the floor under the half that has gone through is in the other room, so a - // crate in a doorway was held by the near room alone. `portal.ghost` copies - // the far room's colliders into this one through the inverse seam, where they - // are ordinary static geometry the solver pushes with; `portal.retire` takes - // them away again in `PostSimulation`, because a proxy that outlived its tick - // is a piece of another room standing invisibly in this one. Both are a query - // that returns at its first line in a world with no portal in it. - // - // **And twenty-two for `snap-portal-transit`**, which is the render half of - // a crossing rather than the simulation half. `capture-previous` records - // where a body was when the tick began and the renderer blends the two; - // across a teleport that blend spans the gap between two rooms, and on a - // client - which never runs `CrossPortals` and so never gets the mapped - // previous frame the authority computes - the body is drawn once or twice - // somewhere in between. `PreRender`, because the serial it reads arrives - // with a replication delta and a delta lands after `PreSimulation` has run. - // - // **And twenty-seven for a standalone client's authority pipeline.** The - // script path now installs editable collision refresh, integration, contacts, - // gravity and abandoned-owner reclamation. Without those five a scripted - // Humanoid produced velocity that no system ever integrated. - // - // **And thirty-one for the animation pipeline.** The post-heartbeat attachment - // and emitter refresh lets script-authored particle changes reach the GPU - // before the particle step. Track clocks advance in - // `Simulation`; clip sampling and bone resolution are presentation work, so - // a suspended Studio scene retains and redraws its last simulated pose. - REQUIRE(timings.size() == 31); + // Timings cover the complete authority tick and its presentation passes. + // Weather clock, terrain and stateful preparation precede simulation; + // ground queries and event consumers run after physics, before collection. + REQUIRE(timings.size() == 36); const auto hasTiming = [&timings](const std::string_view name) { return std::ranges::any_of(timings, [name](const auto &timing) { return timing.Name == name; }); }; CHECK(hasTiming("advance-animation-tracks")); CHECK(hasTiming("evaluate-animations")); CHECK(hasTiming("resolve-bones")); + for (const auto name : + {"weather.clock", "weather.terrain", "weather.stateful", "weather.ground", "weather.runtime"}) { + CAPTURE(name); + CHECK(hasTiming(name)); + } engine::render::OverlayImage image; image.Resize(1280, 720); @@ -1337,33 +1287,14 @@ TEST_CASE("the shipped Bladeborne world runs both single-player roles", "[client REQUIRE(id.IsValid()); std::shared_ptr runtime; + const auto settings = universe.SettingsOf(id); universe.Enter(id, [&](Store &store, Scheduler &systems) { client::InstallPresentation(store, systems); + client::InstallClientWorldSystems(store, systems, settings.PhysicsTickRate); + REQUIRE(store.Resource()); + (void)client::InstallDefaultCamera(store, systems); const engine::ecs::Entity localPlayer = client::EnsureLocalPlayer(store); REQUIRE(localPlayer != engine::ecs::NULL_ENTITY); - const engine::ecs::Entity starterPlayer = store.FindFirstRoot("StarterPlayer"); - REQUIRE(starterPlayer != engine::ecs::NULL_ENTITY); - const engine::ecs::Entity starterScripts = - store.FindFirstChild(starterPlayer, "StarterPlayerScripts"); - REQUIRE(starterScripts != engine::ecs::NULL_ENTITY); - const engine::ecs::Entity playerScripts = - store.FindFirstChild(localPlayer, engine::scene::PLAYER_SCRIPTS_NAME); - REQUIRE(playerScripts != engine::ecs::NULL_ENTITY); - constexpr std::array localScriptNames{"BladeborneHud", "BladeborneCamera"}; - std::array templates{}; - std::array copies{}; - for (size_t index = 0; index < localScriptNames.size(); ++index) { - templates[index] = store.FindFirstChild(starterScripts, localScriptNames[index]); - copies[index] = store.FindFirstChild(playerScripts, localScriptNames[index]); - REQUIRE(templates[index] != engine::ecs::NULL_ENTITY); - REQUIRE(copies[index] != engine::ecs::NULL_ENTITY); - CHECK(copies[index] != templates[index]); - } - const engine::ecs::Entity serverScriptService = store.FindFirstRoot("ServerScriptService"); - REQUIRE(serverScriptService != engine::ecs::NULL_ENTITY); - const engine::ecs::Entity serverScript = - store.FindFirstChild(serverScriptService, "BladeborneArenaServer"); - REQUIRE(serverScript != engine::ecs::NULL_ENTITY); engine::script::RuntimeLimits limits; limits.Role = engine::script::HostRole::OfBoth(); @@ -1373,19 +1304,65 @@ TEST_CASE("the shipped Bladeborne world runs both single-player roles", "[client INFO(error); REQUIRE(error.empty()); REQUIRE(runtime != nullptr); - // Combined hosts run the server script and player copies; templates remain inert. - const std::array startedScripts{serverScript, copies[0], copies[1]}; - REQUIRE(runtime->Costs().size() == startedScripts.size()); - for (const auto script : startedScripts) - CHECK(std::ranges::count(runtime->Costs(), script, &engine::script::ScriptCost::Instance) == 1); - for (const auto script : templates) - CHECK(std::ranges::count(runtime->Costs(), script, &engine::script::ScriptCost::Instance) == 0); + REQUIRE(runtime->Costs().size() == BLADEBORNE_STARTUP_SCRIPT_COUNT); CHECK(std::ranges::all_of(runtime->Costs(), &engine::script::ScriptCost::Completed)); - const engine::ecs::Entity camera = InWorkspace(store, "BladeborneCamera"); - REQUIRE(camera != engine::ecs::NULL_ENTITY); - REQUIRE(store.Resource() != nullptr); - CHECK(store.Resource()->Entity == camera); - CHECK(CountNamedDescendants(store, engine::scene::WorkspaceOf(store), "BladeborneCamera") == 1); + (void)engine::script::ResetPlayerGui(store, localPlayer); + + const engine::ecs::Entity players = engine::scene::PlayersOf(store); + const auto *playerSettings = store.Get(players); + REQUIRE(playerSettings != nullptr); + CHECK(playerSettings->CharacterAutoLoads); + CHECK(engine::scene::CharacterOf(store, localPlayer) == engine::ecs::NULL_ENTITY); + auto *mutableSettings = store.GetMutable(players); + REQUIRE(mutableSettings != nullptr); + mutableSettings->CharacterAutoLoads = false; + std::vector spawned; + CHECK(engine::scene::UpdateRespawns(store, spawned) == 0); + CHECK(spawned.empty()); + CHECK(engine::scene::CharacterOf(store, localPlayer) == engine::ecs::NULL_ENTITY); + mutableSettings->CharacterAutoLoads = true; + REQUIRE(engine::scene::LoadCharacter(store, localPlayer) != engine::ecs::NULL_ENTITY); + const engine::ecs::Entity firstCharacter = engine::scene::CharacterOf(store, localPlayer); + REQUIRE(firstCharacter != engine::ecs::NULL_ENTITY); + CHECK(CountNamedDescendants(store, engine::scene::WorkspaceOf(store), "Player") == 1); + const auto *firstRig = store.Get(firstCharacter); + REQUIRE(firstRig != nullptr); + systems.RunPhases(store, Phase::PreRender, Phase::PreRender); + const auto *active = store.Resource(); + REQUIRE(active != nullptr); + const auto *subject = store.Get(active->Entity); + REQUIRE(subject != nullptr); + CHECK(subject->Target == firstRig->Humanoid); + CHECK(engine::scene::CameraSubjectRoot(store, active->Entity) == firstRig->Root); + const auto *firstCameraTransform = store.Get(active->Entity); + REQUIRE(firstCameraTransform != nullptr); + const engine::core::Vector3 firstCameraPosition = firstCameraTransform->Frame.Position; + systems.RunPhases(store, Phase::Simulation, Phase::Simulation); + const auto *simulatedCameraTransform = store.Get(active->Entity); + REQUIRE(simulatedCameraTransform != nullptr); + CHECK(simulatedCameraTransform->Frame.Position == firstCameraPosition); + + CHECK(engine::scene::RemoveCharacter(store, localPlayer)); + CHECK(engine::scene::CharacterOf(store, localPlayer) == engine::ecs::NULL_ENTITY); + REQUIRE(engine::scene::LoadCharacter(store, localPlayer) != engine::ecs::NULL_ENTITY); + const engine::ecs::Entity respawnedCharacter = engine::scene::CharacterOf(store, localPlayer); + REQUIRE(respawnedCharacter != engine::ecs::NULL_ENTITY); + CHECK(respawnedCharacter != firstCharacter); + CHECK(CountNamedDescendants(store, engine::scene::WorkspaceOf(store), "Player") == 1); + systems.RunPhases(store, Phase::PreRender, Phase::PreRender); + const auto *respawnedRig = store.Get(respawnedCharacter); + REQUIRE(respawnedRig != nullptr); + const auto *respawnedSubject = store.Get(active->Entity); + REQUIRE(respawnedSubject != nullptr); + CHECK(respawnedSubject->Target == respawnedRig->Humanoid); + CHECK(engine::scene::CameraSubjectRoot(store, active->Entity) == respawnedRig->Root); + const auto *respawnedCameraTransform = store.Get(active->Entity); + REQUIRE(respawnedCameraTransform != nullptr); + const engine::core::Vector3 respawnedCameraPosition = respawnedCameraTransform->Frame.Position; + systems.RunPhases(store, Phase::Simulation, Phase::Simulation); + const auto *simulatedRespawnCamera = store.Get(active->Entity); + REQUIRE(simulatedRespawnCamera != nullptr); + CHECK(simulatedRespawnCamera->Frame.Position == respawnedCameraPosition); const engine::script::SourceCache *sources = store.Resource(); REQUIRE(sources != nullptr); @@ -1397,19 +1374,13 @@ TEST_CASE("the shipped Bladeborne world runs both single-player roles", "[client const engine::ecs::Entity starterGui = store.FindFirstRoot(engine::gui::STARTER_GUI); REQUIRE(starterGui != engine::ecs::NULL_ENTITY); - const engine::ecs::Entity templateHud = store.FindFirstChild(starterGui, "BladeborneHUD"); - REQUIRE(templateHud != engine::ecs::NULL_ENTITY); - CHECK(CountNamedDescendants(store, starterGui, "BladeborneHUD") == 1); - CHECK(CountNamedDescendants(store, templateHud, "Ability1") == 1); - CHECK(CountNamedDescendants(store, templateHud, "Minimap") == 1); + CHECK(store.FindFirstChild(starterGui, "BladeborneHUD") == engine::ecs::NULL_ENTITY); - CHECK(engine::gui::ResetPlayerGui(store, localPlayer) == 1); const engine::ecs::Entity playerGui = store.FindFirstChild(localPlayer, engine::gui::PLAYER_GUI); REQUIRE(playerGui != engine::ecs::NULL_ENTITY); const engine::ecs::Entity liveHud = store.FindFirstChild(playerGui, "BladeborneHUD"); REQUIRE(liveHud != engine::ecs::NULL_ENTITY); - CHECK(CountNamedDescendants(store, playerGui, "BladeborneHUD") == 1); - CHECK(CountNamedDescendants(store, liveHud, "Hotbar") == 1); + CHECK(engine::scene::InPlayerGui(store, liveHud, localPlayer)); CHECK(CountNamedDescendants(store, liveHud, "Ability1") == 1); CHECK(CountNamedDescendants(store, liveHud, "Minimap") == 1); CHECK(CountNamedDescendants(store, liveHud, "HotbarSlot1") == 2); @@ -1424,6 +1395,11 @@ TEST_CASE("the shipped Bladeborne world runs both single-player roles", "[client request.Viewer = localPlayer; engine::gui::Compiled compiled; REQUIRE(compiled.Rebuild(store, request)); + CHECK(compiled.Commands().Elements > 0); + CHECK(std::ranges::any_of(compiled.Commands().Commands, [&](const auto &command) { + return command.Kind == engine::gui::DrawKind::Text && !command.Text.empty() && + store.IsDescendantOf(command.Source, liveHud); + })); const bool opaqueScreenCover = std::ranges::any_of(compiled.Commands().Commands, [&](const auto &command) { return command.Kind == engine::gui::DrawKind::Rectangle && command.Transparency == 0.0f && @@ -1484,8 +1460,8 @@ TEST_CASE( universe.Enter(id, [&](Store &store, Scheduler &systems) { client::InstallPresentation(store, systems); - engine::physics::PreparePhysicsWorld(store); - engine::physics::RegisterPhysicsSystems(systems); + REQUIRE(client::InstallDefaultCamera(store, systems)); + client::InstallClientWorldSystems(store, systems); const engine::ecs::Entity localPlayer = client::EnsureLocalPlayer(store); REQUIRE(localPlayer != engine::ecs::NULL_ENTITY); @@ -1512,48 +1488,34 @@ TEST_CASE( CHECK(CountNamedDescendants(store, environment, "Cell Roof Panel 2") == 25); CHECK(CountNamedDescendants(store, environment, "Cell Chase Vehicle") > 0); - size_t stormBodies = 0; - store.Each( - [&](engine::ecs::Entity, const engine::physics::StormResponse &) { stormBodies++; } - ); - size_t stormLinks = 0; - store.Each( - [&](engine::ecs::Entity, const engine::physics::StormLink &) { stormLinks++; } - ); - CHECK(stormBodies >= 80); - CHECK(stormLinks >= 60); - - const engine::physics::Storm *storm = engine::physics::StormOf(store); - REQUIRE(storm != nullptr); - CHECK(storm->State.Parameters.Energy == Approx(0.72f)); - CHECK(storm->State.Parameters.CoreRadius == Approx(34.0f)); - CHECK(storm->State.Parameters.InfluenceRadius == Approx(260.0f)); - CHECK(storm->State.Parameters.PeakTangentialSpeed == Approx(92.0f)); - CHECK(storm->State.Parameters.PeakInflowSpeed == Approx(34.0f)); - CHECK(storm->State.Parameters.PeakUpdraftSpeed == Approx(58.0f)); - CHECK(storm->State.Parameters.PeakDowndraftSpeed == Approx(32.0f)); - CHECK(storm->State.Parameters.SurfaceOutflowSpeed == Approx(28.0f)); - CHECK(storm->State.Parameters.PressureDrop == Approx(72.0f)); - CHECK(storm->State.Parameters.Humidity == Approx(.82f)); - CHECK(storm->State.Parameters.RainRate == Approx(.68f)); - CHECK(storm->State.Parameters.Turbulence == Approx(13.0f)); - CHECK(storm->State.Parameters.GroundFriction == Approx(.28f)); - CHECK(storm->State.Parameters.DebrisDensity == Approx(.65f)); - CHECK(storm->State.Parameters.VortexTightness == Approx(2.25f)); - CHECK(storm->State.Parameters.TopHeight == Approx(360.0f)); - CHECK((storm->State.Parameters.UpperWind == engine::core::Vector3{18.0f, 0.0f, -6.0f})); - CHECK((storm->State.Parameters.TranslationVelocity == engine::core::Vector3{4.0f, 0.0f, 1.5f})); + REQUIRE(runtime->Run(R"( + assert(World:Count("Tornado.Response") >= 80) + assert(World:Count("Tornado.Link") >= 60) + local state = workspace:FindFirstChild("StormAnchor", true):GetComponent("Tornado.State") + assert(state ~= nil) + local expected = { + Energy = 0.72, CoreRadius = 34, InfluenceRadius = 260, + PeakTangentialSpeed = 92, PeakInflowSpeed = 34, PeakUpdraftSpeed = 58, + PeakDowndraftSpeed = 32, SurfaceOutflowSpeed = 28, PressureDrop = 72, + Humidity = 0.82, RainRate = 0.68, Turbulence = 13, GroundFriction = 0.28, + DebrisDensity = 0.65, VortexTightness = 2.25, TopHeight = 360, + } + for field, wanted in expected do + assert(math.abs(state[field] - wanted) < 0.0001, field) + end + assert(state.UpperWind == Vector3.new(18, 0, -6)) + assert(state.TranslationVelocity == Vector3.new(4, 0, 1.5)) + )")); REQUIRE(runtime->Run(R"( game:GetService("ReplicatedStorage").TornadoControl:FireServer('{"kind":"motion","x":-15,"y":5,"z":25}') game:GetService("ReplicatedStorage").TornadoControl:FireServer('{"kind":"rotation","counterClockwise":false}') )")); - storm = engine::physics::StormOf(store); - REQUIRE(storm != nullptr); - CHECK(storm->State.Parameters.TranslationVelocity.X == Approx(-15.0f)); - CHECK(storm->State.Parameters.TranslationVelocity.Y == Approx(5.0f)); - CHECK(storm->State.Parameters.TranslationVelocity.Z == Approx(25.0f)); - CHECK_FALSE(storm->State.Parameters.CounterClockwise); + REQUIRE(runtime->Run(R"( + local state = workspace:FindFirstChild("StormAnchor", true):GetComponent("Tornado.State") + assert(state.TranslationVelocity == Vector3.new(-15, 5, 25)) + assert(not state.CounterClockwise) + )")); const engine::ecs::Entity playerGui = store.FindFirstChild(localPlayer, engine::gui::PLAYER_GUI); REQUIRE(playerGui != engine::ecs::NULL_ENTITY); @@ -1611,20 +1573,19 @@ TEST_CASE( REQUIRE(field != nullptr); CHECK_FALSE(condensation->Enabled); CHECK(condensation->Rate == Approx(0.0f)); - CHECK_FALSE( - engine::scene::HasGpuParticleLayer(*field, engine::scene::GpuParticleLayer::Condensation) - ); + CHECK_FALSE(engine::scene::HasGpuParticleLayer(*field, engine::scene::GpuParticleLayer::First)); REQUIRE(runtime->Run(R"( game:GetService("ReplicatedStorage").TornadoControl:FireServer('{"kind":"preset","name":"EF5"}') )")); - storm = engine::physics::StormOf(store); - REQUIRE(storm != nullptr); - CHECK(storm->State.Parameters.CoreRadius == Approx(45.0f)); + REQUIRE(runtime->Run(R"( + local state = workspace:FindFirstChild("StormAnchor", true):GetComponent("Tornado.State") + assert(math.abs(state.CoreRadius - 45) < 0.0001) + )")); systems.Tick(store, STEP); - storm = engine::physics::StormOf(store); - REQUIRE(storm != nullptr); - CHECK(storm->State.ElapsedSeconds > 0.0f); + REQUIRE(runtime->Run(R"( + assert(workspace:FindFirstChild("StormAnchor", true):GetComponent("Tornado.State").ElapsedSeconds > 0) + )")); // The first fixed step delivers the user-lane request after the server // heartbeat. The second consumes its refresh flag without a long physics run. @@ -1657,9 +1618,9 @@ TEST_CASE( REQUIRE(runtime->Run(R"( game:GetService("ReplicatedStorage").TornadoControl:FireServer('{"kind":"reset"}') )")); - storm = engine::physics::StormOf(store); - REQUIRE(storm != nullptr); - CHECK(storm->State.ElapsedSeconds == Approx(0.0f)); + REQUIRE(runtime->Run(R"( + assert(workspace:FindFirstChild("StormAnchor", true):GetComponent("Tornado.State").ElapsedSeconds == 0) + )")); systems.Tick(store, STEP); CHECK(childCount(environment) == 26); @@ -1671,9 +1632,10 @@ TEST_CASE( CHECK( FirstNamedDescendant(store, resetInteraction, "Wood Sign Wind Link") != engine::ecs::NULL_ENTITY ); - storm = engine::physics::StormOf(store); - REQUIRE(storm != nullptr); - CHECK(storm->State.Parameters.Energy == Approx(0.72f)); - CHECK(storm->State.Parameters.CoreRadius == Approx(34.0f)); + REQUIRE(runtime->Run(R"( + local state = workspace:FindFirstChild("StormAnchor", true):GetComponent("Tornado.State") + assert(math.abs(state.Energy - 0.72) < 0.0001) + assert(math.abs(state.CoreRadius - 34) < 0.0001) + )")); }); } diff --git a/mono.client/tests/Settings.cpp b/mono.client/tests/Settings.cpp new file mode 100644 index 000000000..0b76e2a03 --- /dev/null +++ b/mono.client/tests/Settings.cpp @@ -0,0 +1,70 @@ +#include +#include +#include +#include + +#include + +#include + +TEST_SUITE_ID("client.settings") +TEST_DEPENDS("engine.core.flags") + +namespace { + struct FlagScope { + FlagScope() { + engine::core::Flags::Reset(); + } + ~FlagScope() { + engine::core::Flags::Reset(); + } + }; +} + +TEST_CASE("client defaults remove presentation pacing while retaining the fixed tick", "[client][settings]") { + const FlagScope flags; + CHECK(client::OptionsFromFlags().Uncapped); + REQUIRE(client::DeclareFlags()); + const client::Options settings = client::OptionsFromFlags(); + CHECK(settings.Uncapped); + CHECK(settings.MaximumFrameRate == 0); + CHECK(settings.TickRate == 60.0); +} + +TEST_CASE("persisted frame pacing follows configuration precedence", "[client][settings]") { + using engine::core::Flags; + using engine::core::FlagSource; + using engine::core::FlagStatus; + const FlagScope flags; + REQUIRE(client::DeclareFlags()); + REQUIRE(Flags::Set("client.uncapped", "false", FlagSource::ConfigFile) == FlagStatus::Applied); + REQUIRE(Flags::Set("client.max-fps", "144", FlagSource::ConfigFile) == FlagStatus::Applied); + CHECK_FALSE(client::OptionsFromFlags().Uncapped); + CHECK(client::OptionsFromFlags().MaximumFrameRate == 144); + + REQUIRE(Flags::Set("client.uncapped", "true", FlagSource::Environment) == FlagStatus::Applied); + REQUIRE(Flags::Set("client.max-fps", "240", FlagSource::CommandLine) == FlagStatus::Applied); + CHECK(client::OptionsFromFlags().Uncapped); + CHECK(client::OptionsFromFlags().MaximumFrameRate == 240); + CHECK(Flags::Set("client.max-fps", "30", FlagSource::ConfigFile) == FlagStatus::Outranked); + CHECK(client::OptionsFromFlags().MaximumFrameRate == 240); + CHECK(client::OptionsFromFlags().TickRate == 60.0); +} + +TEST_CASE( + "client CLI documents VSync and rejects conflicting present modes before startup", "[client][settings]" +) { + const auto program = + engine::core::Paths::Base().parent_path() / "client" / engine::core::Paths::Program("client"); + REQUIRE(std::filesystem::exists(program)); + const auto help = engine::parallel::Capture({program.string(), "--help"}); + REQUIRE(help.Started); + REQUIRE(help.ExitCode == 0); + CHECK(help.Output.find("--vsync") != std::string::npos); + CHECK(help.Output.find("--max-fps") != std::string::npos); + + const auto conflict = engine::parallel::Capture({program.string(), "--uncapped", "--vsync"}); + REQUIRE(conflict.Started); + CHECK(conflict.ExitCode == 2); + CHECK(conflict.Output.find("--uncapped and --vsync cannot be combined") != std::string::npos); +} diff --git a/mono.client/tests/TunnelsRender.cpp b/mono.client/tests/TunnelsRender.cpp index 69620996f..6cb20fb23 100644 --- a/mono.client/tests/TunnelsRender.cpp +++ b/mono.client/tests/TunnelsRender.cpp @@ -38,13 +38,21 @@ namespace { void WriteEntrySweep(const std::filesystem::path &path) { std::string source = ReadText(core::Paths::Base().parent_path() / "assets/examples/scripts/Tunnels.luau"); - const size_t cameras = source.find("local cameras: { [string]: Camera } = {}"); - const size_t viewSelection = source.find("if WHICH == \"long\" then", cameras); + const std::string namedCameras = "cameraScript:SetAttribute(\"NamedCameras\", true)"; + const size_t cameras = source.find(namedCameras); REQUIRE(cameras != std::string::npos); - REQUIRE(viewSelection != std::string::npos); - // The checked world has no authored `CurrentCamera`; remove its optional - // still cameras as well, so the client installs its default follow eye. - source.replace(cameras, viewSelection - cameras, "local cameras: { [string]: Camera } = {}\n\n"); + // Keep the demo's real client companion, configured to leave the default + // follow eye in control of this character-driven crossing. + source.replace(cameras, namedCameras.size(), "cameraScript:SetAttribute(\"NamedCameras\", false)"); + const auto companionDirectory = path.parent_path() / "client/DemoCameras"; + std::filesystem::create_directories(companionDirectory); + REQUIRE( + std::filesystem::copy_file( + core::Paths::Base().parent_path() / + "assets/examples/scripts/client/DemoCameras/Tunnels.client.luau", + companionDirectory / (path.stem().string() + ".client.luau") + ) + ); source += R"( -- Test capture: use the actual local player and its default follow camera. diff --git a/mono.client/tests/WeatherSounds.cpp b/mono.client/tests/WeatherSounds.cpp new file mode 100644 index 000000000..adb3f44f1 --- /dev/null +++ b/mono.client/tests/WeatherSounds.cpp @@ -0,0 +1,451 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +TEST_SUITE_ID("client.weather-sounds") +TEST_DEPENDS("engine.weather.events") +TEST_DEPENDS("engine.audio.mixer") + +using namespace engine; + +namespace { + audio::SampleBuffer RenderBlock(audio::AudioMixer &mixer) { + audio::SampleBuffer block(mixer.Format(), 512); + const auto report = mixer.Render(block); + REQUIRE(report.Frames == 512); + return block; + } + float RenderFrames(audio::AudioMixer &mixer, uint64_t frames) { + audio::SampleBuffer block(mixer.Format(), audio::DEFAULT_BLOCK_FRAMES); + float peak = 0; + while (frames != 0) { + const auto count = static_cast(std::min(frames, audio::DEFAULT_BLOCK_FRAMES)); + block.Resize(count); + block.Silence(); + const auto report = mixer.Render(block); + REQUIRE(report.Frames == count); + peak = std::max(peak, block.Peak()); + frames -= count; + } + return peak; + } + ecs::Entity Storm(ecs::Store &store, uint64_t sequence = 1) { + scene::RegisterSceneClasses(); + weather::RegisterWeatherRuntimeComponents(); + const auto provider = store.CreateInstance(ecs::Classes::Find(core::Name("WeatherCompute")), "Storm"); + REQUIRE(provider != ecs::NULL_ENTITY); + store.Set(provider, scene::WeatherClock{}); + weather::StormEvent event; + event.Layer = weather::WeatherLayerName(store, provider); + event.Id = {1, sequence, 1}; + event.StartMetres = {0, 100, 0}; + event.EndMetres = {0, 0, 0}; + event.BranchSeed = 9; + store.Set(provider, weather::WeatherEvents{{event}, 0}); + return provider; + } +} + +TEST_CASE( + "expired latejoin thunder stays silent and consumes the retained journal", + "[weather][audio][thunder-history]" +) { + ecs::Store store("weather.audio.old_journal"); + const auto provider = Storm(store); + auto journal = *store.Get(provider); + const auto original = journal.Events.front(); + journal.Events.clear(); + for (uint64_t sequence = 1; sequence <= weather::MAX_WEATHER_EVENTS; ++sequence) { + auto event = original; + event.Id.Sequence = sequence; + event.Tick = sequence; + event.ElapsedSeconds = sequence; + journal.Events.push_back(event); + } + store.Set(provider, journal); + auto clock = *store.Get(provider); + clock.Tick = 1000; + clock.ElapsedSeconds = 50; + store.Set(provider, clock); + CHECK_FALSE(client::WeatherThunderDueSoon(store, {34, 0, 0})); + REQUIRE(store.Resource()); + CHECK(store.Resource()->Thunder.Pending.empty()); + REQUIRE(store.Resource()->Thunder.Cursors.size() == 1); + CHECK(store.Resource()->Thunder.Cursors.front().Last.Sequence == 32); + CHECK_FALSE(client::WeatherThunderDueSoon(store, {34, 0, 0})); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Voices.empty()); + CHECK(stage.Starts == 0); + CHECK_FALSE(stage.Thunder); + CHECK(RenderBlock(mixer).Peak() == 0); + CHECK(mixer.LastAppliedCommands().empty()); +} + +TEST_CASE( + "partly late thunder seeks to the audible tail at huge elapsed time", "[weather][audio][thunder-history]" +) { + ecs::Store store("weather.audio.partial"); + const auto provider = Storm(store); + const uint64_t emittedSeconds = UINT64_MAX - 10; + auto events = *store.Get(provider); + events.Events.front().ElapsedSeconds = emittedSeconds; + store.Set(provider, events); + auto clock = *store.Get(provider); + clock.Tick = 30; + clock.ElapsedSeconds = emittedSeconds + 1; + clock.ElapsedFractionQ32 = uint32_t{1} << 31; + store.Set(provider, clock); + REQUIRE(client::WeatherThunderDueSoon(store, {})); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {}, catalogue); + REQUIRE(stage.Voices.size() == 1); + REQUIRE(stage.Thunder); + CHECK(stage.Thunder->Frames() == 2 * mixer.Format().SampleRate); + const auto offset = mixer.Format().SampleRate * 3 / 2; + CHECK(stage.Voices.front().StartSample == 0); + CHECK(stage.Voices.front().EndSample == mixer.Format().SampleRate / 2); + const auto block = RenderBlock(mixer); + CHECK(block.Peak() > 0); + CHECK(block.Data().front() == Catch::Approx(stage.Thunder->Frame(offset).front() * 0.3f)); + REQUIRE(mixer.Graph().Find(stage.Voices.front().Player)); + CHECK(mixer.Graph().Find(stage.Voices.front().Player)->Cursor == offset + 512); + CHECK(mixer.Graph().Find(stage.Voices.front().Player)->NotBeforeSample == 0); + const auto end = stage.Voices.front().EndSample; + while (mixer.Clock() < end) + (void)RenderBlock(mixer); + CHECK_FALSE(mixer.Graph().Find(stage.Voices.front().Player)->Playing); + stage.Sync(store, mixer, {}, catalogue); + CHECK(stage.Voices.empty()); + CHECK(stage.Starts == 1); + CHECK(store.Resource()->Thunder.Pending.empty()); + CHECK(RenderBlock(mixer).Peak() == 0); +} + +TEST_CASE( + "future thunder rebuilds its exact sample deadline after clock correction", + "[weather][audio][thunder-history]" +) { + ecs::Store store("weather.audio.corrected"); + const auto provider = Storm(store); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + const auto oldPlayer = stage.Voices.front().Player; + const auto oldDeadline = stage.Voices.front().StartSample; + REQUIRE(RenderBlock(mixer).Peak() == 0); + auto clock = *store.Get(provider); + clock.Tick = 1; + clock.Fraction = 0; + clock.ElapsedFractionQ32 = 214748364; + clock.ElapsedRemainder = 16; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + CHECK(stage.Voices.front().Player != oldPlayer); + CHECK(stage.Voices.front().StartSample < oldDeadline); + const auto arrival = store.Resource()->Thunder.Pending.front(); + const auto remaining = + weather::RemainingThunderSeconds(arrival, clock.ElapsedSeconds, clock.ElapsedFractionQ32, 0); + REQUIRE(remaining); + const uint64_t expected = + mixer.Clock() + static_cast(std::llround(*remaining * mixer.Format().SampleRate)); + CHECK(stage.Voices.front().StartSample == expected); + CHECK(stage.Starts == 2); + while (mixer.Clock() + 512 <= expected) + CHECK(RenderBlock(mixer).Peak() == 0); + const uint64_t before = mixer.Clock(); + const auto heard = RenderBlock(mixer); + CHECK(mixer.Graph().Find(oldPlayer) == nullptr); + REQUIRE(mixer.Graph().Find(stage.Voices.front().Player)); + CHECK(mixer.Graph().Find(stage.Voices.front().Player)->NotBeforeSample == expected); + for (size_t frame = 0; frame < expected - before; ++frame) + for (uint16_t channel = 0; channel < heard.Format().Channels; ++channel) + CHECK(heard.Frame(frame)[channel] == 0); + CHECK(heard.Peak() > 0); + CHECK(stage.Clear(mixer)); + (void)RenderBlock(mixer); +} + +TEST_CASE( + "backward clock correction cancels future thunder until its emission is reached", + "[weather][audio][thunder-history]" +) { + ecs::Store store("weather.audio.corrected_back"); + const auto provider = Storm(store); + auto events = *store.Get(provider); + events.Events.front().ElapsedSeconds = 1; + store.Set(provider, events); + auto clock = *store.Get(provider); + clock.Tick = 20; + clock.ElapsedSeconds = 1; + store.Set(provider, clock); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + const auto oldDeadline = stage.Voices.front().StartSample; + CHECK(RenderBlock(mixer).Peak() == 0); + clock.Tick = 15; + clock.ElapsedSeconds = 0; + clock.ElapsedFractionQ32 = uint32_t{3} << 30; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Voices.empty()); + CHECK_FALSE(client::WeatherThunderDueSoon(store, {34, 0, 0})); + REQUIRE(store.Resource()->Thunder.Pending.size() == 1); + while (mixer.Clock() <= oldDeadline + 512) + CHECK(RenderBlock(mixer).Peak() == 0); + clock.Tick = 20; + clock.ElapsedSeconds = 1; + clock.ElapsedFractionQ32 = 0; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + CHECK(stage.Voices.front().StartSample > mixer.Clock()); + CHECK(stage.Starts == 2); + CHECK(stage.Clear(mixer)); + (void)RenderBlock(mixer); +} + +TEST_CASE( + "clock correction past waveform expiry consumes a scheduled thunder event", + "[weather][audio][thunder-history]" +) { + ecs::Store store("weather.audio.corrected_expired"); + const auto provider = Storm(store); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + const auto oldDeadline = stage.Voices.front().StartSample; + CHECK(RenderBlock(mixer).Peak() == 0); + auto clock = *store.Get(provider); + clock.Tick = 80; + clock.ElapsedSeconds = 4; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Voices.empty()); + CHECK(store.Resource()->Thunder.Pending.empty()); + CHECK_FALSE(client::WeatherThunderDueSoon(store, {34, 0, 0})); + while (mixer.Clock() <= oldDeadline + 512) + CHECK(RenderBlock(mixer).Peak() == 0); + clock.Tick = 0; + clock.ElapsedSeconds = 0; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Starts == 1); + CHECK(stage.Voices.empty()); +} + +TEST_CASE( + "partial thunder start requires all six mixer commands before accepting playback", + "[weather][audio][thunder-history]" +) { + ecs::Store store("weather.audio.six_commands"); + const auto provider = Storm(store); + auto clock = *store.Get(provider); + clock.Tick = 10; + clock.ElapsedFractionQ32 = uint32_t{1} << 31; + store.Set(provider, clock); + audio::AudioMixer mixer; + while (mixer.Commands().Free() > 5) + REQUIRE(mixer.Commands().Post(audio::Command{})); + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {}, catalogue); + CHECK(stage.Starts == 0); + CHECK(stage.Voices.empty()); + CHECK(stage.Refused == 1); + REQUIRE(store.Resource()->Thunder.Pending.size() == 1); + CHECK(RenderBlock(mixer).Peak() == 0); + stage.Sync(store, mixer, {}, catalogue); + REQUIRE(stage.Voices.size() == 1); + CHECK(RenderBlock(mixer).Peak() > 0); + CHECK(stage.Clear(mixer)); + (void)RenderBlock(mixer); +} + +TEST_CASE( + "refused future thunder cancellation retries after its old deadline passes", + "[weather][audio][thunder-history]" +) { + ecs::Store store("weather.audio.correction_retry"); + const auto provider = Storm(store); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + const auto oldPlayer = stage.Voices.front().Player; + const auto oldDeadline = stage.Voices.front().StartSample; + CHECK(RenderBlock(mixer).Peak() == 0); + while (mixer.Commands().Free() > 1) + REQUIRE(mixer.Commands().Post(audio::Command{})); + auto clock = *store.Get(provider); + clock.Tick = 1; + clock.ElapsedFractionQ32 = 214748364; + clock.ElapsedRemainder = 16; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Refused == 1); + REQUIRE(stage.Voices.size() == 1); + CHECK(stage.Voices.front().Player == oldPlayer); + REQUIRE(store.Resource()->Thunder.Pending.size() == 1); + while (mixer.Clock() <= oldDeadline) + (void)RenderBlock(mixer); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + CHECK(stage.Voices.front().Player != oldPlayer); + CHECK(stage.Voices.front().StartSample > mixer.Clock()); + CHECK(stage.Starts == 2); + CHECK(RenderBlock(mixer).Peak() == 0); + CHECK(mixer.Graph().Find(oldPlayer) == nullptr); + CHECK(stage.Clear(mixer)); + (void)RenderBlock(mixer); +} + +TEST_CASE("thunder uses its layer clock and an exact sample deadline once", "[weather][audio]") { + ecs::Store store("weather.audio"); + const auto provider = Storm(store); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + const auto &arrival = store.Resource()->Thunder.Pending.front(); + const uint64_t expected = + static_cast(std::llround(arrival.DelaySeconds * mixer.Format().SampleRate)); + CHECK(stage.Voices.front().StartSample == expected); + CHECK(expected % (mixer.Format().SampleRate / 20) != 0); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Starts == 1); + CHECK(RenderFrames(mixer, expected) == 0); + CHECK(mixer.Clock() == expected); + CHECK(RenderFrames(mixer, 1024) > 0); + CHECK(stage.Clear(mixer)); + mixer.ApplyPending(); + CHECK(stage.Voices.empty()); + CHECK(store.Get(provider)->Events.size() == 1); +} + +TEST_CASE("full audio queue preserves a thunder arrival for retry", "[weather][audio]") { + ecs::Store store("weather.audio.retry"); + (void)Storm(store); + audio::AudioMixer mixer; + while (mixer.Commands().Free() != 0) { + audio::Command command; + REQUIRE(mixer.Commands().Post(command)); + } + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {}, catalogue); + CHECK(stage.Starts == 0); + CHECK(stage.Refused == 1); + REQUIRE(store.Resource()->Thunder.Pending.size() == 1); + mixer.ApplyPending(); + stage.Sync(store, mixer, {}, catalogue); + CHECK(stage.Starts == 1); + CHECK(stage.Voices.size() == 1); + CHECK(stage.Clear(mixer)); + mixer.ApplyPending(); +} + +TEST_CASE("skipping a completed thunder waveform does not restart its event", "[weather][audio]") { + ecs::Store store("weather.audio.skip"); + (void)Storm(store); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + CHECK(RenderFrames(mixer, stage.Voices.front().EndSample + 1024) > 0); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Starts == 1); + CHECK(stage.Voices.empty()); + CHECK(store.Resource()->Thunder.Pending.empty()); + mixer.ApplyPending(); +} + +TEST_CASE("paused weather cancels a future sample command and resumes the same event", "[weather][audio]") { + ecs::Store store("weather.audio.pause"); + const auto provider = Storm(store); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + auto clock = *store.Get(provider); + clock.Paused = true; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + CHECK(stage.Voices.empty()); + CHECK(RenderFrames(mixer, 8000) == 0); + clock.Paused = false; + store.Set(provider, clock); + stage.Sync(store, mixer, {34, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + CHECK(stage.Voices.front().StartSample > mixer.Clock()); + CHECK(stage.Starts == 2); + CHECK(stage.Clear(mixer)); + mixer.ApplyPending(); +} + +TEST_CASE("skipped layer rate edits retain physical thunder age at huge elapsed time", "[weather][audio]") { + ecs::Store store("weather.audio.rate"); + const auto provider = Storm(store); + const uint64_t seconds = UINT64_MAX - 100; + auto events = *store.Get(provider); + events.Events.front().Tick = 1000; + events.Events.front().ElapsedSeconds = seconds; + store.Set(provider, events); + auto clock = *store.Get(provider); + clock.Tick = 1000; + clock.ElapsedSeconds = seconds; + store.Set(provider, clock); + audio::AudioMixer mixer; + client::WeatherSoundStage stage; + client::SoundCatalogue catalogue; + stage.Sync(store, mixer, {150, 0, 0}, catalogue); + CHECK(stage.Voices.empty()); + const double delay = store.Resource()->Thunder.Pending.front().DelaySeconds; + clock.TickRate = 100; + clock.Tick = 1025; + clock.ElapsedFractionQ32 = uint32_t{1} << 30; + store.Set(provider, clock); + // The adapter misses this intermediate copied rate. The canonical acoustic + // pair alone preserves age when its next snapshot uses another base rate. + clock.TickRate = 40; + clock.Tick = 1030; + clock.ElapsedFractionQ32 = uint32_t{3} << 29; + clock.Fraction = 0.5; + store.Set(provider, clock); + stage.Sync(store, mixer, {150, 0, 0}, catalogue); + REQUIRE(stage.Voices.size() == 1); + const auto expected = + static_cast(std::llround((delay - 0.375 - 0.5 / 40) * mixer.Format().SampleRate)); + CHECK(stage.Voices.front().StartSample == expected); + CHECK(stage.Clear(mixer)); + mixer.ApplyPending(); +} diff --git a/mono.client/tests/WorldSystems.cpp b/mono.client/tests/WorldSystems.cpp index eec6f2f35..6f047c783 100644 --- a/mono.client/tests/WorldSystems.cpp +++ b/mono.client/tests/WorldSystems.cpp @@ -1,3 +1,5 @@ +#include "WorldSystems.hpp" + #include #include #include @@ -8,8 +10,6 @@ #include -#include - TEST_SUITE_ID("client.world-systems") TEST_CASE("an imported client world gets its configured physics rate before scripts", "[client][physics]") { diff --git a/mono.client/tests/fixtures/McpContracts.json b/mono.client/tests/fixtures/McpContracts.json index dd2240d78..00c9d6d9a 100644 --- a/mono.client/tests/fixtures/McpContracts.json +++ b/mono.client/tests/fixtures/McpContracts.json @@ -3725,6 +3725,12 @@ "name": "AGENTS.md (engine/gui)", "uri": "atomic://agents/engine/gui" }, + "atomic://agents/engine/imagegraph": { + "description": "The invariants specific to engine/imagegraph. AGENTS.md rule: read this before changing anything in it.", + "mimeType": "text/markdown", + "name": "AGENTS.md (engine/imagegraph)", + "uri": "atomic://agents/engine/imagegraph" + }, "atomic://agents/engine/input": { "description": "The invariants specific to engine/input. AGENTS.md rule: read this before changing anything in it.", "mimeType": "text/markdown", @@ -3815,6 +3821,12 @@ "name": "AGENTS.md (engine/ui)", "uri": "atomic://agents/engine/ui" }, + "atomic://agents/engine/weather": { + "description": "The invariants specific to engine/weather. AGENTS.md rule: read this before changing anything in it.", + "mimeType": "text/markdown", + "name": "AGENTS.md (engine/weather)", + "uri": "atomic://agents/engine/weather" + }, "atomic://agents/engine/world": { "description": "The invariants specific to engine/world. AGENTS.md rule: read this before changing anything in it.", "mimeType": "text/markdown", @@ -8161,6 +8173,12 @@ "name": "AGENTS.md (engine/gui)", "uri": "atomic://agents/engine/gui" }, + "atomic://agents/engine/imagegraph": { + "description": "The invariants specific to engine/imagegraph. AGENTS.md rule: read this before changing anything in it.", + "mimeType": "text/markdown", + "name": "AGENTS.md (engine/imagegraph)", + "uri": "atomic://agents/engine/imagegraph" + }, "atomic://agents/engine/input": { "description": "The invariants specific to engine/input. AGENTS.md rule: read this before changing anything in it.", "mimeType": "text/markdown", @@ -8251,6 +8269,12 @@ "name": "AGENTS.md (engine/ui)", "uri": "atomic://agents/engine/ui" }, + "atomic://agents/engine/weather": { + "description": "The invariants specific to engine/weather. AGENTS.md rule: read this before changing anything in it.", + "mimeType": "text/markdown", + "name": "AGENTS.md (engine/weather)", + "uri": "atomic://agents/engine/weather" + }, "atomic://agents/engine/world": { "description": "The invariants specific to engine/world. AGENTS.md rule: read this before changing anything in it.", "mimeType": "text/markdown", diff --git a/mono.engine/CMakeLists.txt b/mono.engine/CMakeLists.txt index 5a39b4884..c940402e0 100644 --- a/mono.engine/CMakeLists.txt +++ b/mono.engine/CMakeLists.txt @@ -19,9 +19,12 @@ add_subdirectory(gui) # L7 what a 2D thing is [shared] add_subdirectory(assets) # L8 content addressing [shared] add_subdirectory(physics) # L8 shapes, integration, pairs [shared] add_subdirectory(effects) # L8 particles, beams, trails [shared] +add_subdirectory(weather) # L8 deterministic weather and timelines [shared] +add_subdirectory(imagecodec) # L8 bounded RGBA8, PNG and JPEG [shared] add_subdirectory(audiocodec) # L8 byte decoders and sample values [shared] add_subdirectory(script) # L9 what a script may name, with no VM in it [shared] add_subdirectory(bakegraph) # L9 what a bake pipeline is, with no decoders [shared] +add_subdirectory(imagegraph) # L9 bounded static 2D images [shared] add_subdirectory(bake) # L9 importing and baking content [shared] add_subdirectory(graph) # L9 what is drawn, before binding [shared] add_subdirectory(scriptluau) # L10 the Luau adapter [shared] diff --git a/mono.engine/assets/include/engine/assets/AssetKind.hpp b/mono.engine/assets/include/engine/assets/AssetKind.hpp index 29f788326..955208fe3 100644 --- a/mono.engine/assets/include/engine/assets/AssetKind.hpp +++ b/mono.engine/assets/include/engine/assets/AssetKind.hpp @@ -72,6 +72,9 @@ namespace engine::assets { // Baked animation payloads: joint channels in `.aanim` and ordered image // frames in `.aseq`. A consumer selects by the format name. Animation = 10, + + // A bounded cooked image composition document and its named texture inputs. + ImageGraph = 11, }; // Returns a stable, human-readable name for a kind. diff --git a/mono.engine/assets/include/engine/assets/ContentForm.hpp b/mono.engine/assets/include/engine/assets/ContentForm.hpp index 154ab0941..8496c4dc6 100644 --- a/mono.engine/assets/include/engine/assets/ContentForm.hpp +++ b/mono.engine/assets/include/engine/assets/ContentForm.hpp @@ -130,6 +130,10 @@ namespace engine::assets { // Bounded cooked shader bundle with backend payloads and reflection metadata. AShader, + + // Authored composition and its cooked runtime document. + ImageGraph, + AImageGraph, }; // The lowercase name for a form, which is also its canonical extension. diff --git a/mono.engine/assets/include/engine/assets/Shader.hpp b/mono.engine/assets/include/engine/assets/Shader.hpp index 2ccbe7a65..6f2e802ca 100644 --- a/mono.engine/assets/include/engine/assets/Shader.hpp +++ b/mono.engine/assets/include/engine/assets/Shader.hpp @@ -278,7 +278,7 @@ namespace engine::assets { // The decoded cap includes fixed storage and nested owned growth. Input bytes and the // previous destination are separate caller-owned residency and must be reserved by the caller. static bool Read(core::ByteReader &reader, ShaderData &out); - // Reads one container while bounding decoded retained payload to `maximumBytes`. + // Reads one container with a caller-supplied decoded allocation limit. static bool Read(core::ByteReader &reader, ShaderData &out, uint64_t maximumBytes); // Hashes canonical stage/resource/member/input/output/local-size metadata, not code or labels. diff --git a/mono.engine/assets/include/engine/assets/TextureSequence.hpp b/mono.engine/assets/include/engine/assets/TextureSequence.hpp index c9460b753..8bcf7423d 100644 --- a/mono.engine/assets/include/engine/assets/TextureSequence.hpp +++ b/mono.engine/assets/include/engine/assets/TextureSequence.hpp @@ -37,6 +37,7 @@ namespace engine::assets { // Native `.aseq` payload. No renderer or filesystem dependency belongs here. class TextureSequence { public: + // File signature identifying the native ASQ1 sequence container. static constexpr uint32_t MAGIC = 0x31515341; // ASQ1 // Current serialized container version. static constexpr uint16_t VERSION = 1; diff --git a/mono.engine/assets/src/AssetKind.cpp b/mono.engine/assets/src/AssetKind.cpp index 5e56ed658..398394acb 100644 --- a/mono.engine/assets/src/AssetKind.cpp +++ b/mono.engine/assets/src/AssetKind.cpp @@ -25,6 +25,8 @@ namespace engine::assets { return "shader"; case AssetKind::Animation: return "animation"; + case AssetKind::ImageGraph: + return "imagegraph"; case AssetKind::Unknown: break; } @@ -44,7 +46,7 @@ namespace engine::assets { } AssetKind KindFromName(std::string_view text) { - for (uint8_t value = 1; value <= static_cast(AssetKind::Animation); ++value) { + for (uint8_t value = 1; value <= static_cast(AssetKind::ImageGraph); ++value) { const auto kind = static_cast(value); if (text == Describe(kind)) { return kind; diff --git a/mono.engine/assets/src/ContentForm.cpp b/mono.engine/assets/src/ContentForm.cpp index 1780ce0e7..7d79d8f83 100644 --- a/mono.engine/assets/src/ContentForm.cpp +++ b/mono.engine/assets/src/ContentForm.cpp @@ -106,6 +106,8 @@ namespace engine::assets { {ContentForm::AAnim, "aanim", AssetKind::Animation, false}, {ContentForm::AShader, "ashader", AssetKind::Shader, false}, + {ContentForm::ImageGraph, "imagegraph", AssetKind::ImageGraph, true}, + {ContentForm::AImageGraph, "aimagegraph", AssetKind::ImageGraph, false}, }; const Row *RowOf(ContentForm form) { diff --git a/mono.engine/assets/src/Manifest.cpp b/mono.engine/assets/src/Manifest.cpp index 750265ab0..e74224c49 100644 --- a/mono.engine/assets/src/Manifest.cpp +++ b/mono.engine/assets/src/Manifest.cpp @@ -481,8 +481,8 @@ namespace engine::assets { // would make every kind added later a hard break for every client // already deployed. const uint8_t kind = reader.ReadUInt8(); - asset.Kind = kind <= static_cast(AssetKind::Animation) ? static_cast(kind) - : AssetKind::Unknown; + asset.Kind = kind <= static_cast(AssetKind::ImageGraph) ? static_cast(kind) + : AssetKind::Unknown; if (!ReadHash(reader, asset.Root)) { return refuse(); diff --git a/mono.engine/assets/tests/AssetKind.cpp b/mono.engine/assets/tests/AssetKind.cpp index c000697aa..591372bdb 100644 --- a/mono.engine/assets/tests/AssetKind.cpp +++ b/mono.engine/assets/tests/AssetKind.cpp @@ -105,7 +105,7 @@ TEST_CASE("a dot in a directory is not an extension", "[assets]") { TEST_CASE("every kind has a name and the name parses back", "[assets]") { // The round trip is what a command line, a studio panel and a log line all // depend on - AGENTS.md rule 4, a name crosses and a number does not. - for (uint8_t value = 0; value <= static_cast(AssetKind::Data); ++value) { + for (uint8_t value = 0; value <= static_cast(AssetKind::ImageGraph); ++value) { const auto kind = static_cast(value); const std::string name = Describe(kind); CHECK_FALSE(name.empty()); @@ -127,6 +127,7 @@ TEST_CASE("unknown is zero so an unwritten field makes no claim", "[assets]") { CHECK(static_cast(AssetKind::Unknown) == 0); CHECK(static_cast(AssetKind::Mesh) == 1); CHECK(static_cast(AssetKind::Animation) == 10); + CHECK(static_cast(AssetKind::ImageGraph) == 11); CHECK(static_cast(AssetKind::Texture) == 2); CHECK(static_cast(AssetKind::Audio) == 3); } diff --git a/mono.engine/assets/tests/ContentForm.cpp b/mono.engine/assets/tests/ContentForm.cpp index 33f2ae894..8b40c7a10 100644 --- a/mono.engine/assets/tests/ContentForm.cpp +++ b/mono.engine/assets/tests/ContentForm.cpp @@ -47,6 +47,8 @@ namespace { {"pmx", ContentForm::Pmx, AssetKind::Mesh, true}, {"aanim", ContentForm::AAnim, AssetKind::Animation, false}, {"ashader", ContentForm::AShader, AssetKind::Shader, false}, + {"imagegraph", ContentForm::ImageGraph, AssetKind::ImageGraph, true}, + {"aimagegraph", ContentForm::AImageGraph, AssetKind::ImageGraph, false}, {"atex", ContentForm::ATex, AssetKind::Texture, false}, {"aseq", ContentForm::ASeq, AssetKind::Animation, false}, diff --git a/mono.engine/assets/tests/Manifest.cpp b/mono.engine/assets/tests/Manifest.cpp index d940dbe0c..9b7e1d9b9 100644 --- a/mono.engine/assets/tests/Manifest.cpp +++ b/mono.engine/assets/tests/Manifest.cpp @@ -259,6 +259,7 @@ TEST_CASE("an asset's kind survives a round trip", "[assets][manifest]") { manifest.AddAsset("c.wav", AssetKind::Audio, {Chunk("c")}); manifest.AddAsset("d.spv", AssetKind::Shader, {Chunk("d")}); manifest.AddAsset("e.aanim", AssetKind::Animation, {Chunk("e")}); + manifest.AddAsset("f.aimagegraph", AssetKind::ImageGraph, {Chunk("f")}); // The bytes are held in a named local: a ByteReader is a view, so reading // from a temporary would be reading freed memory. @@ -273,6 +274,7 @@ TEST_CASE("an asset's kind survives a round trip", "[assets][manifest]") { CHECK(parsed->Find("c.wav")->Kind == AssetKind::Audio); CHECK(parsed->Find("d.spv")->Kind == AssetKind::Shader); CHECK(parsed->Find("e.aanim")->Kind == AssetKind::Animation); + CHECK(parsed->Find("f.aimagegraph")->Kind == AssetKind::ImageGraph); } TEST_CASE("assets can be selected by kind", "[assets][manifest]") { diff --git a/mono.engine/audio/include/engine/audio/Commands.hpp b/mono.engine/audio/include/engine/audio/Commands.hpp index 3577e205e..38db4ff6d 100644 --- a/mono.engine/audio/include/engine/audio/Commands.hpp +++ b/mono.engine/audio/include/engine/audio/Commands.hpp @@ -120,6 +120,9 @@ namespace engine::audio { // to happen, and dropping it would turn a frame hitch into a missing // sound - which is far worse than one that is a few samples late. uint64_t AtSample = 0; + // Play can retain a deadline beyond the next callback block. The node + // stays silent without advancing its cursor until that absolute sample. + bool RetainDeadline = false; // Which node. NodeId Target; diff --git a/mono.engine/audio/include/engine/audio/Graph.hpp b/mono.engine/audio/include/engine/audio/Graph.hpp index 0227b464d..223393206 100644 --- a/mono.engine/audio/include/engine/audio/Graph.hpp +++ b/mono.engine/audio/include/engine/audio/Graph.hpp @@ -171,8 +171,10 @@ namespace engine::audio { // Host incarnation established by the last SetSound command. uint64_t PlaybackGeneration = 0; - // `Player`: whether it is advancing. + // `Player`: whether playback is armed. bool Playing = false; + // `Player`: retained Play deadline; no source frames advance before it. + uint64_t NotBeforeSample = 0; // `Player`: whether it returns to the start rather than stopping. bool Looping = false; diff --git a/mono.engine/audio/include/engine/audio/Mixer.hpp b/mono.engine/audio/include/engine/audio/Mixer.hpp index 9cb531126..6f36e01c9 100644 --- a/mono.engine/audio/include/engine/audio/Mixer.hpp +++ b/mono.engine/audio/include/engine/audio/Mixer.hpp @@ -124,21 +124,21 @@ namespace engine::audio { // A copy of an existing command/finish record with the resulting player state. // NaturalCompletion selects Finished; otherwise Applied selects the command. struct PlaybackEvent { - // True when this record reports a source reaching its end naturally. + // Selects the natural-finish record instead of the command record. bool NaturalCompletion = false; - // Applied command details when this is not a natural completion. + // Command dispatch details when NaturalCompletion is false. AppliedAudioCommand Applied{}; - // Finished source details when this is a natural completion. + // Source completion details when NaturalCompletion is true. FinishedAudioSource Finished{}; - // Command result, or Applied for a natural completion. + // Outcome associated with the resulting player state. PlaybackStatus Status = PlaybackStatus::Applied; - // Playback incarnation associated with this record. + // Player incarnation represented by this event. uint64_t PlaybackGeneration = 0; - // Whether the player existed when the resulting state was captured. + // Whether the target player still exists after the event. bool Present = false; - // Whether the player was playing when the resulting state was captured. + // Whether the target player is playing after the event. bool Playing = false; - // Player cursor in source frames after the event. + // Player cursor after dispatch, measured in source frames. double CursorFrames = 0.0; }; @@ -182,13 +182,13 @@ namespace engine::audio { return Shape; } - // How many frames have been rendered since this mixer started. + // Completed frames since this mixer started, safely published for producers. // // **The sample clock**, and the thing a command's deadline is measured // against. A caller scheduling something "in 20 milliseconds" adds // `0.020 * SampleRate` to this. uint64_t Clock() const { - return Rendered; + return PublishedRendered.load(std::memory_order_relaxed); } // Commands dispatched by the latest successful render, with outcomes. @@ -230,7 +230,7 @@ namespace engine::audio { return MissedPlaybackEvents.load(std::memory_order_relaxed); } - // Fixed capacity of the playback-event ring; must remain a power of two. + // Fixed event capacity so render-side publication does not allocate. static constexpr size_t PLAYBACK_EVENT_CAPACITY = 2048; // Renders one block. @@ -238,14 +238,16 @@ namespace engine::audio { // Drains the queue, splits the block at every deadline inside it, // applies commands at their exact sample, and mixes. // - // @param[out] out Filled with exactly its own length in frames. Its + // @param[out] out At most the configured block length is mixed; the returned + // Frames identifies the valid output length. Its // format must match this mixer's; a mismatch produces silence // rather than a resample, because a resample on this thread is // the wrong answer to a caller's configuration mistake. // @return What happened. MixReport Render(SampleBuffer &out); - // Applies every waiting command immediately, ignoring deadlines. + // Applies every waiting command immediately, ignoring dispatch deadlines. + // A Play with RetainDeadline still gates its samples until its deadline. // // For building a routing before the clock is running, and for a test // that wants a graph in a known state. **Not for the device thread** - @@ -282,6 +284,8 @@ namespace engine::audio { CommandQueue Queue; uint64_t Rendered = 0; + // The callback owns Rendered; producers read only this completed-block publication. + std::atomic PublishedRendered{0}; // One scratch buffer per node, indexed alongside the graph's order. // Sized when the graph changes and reused after that, so a render diff --git a/mono.engine/audio/src/Mixer.cpp b/mono.engine/audio/src/Mixer.cpp index 7af538deb..d9a9b41fe 100644 --- a/mono.engine/audio/src/Mixer.cpp +++ b/mono.engine/audio/src/Mixer.cpp @@ -112,6 +112,7 @@ namespace engine::audio { case CommandKind::Play: if (Node *node = target) { node->Playing = true; + node->NotBeforeSample = command.RetainDeadline ? command.AtSample : 0; } break; @@ -289,7 +290,12 @@ namespace engine::audio { static_cast(source.Format().SampleRate) / static_cast(Shape.SampleRate); std::span written = out.Data(); - for (size_t frame = 0; frame < frames; ++frame) { + const uint64_t segmentSample = Rendered + blockOffset; + const size_t firstFrame = + node->NotBeforeSample > segmentSample + ? static_cast(std::min(node->NotBeforeSample - segmentSample, frames)) + : 0; + for (size_t frame = firstFrame; frame < frames; ++frame) { if (node->Cursor >= static_cast(sourceFrames)) { if (!node->Looping) { node->Playing = false; @@ -519,6 +525,7 @@ namespace engine::audio { Rendered += frames; report.EndSample = Rendered; + PublishedRendered.store(Rendered, std::memory_order_relaxed); return report; } } diff --git a/mono.engine/audio/tests/Mixer.cpp b/mono.engine/audio/tests/Mixer.cpp index 8e2df52cb..b444e76e9 100644 --- a/mono.engine/audio/tests/Mixer.cpp +++ b/mono.engine/audio/tests/Mixer.cpp @@ -118,7 +118,7 @@ namespace { NodeId Player; SampleBuffer Out{STEREO, BLOCK}; - Rig() { + explicit Rig(size_t frames = BLOCK) : Engine(STEREO, frames), Out(STEREO, frames) { Player = Engine.Commands().Allocate(); Post(AddNode(Player, NodeKind::Player)); Post(Wire(Player, Engine.Graph().Output())); @@ -321,6 +321,74 @@ TEST_CASE("a deadline past this block takes effect at the start of the next", "[ CHECK(rig.At(0) == 1.0f); } +TEST_CASE("retained Play deadlines stay silent across callback blocks", "[audio][mixer][schedule]") { + constexpr size_t callbackFrames = engine::audio::DEFAULT_BLOCK_FRAMES; + Rig rig(callbackFrames); + rig.Post(SetSound(rig.Player, Constant(0.5f))); + rig.Engine.ApplyPending(); + const uint64_t deadline = callbackFrames * 4 + 7; + auto play = Act(CommandKind::Play, rig.Player, deadline); + play.RetainDeadline = true; + rig.Post(play); + for (size_t block = 0; block < 4; ++block) { + rig.Render(); + CHECK(rig.Out.Peak() == 0); + CHECK(rig.Engine.Graph().Find(rig.Player)->Cursor == 0); + } + rig.Render(); + CHECK(rig.At(6) == 0); + CHECK(rig.At(7) == 0.5f); + CHECK(rig.Engine.Graph().Find(rig.Player)->Cursor == callbackFrames - 7); +} + +TEST_CASE("producers read only completed native callback sample clocks", "[audio][mixer][schedule]") { + constexpr size_t callbackFrames = engine::audio::DEFAULT_BLOCK_FRAMES; + constexpr uint64_t callbackCount = 4096; + AudioMixer mixer(STEREO, callbackFrames); + std::atomic complete{false}; + std::jthread callback([&] { + SampleBuffer block(STEREO, callbackFrames); + for (uint64_t index = 0; index < callbackCount; ++index) + mixer.Render(block); + complete.store(true, std::memory_order_release); + }); + uint64_t previous = 0; + bool monotonic = true; + bool completedBlocks = true; + while (!complete.load(std::memory_order_acquire)) { + const uint64_t samples = mixer.Clock(); + monotonic &= samples >= previous; + completedBlocks &= samples % callbackFrames == 0 && samples <= callbackCount * callbackFrames; + previous = samples; + std::this_thread::yield(); + } + callback.join(); + CHECK(monotonic); + CHECK(completedBlocks); + CHECK(mixer.Clock() == callbackCount * callbackFrames); +} + +TEST_CASE("retained Play cancellation retires before its sample deadline", "[audio][mixer][schedule]") { + Rig rig(engine::audio::DEFAULT_BLOCK_FRAMES); + rig.Post(SetSound(rig.Player, Constant(0.5f))); + rig.Engine.ApplyPending(); + auto play = Act(CommandKind::Play, rig.Player, engine::audio::DEFAULT_BLOCK_FRAMES * 4); + play.RetainDeadline = true; + rig.Post(play); + rig.Render(); + rig.Post(Act(CommandKind::Stop, rig.Player, rig.Engine.Clock())); + rig.Render(); + for (size_t block = 0; block < 5; ++block) { + rig.Render(); + CHECK(rig.Out.Peak() == 0); + } + CHECK(rig.Engine.Graph().Find(rig.Player)->Cursor == 0); + CHECK_FALSE(rig.Engine.Graph().Find(rig.Player)->Playing); + rig.Post(Act(CommandKind::RemoveNode, rig.Player, rig.Engine.Clock())); + rig.Render(); + CHECK_FALSE(rig.Engine.Graph().Find(rig.Player)); +} + TEST_CASE("a block with nothing scheduled is one segment", "[audio][mixer][schedule]") { // The common case, and the reason the split is not paid for unless it is // needed. diff --git a/mono.engine/audiocodec/include/engine/audio/Wav.hpp b/mono.engine/audiocodec/include/engine/audio/Wav.hpp index e2262c097..24ee286fa 100644 --- a/mono.engine/audiocodec/include/engine/audio/Wav.hpp +++ b/mono.engine/audiocodec/include/engine/audio/Wav.hpp @@ -68,19 +68,19 @@ namespace engine::audio { // Structural metadata without allocating samples. Decoding still checks its encoding policy. struct WavMetadata { - // Sample rate and channel count declared by the file. + // Sample rate and channel layout declared by the WAV file. AudioFormat Format; - // Total interleaved sample values across all channels. + // Total interleaved samples described by the file. size_t Samples = 0; }; - // Parses WAV structure and reports format and sample count without decoding samples. + // Reads structural WAV metadata without allocating or decoding samples. std::optional InspectWav(std::span bytes); // Pinned Pixel Composer PCM semantics use doubles and leave unsigned 8-bit samples uncentered. struct PixelComposerWav { - // Sample rate and channel count declared by the file. + // Sample rate and channel layout declared by the WAV file. AudioFormat Format; - // Decoded interleaved samples stored as doubles. + // Interleaved PCM values using Pixel Composer sample semantics. std::vector Samples; }; diff --git a/mono.engine/bake/AGENTS.md b/mono.engine/bake/AGENTS.md index 8b7bafd26..1caa9619d 100644 --- a/mono.engine/bake/AGENTS.md +++ b/mono.engine/bake/AGENTS.md @@ -1,9 +1,10 @@ # bake - module invariants -L9 `shared`. The importers and the node pipeline: the only code in this engine -that reads a `.glb`, a `.pmx`, an `.obj`, a `.png`, a `.jpg`, a `.bmp`, an -`.svg`, an `.rbxm` or an `.rbxmx`. `assets` is what a baked mesh or texture *is*; -this is how somebody else's file becomes one. +L9 `shared`. The importers and the node pipeline own format-specific readers +for `.glb`, `.pmx`, `.obj`, `.bmp`, `.svg`, `.rbxm` and `.rbxmx`. PNG and JPEG +decoding belongs to the shared `imagecodec` module; bake wraps its decoder for +content import. `assets` is what a baked mesh or texture *is*; this is how +somebody else's file becomes one. ## Nothing a shipped game links may link this diff --git a/mono.engine/bake/CMakeLists.txt b/mono.engine/bake/CMakeLists.txt index 330fcebdf..d72565c31 100644 --- a/mono.engine/bake/CMakeLists.txt +++ b/mono.engine/bake/CMakeLists.txt @@ -1,30 +1,18 @@ # L9. Turning somebody else's file into one of ours. # -# The importers and the node pipeline `ROADMAP.md` v0.9 asks for. `assets` is -# what a baked mesh or texture *is*; this is the only thing in the engine that -# reads a `.glb`, a `.pmx`, an `.obj`, a `.png`, a `.jpg`, a `.bmp`, an -# `.svg`, an `.rbxm` or an `.rbxmx`, and it exists so -# that nothing else ever has to. -# -# **Nothing a shipped game links may link this.** `Texture.hpp` states the rule -# and this module is where it becomes checkable: a parser for a foreign format -# is the largest attack surface a content pipeline has, and a client that -# carried one would be paying for a Huffman tree on the frame a texture streamed -# in. The row in `mono.tools/architecture/expected_graph.json` is the standing -# proof - `client`, `server` and `cdn` must not name `bake`, and the day one -# does, that diff is the review. +# grug keep publishing formats here: model files, BMP, GIF, SVG and Roblox. +# PNG/JPEG pixels come from bounded L8 imagecodec, also used by runtime image +# buffers under the user-approved decoder exception. assets owns cooked bytes. +# Shipped programs still cannot link bake; script only links imagecodec. +# expected_graph.json checks that separation. # # `shared` rather than a tool-tier idea because two things bake: the `assetc` # CLI and the studio's import. A second copy of a glTF reader is how a format # acquires a dialect, which is the same argument `assets` makes about the # manifest. # -# Vendors are VENDOR rather than VENDOR_PUBLIC. Crypto++ supplies the -# DEFLATE decoder a PNG's pixels are compressed with and the CRC-32 its chunks -# carry; nlohmann/json parses glTF's JSON chunk; zstd inflates the chunks of a -# `.rbxm` that a recent Studio wrote. None reaches a public header here - what -# this module hands back is an `assets::MeshData`, an `assets::TextureData` or a -# `RobloxModel`, and nothing that says what produced it. +# grug vendors stay private. JSON parses glTF and zstd inflates Roblox chunks. +# imagecodec owns PNG CRC and DEFLATE. no vendor type reaches these public headers. # # **The `.rbxm` reader inflates two framings and vendors one of them**, which is # a line worth having in the file that declares the dependency: an LZ4 block is @@ -36,14 +24,17 @@ mono_add_library(bake DEPS Engine::core Engine::assets + Engine::imagecodec # L9, `shared`. The node vocabulary and the document format, split out at # v0.13 so that `Engine::game` can read a pipeline without linking the # decoders below. `D00102`, and `bakegraph/CMakeLists.txt` carries the # argument. What is left here is everything that touches a payload. Engine::bakegraph + + # Checked 2D image evaluation stays separate from foreign source decoders. + Engine::imagegraph VENDOR - Vendor::cryptopp Vendor::json Vendor::roblox_files Vendor::zstd diff --git a/mono.engine/bake/include/engine/bake/ImageGraph.hpp b/mono.engine/bake/include/engine/bake/ImageGraph.hpp new file mode 100644 index 000000000..e138b170d --- /dev/null +++ b/mono.engine/bake/include/engine/bake/ImageGraph.hpp @@ -0,0 +1,83 @@ +#pragma once + +// image graph source, export and live cook bytes. hosts own files and content policy. +// @tier L9 · shared + +#include +#include + +#include +#include +#include +#include +#include + +namespace engine::bake { + // Refuses oversized encoded inputs before decoding; sources are static SDR images. + // PNG, JPEG, BMP, GIF atlases and ordinary .atex data use existing decoders. + // SVG needs an authored raster size and is not a source of this static adapter. + bool DecodeImageGraphSource( + std::string_view name, + std::span encoded, + imagegraph::Image &out, + std::string &failure + ); + + // grug keeps colour bytes encoded and data bytes raw. refusal keeps old image. + bool DecodeImageGraphSourceTyped( + const imagegraph::Source &source, + std::span encoded, + imagegraph::Image &out, + std::string &failure + ); + + // one exact source texture named by its canonical bytes. + struct CookedImageGraphSource { + // signed runtime texture name, never an authored filesystem path. + std::string Name; + // exact graph pixels and sampling space, with no resize or mip chain. + assets::TextureData Texture; + }; + // complete live asset closure. grug publishes dependencies before graph. + struct CookedImageGraph { + // graph's signed runtime asset name. + std::string Name; + // checked graph with source paths rewritten to runtime names. + imagegraph::Document Graph; + // canonical runtime graph JSON. + std::string Text; + // unique normalized source textures in deterministic name order. + std::vector Sources; + }; + // grug normalizes every authored source and bound path default without resizing. + // hosts own source lookup. refusal keeps out. runtime path overrides name signed textures. + bool CookImageGraph( + const imagegraph::Document &document, + std::string_view graphAssetName, + const imagegraph::TypedSourceResolver &sources, + CookedImageGraph &out, + imagegraph::Diagnostic &diagnostic + ); + // static export with colour/data-aware source lookup. refusal keeps out. + bool BakeImageGraphTyped( + const imagegraph::Document &document, + std::string_view output, + const imagegraph::TypedSourceResolver &sources, + assets::TextureData &out, + imagegraph::Diagnostic &diagnostic + ); + + // grug keeps straight alpha and the graph output sampling space in an ordinary texture. + // No graph identity reaches the output asset. Refusal preserves out. + bool ImageGraphTexture(const imagegraph::Image &image, assets::TextureData &out, std::string &failure); + + // Compiles and evaluates a selected output using the host's decoded-source resolver. + // This performs no filesystem or GPU work and preserves out on refusal. + bool BakeImageGraph( + const imagegraph::Document &document, + std::string_view output, + const imagegraph::SourceResolver &sources, + assets::TextureData &out, + imagegraph::Diagnostic &diagnostic + ); +} diff --git a/mono.engine/bake/src/Decoders.hpp b/mono.engine/bake/src/Decoders.hpp index 77fde621d..4d937e9aa 100644 --- a/mono.engine/bake/src/Decoders.hpp +++ b/mono.engine/bake/src/Decoders.hpp @@ -44,6 +44,15 @@ namespace engine::bake { // @return `false` on anything malformed or unsupported. bool ReadGif(std::span bytes, assets::TextureData &out, std::string &failure); + // The same GIF parser, with host-specific admission before canvas and atlas allocation. + bool ReadGifBounded( + std::span bytes, + uint32_t maximumDimension, + uint64_t maximumPixels, + assets::TextureData &out, + std::string &failure + ); + // Decodes a Windows BMP into RGBA8. // // @param bytes The file, `BM` included. diff --git a/mono.engine/bake/src/Gif.cpp b/mono.engine/bake/src/Gif.cpp index 1a6ec3f9f..a653fbe45 100644 --- a/mono.engine/bake/src/Gif.cpp +++ b/mono.engine/bake/src/Gif.cpp @@ -282,12 +282,19 @@ namespace engine::bake { std::span bytes, assets::TextureData *atlas, assets::TextureSequenceData *sequence, - std::string &failure + std::string &failure, + uint32_t maximumDimension = 0, + uint64_t maximumPixels = MAXIMUM_PIXELS ) { + if (maximumDimension > assets::Texture::MAXIMUM_DIMENSION || maximumPixels == 0 || + maximumPixels > MAXIMUM_PIXELS) { + failure = "invalid GIF decode budget"; + return false; + } const uint32_t maximumFrames = sequence ? assets::TextureSequence::MAXIMUM_FRAMES : MAX_SIDE * MAX_SIDE; const uint64_t maximumFrameBytes = - sequence ? assets::TextureSequence::MAXIMUM_PIXEL_BYTES : 64ull * 1024 * 1024; + sequence ? assets::TextureSequence::MAXIMUM_PIXEL_BYTES : maximumPixels * 4; Reader reader{bytes, 0}; if (!reader.Has(13)) { @@ -310,9 +317,9 @@ namespace engine::bake { failure = "a GIF with no canvas"; return false; } - if (canvasWidth > assets::Texture::MAXIMUM_DIMENSION || - canvasHeight > assets::Texture::MAXIMUM_DIMENSION || - static_cast(canvasWidth) * canvasHeight > MAXIMUM_PIXELS) { + if (canvasWidth > (maximumDimension == 0 ? assets::Texture::MAXIMUM_DIMENSION : maximumDimension) || + canvasHeight > (maximumDimension == 0 ? assets::Texture::MAXIMUM_DIMENSION : maximumDimension) || + static_cast(canvasWidth) * canvasHeight > maximumPixels) { failure = "a GIF canvas past the texture ceiling"; return false; } @@ -409,6 +416,14 @@ namespace engine::bake { failure = sequence ? "a GIF has more than 4096 frames" : "a GIF has more than 256 frames"; return false; } + // Each composited frame is a full canvas. Refuse before decoding it into + // the canvas, including when the compressed source is tiny. + const uint64_t frameBytes = uint64_t(canvasWidth) * canvasHeight * sizeof(Pixel); + if (seenImages > maximumFrameBytes / frameBytes) { + failure = sequence ? "a GIF sequence exceeds 256 MiB of frame pixels" + : "a GIF flipbook exceeds 64 MiB of frame pixels"; + return false; + } if (!reader.Has(9)) { failure = "an image descriptor running past the end"; return false; @@ -482,14 +497,6 @@ namespace engine::bake { } } - // Each composited frame is a full canvas. Refuse before adding it to - // the retained frame list, including when the compressed source is tiny. - const uint64_t frameBytes = uint64_t(canvasWidth) * canvasHeight * sizeof(Pixel); - if (seenImages > maximumFrameBytes / frameBytes) { - failure = sequence ? "a GIF sequence exceeds 256 MiB of frame pixels" - : "a GIF flipbook exceeds 64 MiB of frame pixels"; - return false; - } frames.push_back(canvas); // **A delay of 0 or 1 means "as fast as the viewer can", and every @@ -597,7 +604,8 @@ namespace engine::bake { // The same ceiling every other decoder here uses, so a hostile GIF cannot // ask for a gigabyte by claiming a large canvas and 256 frames. - if (static_cast(sheetWidth) * sheetHeight > MAXIMUM_PIXELS) { + if ((maximumDimension != 0 && (sheetWidth > maximumDimension || sheetHeight > maximumDimension)) || + static_cast(sheetWidth) * sheetHeight > maximumPixels) { failure = "a GIF whose flipbook would be larger than the pixel ceiling"; return false; } @@ -648,6 +656,16 @@ namespace engine::bake { return DecodeGif(bytes, &out, nullptr, failure); } + bool ReadGifBounded( + std::span bytes, + uint32_t maximumDimension, + uint64_t maximumPixels, + assets::TextureData &out, + std::string &failure + ) { + return DecodeGif(bytes, &out, nullptr, failure, maximumDimension, maximumPixels); + } + bool ReadGifSequence( std::span bytes, assets::TextureSequenceData &out, std::string &failure ) { diff --git a/mono.engine/bake/src/ImageCodec.cpp b/mono.engine/bake/src/ImageCodec.cpp new file mode 100644 index 000000000..34bbe3746 --- /dev/null +++ b/mono.engine/bake/src/ImageCodec.cpp @@ -0,0 +1,38 @@ +#include "Decoders.hpp" + +#include + +namespace engine::bake { + namespace { + bool DecodeShared( + std::span bytes, + imagecodec::Format format, + assets::TextureData &out, + std::string &failure + ) { + // grug keep legacy bake texture bounds. runtime uses smaller defaults. + const imagecodec::Limits limits{ + assets::Texture::MAXIMUM_DIMENSION, + assets::Texture::MAXIMUM_DIMENSION, + 128 * 1024 * 1024, + static_cast(assets::Texture::MAXIMUM_DIMENSION) * assets::Texture::MAXIMUM_DIMENSION * + 4 + }; + imagecodec::Image decoded; + if (!imagecodec::Decode(bytes, format, decoded, failure, limits)) return false; + assets::TextureData texture; + texture.Width = decoded.Width; + texture.Height = decoded.Height; + texture.Format = assets::TextureFormat::RGBA8; + texture.Pixels = std::move(decoded.Pixels); + out = std::move(texture); + return true; + } + } + bool ReadPng(std::span bytes, assets::TextureData &out, std::string &failure) { + return DecodeShared(bytes, imagecodec::Format::Png, out, failure); + } + bool ReadJpeg(std::span bytes, assets::TextureData &out, std::string &failure) { + return DecodeShared(bytes, imagecodec::Format::Jpeg, out, failure); + } +} diff --git a/mono.engine/bake/src/ImageGraph.cpp b/mono.engine/bake/src/ImageGraph.cpp new file mode 100644 index 000000000..fab1dbd18 --- /dev/null +++ b/mono.engine/bake/src/ImageGraph.cpp @@ -0,0 +1,446 @@ +#include "Decoders.hpp" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace engine::bake { + namespace { + uint32_t Unsigned(std::span bytes, size_t at, bool bigEndian, size_t count = 4) { + uint32_t value = 0; + for (size_t index = 0; index < count; ++index) { + const size_t offset = bigEndian ? index : count - 1 - index; + value = (value << 8) | std::to_integer(bytes[at + offset]); + } + return value; + } + bool Dimensions(uint32_t width, uint32_t height, std::string &failure) { + if (width == 0 || height == 0 || width > imagegraph::Limits::MaximumDimension || + height > imagegraph::Limits::MaximumDimension || + uint64_t(width) * height * 4 > imagegraph::Limits::MaximumImageBytes) { + failure = "image graph source dimensions exceed the image budget"; + return false; + } + return true; + } + // Inspect the decoder's dimension carriers before it allocates decoded pixels. + // Full format validation remains with the existing decoder, including CRCs. + bool RasterDimensions(std::span bytes, ImageFormat format, std::string &failure) { + switch (format) { + case ImageFormat::Png: { + size_t offset = 8; + bool found = false; + while (bytes.size() - std::min(offset, bytes.size()) >= 12) { + const uint32_t length = Unsigned(bytes, offset, true); + if (length > bytes.size() - offset - 12) break; + const bool header = + bytes[offset + 4] == std::byte{'I'} && bytes[offset + 5] == std::byte{'H'} && + bytes[offset + 6] == std::byte{'D'} && bytes[offset + 7] == std::byte{'R'}; + if (header) { + if (length != 13) break; + if (!Dimensions( + Unsigned(bytes, offset + 8, true), Unsigned(bytes, offset + 12, true), failure + )) + return false; + found = true; + } + offset += size_t(length) + 12; + if (offset == bytes.size() && found) return true; + } + break; + } + case ImageFormat::Bmp: + if (bytes.size() >= 26) { + const uint32_t storedHeight = Unsigned(bytes, 22, false); + const uint32_t height = (storedHeight & 0x80000000u) ? 0u - storedHeight : storedHeight; + return Dimensions(Unsigned(bytes, 18, false), height, failure); + } + break; + case ImageFormat::Gif: + if (bytes.size() >= 10) + return Dimensions(Unsigned(bytes, 6, false, 2), Unsigned(bytes, 8, false, 2), failure); + break; + case ImageFormat::Jpeg: { + size_t offset = 2; + bool found = false; + while (offset < bytes.size()) { + if (bytes[offset++] != std::byte{0xff}) break; + while (offset < bytes.size() && bytes[offset] == std::byte{0xff}) + ++offset; + if (offset == bytes.size()) break; + const uint8_t marker = std::to_integer(bytes[offset++]); + if (marker == 0xda || marker == 0xd9) { + if (found) return true; + break; + } + if (marker == 0x01 || (marker >= 0xd0 && marker <= 0xd7)) continue; + if (bytes.size() - offset < 2) break; + const uint32_t length = Unsigned(bytes, offset, true, 2); + if (length < 2 || length > bytes.size() - offset) break; + if (marker == 0xc0) { + if (length < 8) break; + if (!Dimensions( + Unsigned(bytes, offset + 5, true, 2), + Unsigned(bytes, offset + 3, true, 2), + failure + )) + return false; + found = true; + } + offset += length; + } + break; + } + case ImageFormat::Unknown: + case ImageFormat::Svg: + failure = "image graph source is not a supported static raster"; + return false; + } + failure = "image graph source has no valid bounded raster dimensions"; + return false; + } + } + + bool DecodeImageGraphSource( + std::string_view name, + std::span encoded, + imagegraph::Image &out, + std::string &failure + ) { + return DecodeImageGraphSourceTyped(imagegraph::Source{std::string(name)}, encoded, out, failure); + } + + bool DecodeImageGraphSourceTyped( + const imagegraph::Source &source, + std::span encoded, + imagegraph::Image &out, + std::string &failure + ) { + if (source.Interpretation != imagegraph::SourceInterpretation::Colour && + source.Interpretation != imagegraph::SourceInterpretation::Data) { + failure = "image graph source interpretation is invalid"; + return false; + } + if (encoded.empty() || encoded.size() > imagegraph::Limits::MaximumImageBytes) { + failure = "image graph encoded source exceeds the image budget or is empty"; + return false; + } + try { + assets::TextureData decoded; + if (encoded.size() >= 4 && Unsigned(encoded, 0, false) == assets::Texture::MAGIC) { + if (encoded.size() < 15) { + failure = "image graph source is a truncated texture asset"; + return false; + } + if (!Dimensions(Unsigned(encoded, 7, false), Unsigned(encoded, 11, false), failure)) + return false; + core::ByteReader reader(encoded); + if (!assets::Texture::Read(reader, decoded) || !reader.AtEnd()) { + failure = "image graph source is a malformed texture asset"; + return false; + } + } else { + const auto format = ImageFormatOfBytes(encoded); + if (!RasterDimensions(encoded, format, failure)) return false; + const bool imported = format == ImageFormat::Gif + ? ReadGifBounded( + encoded, + imagegraph::Limits::MaximumDimension, + imagegraph::Limits::MaximumImageBytes / 4, + decoded, + failure + ) + : ReadImage(encoded, decoded, failure); + if (!imported) return false; + } + if (!decoded.IsValid() || !Dimensions(decoded.Width, decoded.Height, failure)) return false; + imagegraph::Image converted; + converted.Width = decoded.Width; + converted.Height = decoded.Height; + const bool numeric = source.Interpretation == imagegraph::SourceInterpretation::Data; + converted.Space = numeric ? imagegraph::OutputSpace::Linear : imagegraph::OutputSpace::SRGB; + if (decoded.Format == assets::TextureFormat::RGBA8 || + (numeric && decoded.Format == assets::TextureFormat::RGBA8_LINEAR)) { + converted.Pixels = std::move(decoded.Pixels); + } else { + converted.Pixels.resize(uint64_t(decoded.Width) * decoded.Height * 4); + const size_t stride = assets::BytesPerPixel(decoded.Format); + for (size_t index = 0; index < converted.Pixels.size() / 4; ++index) { + assets::TexturePixel pixel{}; + const auto stored = std::span(decoded.Pixels).subspan(index * stride, stride); + if (numeric) { + if (!assets::LoadTexturePixel(decoded.Format, stored, pixel)) { + failure = "image graph source contains an invalid data pixel"; + return false; + } + } else { + std::array display{}; + if (!assets::LoadTexturePixelForDisplay(decoded.Format, stored, display)) { + failure = "image graph source contains an invalid display pixel"; + return false; + } + pixel = {display[0], display[1], display[2], display[3]}; + // grug stores encoded colour. numeric formats arrive as linear samples. + if (!assets::IsSRGB(decoded.Format)) { + for (size_t channel = 0; channel < 3; ++channel) { + const double linear = pixel[channel]; + pixel[channel] = linear <= 0.0031308 + ? 12.92 * linear + : 1.055 * std::pow(linear, 1.0 / 2.4) - 0.055; + } + } + } + if (!assets::StoreTexturePixel( + assets::TextureFormat::RGBA8, + pixel, + std::span(converted.Pixels).subspan(index * 4, 4) + )) { + failure = "image graph source pixel conversion failed"; + return false; + } + } + } + out = std::move(converted); + return true; + } catch (const std::bad_alloc &) { + failure = "image graph source allocation failed"; + return false; + } + } + + bool ImageGraphTexture(const imagegraph::Image &image, assets::TextureData &out, std::string &failure) { + if (!image.IsValid()) { + failure = "image graph result is not a valid bounded image"; + return false; + } + try { + assets::TextureData converted; + converted.Width = image.Width; + converted.Height = image.Height; + converted.Format = image.Space == imagegraph::OutputSpace::Linear + ? assets::TextureFormat::RGBA8_LINEAR + : assets::TextureFormat::RGBA8; + converted.Pixels = image.Pixels; + out = std::move(converted); + return true; + } catch (const std::bad_alloc &) { + failure = "image graph texture allocation failed"; + return false; + } + } + + bool BakeImageGraphTyped( + const imagegraph::Document &document, + std::string_view output, + const imagegraph::TypedSourceResolver &sources, + assets::TextureData &out, + imagegraph::Diagnostic &diagnostic + ) { + imagegraph::Plan plan; + imagegraph::Image image; + if (!imagegraph::Compile(document, plan, diagnostic) || + !imagegraph::EvaluateTyped(document, plan, output, sources, image, diagnostic)) + return false; + std::string failure; + if (!ImageGraphTexture(image, out, failure)) { + diagnostic = {{}, std::move(failure)}; + return false; + } + return true; + } + + bool CookImageGraph( + const imagegraph::Document &document, + std::string_view graphAssetName, + const imagegraph::TypedSourceResolver &sources, + CookedImageGraph &out, + imagegraph::Diagnostic &diagnostic + ) { + imagegraph::Plan plan; + if (!imagegraph::Compile(document, plan, diagnostic)) return false; + if (!imagegraph::IsRuntimeAsset(graphAssetName) || + graphAssetName.starts_with("__imagegraph_sources/")) { + diagnostic = {{}, "live image graph needs a portable .aimagegraph asset name"}; + return false; + } + + for (const auto &output : document.Outputs) { + if (!imagegraph::IsReferenceToken(output.Name)) { + diagnostic = {output.Node, "live graph output needs a portable reference token"}; + return false; + } + } + try { + CookedImageGraph cooked; + cooked.Name = graphAssetName; + cooked.Graph = document; + using SourceKey = std::pair; + std::map names; + std::map textures; + size_t retainedBytes = 0; + const auto normalize = [&](const imagegraph::Source &source, + std::string_view node, + std::string &name) { + if (source.Path.starts_with("editable-image://")) { + diagnostic = { + std::string(node), + "local editable image cannot be cooked; bind its ContentId at runtime" + }; + return false; + } + const SourceKey key{source.Path, source.Interpretation}; + if (const auto found = names.find(key); found != names.end()) { + name = found->second; + return true; + } + imagegraph::Image image; + std::string failure; + if (!sources || !sources(source, image, failure) || !image.IsValid()) { + diagnostic = { + std::string(node), + failure.empty() ? "live graph source unavailable or invalid" : failure + }; + return false; + } + image.Space = source.Interpretation == imagegraph::SourceInterpretation::Data + ? imagegraph::OutputSpace::Linear + : imagegraph::OutputSpace::SRGB; + assets::TextureData texture; + if (!ImageGraphTexture(image, texture, failure)) { + diagnostic = {std::string(node), std::move(failure)}; + return false; + } + core::ByteWriter bytes; + if (!assets::Texture::Write(bytes, texture)) { + diagnostic = {std::string(node), "live graph source cannot be normalized"}; + return false; + } + name = "__imagegraph_sources/" + assets::Hasher::Of(bytes.Bytes()).ToHex() + ".atex"; + if (!textures.contains(name)) { + if (texture.Pixels.size() > imagegraph::Limits::MaximumRetainedBytes - retainedBytes) { + diagnostic = { + std::string(node), "live graph source closure exceeds retained byte budget" + }; + return false; + } + retainedBytes += texture.Pixels.size(); + textures.emplace(name, std::move(texture)); + } + names.emplace(key, name); + return true; + }; + for (auto &node : cooked.Graph.Nodes) { + auto *source = std::get_if(&node.Value); + if (!source) continue; + std::string name; + if (!normalize(*source, node.Id, name)) return false; + source->Path = std::move(name); + } + for (auto ¶meter : cooked.Graph.Parameters) { + auto *path = std::get_if(¶meter.Default); + if (!path) continue; + const bool sourcePath = + std::any_of(document.Bindings.begin(), document.Bindings.end(), [&](const auto &binding) { + if (binding.Input != parameter.Name || binding.Property != "path") return false; + return std::any_of( + document.Nodes.begin(), document.Nodes.end(), [&](const auto &node) { + return node.Id == binding.Node && + std::holds_alternative(node.Value); + } + ); + }); + if (!sourcePath) continue; + std::optional interpretation; + std::string nodeName; + for (const auto &binding : document.Bindings) { + if (binding.Input != parameter.Name) continue; + const auto node = std::find_if( + document.Nodes.begin(), document.Nodes.end(), [&](const auto &candidate) { + return candidate.Id == binding.Node; + } + ); + const auto *source = node == document.Nodes.end() + ? nullptr + : std::get_if(&node->Value); + if (!source || binding.Property != "path" || + (interpretation && *interpretation != source->Interpretation)) { + diagnostic = { + binding.Node, "live graph path input must bind sources with one interpretation" + }; + return false; + } + interpretation = source->Interpretation; + nodeName = binding.Node; + } + if (!interpretation) continue; + std::string name; + if (!normalize(imagegraph::Source{*path, *interpretation}, nodeName, name)) return false; + *path = std::move(name); + } + imagegraph::Document resolved; + imagegraph::Plan resolvedPlan; + if (!imagegraph::ResolveInputs(cooked.Graph, {}, resolved, diagnostic) || + !imagegraph::Compile(resolved, resolvedPlan, diagnostic)) + return false; + std::vector extents; + for (const auto &node : resolved.Nodes) { + const auto *source = std::get_if(&node.Value); + if (!source) continue; + const auto texture = textures.find(source->Path); + if (texture == textures.end()) { + diagnostic = {node.Id, "live graph source default has no cooked texture"}; + return false; + } + extents.push_back({node.Id, texture->second.Width, texture->second.Height}); + } + for (const auto &output : resolved.Outputs) { + imagegraph::ExecutionPlan execution; + if (!imagegraph::Prepare(resolved, resolvedPlan, output.Name, extents, execution, diagnostic)) + return false; + } + if (!imagegraph::Write(cooked.Graph, cooked.Text, diagnostic)) return false; + for (auto &[name, texture] : textures) + cooked.Sources.push_back({name, std::move(texture)}); + out = std::move(cooked); + return true; + } catch (const std::bad_alloc &) { + diagnostic = {{}, "live image graph cook allocation failed"}; + return false; + } + } + + bool BakeImageGraph( + const imagegraph::Document &document, + std::string_view output, + const imagegraph::SourceResolver &sources, + assets::TextureData &out, + imagegraph::Diagnostic &diagnostic + ) { + imagegraph::Plan plan; + imagegraph::Image image; + if (!imagegraph::Compile(document, plan, diagnostic) || + !imagegraph::Evaluate(document, plan, output, sources, image, diagnostic)) + return false; + assets::TextureData converted; + converted.Width = image.Width; + converted.Height = image.Height; + converted.Format = image.Space == imagegraph::OutputSpace::Linear + ? assets::TextureFormat::RGBA8_LINEAR + : assets::TextureFormat::RGBA8; + converted.Pixels = std::move(image.Pixels); + out = std::move(converted); + return true; + } +} diff --git a/mono.engine/bake/tests/Image.cpp b/mono.engine/bake/tests/Image.cpp index f4fce458f..3b35f59ae 100644 --- a/mono.engine/bake/tests/Image.cpp +++ b/mono.engine/bake/tests/Image.cpp @@ -6,10 +6,8 @@ // convention we had got backwards, and the failure mode this code has is // exactly that - a PNG that decodes without error into a picture of static. // -// The RGBA fixture uses the Sub and Paeth filters deliberately. Filter zero is -// the one a hand-written test reaches for and the one that exercises none of -// the unfilter; Paeth is where the arithmetic has to be done in `int` rather -// than in bytes, and doing it in bytes wraps silently. +// grug PNG/JPEG parser checks live with imagecodec. this suite checks bake's +// adapter byte order and the formats that remain publishing-only. #include #include @@ -26,6 +24,7 @@ TEST_SUITE_ID("engine.bake.image") TEST_DEPENDS("engine.core.random") +TEST_DEPENDS("engine.imagecodec.image") using engine::assets::TextureData; using engine::assets::TextureFormat; @@ -43,64 +42,8 @@ namespace { 0xCC, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} }; - constexpr std::array PNG_RGBA_FILTERED{ - {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x08, 0x06, 0x00, 0x00, 0x00, 0x72, 0xB6, 0x0D, - 0x24, 0x00, 0x00, 0x00, 0x15, 0x49, 0x44, 0x41, 0x54, 0x78, 0xDA, 0x63, 0xE4, 0x12, 0x91, 0xD3, - 0x60, 0x05, 0x02, 0x16, 0x46, 0x20, 0x60, 0x02, 0x02, 0x00, 0x07, 0x38, 0x00, 0x8A, 0xC7, 0x33, - 0x1C, 0x79, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} - }; - - constexpr std::array PNG_PALETTE{ - {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x08, 0x03, 0x00, 0x00, 0x00, 0xC3, 0xFC, 0x8F, 0xB8, 0x00, - 0x00, 0x00, 0x06, 0x50, 0x4C, 0x54, 0x45, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x51, 0x58, 0xD7, 0x91, - 0x00, 0x00, 0x00, 0x02, 0x74, 0x52, 0x4E, 0x53, 0xFF, 0x80, 0x08, 0x0F, 0xB3, 0x6A, 0x00, 0x00, 0x00, - 0x0B, 0x49, 0x44, 0x41, 0x54, 0x78, 0xDA, 0x63, 0x60, 0x60, 0x04, 0x00, 0x00, 0x04, 0x00, 0x02, 0x2C, - 0xDE, 0x48, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} - }; - - constexpr std::array PNG_GREY_ALPHA{ - {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, - 0x44, 0x52, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x08, 0x04, 0x00, 0x00, - 0x00, 0x5E, 0x2B, 0xB7, 0x01, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x44, 0x41, 0x54, 0x78, - 0xDA, 0x63, 0x48, 0x39, 0x61, 0x24, 0x09, 0x00, 0x04, 0x6A, 0x01, 0x78, 0x5F, 0x19, - 0x00, 0xF6, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} - }; - - constexpr std::array PNG_SIXTEEN_BIT{ - {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, - 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x10, 0x02, 0x00, 0x00, 0x00, 0xC0, - 0xE7, 0x8F, 0x9D, 0x00, 0x00, 0x00, 0x0F, 0x49, 0x44, 0x41, 0x54, 0x78, 0xDA, 0x63, 0x58, - 0xB5, 0xFB, 0xCC, 0xDD, 0x77, 0xFF, 0x01, 0x10, 0x4C, 0x04, 0xFC, 0x04, 0x34, 0x45, 0xEA, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} - }; - - constexpr std::array PNG_INTERLACED{ - {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x08, 0x02, 0x00, 0x00, 0x01, 0x8A, 0xD3, 0xAA, - 0xE5, 0x00, 0x00, 0x00, 0x14, 0x49, 0x44, 0x41, 0x54, 0x78, 0xDA, 0x63, 0xF8, 0xCF, 0xC0, 0xC0, - 0x00, 0xC2, 0x0C, 0xFF, 0xFF, 0xFF, 0x67, 0x00, 0x00, 0x1E, 0xEF, 0x04, 0xFC, 0x73, 0x1C, 0x53, - 0xCC, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} - }; - // CRC-valid one-pixel RGBA headers require five inflated bytes. Independent // zlib streams below produce 4096 and four bytes, respectively. - constexpr std::array PNG_EXCESS_INFLATION{ - {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, - 0x00, 0x00, 0x1A, 0x49, 0x44, 0x41, 0x54, 0x78, 0xDA, 0xED, 0xC1, 0x01, 0x0D, 0x00, 0x00, 0x00, 0xC2, - 0xA0, 0xF7, 0x4F, 0x6D, 0x0F, 0x07, 0x14, 0x00, 0x00, 0x00, 0xF0, 0x6E, 0x10, 0x00, 0x00, 0x01, 0x9B, - 0x68, 0x54, 0x63, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} - }; - - constexpr std::array PNG_SHORT_INFLATION{ - {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, - 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x00, 0x00, - 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x0C, 0x49, 0x44, 0x41, 0x54, 0x78, - 0xDA, 0x63, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0xC8, 0xEA, 0xEB, - 0xF9, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} - }; constexpr std::array BMP_BOTTOM_UP{ {0x42, 0x4D, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, @@ -160,51 +103,6 @@ namespace { 0x3F, 0xB1, 0x4A, 0xFF, 0x00, 0x80, 0x33, 0xFA, 0xA0, 0xFF, 0xD9} }; - constexpr std::array JPEG_420{ - {0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, - 0x01, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, - 0x03, 0x04, 0x03, 0x03, 0x04, 0x05, 0x08, 0x05, 0x05, 0x04, 0x04, 0x05, 0x0A, 0x07, 0x07, 0x06, 0x08, - 0x0C, 0x0A, 0x0C, 0x0C, 0x0B, 0x0A, 0x0B, 0x0B, 0x0D, 0x0E, 0x12, 0x10, 0x0D, 0x0E, 0x11, 0x0E, 0x0B, - 0x0B, 0x10, 0x16, 0x10, 0x11, 0x13, 0x14, 0x15, 0x15, 0x15, 0x0C, 0x0F, 0x17, 0x18, 0x16, 0x14, 0x18, - 0x12, 0x14, 0x15, 0x14, 0xFF, 0xDB, 0x00, 0x43, 0x01, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x09, 0x05, - 0x05, 0x09, 0x14, 0x0D, 0x0B, 0x0D, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x10, 0x03, 0x01, 0x22, - 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, - 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, - 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, - 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08, - 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, - 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x83, 0x84, 0x85, - 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, - 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, - 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, - 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, - 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F, 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, - 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05, 0x04, - 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, - 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1, 0x09, 0x23, - 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16, 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, - 0x1A, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, - 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, - 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, - 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, 0xE4, 0xE5, - 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xDA, 0x00, - 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F, 0x00, 0xF9, 0xD2, 0xBE, 0xC6, 0xAF, 0xCB, - 0xCA, 0xFE, 0x83, 0x6B, 0xF2, 0xAF, 0xA4, 0x37, 0x03, 0x7F, 0xC4, 0x27, 0xFE, 0xCA, 0xFF, 0x00, 0x69, - 0xFA, 0xCF, 0xD6, 0x7D, 0xB7, 0xD8, 0xF6, 0x7C, 0xBE, 0xCF, 0xD9, 0x7F, 0x7A, 0x77, 0xBF, 0x3F, 0x95, - 0xAD, 0xD6, 0xFA, 0x76, 0xF8, 0xAF, 0x89, 0xFF, 0x00, 0x88, 0xE3, 0xF5, 0x1D, 0x3E, 0xA7, 0xF5, 0x3F, - 0x69, 0xFF, 0x00, 0x4F, 0x79, 0xFD, 0xAF, 0x27, 0xFD, 0x7A, 0xE5, 0xE5, 0xF6, 0x5F, 0xDE, 0xBF, 0x37, - 0x4B, 0x6B, 0xFF, 0xD9} - }; - constexpr std::array JPEG_GREY{ {0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, @@ -228,44 +126,6 @@ namespace { 0x01, 0x00, 0x00, 0x3F, 0x00, 0xF8, 0xBE, 0xBF, 0x4A, 0x2B, 0xF0, 0x6E, 0xBF, 0xB1, 0x4A, 0xFF, 0xD9} }; - constexpr std::array JPEG_PROGRESSIVE{ - {0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, - 0x01, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, - 0x03, 0x04, 0x03, 0x03, 0x04, 0x05, 0x08, 0x05, 0x05, 0x04, 0x04, 0x05, 0x0A, 0x07, 0x07, 0x06, 0x08, - 0x0C, 0x0A, 0x0C, 0x0C, 0x0B, 0x0A, 0x0B, 0x0B, 0x0D, 0x0E, 0x12, 0x10, 0x0D, 0x0E, 0x11, 0x0E, 0x0B, - 0x0B, 0x10, 0x16, 0x10, 0x11, 0x13, 0x14, 0x15, 0x15, 0x15, 0x0C, 0x0F, 0x17, 0x18, 0x16, 0x14, 0x18, - 0x12, 0x14, 0x15, 0x14, 0xFF, 0xDB, 0x00, 0x43, 0x01, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x09, 0x05, - 0x05, 0x09, 0x14, 0x0D, 0x0B, 0x0D, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0xFF, 0xC2, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x10, 0x03, 0x01, 0x22, - 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xFF, 0xC4, 0x00, 0x16, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x09, 0xFF, 0xC4, 0x00, - 0x15, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x06, 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x10, 0x03, 0x10, 0x00, 0x00, 0x01, - 0x39, 0x63, 0x97, 0xB4, 0x1A, 0x51, 0xBF, 0xFF, 0xC4, 0x00, 0x14, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF, 0xDA, 0x00, 0x08, 0x01, - 0x01, 0x00, 0x01, 0x05, 0x02, 0x1F, 0xFF, 0xC4, 0x00, 0x1F, 0x11, 0x00, 0x01, 0x02, 0x06, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x12, 0x13, 0x00, 0x03, 0x06, 0x16, - 0x31, 0x43, 0x61, 0x62, 0x72, 0xFF, 0xDA, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 0x3F, 0x01, 0xAA, 0xE6, - 0x5F, 0x0C, 0x69, 0x65, 0x5D, 0x8A, 0x87, 0x90, 0x13, 0xCE, 0x63, 0xFF, 0xC4, 0x00, 0x20, 0x11, 0x00, - 0x01, 0x01, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, - 0x00, 0x01, 0x05, 0x07, 0x11, 0x14, 0x16, 0x23, 0x41, 0x51, 0x61, 0xFF, 0xDA, 0x00, 0x08, 0x01, 0x02, - 0x01, 0x01, 0x3F, 0x01, 0x98, 0x70, 0x3C, 0x4E, 0xD7, 0x62, 0x8A, 0x1F, 0x03, 0x41, 0x1F, 0x5F, 0xDB, - 0x7F, 0xFF, 0xC4, 0x00, 0x14, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF, 0xDA, 0x00, 0x08, 0x01, 0x01, 0x00, 0x06, 0x3F, 0x02, 0x1F, - 0xFF, 0xC4, 0x00, 0x14, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF, 0xDA, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x3F, 0x21, 0x1F, 0xFF, - 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0xDF, 0xFF, 0xC4, 0x00, - 0x19, 0x11, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x11, 0x21, 0x41, 0x51, 0xD1, 0xF0, 0xFF, 0xDA, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 0x3F, 0x10, - 0x6E, 0xC3, 0xEE, 0x50, 0x0B, 0xFF, 0xC4, 0x00, 0x19, 0x11, 0x01, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x21, 0x41, 0x61, 0x71, 0xF0, 0xFF, 0xDA, - 0x00, 0x08, 0x01, 0x02, 0x01, 0x01, 0x3F, 0x10, 0xE5, 0xE8, 0xE5, 0x75, 0x0B, 0x63, 0xFF, 0xC4, 0x00, - 0x14, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x20, 0xFF, 0xDA, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x3F, 0x10, 0x1F, 0xFF, 0xD9} - }; - std::span Bytes(std::span raw) { return {reinterpret_cast(raw.data()), raw.size()}; } @@ -486,84 +346,6 @@ TEST_CASE("an eight-bit RGB png decodes to RGBA", "[bake][image]") { CHECK(At(image, 1, 1) == Pixel{255, 255, 0, 255}); } -TEST_CASE("the Sub and Paeth filters are reversed correctly", "[bake][image]") { - // The values below are the specification's arithmetic done by hand. A Paeth - // predictor computed in bytes rather than in `int` wraps on the subtraction - // and produces a picture that decodes cleanly and looks like noise, so the - // second row is the one worth checking a number at a time. - const TextureData image = Decoded(PNG_RGBA_FILTERED); - - CHECK(At(image, 0, 0) == Pixel{10, 20, 30, 40}); - CHECK(At(image, 1, 0) == Pixel{15, 25, 35, 45}); - CHECK(At(image, 0, 1) == Pixel{11, 21, 31, 41}); - CHECK(At(image, 1, 1) == Pixel{17, 27, 37, 47}); -} - -TEST_CASE("a palette png expands through its palette and transparency", "[bake][image]") { - const TextureData image = Decoded(PNG_PALETTE); - - CHECK(At(image, 0, 0) == Pixel{9, 8, 7, 255}); - CHECK(At(image, 1, 0) == Pixel{6, 5, 4, 128}); -} - -TEST_CASE("a grey-alpha png widens to four channels", "[bake][image]") { - const TextureData image = Decoded(PNG_GREY_ALPHA); - - // Widened rather than kept as two channels, so a renderer never has to ask - // how many channels an arbitrary texture has. - CHECK(At(image, 0, 0) == Pixel{100, 100, 100, 200}); - CHECK(At(image, 1, 0) == Pixel{50, 50, 50, 25}); -} - -TEST_CASE("sixteen-bit samples are truncated to their high byte", "[bake][image]") { - const TextureData image = Decoded(PNG_SIXTEEN_BIT); - CHECK(At(image, 0, 0) == Pixel{0xAA, 0xCC, 0xEE, 255}); -} - -TEST_CASE("an interlaced png is refused by name", "[bake][image]") { - TextureData image; - std::string failure; - - // Half-reading one produces a picture that is recognisably the right image - // and wrong everywhere, which is worse than not reading it. - CHECK_FALSE(ReadImage(Bytes(PNG_INTERLACED), image, failure)); - CHECK(failure.find("interlaced") != std::string::npos); -} - -TEST_CASE("a corrupt png chunk is refused rather than decoded", "[bake][image]") { - std::vector corrupt(PNG_RGB.begin(), PNG_RGB.end()); - - // One flipped byte inside the compressed data. Without the chunk checksum - // this is a picture of static rather than a refusal, and the file it came - // from is a truncated download nobody would think to suspect. - corrupt[50] ^= 0xFF; - - TextureData image; - std::string failure; - CHECK_FALSE(ReadImage(Bytes(corrupt), image, failure)); - CHECK_FALSE(failure.empty()); -} - -TEST_CASE("png inflation stops at the header size and still rejects short streams", "[bake][image]") { - TextureData image = Decoded(PNG_RGB); - const TextureData original = image; - std::string failure; - - SECTION("excess output is refused by the bounded sink") { - CHECK_FALSE(ReadImage(Bytes(PNG_EXCESS_INFLATION), image, failure)); - CHECK(failure == "png: inflated data exceeds the header size"); - } - SECTION("short output still fails the exact size check") { - CHECK_FALSE(ReadImage(Bytes(PNG_SHORT_INFLATION), image, failure)); - CHECK(failure == "png: inflated size disagrees with the header"); - } - - CHECK(image.Width == original.Width); - CHECK(image.Height == original.Height); - CHECK(image.Format == original.Format); - CHECK(image.Pixels == original.Pixels); -} - TEST_CASE("a truncated image is refused or whole, never half", "[bake][image]") { // **Not "every truncation fails", which is the assertion this started as // and which is wrong.** A PNG missing only its `IEND` marker has every @@ -684,98 +466,11 @@ TEST_CASE("a twenty-four bit bitmap is opaque", "[bake][image]") { } } -TEST_CASE("a 4:4:4 jpeg decodes to within the transform's own rounding", "[bake][image]") { - const TextureData image = Decoded(JPEG_444); - - CHECK(image.Width == 16); - CHECK(image.Height == 16); - - // The expected values are libjpeg's, through Pillow, and the tolerance is - // three levels - which is what an inverse DCT done in floats differs from - // one done in fixed point by. A wider tolerance here would stop catching - // the thing worth catching: a chroma plane sampled the wrong way, which is - // tens of levels out on exactly these edges. - const auto near = [](Pixel measured, Pixel expected) { - CHECK(std::abs(measured.R - expected.R) <= 3); - CHECK(std::abs(measured.G - expected.G) <= 3); - CHECK(std::abs(measured.B - expected.B) <= 3); - CHECK(measured.A == 255); - }; - - near(At(image, 4, 4), {254, 0, 0, 255}); - near(At(image, 12, 4), {0, 255, 1, 255}); - near(At(image, 4, 12), {0, 0, 254, 255}); - near(At(image, 12, 12), {255, 255, 0, 255}); -} - -TEST_CASE("a 4:2:0 jpeg upsamples chroma the way libjpeg does", "[bake][image]") { - // The case that made the first upsampling wrong. Nearest-neighbour chroma - // passes a flat-field test and fails here by twenty-eight levels, because - // the quadrant boundary is a chroma edge and nothing else in a test image - // is. - const TextureData image = Decoded(JPEG_420); - - const auto near = [](Pixel measured, Pixel expected) { - CHECK(std::abs(measured.R - expected.R) <= 3); - CHECK(std::abs(measured.G - expected.G) <= 3); - CHECK(std::abs(measured.B - expected.B) <= 3); - }; - - near(At(image, 4, 4), {251, 2, 0, 255}); - near(At(image, 12, 4), {1, 255, 1, 255}); - near(At(image, 4, 12), {2, 0, 252, 255}); - near(At(image, 12, 12), {255, 254, 0, 255}); -} - -TEST_CASE("a greyscale jpeg widens to four channels", "[bake][image]") { - const TextureData image = Decoded(JPEG_GREY); - - // The luma of pure red, green, blue and yellow under BT.601. - CHECK(std::abs(At(image, 4, 4).R - 76) <= 3); - CHECK(std::abs(At(image, 12, 4).R - 150) <= 3); - CHECK(std::abs(At(image, 4, 12).R - 29) <= 3); - CHECK(std::abs(At(image, 12, 12).R - 226) <= 3); - - CHECK(At(image, 4, 4).R == At(image, 4, 4).G); - CHECK(At(image, 4, 4).G == At(image, 4, 4).B); - CHECK(At(image, 4, 4).A == 255); -} - -TEST_CASE("a progressive jpeg is refused by name", "[bake][image]") { - TextureData image; - std::string failure; - - // Read as baseline it produces a blurred version of the right picture, - // which looks like a quality setting rather than a bug. - CHECK_FALSE(ReadImage(Bytes(JPEG_PROGRESSIVE), image, failure)); - CHECK(failure.find("progressive") != std::string::npos); - CHECK(image.Pixels.empty()); -} - TEST_CASE("a jpeg is sniffed by its start-of-image marker", "[bake][image]") { CHECK(ImageFormatOfBytes(Bytes(JPEG_444)) == ImageFormat::Jpeg); CHECK(ImageFormatOfBytes(Bytes(JPEG_GREY)) == ImageFormat::Jpeg); } -TEST_CASE("a truncated jpeg is refused or whole, never half", "[bake][image]") { - for (size_t length = 0; length < JPEG_444.size(); length++) { - TextureData image; - std::string failure; - if (ReadImage(Bytes(std::span(JPEG_444.data(), length)), image, failure)) { - // A scan cut short decodes the blocks that arrived and zeroes the - // rest, which is a whole image of the declared size rather than a - // buffer half written. What must never happen is a size that - // disagrees with the header. - REQUIRE(image.IsValid()); - CHECK(image.Width == 16); - CHECK(image.Height == 16); - } else { - CHECK(image.Pixels.empty()); - CHECK_FALSE(failure.empty()); - } - } -} - // --- GIF, added at v0.10 ------------------------------------------------------ // // **A GIF built in the test rather than read from disk**, which is the rule every diff --git a/mono.engine/bake/tests/ImageGraph.cpp b/mono.engine/bake/tests/ImageGraph.cpp new file mode 100644 index 000000000..8b118bdba --- /dev/null +++ b/mono.engine/bake/tests/ImageGraph.cpp @@ -0,0 +1,508 @@ +#include +#include +#include + +#include + +#include +#include +#include + +TEST_SUITE_ID("engine.bake.imagegraph") +TEST_DEPENDS("engine.imagegraph.document") +TEST_DEPENDS("engine.assets.texture") + +namespace { + constexpr std::array PNG_RGB{ + {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x08, 0x02, 0x00, 0x00, 0x00, 0xFD, 0xD4, 0x9A, + 0x73, 0x00, 0x00, 0x00, 0x14, 0x49, 0x44, 0x41, 0x54, 0x78, 0xDA, 0x63, 0xF8, 0xCF, 0xC0, 0xC0, + 0x00, 0xC2, 0x0C, 0xFF, 0xFF, 0xFF, 0x67, 0x00, 0x00, 0x1E, 0xEF, 0x04, 0xFC, 0x73, 0x1C, 0x53, + 0xCC, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82} + }; + constexpr std::array JPEG_GREY{ + {0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, + 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x03, 0x02, 0x02, 0x02, 0x02, 0x05, 0x04, 0x04, 0x03, 0x04, + 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x07, 0x09, 0x08, 0x06, 0x07, 0x09, 0x07, 0x06, + 0x06, 0x08, 0x0B, 0x08, 0x09, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x06, 0x08, 0x0B, 0x0C, 0x0B, 0x0A, 0x0C, + 0x09, 0x0A, 0x0A, 0x0A, 0xFF, 0xC0, 0x00, 0x0B, 0x08, 0x00, 0x10, 0x00, 0x10, 0x01, 0x01, 0x11, 0x00, + 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, + 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, + 0x00, 0x01, 0x7D, 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, + 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, + 0xF0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, + 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x73, + 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, + 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, + 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, + 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, + 0xE9, 0xEA, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xDA, 0x00, 0x08, 0x01, + 0x01, 0x00, 0x00, 0x3F, 0x00, 0xF8, 0xBE, 0xBF, 0x4A, 0x2B, 0xF0, 0x6E, 0xBF, 0xB1, 0x4A, 0xFF, 0xD9} + }; + using namespace engine; + assets::TextureData Source() { + assets::TextureData image; + image.Width = 2; + image.Height = 1; + image.Pixels = { + std::byte{255}, + std::byte{0}, + std::byte{0}, + std::byte{255}, + std::byte{0}, + std::byte{0}, + std::byte{255}, + std::byte{128} + }; + return image; + } +} + +TEST_CASE("Image graph bake exports an ordinary texture with authored flipped pixels", "[imagegraph]") { + using namespace engine; + const auto source = Source(); + core::ByteWriter encoded; + REQUIRE(assets::Texture::Write(encoded, source)); + imagegraph::Document document; + document.Nodes = { + {"source", imagegraph::Source{"source.atex"}, {}}, + {"flipped", imagegraph::Flip{true, false}, {"source"}} + }; + document.Outputs = {{"sprite", "flipped"}}; + const auto resolver = [&](std::string_view name, imagegraph::Image &out, std::string &failure) { + return bake::DecodeImageGraphSource(name, encoded.Bytes(), out, failure); + }; + assets::TextureData result; + imagegraph::Diagnostic diagnostic; + REQUIRE(bake::BakeImageGraph(document, "sprite", resolver, result, diagnostic)); + CHECK(result.Width == 2); + CHECK(result.Height == 1); + const std::vector expected{ + std::byte{0}, + std::byte{0}, + std::byte{255}, + std::byte{128}, + std::byte{255}, + std::byte{0}, + std::byte{0}, + std::byte{255} + }; + CHECK(result.Pixels == expected); + core::ByteWriter baked; + REQUIRE(assets::Texture::Write(baked, result)); + core::ByteReader reader(baked.Bytes()); + assets::TextureData ordinary; + REQUIRE(assets::Texture::Read(reader, ordinary)); + CHECK(reader.AtEnd()); + CHECK(ordinary.Pixels == expected); +} + +TEST_CASE("Image graph source adapter preserves images on malformed or unbounded inputs", "[imagegraph]") { + using namespace engine; + imagegraph::Image previous{1, 1, {std::byte{1}, std::byte{2}, std::byte{3}, std::byte{4}}}; + const auto before = previous.Pixels; + std::string failure; + const std::array malformed{std::byte{'A'}, std::byte{'T'}, std::byte{'X'}, std::byte{'1'}}; + CHECK_FALSE(bake::DecodeImageGraphSource("bad.atex", malformed, previous, failure)); + CHECK_FALSE(failure.empty()); + CHECK(previous.Pixels == before); + core::ByteWriter texture; + REQUIRE(assets::Texture::Write(texture, Source())); + auto trailing = texture.Bytes(); + std::vector bytes(trailing.begin(), trailing.end()); + bytes.push_back(std::byte{0}); + CHECK_FALSE(bake::DecodeImageGraphSource("trailing.atex", bytes, previous, failure)); + CHECK(previous.Pixels == before); + // A second IHDR must not bypass the pre-decode dimension check. + std::vector png{ + std::byte{0x89}, + std::byte{'P'}, + std::byte{'N'}, + std::byte{'G'}, + std::byte{13}, + std::byte{10}, + std::byte{26}, + std::byte{10} + }; + const auto header = [&](uint32_t width) { + png.insert( + png.end(), + {std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{13}, + std::byte{'I'}, + std::byte{'H'}, + std::byte{'D'}, + std::byte{'R'}} + ); + for (int shift = 24; shift >= 0; shift -= 8) + png.push_back(std::byte((width >> shift) & 255)); + png.insert( + png.end(), + {std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{1}, + std::byte{8}, + std::byte{6}, + std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{0}} + ); + }; + header(1); + header(8192); + CHECK_FALSE(bake::DecodeImageGraphSource("large.png", png, previous, failure)); + CHECK(failure.find("dimensions") != std::string::npos); + CHECK(previous.Pixels == before); +} + +TEST_CASE("Image graph texture copy and failed evaluation preserve the caller result", "[imagegraph]") { + using namespace engine; + assets::TextureData output = Source(); + const auto before = output.Pixels; + std::string failure; + CHECK_FALSE(bake::ImageGraphTexture({}, output, failure)); + CHECK(output.Pixels == before); + imagegraph::Document document; + document.Nodes = {{"source", imagegraph::Source{"missing.png"}, {}}}; + document.Outputs = {{"sprite", "source"}}; + imagegraph::Diagnostic diagnostic; + const auto missing = [](std::string_view, imagegraph::Image &, std::string &reason) { + reason = "missing source"; + return false; + }; + CHECK_FALSE(bake::BakeImageGraph(document, {}, missing, output, diagnostic)); + CHECK(output.Pixels == before); + CHECK(diagnostic.Message.find("missing") != std::string::npos); + imagegraph::Image valid{2, 1, before}; + REQUIRE(bake::ImageGraphTexture(valid, output, failure)); + valid.Pixels[0] = std::byte{0}; + CHECK(output.Pixels == before); +} + +TEST_CASE("Image graph source converts ordinary single-channel texture pixels for display", "[imagegraph]") { + using namespace engine; + assets::TextureData source; + source.Width = 2; + source.Height = 1; + source.Format = assets::TextureFormat::R8; + source.Pixels = {std::byte{32}, std::byte{192}}; + core::ByteWriter encoded; + REQUIRE(assets::Texture::Write(encoded, source)); + imagegraph::Image decoded; + std::string failure; + REQUIRE(bake::DecodeImageGraphSource("grey.atex", encoded.Bytes(), decoded, failure)); + const std::vector expected{ + std::byte{99}, + std::byte{99}, + std::byte{99}, + std::byte{255}, + std::byte{225}, + std::byte{225}, + std::byte{225}, + std::byte{255} + }; + CHECK(decoded.Pixels == expected); +} + +TEST_CASE("Image graph raster admission accepts bounded PNG JPEG and GIF source pixels", "[imagegraph]") { + using namespace engine; + imagegraph::Image decoded; + std::string failure; + REQUIRE(bake::DecodeImageGraphSource("colour.png", std::as_bytes(std::span(PNG_RGB)), decoded, failure)); + CHECK(decoded.Width == 2); + CHECK(decoded.Height == 2); + const std::vector expected{ + std::byte{255}, + std::byte{0}, + std::byte{0}, + std::byte{255}, + std::byte{0}, + std::byte{255}, + std::byte{0}, + std::byte{255}, + std::byte{0}, + std::byte{0}, + std::byte{255}, + std::byte{255}, + std::byte{255}, + std::byte{255}, + std::byte{0}, + std::byte{255} + }; + CHECK(decoded.Pixels == expected); + REQUIRE(bake::DecodeImageGraphSource("grey.jpg", std::as_bytes(std::span(JPEG_GREY)), decoded, failure)); + CHECK(decoded.Width == 16); + CHECK(decoded.Height == 16); + const auto value = std::to_integer(decoded.Pixels[(4 * 16 + 4) * 4]); + CHECK(value >= 73); + CHECK(value <= 79); + CHECK(decoded.Pixels[(4 * 16 + 4) * 4 + 3] == std::byte{255}); + const std::array gif{'G', 'I', 'F', '8', '9', 'a', 2, 0, 1, 0, 0x80, 0, + 0, 255, 0, 0, 0, 0, 255, 0x2c, 0, 0, 0, 0, + 2, 0, 1, 0, 0, 2, 2, 0x44, 0x0a, 0, 0x3b}; + REQUIRE(bake::DecodeImageGraphSource("frame.gif", std::as_bytes(std::span(gif)), decoded, failure)); + CHECK(decoded.Width == 2); + CHECK(decoded.Height == 1); + CHECK(decoded.Pixels[0] == std::byte{255}); + CHECK(decoded.Pixels[4 + 2] == std::byte{255}); +} + +TEST_CASE("Image graph texture source encodes linear RGB while preserving straight alpha", "[imagegraph]") { + using namespace engine; + const auto decode = [](assets::TextureFormat format, std::vector pixels) { + assets::TextureData source; + source.Width = source.Height = 1; + source.Format = format; + source.Pixels = std::move(pixels); + core::ByteWriter encoded; + REQUIRE(assets::Texture::Write(encoded, source)); + imagegraph::Image decoded; + std::string failure; + REQUIRE(bake::DecodeImageGraphSource("source.atex", encoded.Bytes(), decoded, failure)); + return decoded.Pixels; + }; + const std::vector linear{std::byte{128}, std::byte{128}, std::byte{128}, std::byte{128}}; + const std::vector srgb{std::byte{188}, std::byte{188}, std::byte{188}, std::byte{128}}; + CHECK(decode(assets::TextureFormat::RGBA8_LINEAR, linear) == srgb); + CHECK(decode(assets::TextureFormat::RGBA8, linear) == linear); + const std::vector packed{std::byte{0x88}, std::byte{0x88}}; + const std::vector packedSrgb{std::byte{193}, std::byte{193}, std::byte{193}, std::byte{136}}; + const std::vector packedEncoded{ + std::byte{136}, std::byte{136}, std::byte{136}, std::byte{136} + }; + CHECK(decode(assets::TextureFormat::RGBA4_UNORM, packed) == packedSrgb); + CHECK(decode(assets::TextureFormat::RGBA4_SRGB, packed) == packedEncoded); + const std::vector half{ + std::byte{0}, + std::byte{0x38}, + std::byte{0}, + std::byte{0x38}, + std::byte{0}, + std::byte{0x38}, + std::byte{0}, + std::byte{0x34} + }; + const std::vector floatingExpected{ + std::byte{188}, std::byte{188}, std::byte{188}, std::byte{64} + }; + CHECK(decode(assets::TextureFormat::RGBA16_FLOAT, half) == floatingExpected); + const std::vector floating{ + std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{0x3f}, + std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{0x3f}, + std::byte{0}, + std::byte{0}, + std::byte{0}, + std::byte{0x3f}, + std::byte{0}, + std::byte{0}, + std::byte{0x80}, + std::byte{0x3e} + }; + CHECK(decode(assets::TextureFormat::RGBA32_FLOAT, floating) == floatingExpected); + const std::vector grey{std::byte{188}, std::byte{188}, std::byte{188}, std::byte{255}}; + CHECK(decode(assets::TextureFormat::R8, {std::byte{128}}) == grey); + CHECK(decode(assets::TextureFormat::R16_FLOAT, {std::byte{0}, std::byte{0x38}}) == grey); + CHECK( + decode( + assets::TextureFormat::R32_FLOAT, {std::byte{0}, std::byte{0}, std::byte{0}, std::byte{0x3f}} + ) == grey + ); +} + +TEST_CASE("Image graph GIF admission refuses an over-wide atlas in the decoder", "[imagegraph]") { + using namespace engine; + std::vector gif{'G', 'I', 'F', '8', '9', 'a', 0, 16, 1, 0, 0x80, 0, 0, 255, 0, 0, 0, 0, 255}; + for (int frame = 0; frame < 2; ++frame) + gif.insert(gif.end(), {0x2c, 0, 0, 0, 0, 2, 0, 1, 0, 0, 2, 2, 0x44, 0x0a, 0}); + gif.push_back(0x3b); + imagegraph::Image previous{1, 1, {std::byte{1}, std::byte{2}, std::byte{3}, std::byte{4}}}; + const auto before = previous.Pixels; + std::string failure; + CHECK_FALSE(bake::DecodeImageGraphSource("wide.gif", std::as_bytes(std::span(gif)), previous, failure)); + // This comes from the atlas admission gate before allocation, rather than post-decode dimensions. + CHECK(failure.find("flipbook") != std::string::npos); + CHECK(previous.Pixels == before); +} + +TEST_CASE("Live image graph cook keeps exact named inputs and normalized source closure", "[imagegraph]") { + using namespace engine; + imagegraph::Document document; + document.Nodes = { + {"source", imagegraph::Source{"base.atex"}, {}}, + {"other", imagegraph::Source{"base.atex"}, {}}, + {"move", imagegraph::Transform{2, 1}, {"source"}} + }; + document.Outputs = {{"image", "move"}, {"original", "other"}}; + document.Parameters = { + {"sheet", std::string("alternate.atex")}, {"shift", 1.0}, {"sampling", std::string("nearest")} + }; + document.Bindings = { + {"source", "path", "sheet"}, {"move", "translate_x", "shift"}, {"move", "filter", "sampling"} + }; + const auto resolver = [](const imagegraph::Source &source, imagegraph::Image &image, std::string &) { + image = {2, 1, Source().Pixels}; + if (source.Path == "alternate.atex") image.Pixels[0] = std::byte{37}; + return true; + }; + bake::CookedImageGraph cooked; + imagegraph::Diagnostic diagnostic; + REQUIRE(bake::CookImageGraph(document, "effects/live.aimagegraph", resolver, cooked, diagnostic)); + CHECK(cooked.Name == "effects/live.aimagegraph"); + REQUIRE(cooked.Sources.size() == 2); + for (const auto &source : cooked.Sources) { + CHECK(source.Name.starts_with("__imagegraph_sources/")); + CHECK(source.Name.ends_with(".atex")); + CHECK(source.Texture.Width == 2); + CHECK(source.Texture.Height == 1); + CHECK(source.Texture.Mips.empty()); + CHECK(source.Texture.Format == assets::TextureFormat::RGBA8); + } + CHECK( + std::get(cooked.Graph.Nodes[0].Value).Path == + std::get(cooked.Graph.Nodes[1].Value).Path + ); + CHECK( + std::get(cooked.Graph.Parameters[0].Default) != + std::get(cooked.Graph.Nodes[0].Value).Path + ); + CHECK(std::get(cooked.Graph.Parameters[1].Default) == 1.0); + CHECK(cooked.Graph.Bindings.size() == 3); + CHECK(std::get(cooked.Graph.Parameters[2].Default) == "nearest"); + imagegraph::Document read; + REQUIRE(imagegraph::Read(cooked.Text, read, diagnostic)); + CHECK(read.Parameters.size() == 3); + CHECK(read.Outputs.size() == 2); + bake::CookedImageGraph again; + REQUIRE(bake::CookImageGraph(document, "effects/live.aimagegraph", resolver, again, diagnostic)); + CHECK(again.Text == cooked.Text); + CHECK(again.Sources[0].Name == cooked.Sources[0].Name); + const auto before = cooked.Text; + CHECK_FALSE(bake::CookImageGraph(document, "../escape.aimagegraph", resolver, cooked, diagnostic)); + CHECK(cooked.Text == before); + CHECK_FALSE(bake::CookImageGraph(document, "space name.aimagegraph", resolver, cooked, diagnostic)); + CHECK(cooked.Text == before); + document.Outputs[0].Name = "space name"; + CHECK_FALSE(bake::CookImageGraph(document, "live.aimagegraph", resolver, cooked, diagnostic)); + CHECK(cooked.Text == before); + document.Outputs[0].Name = "image"; + const auto missing = [](const imagegraph::Source &, imagegraph::Image &, std::string &failure) { + failure = "source missing"; + return false; + }; + CHECK_FALSE(bake::CookImageGraph(document, "effects/live.aimagegraph", missing, cooked, diagnostic)); + CHECK(cooked.Text == before); +} + +TEST_CASE("Live graph numeric source preserves raw channels and linear output", "[imagegraph]") { + using namespace engine; + assets::TextureData texture; + texture.Width = texture.Height = 1; + texture.Format = assets::TextureFormat::RGBA8_LINEAR; + texture.Pixels = {std::byte{128}, std::byte{64}, std::byte{32}, std::byte{192}}; + core::ByteWriter writer; + REQUIRE(assets::Texture::Write(writer, texture)); + imagegraph::Image image; + std::string failure; + const imagegraph::Source source{"numeric.atex", imagegraph::SourceInterpretation::Data}; + REQUIRE(bake::DecodeImageGraphSourceTyped(source, writer.Bytes(), image, failure)); + CHECK(image.Pixels == texture.Pixels); + CHECK(image.Space == imagegraph::OutputSpace::Linear); + assets::TextureData exported; + REQUIRE(bake::ImageGraphTexture(image, exported, failure)); + CHECK(exported.Format == assets::TextureFormat::RGBA8_LINEAR); + CHECK(exported.Pixels == texture.Pixels); + texture.Format = assets::TextureFormat::R8; + texture.Pixels = {std::byte{128}}; + core::ByteWriter grey; + REQUIRE(assets::Texture::Write(grey, texture)); + REQUIRE(bake::DecodeImageGraphSourceTyped(source, grey.Bytes(), image, failure)); + CHECK(image.Pixels == std::vector{std::byte{128}, std::byte{0}, std::byte{0}, std::byte{255}}); + imagegraph::Document document; + document.Nodes = {{"source", source, {}}}; + document.Outputs = {{"normal", "source", imagegraph::OutputSpace::Linear}}; + const auto resolver = [&](const imagegraph::Source &node, imagegraph::Image &out, std::string &reason) { + return bake::DecodeImageGraphSourceTyped(node, writer.Bytes(), out, reason); + }; + imagegraph::Diagnostic diagnostic; + REQUIRE(bake::BakeImageGraphTyped(document, "normal", resolver, exported, diagnostic)); + CHECK(exported.Format == assets::TextureFormat::RGBA8_LINEAR); + CHECK( + exported.Pixels == + std::vector{std::byte{128}, std::byte{64}, std::byte{32}, std::byte{192}} + ); + bake::CookedImageGraph cooked; + REQUIRE(bake::CookImageGraph(document, "normal.aimagegraph", resolver, cooked, diagnostic)); + REQUIRE(cooked.Sources.size() == 1); + CHECK(cooked.Sources[0].Texture.Format == assets::TextureFormat::RGBA8_LINEAR); +} + +TEST_CASE("Live graph cook refuses incompatible extents and path interpretation bindings", "[imagegraph]") { + using namespace engine; + imagegraph::Document graph; + graph.Nodes = { + {"first", imagegraph::Source{"first.atex"}, {}}, + {"second", imagegraph::Source{"second.atex", imagegraph::SourceInterpretation::Data}, {}}, + {"blend", imagegraph::Blend{}, {"first", "second"}} + }; + graph.Outputs = {{"image", "blend"}}; + const auto resolver = [](const imagegraph::Source &source, imagegraph::Image &image, std::string &) { + image = {2, 1, Source().Pixels}; + if (source.Path == "second.atex") { + image.Width = 1; + image.Pixels.resize(4); + } + return true; + }; + bake::CookedImageGraph cooked; + cooked.Text = "previous"; + imagegraph::Diagnostic diagnostic; + CHECK_FALSE(bake::CookImageGraph(graph, "live.aimagegraph", resolver, cooked, diagnostic)); + CHECK(cooked.Text == "previous"); + graph.Parameters = {{"sheet", std::string("first.atex")}}; + graph.Bindings = {{"first", "path", "sheet"}, {"second", "path", "sheet"}}; + CHECK_FALSE(bake::CookImageGraph(graph, "live.aimagegraph", resolver, cooked, diagnostic)); + CHECK(diagnostic.Message.find("one interpretation") != std::string::npos); + CHECK(cooked.Text == "previous"); +} + +TEST_CASE("Live graph cook refuses local editable sources and bound defaults", "[imagegraph]") { + using namespace engine; + imagegraph::Document graph; + graph.Nodes = {{"source", imagegraph::Source{"editable-image://17"}, {}}}; + graph.Outputs = {{"image", "source"}}; + bake::CookedImageGraph cooked; + cooked.Text = "last good"; + imagegraph::Diagnostic diagnostic; + size_t resolved = 0; + const auto resolver = [&](const imagegraph::Source &, imagegraph::Image &image, std::string &) { + resolved++; + image = {2, 1, Source().Pixels}; + return true; + }; + CHECK_FALSE(bake::CookImageGraph(graph, "live.aimagegraph", resolver, cooked, diagnostic)); + CHECK(resolved == 0); + CHECK(cooked.Text == "last good"); + CHECK(diagnostic.Message.find("runtime") != std::string::npos); + std::get(graph.Nodes[0].Value).Path = "disk.atex"; + graph.Parameters = {{"sourceImage", std::string("editable-image://17")}}; + graph.Bindings = {{"source", "path", "sourceImage"}}; + CHECK_FALSE(bake::CookImageGraph(graph, "live.aimagegraph", resolver, cooked, diagnostic)); + CHECK(resolved == 1); + CHECK(cooked.Text == "last good"); +} diff --git a/mono.engine/control/include/engine/control/Surface.hpp b/mono.engine/control/include/engine/control/Surface.hpp index b2d90ef1d..18fffe680 100644 --- a/mono.engine/control/include/engine/control/Surface.hpp +++ b/mono.engine/control/include/engine/control/Surface.hpp @@ -110,25 +110,25 @@ namespace engine::control { Up, }; - // One input action delivered across the host's input boundary. + // Validated input action passed from a control tool to the host. struct InputAutomationEvent { // Input category being emulated. InputAutomationKind Kind = InputAutomationKind::MouseMove; // Click, press, or release state for buttons and keys. InputAutomationState State = InputAutomationState::Click; - // Horizontal pointer coordinate for mouse movement and button events. + // Horizontal pointer position for pointer events. float X = 0.0f; - // Vertical pointer coordinate for mouse movement and button events. + // Vertical pointer position for pointer events. float Y = 0.0f; - // Signed vertical wheel movement in notches. + // Wheel notches for a wheel event. float Wheel = 0.0f; - // Named mouse button, when `Kind` is MouseButton. + // Mouse button name for a button event. std::string Button; - // Named key, when `Kind` is Key. + // Key name for a key event. std::string Key; - // UTF-8 text, when `Kind` is Text. + // Text inserted by a text event. std::string Text; - // Modifier names accompanying a key event. + // Modifier keys held with the event. std::vector Modifiers; }; diff --git a/mono.engine/control/tests/DataScene.cpp b/mono.engine/control/tests/DataScene.cpp index 6d70688c2..7a629a63f 100644 --- a/mono.engine/control/tests/DataScene.cpp +++ b/mono.engine/control/tests/DataScene.cpp @@ -1203,10 +1203,15 @@ TEST_CASE("data-scene MCP returns only explicit authored affordances", "[control engine::scene::RegisterSceneComponents(); engine::scene::EnsureClassTree(); const Entity part = engine::scene::MakePart(store, {}); - auto *affordance = store.GetMutable(part); - affordance->Id = Name("fixture/door/open"); - affordance->Kind = engine::scene::AuthoredAffordanceKind::Interactable; - affordance->Enabled = true; + store.Set( + part, + engine::scene::AuthoredAffordance{ + .Id = engine::core::Name("fixture/door/open"), + .Kind = engine::scene::AuthoredAffordanceKind::Interactable, + .Enabled = true, + .Reserved = {} + } + ); }); bool failed = false; const json response = Call( diff --git a/mono.engine/core/include/engine/core/Arguments.hpp b/mono.engine/core/include/engine/core/Arguments.hpp index 8e29303c3..a8f15ee92 100644 --- a/mono.engine/core/include/engine/core/Arguments.hpp +++ b/mono.engine/core/include/engine/core/Arguments.hpp @@ -27,8 +27,8 @@ namespace engine::core { // A declarative command-line parser that generates help from its options. // - // The parser stores views of declaration text and `argv`; both must outlive - // the `Arguments` object and any values read from it. + // Declaration text is copied so generated names and descriptions may be temporary. + // Parsed values remain views into `argv`, which must outlive their use. class Arguments { public: // The outcome of parsing one command line. @@ -136,9 +136,9 @@ namespace engine::core { private: struct Option { - std::string_view Name; - std::string_view ValueName; - std::string_view Description; + std::string Name; + std::string ValueName; + std::string Description; bool TakesValue = false; bool Present = false; @@ -152,8 +152,8 @@ namespace engine::core { Option *Find(std::string_view name); const Option *Find(std::string_view name) const; - std::string_view Program; - std::string_view Summary; + std::string Program; + std::string Summary; std::vector