pressure update
This commit is contained in:
parent
bb6a9e61c6
commit
20dd2adb3e
|
|
@ -231,6 +231,23 @@ drawPixels = function(forceTick=false) {
|
||||||
if (ctx.globalAlpha < 1) {
|
if (ctx.globalAlpha < 1) {
|
||||||
ctx.globalAlpha = 1;
|
ctx.globalAlpha = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (elements[currentElement].maxSize < mouseSize) {
|
||||||
|
var mouseOffset = Math.trunc(elements[currentElement].maxSize/2);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var mouseOffset = Math.trunc(mouseSize/2);
|
||||||
|
}
|
||||||
|
var topLeft = [mousePos.x-mouseOffset,mousePos.y-mouseOffset];
|
||||||
|
var bottomRight = [mousePos.x+mouseOffset,mousePos.y+mouseOffset];
|
||||||
|
// Draw a square around the mouse
|
||||||
|
ctx.strokeStyle = "white";
|
||||||
|
ctx.strokeRect(topLeft[0]*pixelSize,topLeft[1]*pixelSize,(bottomRight[0]-topLeft[0]+1)*pixelSize,(bottomRight[1]-topLeft[1]+1)*pixelSize);
|
||||||
|
// draw one transparent pixel in the center
|
||||||
|
if (settings.precision) {
|
||||||
|
ctx.fillStyle = "rgba(255,255,255,0.5)";
|
||||||
|
ctx.fillRect(mousePos.x*pixelSize,mousePos.y*pixelSize,pixelSize,pixelSize);
|
||||||
|
}
|
||||||
if ((!paused) || forceTick) {pixelTicks++};
|
if ((!paused) || forceTick) {pixelTicks++};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue