From 742023cc8d832dbc0a8b34deb26c8e2cb847859b Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 10 Sep 2018 17:54:38 -0400 Subject: 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). --- starling/node-2d.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'starling') 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 )) (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)) -- cgit v1.2.3