Skip to content

Releases: moonburnt/p3dss

p3dss 0.5.0

08 Aug 16:36
Compare
Choose a tag to compare

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

p3dss 0.4.0

08 Aug 16:33
Compare
Choose a tag to compare
  • 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

p3dss 0.3.1

24 Jul 17:06
Compare
Choose a tag to compare
  • Fixed issue with SpritesheetObject nodes getting 1-pixel black bars on image corners at random
  • Formatted sources with black

p3dss 0.3.0

18 Jul 15:06
Compare
Choose a tag to compare
  • 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

Initial pypi release

16 May 15:40
Compare
Choose a tag to compare