+ added explanatory comment for CanvasUtils.disableImageSmoothing
+ detect browser for chosing wheel/mousewheel event in DrawingController
+ create ABSTRACT_FUNCTION constant to be reused forabstract methods
- Initial implementation : working but ...
- MODEL_VERSION has been bumped to 2
- The loading process is now theoretically asynchronous (loading images to
read the content of the layers), but for now, the asynchronous behaviour
is hidden behind a nasty hack, which is somehow similar to lazy loading.
When loading the piskel, a Piskel is created synchronously, with fake
empty frames, and as the images will get loaded, the fake frames will be
replaced by the actual frames.
I really don't like this, and the asynchronous nature of the loading
should be clearly expressed
- There is no backward compatible deserializer for the previous version of
the model (1)
- The Serializer utils is just badly designed. Serialization and
deserialization should be splitted into two different classes
- Saving & loading are still done in app.js and should be moved to
services
BUT : the size of the piskels is now pretty small. A piskel which was
using 890kB previously is now using only 10kB. Although it should be
noted, that after gzip there is no significant difference between this
version and the existing one. The only gains we can really expect with
this are : less disk space used on appengine, ability to reuse the
layers' pngs directly on piskel-website (but to be honest I can't see any
valid use case for this)
- fix : removed duplicated code between ImageResizer and CanvasUtils
(disabledImageSmoothing utility method)
- added pskl.utils.UserAgent, basic user agent sniffer. I need it to sniff
out IE10 for frame rendering (and it's not possible to feature detect
here). Can check isChrome, isFirefox, isIE and get the version for each
of them
- added resizeNearestNeighbour in ImageResizer. Readapted from piskel
website, this allows us to 1 - resize without AA on IE10, and 2 - add a
pixel gap to reenable the GRID
- finally : added back support for GRID !
- also extracted the 'zoomed out background color' as a constant in
Constant.js
- Added MinimapController that displays a frame on the animated preview
when zoomed in
- Added bounds for the offset to make sure it doesn't go crazy
- Added new utility Math.js with a minmax function
- TODO : the minimap controller has a lot of dependencies, see if could be
cleaned up
- TODO : DrawingController knows the size of the picture it has to render
only indirectly, which makes it hard in some cases (such as boundary
checking performed during setOffset)
- Extracted layers rendering logic from DrawingController to dedicated
class
- Turned RendererManager into Composite renderer (extends
AbstractRenderer)
- AbstractRenderer no longer contains a render(frame) method, implementing
the render differs too much between my current renderers to impose a
single signature, but I should improve this later if too much time on ma
hands
- simplified Renderer(s) architecture (removed decorator,
CachedFrameRenderer simply inherits from FrameRenderer now)
- keeping AbstractRenderer to act as interface
- fixed issue with layers : forgot to clone the first frame while merging
and therefore was modifying the original frame when I just wanted to
create a tmp frame (FrameUtils.js)
- extracted the mousemove throttling delay used in DrawingController to
Constants.js and reduced it from 40ms to 10ms
- Created AbstractRenderer in rendering package
- Created CachedRenderer and CachedFrameRenderer to extract basic frame
caching logic from DrawingController
- Created RendererManager to synchronize updates made to several Renderer
settings
- Moved FrameRenderer from pskl.rendering to pskl.rendering.frame
- Fixed the resize of the drawing area when the window is resized
M CanvasRenderer : can set the color used to represent transparency
M app.js : modified code responsible for saving when in website mode
M PiskelController.js : just some argument renaming
!! NOT STABLE !!
Initial implementation. No UI update yet.
Check js/model/Piskel.js and js/model/Layer.js for an overview of the new
API.
Piskels can be saved on the existing service.
Previous piskels cannot be loaded. This should be fixed soon.