mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
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:
@@ -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");
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user