summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-10-15 14:39:53 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-10-15 14:39:53 -0400
commitd0250dcd5ebe6de0bb7236b2805869ccd4d45537 (patch)
tree6c5a00e57a643614e00225b89c6f47606fac4584 /examples
parentdafd75249a4b4339eef9b72e15cdff51a14ff042 (diff)
Rename <canvas> to <display-2d> and <path> to <canvas>.
Diffstat (limited to 'examples')
-rw-r--r--examples/tetra/tetra.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/tetra/tetra.scm b/examples/tetra/tetra.scm
index f8a10d3..65e5a33 100644
--- a/examples/tetra/tetra.scm
+++ b/examples/tetra/tetra.scm
@@ -237,7 +237,7 @@ area next to the board."
(if init?
(teleport piece px py)
(run-script piece
- (move-to piece px py 8)))))
+ (move-to piece px py 0.1)))))
(define-method (move-piece (piece <piece>) new-x new-y)
(move-piece piece new-x new-y #f))
@@ -289,7 +289,7 @@ area next to the board."
(define-method (on-clear (row <row>) particles)
(run-script row
- (scale-to row 0.0 0.0 10)
+ (scale-to row 0.0 0.0 0.25)
(detach row))
;; Emit some particles! woooooo
(let* ((pos (position row))
@@ -330,7 +330,7 @@ area next to the board."
(define-method (on-boot (board <board>))
(set! (batch board) (make-sprite-batch #f))
(attach-to board
- (make <path>
+ (make <canvas>
#:name 'background
#:painter (with-style ((fill-color tango-aluminium-6))
(fill
@@ -425,7 +425,7 @@ area next to the board."
(define-method (remove-filled-rows (board <board>))
(let* ((rows (rows board))
(rows-to-remove (filled-rows board))
- (anim-duration 10))
+ (anim-duration 0.25))
(let loop ((dead-rows rows-to-remove)
(count 0))
(match dead-rows
@@ -517,7 +517,7 @@ area next to the board."
(/ container-width 2.0))
(/ (- window-height container-height) 2.0)))))
(attach-to container
- (make <path>
+ (make <canvas>
#:name 'background
#:painter (with-style ((fill-color tango-aluminium-6)
(stroke-color tango-aluminium-3)
@@ -571,7 +571,7 @@ area next to the board."
(define-method (on-boot (tetra <tetra>))
(set! (board tetra) (make <board>))
(attach-to tetra
- (make <path>
+ (make <canvas>
#:painter (with-style ((fill-color tango-aluminium-5))
(fill
(rectangle (vec2 0.0 0.0) window-width window-height))))
@@ -582,7 +582,7 @@ area next to the board."
#:font click-font
#:position (vec2 (centered-text text) 630.0)
#:scale (vec2 2.0 2.0)))
- (make <path>
+ (make <canvas>
#:name 'next-background
#:painter (with-style ((fill-color tango-aluminium-6))
(fill