Repository navigation
scenix v1.5.0 — Controls, Interaction, And Editor Primitives
Scenix v1.5.0 — Controls, Interaction, And Editor Primitives
Scenix 1.5.0 adds the reusable interaction layer needed by product viewers,
scene tools, games, CAD-like applications, and data visualizations. The release
keeps the default facade CPU-first: editor snapshots, egui, GPU picking, and
browser backends remain explicit features.
Highlights
- One allocation-free
InputStatecombines keyboard, pointer, scroll, up to ten
touch contacts, recognized gestures, four standard gamepads, pointer lock,
and logical/physical viewport metrics. - New Arcball, Trackball, Map, FirstPerson, and PointerLock controllers consume
the same platform-neutral input state. Orbit and Fly controls can use it too. SceneGraphnow owns deterministic selected/hovered/active state, sparse
editor metadata, selectable/locked/hidden policy, layer masks, transform
mode/space/constraints, and snapping configuration.- BVH-backed marquee/frustum selection, reusable ray result buffers, drag
planes, cancellable dragging, and translate/rotate/scale transform sessions. - Retained transform-gizmo geometry with analytic handle hit testing, selection
outlines, corner bounds, and snap-grid helpers. - A typed, renderer-independent inspector tree covers scenes, cameras,
materials, lights, textures, animation mixers, renderer diagnostics, and GPU
resources. The optionaleguifeature renders the shared model. - Optional on-demand WebGPU ID, normal, and depth passes use dense temporary
IDs, a one-pixel scissor, reusable readback resources, and world-position
reconstruction. No editor buffers are allocated until first use. - Browser bindings now forward DPR-aware canvas metrics, touch, gestures,
pointer lock, relative motion, standard gamepads, transform modes, selection,
and inspector JSON across WebGPU and WebGL paths.
Small Example
use scenix::{
ArcballController, InputState, PerspectiveCamera, PointerButton, Vec2, Vec3,
ViewportMetrics,
};
let mut input = InputState::new(ViewportMetrics::new(Vec2::new(1280.0, 720.0), 2.0));
input.on_pointer_down(PointerButton::Left);
input.on_pointer_move(Vec2::new(32.0, 12.0));
let mut controls = ArcballController::new(Vec3::ZERO, 5.0);
let mut camera = PerspectiveCamera::default();
controls.update_from_input(&input, 1.0 / 60.0);
controls.apply_to_perspective(&mut camera);
input.end_frame();Feature Flags
interaction: camera, scene, raycaster, and helper interaction primitives.editor:interactionplus typed inspector implementations.egui:editorplus the read-only egui inspector adapter.renderer: enables on-demand GPU editor picking throughRenderer::pick.wasm: exposes browser input and editor state forwarding.
Examples
cargo run -p scenix --example controls_showcase
cargo run -p scenix --example selection_and_drag
cargo run -p scenix --example transform_gizmo
cargo run -p scenix --example editor_inspector --features egui
cargo run -p scenix --example renderer_picking --features rendererCompatibility
- All 17 workspace crates are version
1.5.0and require Rust1.89. - Existing v1.4 APIs and default facade features remain available; the new
facade bundles are additive and opt-in. - GPU picking requires the renderer/WebGPU path. WebGL browser rendering keeps
CPU BVH selection as its compatible fallback. - The egui adapter is an inspector primitive, not the full application/editor
shell planned for a later milestone. - Dedicated benchmarks cover control updates, retained gizmo generation/hit
testing, and BVH marquee selection into caller-owned output storage.
See the full changelog and
v1.5 guide for API and verification details.