aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-08-06 09:06:43 -0700
committercolin <colin@cicadas.surf>2023-08-06 09:06:43 -0700
commit2cbb8e4114c860e1774efd40d18661aee8ab2a72 (patch)
tree1dd53008e31b479676df3835db6aa88d1e34f694
parent32d322050b4ad7b658c2976b4edab13737143102 (diff)
Fix frameset initialization
-rw-r--r--src/interactive/canvas.lisp2
-rw-r--r--src/interactive/frameset.lisp9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/interactive/canvas.lisp b/src/interactive/canvas.lisp
index 9a3515f..af54634 100644
--- a/src/interactive/canvas.lisp
+++ b/src/interactive/canvas.lisp
@@ -198,7 +198,7 @@ e.g., drawing a line in a particular color."
(gl:bind-framebuffer :framebuffer 0)))
(defun blit (canvas)
- "Blits a canvas to the its texture"
+ "Blits a canvas to its texture"
(with-slots (fbo texture data pixel-width pixel-height) canvas
(gl:bind-framebuffer :framebuffer fbo)
(gl:bind-texture :texture-2d (texture-id texture))
diff --git a/src/interactive/frameset.lisp b/src/interactive/frameset.lisp
index 25812f0..c866d04 100644
--- a/src/interactive/frameset.lisp
+++ b/src/interactive/frameset.lisp
@@ -32,12 +32,17 @@
(defmethod initialize-instance :after ((fs frameset) &key)
(add-handler fs #'check-advance-frameset-index)
- (with-slots (index sequence count frames) fs
+ (with-slots (index sequence count frames x y scale-x scale-y rotation) fs
(setf index 0
count (length sequence))
(loop for frame across frames
when frame
- do (setf (unit-in-scene-p frame) fs))))
+ do (setf (unit-in-scene-p frame) fs
+ (x frame) x
+ (y frame) y
+ (scale-x frame) scale-x
+ (scale-y frame) scale-y
+ (rotation frame) rotation))))
(defun current-frame-unit (fs)
"Returns the unit be currently displaayed as the animation's frame."