| Crates.io | dear-imguizmo-quat |
| lib.rs | dear-imguizmo-quat |
| version | 0.8.0 |
| created_at | 2025-10-06 16:07:50.732132+00 |
| updated_at | 2026-01-02 18:16:26.279932+00 |
| description | High-level Rust bindings for ImGuIZMO.quat (C API) with Dear ImGui integration |
| homepage | https://github.com/Latias94/dear-imgui-rs |
| repository | https://github.com/Latias94/dear-imgui-rs |
| max_upload_size | |
| id | 1870382 |
| size | 83,333 |
Safe, idiomatic Rust bindings for ImGuIZMO.quat (quaternion + 3D gizmo helpers) built on the C API wrapper cimguizmo_quat, integrated with dear-imgui-rs.
| Item | Version |
|---|---|
| Crate | 0.8.x |
| dear-imgui-rs | 0.8.x |
| dear-imguizmo-quat-sys | 0.8.x |
See also: docs/COMPATIBILITY.md in the workspace for the full matrix.
This crate has experimental support for wasm32-unknown-unknown targets via the same import-style design used by the core ImGui bindings:
dear-imguizmo-quat + dear-imguizmo-quat-sys expose a wasm feature which:
imgui-sys-v0 provider module.imgui-sys-v0) is built once using Emscripten and contains:
dear-imgui-sys)dear-imguizmo-sys)dear-imguizmo-quat-sys)To try the web demo with ImGuIZMO.quat enabled:
# 1) Generate pregenerated wasm bindings (Dear ImGui core + ImGuIZMO.quat)
cargo run -p xtask -- wasm-bindgen imgui-sys-v0
cargo run -p xtask -- wasm-bindgen-imguizmo-quat imgui-sys-v0
# 2) Build the main wasm + JS (includes an "ImGuIZMO.quat (Web)" window)
cargo run -p xtask -- web-demo imguizmo-quat
# 3) Build the provider (Emscripten imgui-sys-v0 with ImGui + ImGuIZMO.quat)
cargo run -p xtask -- build-cimgui-provider
# 4) Serve and open in a browser
python -m http.server -d target/web-demo 8080
Notes:
dear-imgui-web-demo crate in examples-wasm can enable the imguizmo-quat feature; when present, an “ImGuIZMO.quat (Web)” window is shown if bindings + provider are available.0.6.x release and follow changes in docs/WASM.md.glam::Quat, glam::Vec3, glam::Vec4 directlymint::{Quaternion, Vector3, Vector4}dear-imgui-sys/freetype (enable from any crate once)All math parameters are generic over lightweight traits so you can also use plain arrays: [f32; 4] for quaternions, [f32; 3|4] for vectors.
[dependencies]
dear-imgui-rs = "0.8"
dear-imguizmo-quat = "0.8"
Minimal usage with the Ui extension and builder API:
use dear_imgui_rs::Ui;
use dear_imguizmo_quat::{GizmoQuatExt, Mode};
fn draw(ui: &Ui) {
let mut rot = glam::Quat::IDENTITY; // or [f32; 4]
let used = ui
.gizmo_quat()
.builder()
.size(220.0)
.mode(Mode::MODE_DUAL | Mode::CUBE_AT_ORIGIN)
.quat("##rot", &mut rot);
if used {
// rotation changed this frame
}
}
Pan+Dolly + quaternion + light direction variant:
use dear_imguizmo_quat::{GizmoQuatExt, Mode};
let mut pan_dolly = glam::Vec3::ZERO;
let mut rot = glam::Quat::IDENTITY;
let mut light_dir = glam::Vec3::new(1.0, 0.0, 0.0);
ui.gizmo_quat()
.builder()
.mode(Mode::MODE_PAN_DOLLY | Mode::MODE_DUAL | Mode::CUBE_AT_ORIGIN)
.pan_dolly_quat_light_vec3("##gizmo", &mut pan_dolly, &mut rot, &mut light_dir);
ui.gizmo_quat() and call into the builder; no extra context is required.##suffix to avoid ID clashes in loops.examples/imguizmo_quat_basic.rs for a complete WGPU demo (cube + view controls).