v0.12.1
·
359 commits
to master
since this release
Features
PatternConfig: new struct carrying pattern, color, andscale(cells across the object's longest world-space bounding-box dimension, default 8.0). Pattern density is now object-relative — ascaleof 8.0 produces 8 cells across the object regardless of mesh units or physical size.- Volume mesh filled clip: clipping a
VolumeMeshDatanow produces real interior cross-sections instead of an open shell. Boundary faces on the kept side are preserved; intersected cells contribute CPU-generated section polygons coloured by per-cell scalar or direct-colour data. Supports multiple simultaneous clip planes via the same[nx, ny, nz, d]encoding used byClipPlanesUniform.- New
ViewportGpuResourcesmethods:upload_clipped_volume_mesh_dataandreplace_clipped_volume_mesh_datafor per-frame GPU slot management.
- New
VolumeMeshDatanow supports pyramid (5-vertex) and wedge/triangular-prism (6-vertex) cells in addition to tets and hexes. Both cell types participate fully in boundary extraction, clipping, and per-cell scalar/color attribute remapping.- New
VolumeMeshDatapush helpers:push_tet,push_pyramid,push_wedge,push_hex. Each method fills sentinel slots automatically, removing the footgun of manually padding the 8-slot cell array. ClipObject: two new fields:edge_color: Option<[f32; 4]>— independent RGBA colour for the plane border edge. When set, the edge uses this colour instead of deriving fromcolor, allowing a visible outline with a fully transparent fill.clip_geometry: bool— whenfalse, the object renders its visual indicator but does not contribute to the GPU clip-plane uniform. Default:true. Allows a decorative plane edge with no effect on rendered geometry.
Fixes
- Phantom shadows from stale GPU cull data:
cull_instancesandwrite_indirect_argscompute shaders previously bounded their loops witharrayLength(), which returns the allocated buffer capacity (2× headroom). When switching to a scene with fewer objects, stale AABB entries from the previous, larger scene were still processed, injecting ghost shadow casters from old geometry. Fixed by addinginstance_countandbatch_counttoFrustumUniform; the shaders now guard against the valid element count rather than the buffer size. - Scroll unit handling: all eframe examples now pass
ScrollUnits::Linesfor mouse wheel events andScrollUnits::Pixelsfor trackpad events by readingegui::MouseWheelUnitfrom theMouseWheelevent. Previously all eframe examples hardcodedScrollUnits::Pixels, causing mouse wheel zoom to bypass thePIXELS_PER_LINEscaling and feel incorrect. - iced example: removed manual
* 28.0line-to-pixel conversion; the library now applies the scaling internally viaScrollUnits::Lines. - Added
ScrollUnits::Pagesvariant (one unit = viewport height in pixels) to coveregui::MouseWheelUnit::Pageand equivalent page-scroll events from other frameworks. - Clip plane overlay: the border edge previously used a hardcoded alpha (0.6) that ignored
color[3], so setting fill opacity to zero still rendered a visible edge. The fill quad is now skipped entirely whencolorisNone, and the border falls back throughedge_color -> color -> white. - Volume mesh latitude scalar: the center cell of a sphere mesh had its centroid exactly at the origin, producing a
NaNlatitude value that was invisible on the boundary surface but appeared as a hole in CPU-generated section faces. The centroid length is now clamped to1e-6before normalization.