summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--catbird/node-2d.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/catbird/node-2d.scm b/catbird/node-2d.scm
index 05393fa..b2f60c6 100644
--- a/catbird/node-2d.scm
+++ b/catbird/node-2d.scm
@@ -767,8 +767,9 @@ A."
(define-method (on-change (sprite <sprite>) slot-name old new)
(case slot-name
((texture)
- (set! (width sprite) (texture-width new))
- (set! (height sprite) (texture-height new)))))
+ (let ((new (artifact (->asset new))))
+ (set! (width sprite) (texture-width new))
+ (set! (height sprite) (texture-height new))))))
(define-method (render (sprite <sprite>) alpha)
(let ((t (texture sprite)))