kitgit

tirbofish/dropbear · commit

9e5caa8b268e084490941a2b07690379280ad6da

feature: OnRails, which allows an entities EntityTransform be constricted by a set path. refactor: made collider wireframe use DebugDraw instead of its own pipeline. feature+refactor: allowed for components to be created within the users kotlin codebase instead of a rust only implementation. wip: improving UI with a stolen WidgetType struct from egui LOL

Unverified

Thribhu K <4tkbytes@pm.me> · 2026-03-27 10:31

view full diff

diff --git a/Cargo.toml b/Cargo.toml
index e863633..e665142 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -90,6 +90,7 @@ rkyv = "0.8"
 bevy_mikktspace = "1.0.0"
 naga = { version = "29", features = ["wgsl-in"] }
 uuid = { version = "1.22", features = ["v4", "serde"] }
+splines = "5.0"
 
 [workspace.dependencies.image]
 version = "0.25"
diff --git a/crates/dropbear-engine/src/debug.rs b/crates/dropbear-engine/src/debug.rs
index fb63808..737d3ad 100644
--- a/crates/dropbear-engine/src/debug.rs
+++ b/crates/dropbear-engine/src/debug.rs
@@ -239,6 +239,24 @@ impl DebugDraw {
         }
     }
 
+    /// Draws a wireframe cylinder centered at `center`, aligned to `axis`.
+    pub fn draw_cylinder(&mut self, center: Vec3, half_height: f32, radius: f32, axis: Vec3, colour: [f32; 4]) {
+        let axis = axis.normalize();
+        let top = center + axis * half_height;
+        let bottom = center - axis * half_height;
+
+        self.draw_circle(top, radius, axis, colour);
+        self.draw_circle(bottom, radius, axis, colour);
+
+        let up = if axis.dot(Vec3::Y).abs() < 0.99 { Vec3::Y } else { Vec3::Z };
+        let tangent = axis.cross(up).normalize();
+        let bitangent = axis.cross(tangent).normalize();
+
+        for dir in [tangent, -tangent, bitangent, -bitangent] {
+            self.draw_line(top + dir * radius, bottom + dir * radius, colour);
+        }
+    }
+
     /// Draws a wireframe cone from `apex` extending in `dir`.
     ///
     /// `angle` is the half-angle of the cone in radians.
diff --git a/crates/eucalyptus-core/Cargo.toml b/crates/eucalyptus-core/Cargo.toml
index d445556..45222f8 100644
--- a/crates/eucalyptus-core/Cargo.toml
+++ b/crates/eucalyptus-core/Cargo.toml
@@ -51,6 +51,7 @@ wgpu = {workspace = true, features = ["serde"]}
 rkyv.workspace = true
 bitflags.workspace = true
 uuid.workspace = true
+splines.workspace = true

Large diffs are not rendered by default. Showing the first 50 of 3289 lines. Show full diff