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
This commit is contained in:
jdescottes
2013-11-01 15:39:42 +01:00
parent 3ce9aaa843
commit 51f86afe6e
11 changed files with 345 additions and 218 deletions

View File

@@ -232,9 +232,9 @@
getFirstFrameAsPng : function () {
var firstFrame = this.piskelController.getFrameAt(0);
var frameRenderer = new pskl.rendering.CanvasRenderer(firstFrame, 1);
frameRenderer.drawTransparentAs('rgba(0,0,0,0)');
var firstFrameCanvas = frameRenderer.render().canvas;
var canvasRenderer = new pskl.rendering.CanvasRenderer(firstFrame, 1);
canvasRenderer.drawTransparentAs('rgba(0,0,0,0)');
var firstFrameCanvas = canvasRenderer.render().canvas;
return firstFrameCanvas.toDataURL("image/png");
},