diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-09-10 17:54:38 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-09-10 17:55:54 -0400 |
commit | 742023cc8d832dbc0a8b34deb26c8e2cb847859b (patch) | |
tree | d9cfa92b40e49b244390b54776f76754581099bc | |
parent | ee5ef30d60bb0155064a00786893935fb4136075 (diff) |
node-2d: Initialize last position to avoid rendering glitches.
* starling/node-2d.scm (activate): Set the initial last position to
the same as the initial position to avoid a brief flash where the
node appears at (0, 0).
-rw-r--r-- | starling/node-2d.scm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/starling/node-2d.scm b/starling/node-2d.scm index 0e00d43..205bf41 100644 --- a/starling/node-2d.scm +++ b/starling/node-2d.scm @@ -404,6 +404,9 @@ (define-method (activate (node <node-2d>)) (set! (dirty-matrix? node) #t) + ;; Set the initial last position to the same as the initial position + ;; to avoid a brief flash where the node appears at (0, 0). + (vec2-copy! (position node) (last-position node)) (next-method)) |