Skip to main content

Crate indicatrix_web_core

Crate indicatrix_web_core 

Source
Expand description

The compute side of the indicatrix browser app, with no DOM and no Slint in it.

Everything here except [host] builds and is tested natively, so the logic a Web Worker runs is checked by cargo test -p indicatrix-web-core rather than only in a browser.

  • protocol: the messages between the page and its Workers (protocol::ToWorker, protocol::FromWorker), postcard-encoded into a transferred ArrayBuffer, and the protocol::PROTOCOL_VERSION checked on Init.
  • scene: scene::SceneSpec, the plain-data description of a render scene, and scene::OwnedScene, which builds exactly the scene the desktop builds for the same settings and lends out a FrameScene.
  • render: the per-chunk CPU trace (render::handle_trace_chunk), the full-frame render::Accumulator and the render::ChunkPlanner that sizes chunks.
  • solve: solve::handle_solve, the solve worker’s job: a native-TOML design in, the solved masts, planes, status and warnings out.
  • solve_error: solve_error::SolveError, the typed reason a solve-role job produced no answer (superseded, cancelled, failed).
  • display: pixels from an accumulation – the live tone map, the settled denoise, the PNG export and its file name – each the desktop’s own call.
  • settings: the persisted render settings and session payload, and settings::scene_spec, which turns them into a scene::SceneSpec with the desktop’s conversions.
  • custom_material: the Design settings dialog’s custom-material fields turned into a GemMaterial and the snapshot a design file stores for it.
  • design_meta: the .isdd file’s descriptive [meta] table as the page keeps and stamps it (ISO-8601 UTC time, UUID v4 from caller-supplied bytes).
  • gpu_admission: the pure half of the GPU admission gate – scene eligibility, the per-adapter record and key, the self-check scene.
  • gpu_startup: the GPU start-up test’s pure half – what to do at page load, the progress of a run, and the sentence that says what the app renders with.
  • gpu_ledger: the pool’s book of full passes posted to the GPU Worker.
  • guide: the guided walkthrough’s tab-session state (open, step, collapsed, where the floating panel was dragged to).
  • hdr: the browser’s HDR limits and the render-worker count rule for a map.
  • input: the size limits checked on a picked or dropped file before it is read.
  • open_route: what the Open picker offers and the design file’s name (which loader a file goes to is indicatrix_editor::files::InputFileKind::classify).
  • rows: the tier table’s row ids, the driven-angle refusal, the schedule notes and the history labels (pure helpers of the page’s editor).
  • new_design: the New Design dialog’s template path without the window.
  • storage_keys: the indicatrix.<name>.v<n> storage key builders.
  • tab_state: the design name and unsaved flag, which belong to one tab (sessionStorage) rather than to the shared settings.
  • worker: worker::WorkerHandler, the whole message-handling state machine a Worker runs; the indicatrix-web-compute crate only moves bytes in and out of it.
  • [host] (wasm32 only): the page-side pool, [host::WorkerPool] with its [host::RenderPool] and [host::SolveClient].

Modules§

custom_material
The Design settings dialog’s compact custom-material editor: the typed fields turned into a GemMaterial and the CustomMaterialSnapshot a design file carries for it.
design_meta
The descriptive [meta] table of an .isdd design file as the browser app handles it: kept from the opened file, stamped on save, written back unchanged.
display
Pixels from an accumulation, each step the desktop’s own call, so the same float sum gives the same bytes on the same target.
gpu_admission
The pure half of the GPU admission gate (plan section 6.5).
gpu_ledger
The book the render pool keeps of the passes it has posted to the GPU Worker.
gpu_startup
The pure half of the GPU start-up test.
guide
The guided walkthrough’s tab-session state.
hdr
HDR environment maps in the browser: the upload limits and the render-worker count rule.
input
Size limits for the files the page reads.
new_design
The template path of the New Design dialog, minus the window.
open_route
What the Open picker offers, and the file names a design is saved under.
protocol
The messages between the page and its Web Workers.
render
The CPU render path, split the way the browser runs it.
rows
Pure helpers of the page’s tier table, nudges, schedule readout and history list, kept here (not in the wasm-only page crate) so they run under cargo test.
scene
SceneSpec: a render scene as plain serde data, and OwnedScene, which builds from it exactly the scene the desktop builds for the same settings.
settings
The browser app’s render settings, their session payload and their render scene.
solve
The solve Worker’s job: a design as native TOML in, everything the page needs to install the result out.
solve_error
SolveError: why a solve-role job produced no answer.
storage_keys
Pure key and format helpers for the page’s browser storage layers.
tab_state
The two facts about the open design that belong to ONE browser tab, kept apart from the shared settings.
worker
WorkerHandler: everything a Web Worker does with a message, as a plain state machine.

Constants§

GPU_WORKER_LOADER_URL
Where the host finds the GPU Worker script: the loader shim Trunk writes next to the app for apps/indicatrix-web/index.html’s data-type="worker" link for indicatrix-web-gpu.
WORKER_LOADER_URL
Where the host finds the Worker script: the loader shim Trunk writes next to the app for apps/indicatrix-web/index.html’s data-type="worker" link.