Merge branch 'R74nCom:main' into main

This commit is contained in:
PumpkinPriest 2023-12-02 10:17:09 -05:00 committed by GitHub
commit 4d69db50ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1289 additions and 179 deletions

View File

@ -109,6 +109,117 @@
<p>The original <a href="https://sandboxels.r74n.com/changelog.txt">plain text version</a> of this is still maintained.</p>
</div>
<h2 id="1.9.1">[Version 1.9.1 - December 1, 2023 - Cozy Solstice]</h2>
<ul>
<li>+ Pipe</li>
<li> 1. Draw a line with Pipe, maybe while paused</li>
<li> 2. Wait for walls to form around it</li>
<li> 3. Erase an exit point and allow Pipe to generate</li>
<li>+ Mayo</li>
<li>+ Mulch</li>
<li>+ Porcelain Shard (Hidden)</li>
<li>+ Jelly (Hidden)</li>
<li>[Coffee]</li>
<li>+ Coffee Bean</li>
<li>+ Coffee Ground (Hidden)</li>
<li>+ Coffee (Hidden)</li>
<li>[Nuts]</li>
<li>+ Nuts</li>
<li>+ Nut Meat (Hidden, from crushing)</li>
<li>+ Nut Butter (Hidden, from cooking)</li>
<li>+ Nut Milk (Hidden, from soaking)</li>
<li>[Festivities]</li>
<li>+ Candy is candy cane-colored</li>
<li>+ Mashed Potato (Hidden)</li>
<li>+ Skin will warm itself up when cold</li>
<li>[Other Changes]</li>
<li>+ Roots grow through Grass</li>
<li>~ Saplings no longer turn to wood all at once</li>
<li>~ Tree Branches no longer grow when burning</li>
<li>~ Tree Branches, Plant, and Grass are less flammable</li>
<li>+ Soda deoxidizes Rust and Copper</li>
<li>+ Balloons pop near absolute zero</li>
<li>+ Balloons pop when touching Clouds</li>
<li>+ Humans can consume Tomatoes, Pumpkin Seeds, and Cream</li>
<li>+ Humans get gas when eating Beans</li>
<li>+ Humans can take Gold Coins</li>
<li>+ Skin spawns at average body temperature</li>
<li>~ Skin no longer heals wounds</li>
<li>+ Snails can eat Lettuce</li>
<li>+ Tadpoles and Evergreen can be smashed</li>
<li>~ Rats no longer eat Rotten Meat</li>
<li>+ Rats can drink Milk</li>
<li>+ Lichen convert Gravel and Rock Wall to Dirt</li>
<li>+ Yeast ferments Sugar Water and Soda</li>
<li>+ Caramel freezes into Candy much colder</li>
<li>+ Baked Batter breaks into Crumbs</li>
<li>+ Rotten Meat or Cheese and Flies remove Fragrance</li>
<li>+ Primordial Soup spawns at a warmer temperature</li>
<li>+ Ammonia affects Pumpkin Seeds, Herbs, and Tomatoes</li>
<li>+ Glue can fix shards</li>
<li>+ Salt makes Water colder</li>
<li>+ Water breaks down Confetti into Cellulose</li>
<li>+ Hydrogen burns into some Steam</li>
<li>+ Hydrogen fusion releases Neutrons</li>
<li>+ Anesthesia breaks down to Oxygen at high temperatures</li>
<li>+ CastnerKellner process</li>
<li>+ Sodium and Mercury reaction shocks and releases heat</li>
<li>+ Sulfur burns into Stench</li>
<li>+ Sugar dissolves in Milk</li>
<li>+ Salt dissolves in Sauce and Melted Cheese</li>
<li>+ Juice can be radiated</li>
<li>+ Carbonating Juice makes Soda</li>
<li>+ Seltzer can dissolve Limestone over time</li>
<li>+ Water can weather Limestone into Sand</li>
<li>+ Vinegar slowly dissolves the shell of Eggs</li>
<li>+ Baking Soda releases CO₂ when heated</li>
<li>+ Tuff melts into Magma</li>
<li>+ E-cloner ignores Wire, Sensor, and Battery</li>
<li>+ Cloners ignore Wall</li>
<li>+ Incense recipe</li>
<li>~ Fragrance now dissipates over time</li>
<li>~ Oxygen spreads Fragrance and Stench slower</li>
<li>~ Molten Solder no longer makes Fire</li>
<li>~ Recolored Molten Solder</li>
<li>~ Recolored Gold Coin</li>
<li>+ Insulation won't mix unless Shift is held</li>
<li>+ LEDs can break into Glass Shards</li>
<li>+ Cloners display element on hover</li>
<li>+ Author name appears if present in loaded save</li>
<li>+ Pressing ; toggles Replace mode</li>
<li>+ Methane Ice</li>
<li>- Removed Molten Baking Soda</li>
<li>[Bug Fixes]</li>
<li>~ Fixed: Flicker when stepping frame</li>
<li>~ Fixed: Lamp Oil burns forever</li>
<li>~ Fixed: Mushroom Gills don't conduct heat</li>
<li>~ Fixed: Pumpkin, Stained Glass, Skin, Sponge, E-cloner can be dragged</li>
<li>~ Fixed: God Raying Gray Goo makes Rainbow</li>
<li>~ Fixed: Soda deletes Salt Water quickly</li>
<li>~ Fixed: Juice Ice darkens when melting</li>
<li>~ Fixed: Sand from Water weathering Tuff uses wrong color</li>
<li>~ Fixed: Hail doesn't apply color variants when breaking</li>
<li>~ Fixed: Confirmation appears when dropping save onto empty canvas</li>
<li>~ Fixed: Sauce density too high</li>
<li>~ Fixed: Hail is way too cold</li>
<li>~ Fixed: Humans continue panicking after extinguished</li>
<li>~ Fixed: Cloned pixels don't change state based on Cloner temperature</li>
<li>~ Fixed: Antifire doesn't react with Antifluid right</li>
<li>~ Fixed: Porcelain reforms immediately after breaking when hot</li>
<li>~ Fixed: Hot Bomb often melts itself</li>
<li>~ Fixed: Hard Yolk can't be mixed into Batter/Dough</li>
<li>[Technical]</li>
<li>+ Prop tool</li>
<li>+ Option for uncompressed raw save data</li>
<li>~ Save version is now sb2</li>
<li> ~ New saves may not work in older versions</li>
<li> ~ Old saves will work fine</li>
<li> + Version handling system, warnings</li>
<li>+ Random will work when placed by cheating</li>
<li>~ FW_Ember no longer has a long name</li>
<li>+ runAfterAutogen function</li>
</ul>
<h2 id="1.9">[Version 1.9 - October 13, 2023 - Local Saves]</h2>
<ul>
<li>+ Local Saves</li>
@ -126,7 +237,7 @@
<li>~ Thermal View now uses a more useful logarithmic scale</li>
<li>[Changes]</li>
<li>+ Resetting now adjusts canvas size if needed</li>
<li>+ Dot appears in center of cursor</li>
<li>+ Setting for dot in center of cursor</li>
<li>+ E-cloner can select an element while unpowered</li>
<li>+ E-cloner ignores Wires and E-walls</li>
<li>+ Grass can spread on Sand, Clay, and Mycelium</li>

