P3dss

Latest version: v0.5.0

Safety actively analyzes 622819 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.5.0

**This release contains major code changes that WILL break backwards compatibility. Proceed with caution**

- Renamed SpritesheetObject -> SpritesheetNode
- Reworked whole SpritesheetNode's animation mechanism, which should
hopefully fix rare issue with animation glitching out
- Changed default parent of SpritesheetNode: render -> NodePath()
- Removed everything related to item initialization from
SpritesheetNode's init - things now should be added via add_item()
- SpritesheetNode's "name" is now optional init arg - if not set, will
set it either to texture's get_name() or to "SpritesheetNode"
- Added SpritesheetItem - dataclass that holds info about named items
from certain spritesheet
- Moved DEFAULT_ANIMATIONS_SPEED -> SpritesheetItem.playback_speed
- Renamed SpritesheetNode.show() -> SpritesheetNode.play()
- Removed SpritesheetNode.switch() - for same functionality, use
SpritesheetNode.play(item, ignore_if_current = True)
- Added PlaybackState enum that specifies if SpritesheetNode's sequence
is playing, paused or stopped right now
- Removed Animation and Sprite classes, since they are obsolete now
- Removed "locked" and "length" properties, since they are obsolete
- SpritesheetNode now accepts is_transparent, is_two_sided and position
on init, like make_sprite_node()
- SpritesheetNode's "sprite_sizes" init arg is now applied "as is",
instead of cutting its parts in half. This changes old behavior, so if
its critical to go back to it with existing values - either set new
"scale" argument to 0.5 on SpritesheetNode's init or use node_sizes
with halved values (mentioned belowbelow)
- SpritesheetNode now has optional "node_sizes" init argument, to
separately specify size of node's card. Under the hood it uses
make_sprite_node() thus it accepts 1, 2 or 4-items tuple. If its not
set - "sprite_sizes" will be used instead
- Renamed spritesheet_object -> nodes

0.4.0

- Added make_sprite_node() function, which is basically a wrapper to
panda's CardMaker with sane defaults and easy customization
- Fixed type hint in SpritesheetObject's init: sprites list -> dict
- Added "texture_filter" arg to get_textures() and to_textures() which
accepts SamplerState's filters and apply them to all produced textures
(both as minfilter and magfilter - for normal usage there is no
difference, for advanced use its better to apply them manually).
If not set - get_textures() will use original spritesheet's magfilter
- Added "image_sizes" arg to to_textures() which accepts image's x
and y and use these to set_orig_file_size() for each texture
- Added example to describe how to use make_sprite_node()
- Added few missing type hints
- Made SpritesheetObject use make_sprite_node() internally

0.3.1

- Fixed issue with SpritesheetObject nodes getting 1-pixel black bars on image corners at random
- Formatted sources with black

0.3.0

- Renamed spritesheet_cutter -> processor
- Renamed cut_spritesheet() -> get_offsets()
- Added some new cutters to processor:
- get_images() to cut spritesheet texture into multiple PNMImage objects
- get_textures() to cut spitesheet texture into multiple sprite textures
(which allows for usage of these in default panda's stuff - buttons, etc)
- Added new usage example to cover new functionality
- Added modules for custom exceptions and types
- Added basic exception handling to processor's cutters
- get_offsets() now returns namedtuple instead of dict
- Offsets and offset steps are now panda's LPoint2f instead of tuples
- Various minor internal style improvements and refactors

0.2.0

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.