delete all of specific element tool

This commit is contained in:
Lily-129 2022-02-23 20:08:35 -05:00 committed by GitHub
parent 41e899929b
commit aa20c00b54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
elements.daoe = {
name: "delete all of element",
color: ["#a7a7a7", "#a7a7a7", "#a7a7a7", "#a7a7a7", "#000000", "#000000", "#000000", "#000000"],
tool: function(pixel) {
for (var i = 1; i < width; i++) {
for (var j = 1; j < height; j++) {
if (!isEmpty(i,j)) {
if(pixelMap[i][j].element == pixel.element) {
deletePixel(i,j)
}
}
}
}
},
category: "tools",
excludeRandom: true,
};