ui.render
multi-methods
multi-method-syntax
- combinators.short-circuit.smart
+ combinators.short-circuit
processing.shapes
flatland ;
[ BEHAVIOUR view-angle>> in-view? ]
[ eq? not ]
}
- && ;
+ 2&& ;
:: neighborhood ( SELF OTHERS BEHAVIOUR -- boids )
OTHERS [| OTHER | SELF OTHER BEHAVIOUR within-neighborhood? ] filter ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-M:: <boids-gadget> draw-gadget* ( BOIDS-GADGET -- )
+:: iterate-system ( BOIDS-GADGET -- )
[let | SKY [ BOIDS-GADGET gadget->sky ]
BOIDS [ BOIDS-GADGET boids>> ]
map
- BOIDS-GADGET (>>boids)
+ BOIDS-GADGET (>>boids) ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- origin get
- [ BOIDS-GADGET boids>> [ draw-boid ] each ]
- with-translation ] ;
+M:: <boids-gadget> draw-gadget* ( BOIDS-GADGET -- )
+ origin get
+ [ BOIDS-GADGET boids>> [ draw-boid ] each ]
+ with-translation ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[
GADGET paused>>
[ f ]
- [ GADGET relayout-1 25 milliseconds sleep t ]
+ [ GADGET iterate-system GADGET relayout-1 1 milliseconds sleep t ]
if
]
loop