Merge pull request #423 from JustAGenericUsername/main

faster circle brush
This commit is contained in:
slweeb 2024-03-18 21:31:01 -04:00 committed by GitHub
commit 272a2a4a47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 5 deletions

View File

@ -2311,16 +2311,17 @@ elements.scuffed_circle_brush = {
color: elements.drag.color,
excludeRandom: true,
state: "solid",
movable: "false",
movable: false,
maxSize: 1,
onSelect: function(){
var answerR = prompt("Radius of the brush.",(radiusVar||undefined));
var answerR = prompt("Radius of the brush. Things above 10 may be laggy.",(radiusVar||undefined));
if (!answerR) { return }
radiusVar = answerR;
var answerE = prompt("Element of the brush.",(circleElem||undefined));
if (!answerE) { return }
circleElem = answerE;
var answerH = prompt("Replace? y or n. May be laggy.",(circleRep||undefined));
if (!answerH) { return }
var answerH = prompt("Replace? True or false. May be laggy.",(circleRep||undefined));
if (!answerH) { answerH = false }
circleRep = answerH;
},
tick: function(pixel){
@ -2332,7 +2333,7 @@ elements.scuffed_circle_brush = {
if (isEmpty(x, y)){
createPixel(circleElem, x, y)
}
else if (!isEmpty(x, y, true) && !(circleRep == "n")){
else if (circleRep && !outOfBounds(x, y)){
deletePixel(x, y)
createPixel(circleElem, x, y)
}