Merge pull request #146 from feeshmaster/patch-1
Create pixelResizeTool.js
This commit is contained in:
commit
7a7a13766c
|
|
@ -0,0 +1,10 @@
|
|||
pixelResizeButton = document.createElement("button");
|
||||
pixelResizeButton.onclick = function(pixel) {
|
||||
let canvas_width = document.getElementById("game").width;
|
||||
let canvas_height = document.getElementById("game").height;
|
||||
let pixelSizeNeeded = prompt("How big should pixels be?");
|
||||
if (!pixelSizeNeeded) { return }
|
||||
resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true);
|
||||
};
|
||||
pixelResizeButton.textContent = "Resize";
|
||||
document.getElementById("toolControls").appendChild(pixelResizeButton);
|
||||
Loading…
Reference in New Issue