dymokomi/luce-3d
Source of release 0.9.1
# Validation
`./test.sh` builds the direct Base fixture and two Luce consumers in native
optimization modes 0, 1, 2, 3 and supplemental C debug/release modes.
- Sphere counts, radii, normalized normals, exact seams, UV bounds, outward
nondegenerate triangles at both poles, and out-of-range access.
- Copied vertex/index storage, invalid constructor inputs, composed transforms,
inverse-transpose normals under nonuniform scale, polar camera orientation and
rejected invalid lens updates without state changes.
- Rejection at each sphere allocation stage, no live package allocations after
cleanup, transactional membership growth, duplicates, cycles, removing closed
children and closing parents with externally retained nodes.
- Heterogeneous native scene objects, shared geometry/materials, nested groups,
independent camera aspect and region rendering through real package imports.
- Application-defined geometry and material interfaces, dynamic error messages,
invalid indices, successful reuse after failed rendering, reentrant rendering
rejection and deferred renderer closure from inside a callback.
- Edit overlays (`tests/objects.luc`): selection geometry rebuilt only when
the selection changes (never for hover or camera), see-through drawing,
point and edge picks on a known face, point-cloud picks, a new mesh
replacing every retained batch, knife planes, the faces under a stroke and
15-degree snapping, and soft-selection weights in point and face modes.
- Mesh construction, operators, display triangulations, dissolves and
spatial queries are validated in luce-geocore (its docs/VALIDATION.md).
`python3 tests/gpu.py` uses the pinned Base standard GPU test observer solely in
a temporary test consumer. The package itself has no native framework imports.
With Metal API/shader validation enabled it reads back pixels for overlapping
triangles in both submission orders, near-plane and behind-camera clipping,
resize, and rendering into a host view's region. These tests require a macOS Metal desktop;
portable scene/geometry tests run on macOS and Linux.
The public README's Luce example is compiled by `tests/docs.py`. CI executes the
portable suite and this documentation check on ARM64 macOS and x86-64 Linux, and
the Metal suite on macOS. Exact toolchain and library revisions are recorded in bootstrap
pins. Tests use temporary output directories and release them on success/failure.
`python3 tests/gpu.py` also renders tests/mesh_pixels_main.lucb offscreen: the
polygon-mesh path matches the per-vertex path within 3/255 in lit and flat
modes (with authored normals and point colors), a Move uploads exactly two
arrays, zebra bands double with the stripe count on a cylinder, break at a
crease with a normal per face and flow across the same seam with shared
normals, and change without one-pixel jumps on a sphere. The program uses only
portable `gpu` calls, so it runs on Vulkan hosts too. This library has no
texture, shadow, skinning, model-loading or general shader API.