View File

@ -7,6 +7,115 @@ See sneak peaks for upcoming updates on the Discord: https://discord.gg/ejUc6YPQ
A fancier version of this changelog can be found here: https://sandboxels.R74n.com/changelog
[Version 1.9.1 - December 1, 2023 - Cozy Solstice]
+ Pipe
1. Draw a line with Pipe, maybe while paused
2. Wait for walls to form around it
3. Erase an exit point and allow Pipe to generate
+ Mayo
+ Mulch
+ Porcelain Shard (Hidden)
+ Jelly (Hidden)
[Coffee]
+ Coffee Bean
+ Coffee Ground (Hidden)
+ Coffee (Hidden)
[Nuts]
+ Nuts
+ Nut Meat (Hidden, from crushing)
+ Nut Butter (Hidden, from cooking)
+ Nut Milk (Hidden, from soaking)
[Festivities]
+ Candy is candy cane-colored
+ Mashed Potato (Hidden)
+ Skin will warm itself up when cold
[Other Changes]
+ Roots grow through Grass
~ Saplings no longer turn to wood all at once
~ Tree Branches no longer grow when burning
~ Tree Branches, Plant, and Grass are less flammable
+ Soda deoxidizes Rust and Copper
+ Balloons pop near absolute zero
+ Balloons pop when touching Clouds
+ Humans can consume Tomatoes, Pumpkin Seeds, and Cream
+ Humans get gas when eating Beans
+ Humans can take Gold Coins
+ Skin spawns at average body temperature
~ Skin no longer heals wounds
+ Snails can eat Lettuce
+ Tadpoles and Evergreen can be smashed
~ Rats no longer eat Rotten Meat
+ Rats can drink Milk
+ Lichen convert Gravel and Rock Wall to Dirt
+ Yeast ferments Sugar Water and Soda
+ Caramel freezes into Candy much colder
+ Baked Batter breaks into Crumbs
+ Rotten Meat or Cheese and Flies remove Fragrance
+ Primordial Soup spawns at a warmer temperature
+ Ammonia affects Pumpkin Seeds, Herbs, and Tomatoes
+ Glue can fix shards
+ Salt makes Water colder
+ Water breaks down Confetti into Cellulose
+ Hydrogen burns into some Steam
+ Hydrogen fusion releases Neutrons
+ Anesthesia breaks down to Oxygen at high temperatures
+ CastnerKellner process
+ Sodium and Mercury reaction shocks and releases heat
+ Sulfur burns into Stench
+ Sugar dissolves in Milk
+ Salt dissolves in Sauce and Melted Cheese
+ Juice can be radiated
+ Carbonating Juice makes Soda
+ Seltzer can dissolve Limestone over time
+ Water can weather Limestone into Sand
+ Vinegar slowly dissolves the shell of Eggs
+ Baking Soda releases CO₂ when heated
+ Tuff melts into Magma
+ E-cloner ignores Wire, Sensor, and Battery
+ Cloners ignore Wall
+ Incense recipe
~ Fragrance now dissipates over time
~ Oxygen spreads Fragrance and Stench slower
~ Molten Solder no longer makes Fire
~ Recolored Molten Solder
~ Recolored Gold Coin
+ Insulation won't mix unless Shift is held
+ LEDs can break into Glass Shards
+ Cloners display element on hover
+ Author name appears if present in loaded save
+ Pressing ; toggles Replace mode
+ Methane Ice
- Removed Molten Baking Soda
[Bug Fixes]
~ Fixed: Flicker when stepping frame
~ Fixed: Lamp Oil burns forever
~ Fixed: Mushroom Gills don't conduct heat
~ Fixed: Pumpkin, Stained Glass, Skin, Sponge, E-cloner can be dragged
~ Fixed: God Raying Gray Goo makes Rainbow
~ Fixed: Soda deletes Salt Water quickly
~ Fixed: Juice Ice darkens when melting
~ Fixed: Sand from Water weathering Tuff uses wrong color
~ Fixed: Hail doesn't apply color variants when breaking
~ Fixed: Confirmation appears when dropping save onto empty canvas
~ Fixed: Sauce density too high
~ Fixed: Hail is way too cold
~ Fixed: Humans continue panicking after extinguished
~ Fixed: Cloned pixels don't change state based on Cloner temperature
~ Fixed: Antifire doesn't react with Antifluid right
~ Fixed: Porcelain reforms immediately after breaking when hot
~ Fixed: Hot Bomb often melts itself
~ Fixed: Hard Yolk can't be mixed into Batter/Dough
[Technical]
+ Prop tool
+ Option for uncompressed raw save data
~ Save version is now sb2
~ New saves may not work in older versions
~ Old saves will work fine
+ Version handling system, warnings
+ Random will work when placed by cheating
~ FW_Ember no longer has a long name
+ runAfterAutogen function
[Version 1.9 - October 13, 2023 - Local Saves]
+ Local Saves
+ SAVES button
@ -23,7 +132,7 @@ A fancier version of this changelog can be found here: https://sandboxels.R74n.c
~ Thermal View now uses a more useful logarithmic scale
[Changes]
+ Resetting now adjusts canvas size if needed
+ Dot appears in center of cursor
+ Setting for dot in center of cursor
+ E-cloner can select an element while unpowered
+ E-cloner ignores Wires and E-walls
+ Grass can spread on Sand, Clay, and Mycelium

