In the GIF export panel, user can now choose between :
- export online (previous 'upload' feature)
- download GIF
Labels have been updated in the PNG export panel to follow the same
convention.
CanvasToBlob library was modified and moved to dedicated utils to handle
not only canvas, but also any base64 dateURI.
When holding shift and using the move tool,pixels normally exiting the
frame will now be redrawn on the other end of the frame.
Makes it easy to perform sliding animations.
Added new tool to lighten/darken. By default is in lightening mode. If the
user holds ctrl/cmd while using the tool, switches to darkening mode.
If the user holds shift while using the tool, then each pixel can only be
modified once per tool usage (ie user keeps hovering the same pixel, it
won't get lighter/darker after the first time). Can be useful if you want
to keep control of the amount of colors in the sprite.
TODO :
- Ability to select explicitly lighten/darken (context menu for
tools).
- Ability to set the 'step' (ie the strength of the lighten/darken)
If there are less than 256 colors in the piskel, do not perform anycolor
quantization, just reuse the colors from the piskel.
Added preserveColorsParameter to gif.js library.
If nb colors>256, fallback to the previous behavior. This could be
improved by checking the number of colors for each frame. The palette is
defined independantly for each frame, so as long as a frame is <256
colors, we could reuse the original colors.
I also believe that images with more colors would get a better quality if
we could use a single color sample for all frames. This would avoid color
'gaps' as we can experience today. In any case, for piskel, < 256 is a
reasonable assumption
When user changes canvas background, css class now applied on document
body.
Created new controller listening to Events.USER_SETTINGS_CHANGED to handle
this.
Created dynamic palette displaying currently used colors.
This palette is now selected by default.
New service UsedColorsService created. Listens to PISKEL_RESET and
TOOL_RELEASED and keeps track of the list of current colors.
Still need to :
- improve sorting of colors
- allow to clone the current color palette as a custom palette
- add proper getter in UsedColorService to get the list of current colors
Also I hardcoded a max-height for the palettes-list as I found no better
way of handling the case of palettes containing many colors.
Maybe should add a limit to the number of colors handled by this automatic
palette.