mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Remove atob and btoa, it's already in base64
This commit is contained in:
parent
26b3cf3a23
commit
4cc434edd6
@ -108,7 +108,7 @@
|
|||||||
for (j = 0; j < dataUriLength; j++) {
|
for (j = 0; j < dataUriLength; j++) {
|
||||||
dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]);
|
dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]);
|
||||||
}
|
}
|
||||||
dataUri = 'data:image/png;base64,' + btoa(dataUri);
|
dataUri = 'data:image/png;base64,' + dataUri;
|
||||||
|
|
||||||
layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2));
|
layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2));
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
var framesData = [];
|
var framesData = [];
|
||||||
for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) {
|
for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) {
|
||||||
var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames());
|
var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames());
|
||||||
dataUri = atob(renderer.renderAsCanvas().toDataURL().split(',')[1]);
|
dataUri = renderer.renderAsCanvas().toDataURL().split(',')[1];
|
||||||
dataUriLength = dataUri.length;
|
dataUriLength = dataUri.length;
|
||||||
framesData.push({uri: dataUri, length: dataUriLength});
|
framesData.push({uri: dataUri, length: dataUriLength});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user