View File

@ -103,6 +103,8 @@
<tr><td>Toggle GUI</td> <td><kbd>F1</kbd></td></tr>
<tr><td>Capture screenshot</td> <td><kbd>C</kbd> or <kbd>F2</kbd></td></tr>
<tr><td>Paste Image or Load Save File</td> <td><kbd>Ctrl</kbd> + <kbd>V</kbd> or <kbd>Drag & Drop</kbd></td></tr>
<tr><td>Close menu or clear logs</td> <td><kbd>Esc</kbd></td></tr>
<tr><td>Toggle Replace mode</td> <td><kbd>;</kbd></td></tr>
</table>
<h2>Button Info</h2>

View File

@ -7,8 +7,9 @@ Middle Click = Pick Element
Space or P = Pause Simulation
Shift + Heat = Intense Heating
Shift + Cool = Intense Cooling
Shift + Mix = Include Fire & Smoke in Mixing
Shift + Mix = Include Fire, Smoke, and more in Mixing
Shift + Shock = Intense Shock
Shift + Smash = Intense Smash
Shift + Mouse = Draw Line
Scroll = Change Cursor Size
- or [ = Decrease Cursor Size
@ -32,6 +33,8 @@ F1 = Toggle GUI / HUD
F2 or C = Capture Screenshot
Drag & Drop = Insert an image or load save file
Paste = Insert an image or load save file
Escape = Close Menu / Clear Logs
; = Replace Mode
(Alt/Option can be used in place of Shift)

View File

@ -74,6 +74,10 @@
<p>This is usually because of a mod, so follow the steps above.</p>
<p>If you've done those steps, it may be that you are using an unsupported or outdated browser. Try a different one, like Google Chrome or Microsoft Edge.</p>
<h2>Game runs slowly, low frame rate</h2>
<p>Make sure you do not have Low Power Mode enabled on your device.</p>
<p>This can limit JavaScript speeds, especially on mobile devices.</p>
<h2>Screen flickers or stays black unless paused</h2>
<p>The canvas may flicker or disappear if an error occurs when trying to simulate certain pixels.</p>
<p>Pausing should fix this temporarily, during which you can delete the offending pixels, or follow the steps above to uninstall any mods.</p>

File diff suppressed because it is too large Load Diff

View File

@ -139,5 +139,8 @@ if (elements.lead) {elements.lead.color = "#6c6c6a";}
if (elements.drag) {elements.drag.color = "#ffffff";}
if (elements.tuff) {elements.tuff.color = ["#A16A49","#C98256","#C7834F","#BF7640","#DB8641","#D1732C","#AF5D30","#A55E35","#8B5B4C"];}
if (elements.blood) {elements.blood.color = "#ff0000";}
if (elements.water && elements.tuff) {elements.water.reactions.tuff = { elem2: "wet_sand", color2:"#7a6b5c", chance: 0.00035 };}
if (elements.antibody) {elements.antibody.color = "#ff4040";}
if (elements.infection) {elements.infection.color = "#cf005d";}
if (elements.infection) {elements.infection.color = "#cf005d";}
if (elements.molten_solder) {delete elements.molten_solder.color;}
if (elements.gold_coin) {elements.gold_coin.color = ["#fff0b5","#986a1a","#f0bb62"];}

View File

@ -59,4 +59,74 @@ elements.rad_fluid = {
state: "liquid",
}
elements.rad_fluid.color = elements.radiation.color;
elements.rad_fluid.reactions = elements.radiation.reactions;
elements.rad_fluid.reactions = elements.radiation.reactions;
elements.time_reverse = {
color: "#ffffff",
perTick: function() {
pixelTicks -= 2;
},
rotatable: true,
category: "special",
canPlace: false,
}
elements.steam_train = {
color: "#DFDFDF",
behavior: [
"XX|CR:smoke|XX",
"BO AND M1|XX|CR:smoke",
"XX|CR:smoke|XX",
],
category: "gases",
density: 99999,
state: "gas",
}
elements.polish = {
color: "#aba593",
tool: function(pixel) {
if (elements.polish.reactions[pixel.element] && Math.random()<0.25) {
var r = elements.polish.reactions[pixel.element];
var color2 = r.color2;
if (color2 !== undefined) {
if (Array.isArray(color2)) { color2 = color2[Math.floor(Math.random()*color2.length)]; }
var rgb = hexToRGB(color2);
pixel.color = "rgb("+rgb.r+","+rgb.g+","+rgb.b+")";
}
}
},
behavior: [
"M2|M1|M2",
"M1|DL%10|M1",
"M2|M1|M2",
],
reactions: {
"wood": { color2:"#872b00" },
"glass": { color2:"#526158" },
},
burn: 100,
burnTime: 2,
state: "gas",
canPlace: true,
category: "gases",
stain: -0.5
}
window.addEventListener("load", function() {
eLists.FOOD = [];
for (var element in elements) {
if (elements[element].isFood) {
eLists.FOOD.push(element);
}
}
})
elements.food = {
color: ["#359100","#74b332","#b9d461","#dede7a"],
tick: function(pixel) {
// Choose randomly from eLists.SEEDS
changePixel(pixel,eLists.FOOD[Math.floor(Math.random()*eLists.FOOD.length)]);
},
category: "food"
}

View File

@ -96,4 +96,204 @@ elements.technetium = {
temp: 2200,
stateLow: "technetium",
density: 11400
}
},
elements.destroyable_pipe = {
color: "#414c4f",
onSelect: function() {
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole.");
},
tick: function(pixel) {
if (!pixel.stage && pixelTicks-pixel.start > 60) {
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (isEmpty(x,y)) {
createPixel("brick",x,y);
pixelMap[x][y].color = pixelColorPick(pixel,"#808080");
}
}
pixel.stage = 1;
}
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
for (var i = 0; i < adjacentCoords.length; i++) {
var coord = adjacentCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (isEmpty(x,y)) {
pixel.stage = 2; //blue
pixel.color = pixelColorPick(pixel,"#000036");
break;
}
}
}
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (!isEmpty(x,y,true) && pixelMap[x][y].element === "destroyable_pipe") {
var newPixel = pixelMap[x][y];
if (newPixel.stage === 1) {
var newColor;
switch (pixel.stage) {
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
}
newPixel.color = pixelColorPick(newPixel,newColor);
}
}
}
var moved = false;
shuffleArray(squareCoordsShuffle);
for (var i = 0; i < squareCoordsShuffle.length; i++) {
var coord = squareCoordsShuffle[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (!isEmpty(x,y,true)) {
var newPixel = pixelMap[x][y];
if (newPixel.element === "destroyable_pipe") {
var nextStage;
switch (pixel.stage) {
case 2: nextStage = 4; break; //green
case 3: nextStage = 2; break; //red
case 4: nextStage = 3; break; //blue
}
if (pixel.con && !newPixel.con && newPixel.stage === nextStage) { //transfer to adjacent pipe
newPixel.con = pixel.con;
newPixel.con.x = newPixel.x;
newPixel.con.y = newPixel.y;
pixel.con = null;
moved = true;
break;
}
}
else if (!pixel.con && elements[newPixel.element].movable) { //suck up pixel
pixel.con = newPixel;
deletePixel(newPixel.x,newPixel.y);
pixel.con.x = pixel.x;
pixel.con.y = pixel.y;
pixel.con.del;
moved = true;
break;
}
}
}
if (pixel.con && !moved) { // move to same stage if none other
for (var i = 0; i < squareCoordsShuffle.length; i++) {
var coord = squareCoordsShuffle[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (isEmpty(x,y)) {
delete pixel.con.del;
pixel.con.x = x;
pixel.con.y = y;
pixelMap[x][y] = pixel.con;
currentPixels.push(pixel.con);
pixel.con = null;
break;
}
if (!isEmpty(x,y,true) && pixelMap[x][y].element === "destroyable_pipe") {
var newPixel = pixelMap[x][y];
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
newPixel.con = pixel.con;
newPixel.con.x = newPixel.x;
newPixel.con.y = newPixel.y;
pixel.con = null;
break;
}
}
}
}
}
doDefaults(pixel);
},
category: "machines",
movable: false,
canContain: true,
tempHigh: 1538,
stateHigh: "molten_iron",
breakInto: "metal_scrap",
},
elements.destroyable_superheater = {
color: "#dd1111",
behavior: [
"XX|HT:10|XX",
"HT:10|XX|HT:10",
"XX|HT:10|XX",
],
category:"machines",
stateLow:["iron","copper"],
tempLow: -7,
breakInto:["metal_scrap","oxidixed_copper"],
},
elements.destroyable_heater = {
color: "#881111",
behavior: [
"XX|HT:2|XX",
"HT:2|XX|HT:2",
"XX|HT:2|XX",
],
category:"machines",
stateLow:["iron","copper"],
tempLow: -7,
breakInto:["metal_scrap","oxidixed_copper"],
},
elements.destroyable_cooler = {
color: "#111188",
behavior: [
"XX|CO:2|XX",
"CO:2|XX|CO:2",
"XX|CO:2|XX",
],
category:"machines",
stateHigh:["iron","copper"],
tempHigh: 49,
breakInto:["metal_scrap","oxidixed_copper"],
},
elements.destroyable_freezer = {
color: "#1111dd",
behavior: [
"XX|CO:10|XX",
"CO:10|XX|CO:10",
"XX|CO:10|XX",
],
category:"machines",
stateHigh:["iron","copper"],
tempHigh: 49,
breakInto:["metal_scrap","oxidixed_copper"],
},
elements.destroyable_cloner = {
color: "#dddd00",
behavior: behaviors.CLONER,
ignore: ["ecloner","slow_cloner","clone_powder","floating_cloner","wall","ewall","destroyable_cloner","destroyable_clone_powder","cloner"],
category:"machines",
hardness: 1,
darkText: true,
breakInto: "destroyable_clone_powder",
tempHigh: 1538,
stateHigh: "molten_iron",
},
elements.destroyable_clone_powder = {
color: "#f0f000",
behavior: [
"XX|CF|XX",
"CF|XX|CF",
"M2|CF AND M1|M2",
],
ignore: ["ecloner","slow_cloner","clone_powder","floating_cloner","wall","ewall","destroyable_cloner","destroyable_clone_powder","cloner"],
category:"machines",
state:"solid",
density:2710,
hardness: 1,
darkText: true,
breakInto: "destroyable_clone_powder",
tempHigh: 1538,
stateHigh: "molten_iron",
},
eLists.CLONERS = ["ecloner","slow_cloner","clone_powder","floating_cloner","wall","ewall","destroyable_cloner","destroyable_clone_powder","cloner"];
elements.cloner.ignore = eLists.CLONERS;
elements.slow_cloner.ignore = eLists.CLONERS;
elements.clone_powder.ignore = eLists.CLONERS;
elements.floating_cloner.ignore = eLists.CLONERS;

