mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Switch back to line layout
This commit is contained in:
parent
84419a1550
commit
c743334a31
@ -7,10 +7,10 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var createColumnLayout = function (size, offset) {
|
var createLineLayout = function (size, offset) {
|
||||||
var layout = [[]];
|
var layout = [];
|
||||||
for (var i = 0 ; i < size ; i++) {
|
for (var i = 0 ; i < size ; i++) {
|
||||||
layout[0].push(i + offset);
|
layout.push([i + offset]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return layout;
|
return layout;
|
||||||
@ -56,10 +56,9 @@
|
|||||||
var chunkFrames = frameChunks[i];
|
var chunkFrames = frameChunks[i];
|
||||||
var renderer = new pskl.rendering.FramesheetRenderer(chunkFrames);
|
var renderer = new pskl.rendering.FramesheetRenderer(chunkFrames);
|
||||||
chunks.push({
|
chunks.push({
|
||||||
// renderAsCanvas with 1 column
|
base64PNG : renderer.renderAsCanvas().toDataURL(),
|
||||||
base64PNG : renderer.renderAsCanvas(1).toDataURL(),
|
|
||||||
// create a layout array, containing the indices of the frames extracted in this chunk
|
// create a layout array, containing the indices of the frames extracted in this chunk
|
||||||
layout : createColumnLayout(chunkFrames.length, offset),
|
layout : createLineLayout(chunkFrames.length, offset),
|
||||||
});
|
});
|
||||||
|
|
||||||
offset += chunkFrames.length;
|
offset += chunkFrames.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user