tirbofish/dropbear · diff
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
Signature present but could not be verified.
Unverified
@@ -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" @@ -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. @@ -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