View File

@ -62,7 +62,6 @@ drawPixels = function(forceTick=false) {
//if (pixelMap[pixel.x][pixel.y] == undefined || currentPixels.indexOf(pixel) == -1) {continue}
if (pixel.del) {continue}
if (!paused || forceTick) {
// VELOCITY
doVelocity(pixel);
if (elements[pixel.element].tick) { // Run tick function if it exists
elements[pixel.element].tick(pixel);
@ -72,6 +71,7 @@ drawPixels = function(forceTick=false) {
pixelTick(pixel);
}
};
if (pixel.con) { pixel = pixel.con }
if (elements[pixel.element].isGas || elements[pixel.element].glow) {
pixelsLast.push(pixel);
}
@ -81,12 +81,18 @@ drawPixels = function(forceTick=false) {
}
// Draw the current pixels
var canvas = document.getElementById("game");
if (canvas === null) {return}
var ctx = canvas.getContext("2d");
// Clear the canvas
if (!settings["bg"]) {ctx.clearRect(0, 0, canvas.width, canvas.height)}
else {
ctx.fillStyle = settings["bg"];
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
var pixelDrawList = pixelsFirst.concat(pixelsLast);
for (var i = 0; i < pixelDrawList.length; i++) {
pixel = pixelDrawList[i];
if (pixelMap[pixel.x][pixel.y] == undefined) {continue}
if (pixel.con) { pixel = pixel.con }
if (view===null || view===3) {
ctx.fillStyle = pixel.color;
}

9
promo.html Normal file
View File

@ -0,0 +1,9 @@
<html>
<style>
body, html {width: 300px; height: 250px; background-color: gray; overflow: hidden; padding:0!important; margin: 0!important;}
img {width: 300px; height: 250px;}
</style>
</html>
<body>
<img src="https://R74n.com/icons/thumbnail.png">
</body>

View File

@ -549,4 +549,5 @@ select, .toggleInput, #settingsMenu input[type="number"], #settingsMenu input[ty
pointer-events: none;
padding: 5px;
white-space: pre-wrap;
font-size: 0.75em;
}