Merge branch 'master' of git://factorcode.org/git/factor

db4
U-SLAVA-DFB8FF805\Slava 2008-12-01 17:53:46 -06:00
commit e8200dcf3e
1 changed files with 11 additions and 8 deletions

View File

@ -25,7 +25,7 @@ USING: kernel
ui.render ui.render
multi-methods multi-methods
multi-method-syntax multi-method-syntax
combinators.short-circuit.smart combinators.short-circuit
processing.shapes processing.shapes
flatland ; flatland ;
@ -86,7 +86,7 @@ TUPLE: <separation> < <behaviour> { radius initial: 25 } ;
[ BEHAVIOUR view-angle>> in-view? ] [ BEHAVIOUR view-angle>> in-view? ]
[ eq? not ] [ eq? not ]
} }
&& ; 2&& ;
:: neighborhood ( SELF OTHERS BEHAVIOUR -- boids ) :: neighborhood ( SELF OTHERS BEHAVIOUR -- boids )
OTHERS [| OTHER | SELF OTHER BEHAVIOUR within-neighborhood? ] filter ; OTHERS [| OTHER | SELF OTHER BEHAVIOUR within-neighborhood? ] filter ;
@ -154,7 +154,7 @@ M: <boids-gadget> ungraft* ( <boids-gadget> -- ) t >>paused drop ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
M:: <boids-gadget> draw-gadget* ( BOIDS-GADGET -- ) :: iterate-system ( BOIDS-GADGET -- )
[let | SKY [ BOIDS-GADGET gadget->sky ] [let | SKY [ BOIDS-GADGET gadget->sky ]
BOIDS [ BOIDS-GADGET boids>> ] BOIDS [ BOIDS-GADGET boids>> ]
@ -183,11 +183,14 @@ M:: <boids-gadget> draw-gadget* ( BOIDS-GADGET -- )
map map
BOIDS-GADGET (>>boids) BOIDS-GADGET (>>boids) ] ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
M:: <boids-gadget> draw-gadget* ( BOIDS-GADGET -- )
origin get origin get
[ BOIDS-GADGET boids>> [ draw-boid ] each ] [ BOIDS-GADGET boids>> [ draw-boid ] each ]
with-translation ] ; with-translation ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -197,7 +200,7 @@ M:: <boids-gadget> draw-gadget* ( BOIDS-GADGET -- )
[ [
GADGET paused>> GADGET paused>>
[ f ] [ f ]
[ GADGET relayout-1 25 milliseconds sleep t ] [ GADGET iterate-system GADGET relayout-1 1 milliseconds sleep t ]
if if
] ]
loop loop