Handbook
Glossary
make-ball ( x y -- shape )
Vocabulary
chipmunk
.
demo
Inputs
x
an
object
y
an
object
Outputs
shape
an
object
Definition
USING:
accessors
chipmunk.ffi
kernel
;
IN:
chipmunk.demo
::
make-ball
( x y -- shape )
cpBodyAlloc
1.0 1/0.
cpBodyInit
x y
cpv
>>p
:>
body
cpCircleShapeAlloc
body 0.95 0 0
cpv
cpCircleShapeInit
dup
shape>>
0
>>e
0
>>u
drop
;