From 8ba99e63f4fa334972654909c552b81784274187 Mon Sep 17 00:00:00 2001 From: Eric Lewis Date: Tue, 11 Aug 2026 04:10:47 -0400 Subject: [PATCH] Document that animated NobleSprites need setSize(), and that NobleSprite:draw() is a render callback. Sprites whose view is a spritesheet/imagetable or a Noble.Animation do not get their size set automatically (unlike image-based sprites, which are auto-sized via setImage()), so they must call setSize() with the frame dimensions or they will never be drawn. The spritesheet usage examples now include the setSize() call, and Noble.Animation.new() notes it as well. (upstream issue #83) NobleSprite:draw() is now documented as the sprite draw callback invoked by Graphics.sprite.update() in sprite-local coordinates, which must not be called manually; use myNobleSprite.animation:draw(x, y) for immediate-mode drawing, or setSize() plus add(x, y) for scene placement. (upstream issue #91) The generated HTML docs were hand-patched to match, since ldoc is not available in this environment. Co-Authored-By: Claude Fable 5 --- .docs/classes/NobleSprite.html | 38 ++++++++++++++++++++++++++---- .docs/modules/Noble.Animation.html | 4 +++- modules/Noble.Animation.lua | 2 ++ modules/NobleSprite.lua | 14 +++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) diff --git a/.docs/classes/NobleSprite.html b/.docs/classes/NobleSprite.html index ab54f0b..d528b55 100644 --- a/.docs/classes/NobleSprite.html +++ b/.docs/classes/NobleSprite.html @@ -30,6 +30,7 @@

Fields

Methods