diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-03-09 08:52:14 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-03-09 08:58:42 -0400 |
commit | d84bb24d2359be9c4be7b3e4f05caf3daf68f243 (patch) | |
tree | d57b082948ef75bdd0f9cc5d1c15a8d70d784d26 /examples/joystick.scm | |
parent | 8ac70ff3cef2963c460ce5382e37946eb0a4914e (diff) |
render: Merge <group> into <model>.
* sly/render/model.scm (<model>): Add 'transform' and 'children' fields.
(model-transform, model-children): New accessors.
(make-model): Add 'transform' and 'children' keyword arguments.
(set-transform-identity!): New procedure.
(draw-model): Recursively draw model and all children.
(model-paint, model-blend): Renamed.
(paint, blend, group, group*, move, place): New procedures.
* sly/render/group.scm: Delete.
* Makefile.am (SOURCES): Remove it.
* examples/2048/2048.scm: Update example.
* examples/animation.scm: Likewise.
* examples/font.scm: Likewise.
* examples/joystick.scm: Likewise.
* examples/mines/mines.scm: Likewise.
* examples/simple.scm: Likewise.
* examples/tilemap.scm: Likewise.
* README.org (Example): Update sample code.
Diffstat (limited to 'examples/joystick.scm')
-rw-r--r-- | examples/joystick.scm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/joystick.scm b/examples/joystick.scm index 57955c9..7aa83c7 100644 --- a/examples/joystick.scm +++ b/examples/joystick.scm @@ -28,7 +28,6 @@ (sly input joystick) (sly render camera) (sly render model) - (sly render group) (sly render sprite) (sly render texture) (sly render font)) @@ -56,8 +55,7 @@ (define-signal caption (signal-map (lambda (text) - (group-move (vector2 -76 -90) - (group (label font text)))) + (move (vector2 -76 -90) (label font text))) (signal-merge (make-signal "Press a button") (button-caption-signal "Hello there" 0) @@ -67,13 +65,12 @@ (define-signal scene (signal-map (lambda (position caption) - (group-move position - (group player caption))) + (move position (group player caption))) player-position caption)) (define camera (orthographic-camera (vx resolution) (vy resolution))) -(add-hook! draw-hook (lambda _ (draw-group (signal-ref scene) camera))) +(add-hook! draw-hook (lambda _ (draw-model (signal-ref scene) camera))) (add-hook! joystick-axis-hook (lambda (which axis value) |