From d84bb24d2359be9c4be7b3e4f05caf3daf68f243 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 9 Mar 2015 08:52:14 -0400 Subject: render: Merge into . * sly/render/model.scm (): 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. --- examples/joystick.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'examples/joystick.scm') 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) -- cgit v1.2.3