Skip to content

Strata 0.7.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 03:30
· 50 commits to main since this release
20827c3

The web kit: the shell around a Strata scene embedded in a web page, shipped
in the release's strata-0.7.0-wasm32-emscripten.tar.gz as kit/, so hosts
stop copying it from one another. The engine and its C ABI are unchanged:
STRATA_ABI_VERSION stays 1 and STRATA_ABI_MINOR stays 12, and the
libraries draw what 0.6.0 drew. The kit carries its own version (1.1). The
Python binding knows the v0.6.0 libraries' SHA-256s and, for the first time,
this release's own (strata.load_release("0.7.0") needs no hash).

  • A release's Python binding can load_release its own version with no
    hash. Until now KNOWN_RELEASES gained a version's SHA-256s only after
    that release was published, so the binding at tag v0.6.0 stopped at 0.5.0.
    The libraries are now reproducible on every platform (MSVC builds with
    /Brepro; the Linux build already was), so the release-prep pull request
    pins its own hashes with the new tools/known_releases.py pin, and the
    package job checks them: on a tag, a missing or different entry fails
    the workflow before the release job; on other runs of an untagged version
    it warns with the lines to pin. Tests in tests/python/test_known_releases.py
    cover the tool, check that every earlier release (0.4.0 on) is pinned and
    that the binding's version is the project's. CONTRIBUTING.md has the
    release steps. No ABI or pixel change.
  • strata_set_lighting errors now include the rejected value for
    legacy_ambient (legacy and space modes), time_of_day and
    latitude_degrees, shadow_distance and split_lambda, the same way the
    cascade, shadow-map-size, camera, point-light and terrain checks already
    do. No ABI or pixel change.
  • The headless surface no longer crashes on WSL2 with a GPU. There, Mesa
    picks its d3d12 driver, and with Mesa 21.2 and the NVIDIA WSL driver
    eglInitialize segfaulted inside it, so strata_create killed the host
    instead of returning an error. Where /dev/dxg exists and none of
    GALLIUM_DRIVER, LIBGL_ALWAYS_SOFTWARE or MESA_LOADER_DRIVER_OVERRIDE
    is set, the headless surface now sets GALLIUM_DRIVER=llvmpipe before
    loading EGL and logs that it did; GALLIUM_DRIVER=d3d12 opts back in.
    Elsewhere nothing changes. No ABI or pixel change. A unit test covers the
    choice (test_headless_driver.cpp).
  • Web kit 1.1 (web/kit/; docs/WEB.md, "The web kit"). No ABI or pixel
    change.
    • StrataLoader.show(options) and StrataLoader.progress(fraction, label): a host whose own loader knows its progress (a .NET
      browser-wasm or Unity-style boot) shows the loading shell and drives
      its bar without load()'s fetch. The fraction is clamped to 0..1 and
      the bar never moves back; the label, or the percentage, replaces the size
      line.
    • StrataLoader.slow() is idempotent: a second call while its bar is
      showing no longer adds another.
    • sk_stats / kit.stats() count meshes (meshes, as the host sets
      Host::meshes), and ?fps=1 shows them. A 1.0 wasm reports 0.
    • The gate's reduced-motion message now reads "This device asks for
      reduced motion. The live view is a 3.4 MB download and is animated."
    • testing/smoke.cjs checks the loading shell on a blank page first:
      progress() clamps, stays monotonic and shows its label, and slow()
      twice shows one bar.
  • The web kit no longer downloads the scene's .wasm twice.
    strata-loader.js streams the file for its progress bar and hands the
    bytes over as Module.wasmBinary, but emsdk 6.0.11's default
    INCOMING_MODULE_JS_API leaves wasmBinary out, so the glue that
    build-kit.sh built ignored them and fetched the file again.
    build-kit.sh now passes that list with wasmBinary added (the example's
    .wasm is unchanged; its .js reads Module.wasmBinary), and
    testing/smoke.cjs fails when any .wasm is requested more than once.
  • The web kit (web/kit/, shipped in the wasm32-emscripten tarball as
    kit/; docs/WEB.md, "The web kit"): the shell around a Strata scene
    embedded in a page's own WebGL 2 context, so hosts stop copying it. No ABI
    change; the kit uses only the C ABI and carries its own version (1.0).
    • strata_kit.h: header-only host shell. Context and engine creation
      (preserveDrawingBuffer on), resize, three quality tiers, an orbit
      camera and its view-projection export, the sun, per-frame batches with
      the point-alpha clamp and prioritised point lights, frame stats, and
      rebuilding the engine after a lost context (sk_restore). Natively the
      same header opens a headless engine and saves PNGs.
    • strata-kit.js: dependency-free page shell. DPR-capped sizing, adaptive
      quality (pixel density first, then shadows; reset on a hidden tab),
      orbit/pan/pinch/keyboard camera, project and pick in CSS pixels,
      webglcontextlost/restored, ?quality=, ?fps=1, ?drive=1 with
      drive(t), and label placement with hysteresis.
    • strata-loader.js: the loading shell. Poster backdrop, byte-accurate
      progress with the size, and a fallback to the trailer or poster when
      WebGL 2 is missing, the engine fails, the context is gone or the device
      is too slow.
    • build-kit.sh (parameterised, SHA-checked, byte-reproducible),
      ci-snippet.yml, and testing/ (smoke.cjs: tap == pick at DPR 1/2/3,
      context loss; capture.cjs: frames from drive(t)).
    • CI builds web/kit/example with the kit against its own libstrata.a,
      runs the smoke test on it in Chromium, and checks the tarball carries
      the kit.
  • Python binding: KNOWN_RELEASES gains v0.6.0 (linux-x64 and win-x64),
    so strata.load_release("0.6.0") needs no hash.