summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2021-12-17 21:57:11 -0500
committerrealtradam <[email protected]>2021-12-17 21:57:11 -0500
commit8f5eb1177dd404cfe562ca562415a0246f2cbca1 (patch)
treec4455d828fe72c4bc8413ae171acaa0f90ee05e4
parentb8b008c726810dc5e3f18b5637a5e5c882da7dd4 (diff)
downloadSteelWings-8f5eb1177dd404cfe562ca562415a0246f2cbca1.tar.gz
SteelWings-8f5eb1177dd404cfe562ca562415a0246f2cbca1.zip
Improved visibility of debug vectors.
-rw-r--r--app/systems/debug/debug_render_vector_arrow.rb25
1 files changed, 23 insertions, 2 deletions
diff --git a/app/systems/debug/debug_render_vector_arrow.rb b/app/systems/debug/debug_render_vector_arrow.rb
index 19d3235..ce00ef8 100644
--- a/app/systems/debug/debug_render_vector_arrow.rb
+++ b/app/systems/debug/debug_render_vector_arrow.rb
@@ -8,9 +8,30 @@ FF::Sys.new('DebugRenderVectorArrow', priority: 100) do
#puts "cx: #{boid.cx}"
vxtip = ox + (boid.vx * length)
vytip = oy + (boid.vy * length)
- $gtk.args.outputs.lines << [ox, oy, vxtip, vytip, 255, 255, 0, 255]
+
+ # Velocity
+ $gtk.args.outputs.lines << [ox, oy, vxtip, vytip, 0, 255, 255, 255]
+ $gtk.args.outputs.lines << [ox+1, oy, vxtip+1, vytip, 0, 255, 255, 255]
+ $gtk.args.outputs.lines << [ox-1, oy, vxtip-1, vytip, 0, 255, 255, 255]
+ $gtk.args.outputs.lines << [ox, oy+1, vxtip, vytip+1, 0, 255, 255, 255]
+ $gtk.args.outputs.lines << [ox, oy-1, vxtip, vytip-1, 0, 255, 255, 255]
#$gtk.args.outputs.lines << [ox, oy, ox + (boid.cx * length * 10), oy + (boid.cy * length), 0, 255, 0, 255]
- $gtk.args.outputs.lines << [vxtip, vytip, vxtip + (boid.cx * length * 10), vytip + (boid.cy * length * 10), 0, 0, 255, 255]
+ # Change in Velocity
+ $gtk.args.outputs.lines << [vxtip, vytip, vxtip + (boid.cx * length * 10), vytip + (boid.cy * length * 10), 255, 0, 255, 255]
+ $gtk.args.outputs.lines << [vxtip+1, vytip, vxtip+1 + (boid.cx * length * 10), vytip + (boid.cy * length * 10), 255, 0, 255, 255]
+ $gtk.args.outputs.lines << [vxtip-1, vytip, vxtip-1 + (boid.cx * length * 10), vytip + (boid.cy * length * 10), 255, 0, 255, 255]
+ $gtk.args.outputs.lines << [vxtip, vytip+1, vxtip + (boid.cx * length * 10), vytip+1 + (boid.cy * length * 10), 255, 0, 255, 255]
+ $gtk.args.outputs.lines << [vxtip, vytip-1, vxtip + (boid.cx * length * 10), vytip-1 + (boid.cy * length * 10), 255, 0, 255, 255]
+
+ # Square Velocity
+ $gtk.args.outputs.borders << [vxtip - 24, vytip - 24, 48, 48, 0, 255, 255]
+ $gtk.args.outputs.borders << [vxtip - 25, vytip - 26, 52, 52, 0, 255, 255]
+ $gtk.args.outputs.borders << [vxtip - 25, vytip - 25, 50, 50, 0, 255, 255]
+
+ # Square Change in Velocity
+ $gtk.args.outputs.borders << [vxtip - 14 + (boid.cx * length * 10), vytip - 14 + (boid.cy * length * 10), 28, 28, 255, 0, 255, 255]
+ $gtk.args.outputs.borders << [vxtip - 15 + (boid.cx * length * 10), vytip - 15 + (boid.cy * length * 10), 30, 30, 255, 0, 255, 255]
+ $gtk.args.outputs.borders << [vxtip - 16 + (boid.cx * length * 10), vytip - 16 + (boid.cy * length * 10), 32, 32, 255, 0, 255, 255]
end
end