Fix turtle angles, states, and colors.
This commit is contained in:
parent
0e42d893e8
commit
b61322bbfd
|
@ -5,6 +5,8 @@
|
|||
|
||||
if turtle_state() :visible? then render_turtle! () else nil
|
||||
|
||||
make! (turtle_states, [turtle_init])
|
||||
|
||||
let console_msgs = flush! ()
|
||||
|
||||
let (r, g, b, a) = deref (bgcolor)
|
||||
|
|
|
@ -882,7 +882,7 @@ let turtle_radius = 20
|
|||
|
||||
let turtle_angle = 0.375
|
||||
|
||||
let turtle_color = (100, 100, 100, 100)
|
||||
let turtle_color = (150, 150, 150, 200)
|
||||
|
||||
fn render_turtle! () -> {
|
||||
let state = do turtle_states > deref > last
|
||||
|
@ -894,7 +894,7 @@ fn render_turtle! () -> {
|
|||
add_call! ((:noStroke))
|
||||
let #{heading, :position (x, y)} = state
|
||||
add_call! ((:translate, x, y))
|
||||
add_call! ((:rotate, turn/deg (heading)))
|
||||
add_call! ((:rotate, turn/rad (heading)))
|
||||
add_call! ((:beginShape))
|
||||
let head_unit = heading/vector (heading)
|
||||
let first = mult (head_unit, turtle_radius)
|
||||
|
|
Loading…
Reference in New Issue
Block a user