Releases: ebeneliason/acetate
Releases · ebeneliason/acetate
v1.2.0
Fixes & Features
- Better out-of-the-box support for apps which set custom draw offsets, so that debug drawing remains properly aligned with your sprites.
- Optionally cache the draw offset for your sprites (if the new default logic is insufficient) by calling
self:cacheDrawOffset()
from within your sprite'sdraw
function.
v1.1.0
Features
- Hold
SHIFT
while cycling through sprites to constrain focus to sprites of the same class as the currently focused sprite. - Press
L
to lock focus to the class of the currently focused sprite (just as above, without needing to holdSHIFT
).
See the updated README for additional details.
v1.0.0
1.0 Release
Acetate is now 1.0! This is symbolic only. This repository will adhere to semantic versioning going forward, but the 1.0 release is not actually a breaking change.
Features
- A new
customOverridesDefaults
setting can be set totrue
to prevent built-in debug drawing from being performed for any sprites which implement customdebugDraw()
functions. - Sprite debug strings are now provided via the
debugString()
function. This will be called on your sprite each frame, allowing you to provide an updated string containing any properties of your sprite. You can include substitution patterns, passingtrue
as a second return argument to indicate that substitutions are needed. This approach supersedes the use ofdebugString
anddebugStringFormat
members, although they are still supported as before. - Debug string substitutions are now included for independent relative horizontal (
$rx
) and vertical ($ry
) center values. - It's now possible to check for
acetate.initialized
to confirm proper initialization before accessing its members. This can be helpful to avoid crashes on device when calling acetate functions outside of specific contexts.
Fixes
- Several erroneous debug string substitutions have been corrected
- Improved troubleshooting
- More comprehensive unit tests
- Remove extraneous print statement
Full Changelog: v0.2.0...v1.0
v0.2.0
Breaking Changes
This release includes several breaking changes:
- The acetate namespace is now lowercase, following standard module convention. Anywhere you configured a setting or called an acetate function, you'll need to update your code.
Acetate.setFocus(mySprite)
→acetate.setFocus(mySprite)
Acetate.drawCenters = false
→acetate.drawCenters = false
- etc.
- Acetate must now be manually initialized by calling
acetate.init()
. Settings can now be overridden by providing a table of settings values when callinginit()
. See the README for more details. - The relative center substitution string, formerly
$co
, is now specified as$rc
.
Features
- The [p]ause keyboard shortcut now works even when debug mode isn't active. Pausing will implicitly enter debug mode.
- Focused sprite bounds are now shown in an animated dashed line. (This can be disabled via the
animateBoundsForFocus
setting.) - Added sprite extensions
getLocalOrigin
andgetWorldOrigin
which return the top left corner of the sprite in local or world space. Substitution strings for these values are also provided for use in debug strings:$o
: local origin coord$ox
: local origin x$oy
: local origin y$O
: world origin coord$Ox
: world origin x$Oy
: world origin y
- Debug strings now support an opaqueness substitution. Use
$q
to output either "OPAQUE" or "TRANSPARENT" indicating whether the sprite is set to be opaque. - Added luacheck support. Run
luacheck *.lua
in the top-level directory. - Added unit tests via luaunit.
- A hint is now printed in the console when acetate is initialized to indicate how to toggle debug mode.
Fixes
- Both
pause
andunpause
now work properly even whenplaydate.gameWillPause
andplaydate.gameWillResume
aren't implemented. - State is preserved properly even if
pause
(orunpause
) is called multiple times in a row. - The
setFocus
function now respects thefocusInvisibleSprites
setting. - Fixed
getWorldCenter
, which was actually returning the top left coordinate, not the center point. focusedSprite
is no longer included in settings, as this is an implementation detail.
v0.1.1
Features
- Automate installation of fonts when using
toybox.py
. - Various README improvements
Full Changelog: v0.1.0...v0.1.1