flixel icon indicating copy to clipboard operation
flixel copied to clipboard

Aseprite Atlas repeat value to follow editor convention

Open MondayHopscotch opened this issue 2 years ago • 0 comments

  • Flixel version: 5.4.1

Aseprite editor behavior is as follows:

Tag's Repeat Checkbox Tag's Repeat Field Value Tag Looping behavior
  • - [ ] Repeat
N/A Loops Forever
  • - [x] Repeat
1 Plays a single time, stopping at the final frame
  • - [x] Repeat
>1 Plays N times

Currently, AseAtlas parses the loops value as:

inline function get_loops()
{
	return this != null && toInt() > 0;
}

However, in the Aseprite editor, tags default to looping, represented by the Repeat field on the tag being unchecked.

Current Flixel parsed behavior:

Tag's Repeat Checkbox Tag's Repeat Field Value Flixel Animation parsed loops value
  • - [ ] Repeat
N/A false
  • - [x] Repeat
1 true
  • - [x] Repeat
>1 true

Desired Flixel parsed behavior:

Tag's Repeat Checkbox Tag's Repeat Field Value Flixel Animation parsed loops value
  • - [ ] Repeat
N/A true
  • - [x] Repeat
1 false
  • - [x] Repeat
>1 true

With this behavior, the only gap between Aseprite and Flixel is in the case where Repeat is >1, as Flixel does not have a built-in notion of playing an animation x times.

MondayHopscotch avatar Oct 24 '23 17:10 MondayHopscotch