daybreak.js

This commit is contained in:
Nekonico 2024-09-16 18:25:41 -07:00 committed by GitHub
parent 47507ea9ab
commit 590c59bfe6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 272 additions and 59 deletions

View File

@ -1,4 +1,3 @@
elements.beautiful_sun = { elements.beautiful_sun = {
color: "#c12600", color: "#c12600",
tick: function(pixel) { tick: function(pixel) {
@ -6,11 +5,10 @@ elements.beautiful_sun = {
// maximum 7726 // maximum 7726
if (pixel.eclipse) { pixel.color = pixelColorPick(pixel,"#f68656"); var c=0.01} if (pixel.eclipse) { pixel.color = pixelColorPick(pixel,"#f68656"); var c=0.01}
else if (pixel.temp < 1500) { pixel.color = pixelColorPick(pixel,"#7a4e43"); } else if (pixel.temp < 1500) { pixel.color = pixelColorPick(pixel,"#7a4e43"); }
else if (pixel.temp < 3600) { pixel.color = pixelColorPick(pixel,"#ffbdbd"); var c=0.015 } else if (pixel.temp < 3600) { pixel.color = pixelColorPick(pixel,"#ffbdbd"); var c=0.05 }
else if (pixel.temp < 5000) { pixel.color = pixelColorPick(pixel,"#da2b27"); var c=0.025 } else if (pixel.temp < 7000) { pixel.color = pixelColorPick(pixel,"#c12600"); var c=0.1 }
else if (pixel.temp < 7000) { pixel.color = pixelColorPick(pixel,"#c12600"); var c=0.05 } else if (pixel.temp < 11000) { pixel.color = pixelColorPick(pixel,"#ffb09c"); var c=0.25 }
else if (pixel.temp < 11000) { pixel.color = pixelColorPick(pixel,"#f7fff5"); var c=0.1 } else if (pixel.temp < 28000) { pixel.color = pixelColorPick(pixel,"#f7fff5"); var c=0.5 }
else if (pixel.temp < 28000) { pixel.color = pixelColorPick(pixel,"#bde0ff"); var c=0.2 }
else { pixel.color = pixelColorPick(pixel,"#c3bdff"); var c=0.4 } else { pixel.color = pixelColorPick(pixel,"#c3bdff"); var c=0.4 }
if (pixel.temp < 1500) { var c=0 } if (pixel.temp < 1500) { var c=0 }
for (var i = 0; i < adjacentCoords.length; i++) { for (var i = 0; i < adjacentCoords.length; i++) {
@ -51,26 +49,28 @@ elements.beautiful_sun = {
reactions: { reactions: {
"hydrogen": { elem2:"helium", temp1:5 }, "hydrogen": { elem2:"helium", temp1:5 },
"helium": { elem2:"carbon_dioxide", temp1:5, tempMax:3600 }, "helium": { elem2:"carbon_dioxide", temp1:5, tempMax:3600 },
"carbon_dioxide": { elem2:"neon", temp1:5, tempMax:1800 } "carbon_dioxide": { elem2:"neon", temp1:5, tempMax:1800 },
"sun": { elem2:"beautiful_sun", },
"light": { elem2:"beautiful_light" },
}, },
temp: 5504, temp: 5504,
tempLow: -100, tempLow: -100,
stateLow: "supernova", stateLow: "supernova",
category: "special", category: "brokenday",
state: "gas", state: "gas",
//density: 1408, //density: 1408,
insulate: true, insulate: true,
noMix: true, noMix: true,
alias: "star", alias: "hateful_star",
movable: false movable: false
}, },
elements.beautiful_light = { elements.beautiful_light = {
hidden: true, hidden: true,
name: "light", name: "light",
color: "#ffb09c", color: "#c12600",
tick: function(pixel) { tick: function(pixel) {
if (Math.random() < 0.02) { if (Math.random() < 0.01) {
deletePixel(pixel.x,pixel.y); deletePixel(pixel.x,pixel.y);
return; return;
} }
@ -107,7 +107,7 @@ elements.beautiful_light = {
if (!isEmpty(pixel.x, newY, true)) { if (!isEmpty(pixel.x, newY, true)) {
var newPixel = pixelMap[pixel.x][pixel.y+pixel.by]; var newPixel = pixelMap[pixel.x][pixel.y+pixel.by];
if (!elements[newPixel.element].insulate) { if (!elements[newPixel.element].insulate) {
newPixel.temp += 1; newPixel.temp += 0.05;
pixelTempCheck(newPixel); pixelTempCheck(newPixel);
} }
if (!elements.light.reactions[newPixel.element]) { if (!elements.light.reactions[newPixel.element]) {
@ -138,74 +138,287 @@ elements.beautiful_light = {
"seltzer": { "color1":"#c2fff9" }, "seltzer": { "color1":"#c2fff9" },
"diamond": { "color1":["#c2c5ff","#c2d9ff"] }, "diamond": { "color1":["#c2c5ff","#c2d9ff"] },
"rainbow": { "color1":["#ff0000","#ff8800","#ffff00","#00ff00","#00ffff","#0000ff","#ff00ff"] }, "rainbow": { "color1":["#ff0000","#ff8800","#ffff00","#00ff00","#00ffff","#0000ff","#ff00ff"] },
"static": { "color1":["#ffffff","#bdbdbd","#808080","#424242","#1c1c1c"] } "static": { "color1":["#ffffff","#bdbdbd","#808080","#424242","#1c1c1c"] },
"head": { "color1":["#ffffff","#bdbdbd","#808080","#424242","#1c1c1c"] } "sun": { elem2:"beautiful_sun", },
"light": { elem2:"beautiful_light" },
"meat": { elem2:"fused_organism" },
"head": { elem2:"melted_human" },
"body": { elem2:"melted_human" },
"dead_bug": { elem2:"melted_insect" },
"worm": { elem2:"melted_insect" },
"ant": { elem2:"melted_insect" },
"bee": { elem2:"melted_insect" },
"fly": { elem2:"melted_insect" },
"firefly": { elem2:"melted_insect" },
"stinkbug": { elem2:"melted_insect" },
"slug": { color2:["#997e12","#997e12","#997e12","#997e12","#997e12","#997e12","#403314","#403314","#403314","#403314","#403314","#403314","#124a44"], elem2:"melted_insect" },
"snail": { color2:"#5c3104", elem2:"melted_insect", chance:0.5 },
"tree_branch": { elem2:"wood" },
"plant": { elem2:"melted_plant" },
"grass": { elem2:"melted_plant" },
"evergreen": { color2:"#006300", elem2:"melted_plant" },
"pistil": { elem2:"melted_plant" },
"petal": { color2:["#ff0000","#ff8800","#ffff00","#88ff00","#00ff00","#00ff88","#00ffff","#0088ff","#0000ff","#8800ff","#ff00ff"], elem2:"melted_plant" },
"bamboo": { elem2:"melted_plant" },
"bamboo_plant": { elem2:"melted_plant" },
"cactus": { elem2:"melted_plant" },
"corn": { color2:["#f8d223","#d6ba2a","#f7f5ba","#dbd281","#cdb12d"], elem2:"melted_plant" },
"wheat": { color2:["#f1b569","#edb864","#de9c45","#c2853d"], elem2:"melted_plant" },
"dead_plant": { elem2:"melted_plant" },
"sapling": { elem2:"melted_plant" },
"pinecone": { color2:["#5c3e33","#472f27","#31211b"], elem2:"melted_plant" },
"bird": { color2:"#997457", elem2:"melted_animal" },
"rat": { color2:["#a698a9","#8c7d82","#ccc3cf"], elem2:"melted_animal" },
"fish": { elem2:"melted_fish", chance:0.2 },
"tadpole": { elem2:"melted_fish", chance:0.2 },
"frog": { elem2:"melted_fish", chance:0.2 },
}, },
temp: 35, temp: 35,
tempLow: -273, tempLow: -273,
stateLow: ["liquid_light",null], stateLow: ["liquid_light",null],
stateLowColorMultiplier: 0.8, stateLowColorMultiplier: 0.8,
category: "energy", category: "brokenday",
state: "gas", state: "gas",
density: 0.00001, density: 0.00001,
ignoreAir: true, ignoreAir: true,
insulate: true insulate: true
}, },
elements.freed_human = { elements.melted_human = {
name: "melted_human", color: ["#f3e7db","#f7ead0","#eadaba","#d7bd96","#a07e56","#825c43"],
color: ["#f3e7db","#f7ead0","#eadaba","#d7bd96","#a07e56","#825c43","#604134","#3a312a"], behavior: behaviors.LIQUID,
behavior: [ viscosity: 7500,
"XX|CL%0.5|XX",
"M2%0.5|XX|M2%0.5",
"M2%10|M1|M2%10",
],
reactions: { reactions: {
"oxygen": { elem2:"carbon_dioxide", chance:0.5 }, "oxygen": { elem2:"carbon_dioxide", chance:0.5 },
"meat": { elem2:null, chance:0.1 }, "meat": { elem2:null, chance:0.1 },
"cooked_meat": { elem2:null, chance:0.1 }, "cooked_meat": { elem2:null, chance:0.1 },
"sun": { elem1:"cooked_meat" }, "sun": { elem2:"beautiful_sun", elem1:"cooked_meat" },
"light": { stain1:"#825043" }, "light": { elem2:"beautiful_light" },
"bee": { elem1:"organic_slime", elem2:"organic_slime", chance:0.2 }, "dead_bug": { elem2:"fused_organism", chance:0.1 },
"water": { elem2:"bubble", attr2:{"clone":"water"}, chance:0.001 }, "ant": { elem2:"fused_organism", chance:0.2 },
"salt_water": { elem2:"bubble", attr2:{"clone":"salt_water"}, chance:0.001 }, "bee": { elem2:"fused_organism", chance:0.2 },
"pool_water": { elem2:"bubble", attr2:{"clone":"pool_water"}, chance:0.001 }, "fly": { elem2:"fused_organism", chance:0.2 },
"firefly": { elem2:"fused_organism", chance:0.2 },
"stinkbug": { elem2:"fused_organism", chance:0.2 },
"slug": { elem2:"fused_organism", chance:0.2 },
"snail": { elem2:"fused_organism", chance:0.15 },
"head": { elem2:"melted_human", chance:0.1 },
"body": { elem2:"melted_human", chance:0.1 },
"bird": { elem2:"fused_organism", chance:0.1 },
"rat": { color2:["#a698a9","#8c7d82","#ccc3cf"], elem2:"fused_organism", chance:0.1 },
"fish": { elem2:"fused_organism", chance:0.2 },
"tadpole": { elem2:"fused_organism", chance:0.2 },
"frog": { elem2:"fused_organism", chance:0.2 },
"melted_fish": { elem2:"fused_organism", chance:0.1 },
"melted_animal": { elem2:"fused_organism", chance:0.1 },
"melted_insect": { elem2:"fused_organism", chance:0.1 },
}, },
tempHigh: 102, tempHigh: 300,
stateHigh: ["steam","steam","steam","sugar"], stateHigh: "cooked_meat",
tempLow: -2, tempLow: -20,
stateLow: ["ice","ice","ice","sugar_ice"], stateLow: "frozen_meat",
state: "solid", burn: 10,
density: 1000.1, burnTime: 300,
category: "life", burnInto: "cooked_meat",
breakInto: ["water","dna","dna","dna"] state: "liquid",
density: 2000,
category: "brokenday",
}, },
elements.organic_slime = { elements.melted_animal = {
name: "slime", color: ["#997457","#a698a9"],
color: ["#f3e7db","#f7ead0","#eadaba","#d7bd96","#a07e56","#825c43","#604134","#3a312a"], behavior: behaviors.LIQUID,
behavior: [ viscosity: 7500,
"XX|CL%0.5|XX",
"M2%0.5|XX|M2%0.5",
"M2%10|M1|M2%10",
],
reactions: { reactions: {
"oxygen": { elem2:"carbon_dioxide", chance:0.5 }, "oxygen": { elem2:"carbon_dioxide", chance:0.5 },
"meat": { elem2:null, chance:0.1 }, "meat": { elem2:null, chance:0.1 },
"cooked_meat": { elem2:null, chance:0.1 }, "cooked_meat": { elem2:null, chance:0.1 },
"sun": { elem1:"cooked_meat" }, "sun": { elem2:"beautiful_sun", elem1:"cooked_meat" },
"light": { stain1:"#825043" }, "light": { elem2:"beautiful_light" },
"bee": { elem1:"organic_slime", elem2:"organic_slime", chance:0.2 }, "dead_bug": { elem2:"fused_organism", chance:0.1 },
"water": { elem2:"bubble", attr2:{"clone":"water"}, chance:0.001 }, "ant": { elem2:"fused_organism", chance:0.2 },
"salt_water": { elem2:"bubble", attr2:{"clone":"salt_water"}, chance:0.001 }, "bee": { elem2:"fused_organism", chance:0.2 },
"pool_water": { elem2:"bubble", attr2:{"clone":"pool_water"}, chance:0.001 }, "fly": { elem2:"fused_organism", chance:0.2 },
"firefly": { elem2:"fused_organism", chance:0.2 },
"stinkbug": { elem2:"fused_organism", chance:0.2 },
"slug": { elem2:"fused_organism", chance:0.2 },
"snail": { elem2:"fused_organism", chance:0.15 },
"head": { elem2:"fused_organism", chance:0.1 },
"body": { elem2:"fused_organism", chance:0.1 },
"bird": { color2:"#997457", elem2:"melted_animal", chance:0.2 },
"rat": { color2:["#a698a9","#8c7d82","#ccc3cf"], elem2:"melted_animal", chance:0.2 },
"fish": { elem2:"fused_organism", chance:0.2 },
"tadpole": { elem2:"fused_organism", chance:0.2 },
"frog": { elem2:"fused_organism", chance:0.2 },
"melted_fish": { elem2:"fused_organism", chance:0.1 },
"melted_human": { elem2:"fused_organism", chance:0.1 },
"melted_insect": { elem2:"fused_organism", chance:0.1 },
}, },
tempHigh: 102, tempHigh: 275,
stateHigh: ["steam","steam","steam","sugar"], stateHigh: "cooked_meat",
tempLow: -2, tempLow: -20,
stateLow: ["ice","ice","ice","sugar_ice"], stateLow: "frozen_meat",
state: "solid", burn: 10,
density: 1000.1, burnTime: 300,
category: "life", burnInto: "cooked_meat",
breakInto: ["water","dna","dna","dna"] state: "liquid",
density: 2000,
category: "brokenday",
}, },
elements.melted_fish = {
color: "#ac8650",
behavior: behaviors.LIQUID,
viscosity: 7500,
reactions: {
"oxygen": { elem2:"carbon_dioxide", chance:0.5 },
"meat": { elem2:null, chance:0.1 },
"cooked_meat": { elem2:null, chance:0.1 },
"sun": { elem2:"beautiful_sun", elem1:"cooked_meat" },
"light": { elem2:"beautiful_light" },
"dead_bug": { elem2:"fused_organism", chance:0.1 },
"ant": { elem2:"fused_organism", chance:0.2 },
"bee": { elem2:"fused_organism", chance:0.2 },
"fly": { elem2:"fused_organism", chance:0.2 },
"firefly": { elem2:"fused_organism", chance:0.2 },
"stinkbug": { elem2:"fused_organism", chance:0.2 },
"head": { elem2:"fused_organism", chance:0.1 },
"body": { elem2:"fused_organism", chance:0.1 },
"bird": { elem2:"fused_organism", chance:0.2 },
"rat": { elem2:"fused_organism", chance:0.2 },
"slug": { elem2:"fused_organism", chance:0.2 },
"snail": { elem2:"fused_organism", chance:0.15 },
"fish": { elem2:"melted_fish", chance:0.2 },
"tadpole": { color2:"#87b574", elem2:"melted_fish", chance:0.2 },
"frog": { color2:"#607300", elem2:"melted_fish", chance:0.2 },
"melted_animal": { elem2:"fused_organism", chance:0.1 },
"melted_human": { elem2:"fused_organism", chance:0.1 },
"melted_insect": { elem2:"fused_organism", chance:0.1 },
},
tempHigh: 275,
stateHigh: "cooked_meat",
tempLow: -20,
stateLow: "frozen_meat",
burn: 10,
burnTime: 300,
burnInto: "cooked_meat",
state: "liquid",
density: 2000,
category: "brokenday",
},
elements.melted_insect = {
color: ["#4c4e42","#5e0b04","#4c4e42","#5e0b04","#56482d","#52472c","#635443"],
behavior: behaviors.LIQUID,
viscosity: 4500,
reactions: {
"meat": { elem2:"fused_organism", chance:0.1 },
"cooked_meat": { elem2:"fused_organism", chance:0.1 },
"sun": { elem2:"beautiful_sun", elem1:"cooked_meat" },
"light": { elem2:"beautiful_light" },
"dead_bug": { elem2:"melted_insect", chance:0.1 },
"ant": { elem2:"melted_insect", chance:0.2 },
"bee": { color2:"#c4b100", elem2:"melted_insect", chance:0.2 },
"fly": { elem2:"melted_insect", chance:0.2 },
"firefly": { elem2:"melted_insect", chance:0.2 },
"stinkbug": { elem2:"melted_insect", chance:0.2 },
"slug": { color2:["#997e12","#997e12","#997e12","#997e12","#997e12","#997e12","#403314","#403314","#403314","#403314","#403314","#403314","#124a44"], elem2:"melted_insect", chance:0.2 },
"snail": { color2:"#5c3104", elem2:"melted_insect", chance:0.15 },
"fish": { elem2:"fused_organism", chance:0.2 },
"tadpole": { elem2:"fused_organism", chance:0.2 },
"frog": { elem2:"fused_organism", chance:0.2 },
"head": { elem2:"fused_organism", chance:0.1 },
"body": { elem2:"fused_organism", chance:0.1 },
"melted_human": { elem2:"fused_organism", chance:0.1 },
"bird": { elem2:"fused_organism", chance:0.1 },
"rat": { elem2:"fused_organism", chance:0.1 },
"melted_animal": { elem2:"fused_organism", chance:0.1 },
"melted_fish": { elem2:"fused_organism", chance:0.1 },
},
tempHigh: 100,
stateHigh: "dead_bug",
tempLow: -20,
stateLow: "dead_bug",
burn: 10,
burnTime: 150,
burnInto: "ash",
state: "liquid",
density: 2000,
category: "brokenday",
},
elements.melted_plant = {
color: ["#00bf00","#439809","#258b08","#118511","#127b12","#136d14"],
behavior: behaviors.LIQUID,
viscosity: 50000,
reactions: {
"sun": { elem2:"beautiful_sun", elem1:"dead_plant" },
"light": { elem2:"beautiful_light" },
"carbon_dioxide": { elem2:"oxygen" },
"tree_branch": { elem2:"wood" },
"plant": { elem2:"melted_plant", chance:0.2 },
"grass": { elem2:"melted_plant", chance:0.2 },
"evergreen": { color2:"#006300", elem2:"melted_plant", chance:0.2 },
"pistil": { elem2:"melted_plant", chance:0.2 },
"petal": { color2:["#CC9978","#CD8C6F","#BE785E","#CC9978","#CD8C6F","#BE785E","#A9D475","#5AF353","#8E5FA5"], elem2:"melted_plant", chance:0.1 },
"bamboo": { elem2:"melted_plant", chance:0.1 },
"bamboo_plant": { elem2:"melted_plant", chance:0.1 },
"cactus": { elem2:"melted_plant", chance:0.1 },
"corn": { color2:["#f8d223","#d6ba2a","#f7f5ba","#dbd281","#cdb12d"], elem2:"melted_plant", chance:0.1 },
"wheat": { color2:["#f1b569","#edb864","#de9c45","#c2853d"], elem2:"melted_plant", chance:0.1 },
"dead_plant": { elem2:"melted_plant", chance:0.1 },
"sapling": { elem2:"melted_plant", chance:0.05 },
"pinecone": { color2:["#5c3e33","#472f27","#31211b"], elem2:"melted_plant", chance:0.05 },
},
tempHigh: 250,
stateHigh: "dead_plant",
tempLow: -20,
stateLow: "frozen_plant",
burn: 10,
burnTime: 200,
burnInto: ["dead_plant","fire","fire","fire","ash"],
state: "liquid",
density: 2000,
category: "brokenday",
};
elements.fused_organism = {
color: ["#f3e7db","#f7ead0"],
behavior: behaviors.LIQUID,
viscosity: 4000,
reactions: {
"meat": { elem2:"fused_organism", chance:0.1 },
"cooked_meat": { elem2:"fused_organism", chance:0.1 },
"sun": { elem2:"beautiful_sun", elem1:"cooked_meat" },
"light": { elem2:"beautiful_light" },
"dead_bug": { elem2:"fused_organism", chance:0.1 },
"ant": { elem2:"fused_organism", chance:0.2 },
"bee": { elem2:"fused_organism", chance:0.2 },
"fly": { elem2:"fused_organism", chance:0.2 },
"firefly": { elem2:"fused_organism", chance:0.2 },
"stinkbug": { elem2:"fused_organism", chance:0.2 },
"slug": { elem2:"fused_organism", chance:0.2 },
"snail": { elem2:"fused_organism", chance:0.15 },
"head": { elem2:"fused_organism", chance:0.1 },
"body": { elem2:"fused_organism", chance:0.1 },
"melted_human": { elem2:"fused_organism", chance:0.1 },
"melted_insect": { elem2:"fused_organism", chance:0.1 },
"bird": { elem2:"fused_organism", chance:0.1 },
"rat": { elem2:"fused_organism", chance:0.1 },
"fish": { elem2:"fused_organism", chance:0.2 },
"tadpole": { elem2:"fused_organism", chance:0.2 },
"frog": { elem2:"fused_organism", chance:0.2 },
"melted_animal": { elem2:"fused_organism", chance:0.1 },
"melted_fish": { elem2:"fused_organism", chance:0.1 },
},
tempHigh: 250,
stateHigh: "cooked_meat",
tempLow: -20,
stateLow: "frozen_meat",
burn: 10,
burnTime: 400,
burnInto: "cooked_meat",
state: "liquid",
density: 2000,
category: "brokenday",
};