Commit Graph

22 Commits

Author SHA1 Message Date
grosbouddha
46b267c2a4 Merge pull request #143 from juliandescottes/add-keyboard-shortcuts
Add keyboard shortcuts
2013-11-24 06:23:47 -08:00
juliandescottes
e852fb7c57 Merge with master after PR zoom-level 2013-11-23 19:50:53 +01:00
juliandescottes
ce111be5c8 Merging from master after PR zoom level 2013-11-23 19:25:51 +01:00
jdescottes
6eabf01ffc feature : add keyboard shortcuts
+ decentralized shortcut declaration
+ each service/controller is now responsible for declaring its shorcuts
- documentation (cheatsheet) is still to be maintained manually
- init order matters (shortcutService has to be instanciated before
  everyone else) => should have a standalone KeyboardService singleton
  which is ready as soon as it is loaded
2013-11-19 23:46:33 +01:00
jdescottes
a0273edb3e feature : add keyboard shortcuts
+ cleanup of color management
+ colors are now stored in palette controller
+ drawing controller has a dependency on palette controller
+ UPDATE COLOR events have been removed (they were used only for
synchronizing palette and drawing controller)
2013-11-19 07:40:35 +01:00
jdescottes
e0b76f5329 feature : add keyboard shortcuts : added help panel displayed on shift+? 2013-11-18 23:53:12 +01:00
jdescottes
86cd1cdeaa fix : reduce piskel model size
+ moved Serializer and Deserializer to utils.serialization package
+ put all backward code in utils.serialization.backward
+ added static method on Deserializer to make its usage similar to other
  utils in the package
- still not happy with the names used in Deserializer classes
  (deserializer.deserialize ...)
2013-11-15 00:03:05 +01:00
jdescottes
df4978f6af fix : reduce piskel model size
+ piskel deserialization is now clearly asynchronous
+ added utils.Deserializer (not a singleton though, more a builder/loader)
+ utils.Deserializer constructor expects a callback
+ when all layers are loaded and piskel is ready, the callback provided by
  the client is called with piskel as the first argument
- Deserializer doesn't fit in the utils package, which should be reserved
  to singletons : can move it to service as a PiskelLoaderService, and
  Deserializer could remain with only the purely static methods
- ImportController is realying on the Deserializer to build a Piskel but
  it shouldn't. Find a way to mutualize the code necessary to create a
  Piskel from an array of pskl.model.Frame
- still cleanup to do in app.js
- comments to add as well
2013-11-13 23:39:43 +01:00
jdescottes
4f54715f70 fix : reduce piskel model size
- 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)
2013-11-08 00:44:24 +01:00
jdescottes
8a380b6c78 merged from master 2013-11-01 23:37:09 +01:00
jdescottes
bd99027852 feature : zoom
- 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)
2013-11-01 23:11:11 +01:00
jdescottes
51f86afe6e feature : zoom
- 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
2013-11-01 15:39:42 +01:00
jdescottes
2509ba80a4 intermediary 2013-10-18 08:01:25 +02:00
jdescottes
07cb37f2bf Merge branch 'master' into import-picture-panel 2013-10-16 23:15:09 +02:00
jdescottes
f549174424 Import panel:
- added pskl.controller.settings.ImportController (empty atm)
- moved SettingsController under settings namespace
- move settings templates in a dedicated folder
- created import icon (svg is in the resources folder)
- added import button in right-layer
2013-10-11 00:04:40 +02:00
jdescottes
55e3607ecc Cleanup of saving/loading process 2013-10-10 00:06:11 +02:00
jdescottes
564f74265a Piskel website adaptations :
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
2013-10-08 23:44:06 +02:00
jdescottes
f514b6cd10 Layers:Review:Cleanup of GifExportController 2013-09-30 22:00:31 +02:00
jdescottes
7aa407970f Layers:Review:Rename LayersController to LayersListController 2013-09-30 21:22:58 +02:00
jdescottes
9395be3034 Layers : add layer icon. Position buttons on top of list. Fix name generation issue 2013-09-25 22:43:21 +02:00
jdescottes
80a9fe3396 First layer UI. Just functional, UX far from ideal 2013-09-25 00:11:12 +02:00
jdescottes
6528c7724b Issue 24 : Layers
!! 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.
2013-09-22 21:02:43 +02:00