sandboxels/mods/glow.js

113 lines
3.7 KiB
JavaScript
Raw Normal View History

2025-01-08 14:41:56 -05:00
var isChromium = !!window.chrome;
2025-04-07 14:24:50 -04:00
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
2025-01-08 14:41:56 -05:00
2025-04-07 14:24:50 -04:00
if (!isChromium && !isAndroid) {
2025-01-08 14:41:56 -05:00
window.addEventListener("load",function(){
Version 1.12 - July 17, 2025 - Saves For All [Version 1.12 - July 17, 2025 - Saves For All] + Featured Saves tab + Discord Saves tab + Browse community-made saves from our server + Lye, a reactive powder + Invar, a dark metal alloy (Hidden) + Streak View (Press 4) [Steam Edition Changes] + Workshop support + Add and load community-made saves + Publish saves for everyone to discover + Save tagging support + Rich Presence support for Discord and Steam Chat + Show off your current element and canvas state ~ Saves are stored in a new game data folder instead of slots + Mods can be loaded from the game data folder for offline use ~ Dependencies are currently not supported for local files + "Open Data Folder" button in Settings + Steam automatically selects supported languages + Save author name will default to Steam username - Hid "Clear Saves" button ~ Version and element count are shown again [Changes] + Button click animations + Corn has gravity + Cloner elements can be set by clicking over them + Dyes can be mixed into liquids + Sand can be dyed into Color Sand + Stained Glass can be made by melting Glass with certain metals + Batteries are breakable + Vaccine and Antidote can freeze + Small amounts of Vaccine can be made by boiling Antibody + Vaccine can be made by mixing Antibody with Sugar Water + Cream can be turned into Yogurt + Clay and Brick Rubble makes Clay Soil + Slime rots Meat + Glue turns Crumb into Bread + Yeast ferments Wheat + Vinegar-Ammonia reaction + Bleach-Baking Soda reaction + Blood bubbles before boiling + Infection passively creates Plague + Pool Water slowly breaks down DNA + Distilling Oil with Hydrogen makes Sulfur and Water (Claus process) + Greek Fire is made with Oil and Sap, instead of Sulfur + Sulfur stains Silver + Candy from freezing Honey or Molasses has a unique color + Ember changes color when hitting elements with flame colors + Plasma can heat existing pixels when placed over them + Magnesium-Acid reaction produces Hydrogen + Gold variants are immune to Acid + Acid decomposes at extreme temperatures + Ammonia decomposes at high temperatures + Copper Sulfate reacts with other carbs like Sugar + Molten Caustic Potash electrolysis + Virus and Strange Matter ignore Pointer + Neutrons radiate Glass Shards + Cancer kills Homunculi + Anesthesia and Alcohol Gas calm Humans ~ Human will be selected when using Pick on Head or Body ~ Tweaked Diamond formation ~ Walls and Pipes don't change Light color ~ God Ray is better at extinguishing fires ~ Ember no longer produces Fire on its own ~ Salt Water electrolysis produces Lye (Chloralkali process) ~ Sodium-Water reaction produces Lye ~ Improved Sodium-Acid reaction ~ Potassium-Acid reaction is more violent ~ Acid no longer deletes Smoke or Fire ~ Gallium-Aluminum reaction is more destructive ~ Supernovae create Mercury and Aluminum ~ Antimatter no longer explodes when hitting the border ~ Lightning no longer explodes when hitting the border on Void mode ~ Uranium releases Radiation more consistently when falling ~ Rats release Plague more consistently when falling ~ Molten Stained Glass has colorful Fire + Rainbow and Static affect the color of Fire ~ Canvas will shrink dynamically to fit screen width + Empty canvases will be reset automatically when window is resized + Saves menu tabs ~ Saves menu takes up more screen space ~ Modded saves automatically reload the save and remove new mods after session + Sandboxels will reload on canvas reset after changing mods + TPS is restored after unloading a save + Button to reload after adding or removing mods ~ Currently-loaded save will be underscored in menu ~ Saves keep track of standalone version (i.e. Steam) ~ Save warnings use native Sandboxels prompts ~ Reset Warning setting affects save loading popup on non-empty canvas - Loading a save no longer changes your selected view ~ 'Reset Scene' buttons in Settings now confirm before resetting ~ Cursor color is affected by theme color ~ Canvas Size and Worldgen settings automatically reset empty canvases ~ Updated styling of bottom links ~ Links are underlined when hovered over ~ Prompts are closed when elements are deselected ~ Confirm buttons for data reset prompts are red to show danger ~ Entering an invalid TPS no longer resets to 30 TPS ~ Recolored Gold ~ Recolored Zinc ~ Recolored Nickel ~ Recolored Tungsten ~ Recolored Sulfur ~ Recolored Brass ~ Recolored Sterling ~ Recolored Solder ~ Recolored Molten Aluminum and removed heat glow ~ Recolored Molten Caustic Potash and removed Fire ~ Recolored Soda made from Juice ~ Poison, Radiation, God Ray, Aluminum, Insulation, Bead, and Color Sand display with dark text ~ Prop tool can convert between boolean and number types + Broth alias 'Soup' + Jelly alias 'Jam' + Soda alias 'Cola' + Hard Yolk alias 'Fried Egg' + Gunpowder alias 'Black Powder' [Bug Fixes] ~ Fixed: Enabled mods can be stuck behind input box ~ Fixed: Flies and Bees get stuck on Loop border modes ~ Fixed: Rock Wall and Bless can't be used as Image element ~ Fixed: Screenshots don't include background color if it was never set ~ Fixed: Corrupted save error messages don't appear ~ Fixed: Large save canvases can go off-screen ~ Fixed: Cheerful Mode setting button has old behavior ~ Fixed: Cheerful Mode setting 'Refresh Page' button doesn't work ~ Fixed: runEveryTick() runs even when paused ~ Fixed: World gen replaces Destroyable border pixels with Wall ~ Fixed: Random events and modded per-tick events don't happen when stepping ticks ~ Fixed: Maximum cursor size doesn't fill entire canvas with odd widths ~ Fixed: Unpaint tool removes fancy textures ~ Fixed: Category buttons don't glow in Unlock as Discovered mode ~ Fixed: Coolers and Freezers affect insulative elements ~ Fixed: Lightning heats insulative elements ~ Fixed: Dark element button text isn't triggered by buttonColor ~ Fixed: Force-loaded mod dependencies don't load properly on Steam ~ Fixed: Theme background doesn't affect entire page on Steam Edition [Technical] + New helper functions: + getPixel(x, y) -> Pixel object or null + tryCreate(element, x, y, replace?) -> Pixel object or null + tryDelete(x, y) -> Pixel object or null + 'onCollide' element property, called when the pixel moves into any other (function(pixel1,pixel2)) + 'onClicked' element property, called when the pixel is clicked on (function(pixel,element)) + 'skip' pixel property, skips simulation of the pixel + 'RL' behavior rule, releases an element in any available space + 'clear' view property for clearing the canvas layers, defaults to true + modIsEnabled(str) function, checks only file names (e.g. "glow.js") + promptChoose() for multiple-choice prompts + promptDir() for direction-based prompts ~ Debug console has been re-enabled on Steam Edition ~ Pick and Erase tools are no longer hard-coded ~ Sensor 'sense' property can take multiple comma-separated values ~ Save version is now sb5
2025-07-17 13:49:09 -04:00
console.log("Error: glow.js only works on Chrome or Chromium-based browsers.")
2025-01-08 14:41:56 -05:00
logMessage("Error: glow.js only works on Chrome or Chromium-based browsers.")
})
}
else {
2025-01-08 13:00:52 -05:00
addCanvasLayer("glowmod");
addCanvasLayer("glowmod2");
canvasLayersPre.unshift(canvasLayers["glowmod"]);
glowmodCtx = canvasLayers["glowmod"].getContext("2d");
glowmodCtx2 = canvasLayers["glowmod2"].getContext("2d");
delete canvasLayers.glowmod;
delete canvasLayers.glowmod2;
elements.fire.emit = true;
elements.lightning.emit = 15;
elements.electric.emit = true;
Version 1.11.1 - April 1, 2025 - FOOLS-2-5 [Version 1.11.1 - April 1, 2025 - FOOLS-2-5] + Border setting + Void deletes pixels that touch the sides + Loop teleports pixels that touch the sides ~ Improved Thermal View now uses hottest and coldest pixels as bounds + Finnish and Indonesian languages [FOOLS] + Element Modulator + FOOLS Mode is back! ~ Note: FOOLS features will disappear April 4th [Changes] + Keybind: Ctrl+O to load a save file + Keybind: Ctrl+Shift+O to reload the last loaded save + Flame test can be done on elements with fire colors + Honey and Molasses freeze into Candy + 'Golden Wind' Tornado variant + Milk variants can be churned into Butter + Udders can absorb certain liquids to produce Milk variants + Cheese can be made with Cream + Soda foam has a unique color + Candy dissolves in Water + Void is insulative + Bless stops panic in Humans + Gunpowder explodes when shocked + Ozone can cure Infection + Dust and Ash dirty Seltzer + Calcium can react with Steam + Magnesium reacts with Water and Steam + Sponges can release Water absorbed from soils + Sponges separate Water variant contents + Primordial Soup can freeze + Positrons shock Antimatter ~ Antimatter no longer explodes when touching Cloners ~ Thermite burns into Molten Iron + Acid stains Silver ~ Tweaked Acid-Potassium reaction ~ Frogs have a unique egg color ~ Molten Rad Glass is greener ~ Recolored Pilk Cheese ~ Bless removes Filler, Lattice, Vertical, and Horizontal ~ Copper Sulfate is no longer flammable + Copper Sulfate produces Poison Gas when burned + Baking Soda alias 'Sodium Bicarbonate' + Cellulose alias 'Paper Paste' + Cyanide alias 'Hydrogen Cyanide' + Acid Gas alias 'Hydrochloric Acid Gas' + Adobe alias 'Mud Brick' + Saves can keep Limitless Mode if settings are included ~ Saves no longer update cursor size + Partial translations for Dutch, Korean, Italian, Serbian, and Emoji ~ Halacae translations completed ~ Prompt inputs no longer allow autocomplete [Bug Fixes] ~ Fixed: Half-pixels on the edges of smaller canvases ~ Fixed: LEDs can create ghost pixels when absorbing Light ~ Fixed: Eggs break when placed with Drag tool ~ Fixed: Frozen Yogurt variants don't retain color when melting ~ Fixed: Frozen elements aren't generated properly when no state is present ~ Fixed: Tea and Coffee start boiling when placed manually ~ Fixed: Duplicate mods can be added ~ Fixed: Portals can't teleport pixels being dragged ~ Fixed: Embers are never deleted when Burning is disabled ~ Fixed: Mix tool can be used on ghost pixels ~ Fixed: Saves can set cursor size to impossible sizes ~ Fixed: colorOn isn't applied by reactions [Technical] + Mod dependency system, see dependency_test.js for more info + Elements can be added dynamically with addElement() + onAddElement(callback) function, called when element is added dynamically + loadedMods array holds mods that have been loaded + onSelect and onUnselect properties for custom views + Portals display channel on hover + 'mouseColor' setting ~ Unknown is now in the Special category (Still hidden) ~ Save version is now sb4 and includes new border settings
2025-04-01 11:52:52 -04:00
elements.positron.emit = true;
2025-01-08 13:00:52 -05:00
elements.plasma.emit = true;
elements.uranium.emit = 3;
elements.uranium.emitColor = "#009800";
Version 1.12 - July 17, 2025 - Saves For All [Version 1.12 - July 17, 2025 - Saves For All] + Featured Saves tab + Discord Saves tab + Browse community-made saves from our server + Lye, a reactive powder + Invar, a dark metal alloy (Hidden) + Streak View (Press 4) [Steam Edition Changes] + Workshop support + Add and load community-made saves + Publish saves for everyone to discover + Save tagging support + Rich Presence support for Discord and Steam Chat + Show off your current element and canvas state ~ Saves are stored in a new game data folder instead of slots + Mods can be loaded from the game data folder for offline use ~ Dependencies are currently not supported for local files + "Open Data Folder" button in Settings + Steam automatically selects supported languages + Save author name will default to Steam username - Hid "Clear Saves" button ~ Version and element count are shown again [Changes] + Button click animations + Corn has gravity + Cloner elements can be set by clicking over them + Dyes can be mixed into liquids + Sand can be dyed into Color Sand + Stained Glass can be made by melting Glass with certain metals + Batteries are breakable + Vaccine and Antidote can freeze + Small amounts of Vaccine can be made by boiling Antibody + Vaccine can be made by mixing Antibody with Sugar Water + Cream can be turned into Yogurt + Clay and Brick Rubble makes Clay Soil + Slime rots Meat + Glue turns Crumb into Bread + Yeast ferments Wheat + Vinegar-Ammonia reaction + Bleach-Baking Soda reaction + Blood bubbles before boiling + Infection passively creates Plague + Pool Water slowly breaks down DNA + Distilling Oil with Hydrogen makes Sulfur and Water (Claus process) + Greek Fire is made with Oil and Sap, instead of Sulfur + Sulfur stains Silver + Candy from freezing Honey or Molasses has a unique color + Ember changes color when hitting elements with flame colors + Plasma can heat existing pixels when placed over them + Magnesium-Acid reaction produces Hydrogen + Gold variants are immune to Acid + Acid decomposes at extreme temperatures + Ammonia decomposes at high temperatures + Copper Sulfate reacts with other carbs like Sugar + Molten Caustic Potash electrolysis + Virus and Strange Matter ignore Pointer + Neutrons radiate Glass Shards + Cancer kills Homunculi + Anesthesia and Alcohol Gas calm Humans ~ Human will be selected when using Pick on Head or Body ~ Tweaked Diamond formation ~ Walls and Pipes don't change Light color ~ God Ray is better at extinguishing fires ~ Ember no longer produces Fire on its own ~ Salt Water electrolysis produces Lye (Chloralkali process) ~ Sodium-Water reaction produces Lye ~ Improved Sodium-Acid reaction ~ Potassium-Acid reaction is more violent ~ Acid no longer deletes Smoke or Fire ~ Gallium-Aluminum reaction is more destructive ~ Supernovae create Mercury and Aluminum ~ Antimatter no longer explodes when hitting the border ~ Lightning no longer explodes when hitting the border on Void mode ~ Uranium releases Radiation more consistently when falling ~ Rats release Plague more consistently when falling ~ Molten Stained Glass has colorful Fire + Rainbow and Static affect the color of Fire ~ Canvas will shrink dynamically to fit screen width + Empty canvases will be reset automatically when window is resized + Saves menu tabs ~ Saves menu takes up more screen space ~ Modded saves automatically reload the save and remove new mods after session + Sandboxels will reload on canvas reset after changing mods + TPS is restored after unloading a save + Button to reload after adding or removing mods ~ Currently-loaded save will be underscored in menu ~ Saves keep track of standalone version (i.e. Steam) ~ Save warnings use native Sandboxels prompts ~ Reset Warning setting affects save loading popup on non-empty canvas - Loading a save no longer changes your selected view ~ 'Reset Scene' buttons in Settings now confirm before resetting ~ Cursor color is affected by theme color ~ Canvas Size and Worldgen settings automatically reset empty canvases ~ Updated styling of bottom links ~ Links are underlined when hovered over ~ Prompts are closed when elements are deselected ~ Confirm buttons for data reset prompts are red to show danger ~ Entering an invalid TPS no longer resets to 30 TPS ~ Recolored Gold ~ Recolored Zinc ~ Recolored Nickel ~ Recolored Tungsten ~ Recolored Sulfur ~ Recolored Brass ~ Recolored Sterling ~ Recolored Solder ~ Recolored Molten Aluminum and removed heat glow ~ Recolored Molten Caustic Potash and removed Fire ~ Recolored Soda made from Juice ~ Poison, Radiation, God Ray, Aluminum, Insulation, Bead, and Color Sand display with dark text ~ Prop tool can convert between boolean and number types + Broth alias 'Soup' + Jelly alias 'Jam' + Soda alias 'Cola' + Hard Yolk alias 'Fried Egg' + Gunpowder alias 'Black Powder' [Bug Fixes] ~ Fixed: Enabled mods can be stuck behind input box ~ Fixed: Flies and Bees get stuck on Loop border modes ~ Fixed: Rock Wall and Bless can't be used as Image element ~ Fixed: Screenshots don't include background color if it was never set ~ Fixed: Corrupted save error messages don't appear ~ Fixed: Large save canvases can go off-screen ~ Fixed: Cheerful Mode setting button has old behavior ~ Fixed: Cheerful Mode setting 'Refresh Page' button doesn't work ~ Fixed: runEveryTick() runs even when paused ~ Fixed: World gen replaces Destroyable border pixels with Wall ~ Fixed: Random events and modded per-tick events don't happen when stepping ticks ~ Fixed: Maximum cursor size doesn't fill entire canvas with odd widths ~ Fixed: Unpaint tool removes fancy textures ~ Fixed: Category buttons don't glow in Unlock as Discovered mode ~ Fixed: Coolers and Freezers affect insulative elements ~ Fixed: Lightning heats insulative elements ~ Fixed: Dark element button text isn't triggered by buttonColor ~ Fixed: Force-loaded mod dependencies don't load properly on Steam ~ Fixed: Theme background doesn't affect entire page on Steam Edition [Technical] + New helper functions: + getPixel(x, y) -> Pixel object or null + tryCreate(element, x, y, replace?) -> Pixel object or null + tryDelete(x, y) -> Pixel object or null + 'onCollide' element property, called when the pixel moves into any other (function(pixel1,pixel2)) + 'onClicked' element property, called when the pixel is clicked on (function(pixel,element)) + 'skip' pixel property, skips simulation of the pixel + 'RL' behavior rule, releases an element in any available space + 'clear' view property for clearing the canvas layers, defaults to true + modIsEnabled(str) function, checks only file names (e.g. "glow.js") + promptChoose() for multiple-choice prompts + promptDir() for direction-based prompts ~ Debug console has been re-enabled on Steam Edition ~ Pick and Erase tools are no longer hard-coded ~ Sensor 'sense' property can take multiple comma-separated values ~ Save version is now sb5
2025-07-17 13:49:09 -04:00
elements.molten_uranium.emit = 3;
elements.molten_uranium.emitColor = "#009800";
2025-01-08 13:00:52 -05:00
elements.rainbow.emit = true;
elements.static.emit = true;
elements.flash.emit = true;
elements.cold_fire.emit = true;
elements.blaster.emit = true;
elements.ember.emit = true;
elements.fw_ember.emit = 10;
elements.bless.emit = true;
elements.pop.emit = true;
elements.explosion.emit = true;
elements.n_explosion.emit = 10;
elements.supernova.emit = 20;
elements.midas_touch.emit = true;
elements.fireball.emit = true;
elements.sun.emit = 15;
elements.light.emit = 3;
elements.liquid_light.emit = true;
elements.laser.emit = 3;
elements.neutron.emit = 3;
elements.proton.emit = 3;
elements.radiation.emit = 3;
elements.fallout.emit = 3;
elements.rad_steam.emit = 2;
elements.rad_steam.emitColor = "#6ad48c";
elements.rad_cloud.emit = 2;
elements.rad_cloud.emitColor = "#009800";
elements.rad_glass.emit = 2;
elements.rad_glass.emitColor = "#009800";
elements.rad_shard.emit = 2;
elements.rad_shard.emitColor = "#009800";
elements.malware.emit = 2;
elements.border.emit = 2;
Version 1.11 - February 21, 2025 - Everyone's Update [Version 1.11 - February 21, 2025 - Everyone's Update] + Portals! + Portal In and Portal Out elements + Portals teleport pixels and electricity + Coral + Grows in Water + Bleaches in high temperatures + Adobe, made from Mud and Straw + Element translations for Turkish and Hungarian [Electricity Rework] ~ Electricity is now more consistent in highly conductive material ~ Sensors give out a single charge instead of 4 ~ Pixels now store when they were charged ~ Note: Effects on existing builds should be limited but please report any issues [Changes] + Liquid pixels of the same element move around + Tiny canvas size + Molten elements oscillate color (Experimental) ~ Pixels can now exist along the border of the canvas ~ Disabling Staining will clear all existing pixel stains + Dye, Paint, etc. retain their selected color independently + Radioactive Tornado variant + Humans panic when shocked ~ Humans are less heat-resistant ~ Pipes are no longer unbreakable + Smoke rises in normal air density ~ Tweaked Fire and Cold Fire behavior + Sabatier process for producing Methane + Bergius process for producing Oil + Acid reacts with Potassium ~ Increased Methane autoignition point + Uranium radiates Glass on contact + Burning Lamp Oil explodes in Water + Liquid Ozone explodes when broken or shocked + Molten Gallium can react with Gold Coins + Slaked Lime reacts with Carbon Dioxide + Molten Plastic evaporates + Glue turns Color Sand into Stained Glass + Butter and Caustic Potash make Soap + Neutrons radiate Glass, Clouds, and Water ~ Light absorbed by LEDs is deleted ~ Foam made from Oxygen + Water releases the Oxygen ~ Tweaked Bleach and Acid reaction ~ Increased Molten Sulfur freezing point ~ Tweaked Smash tool + Cyanide dirties Water variants + Infection dirties Water + Tea and Coffee bubble when hot + CO2 carbonates Salt Water instead of dirtying + Soda and Seltzer release Foam when mixed + Pilk creates Foam + Cells can ferment Milk variants ~ Cells ferment Milk slower ~ Cheese keeps color when breaking into powder (Pilk Powder?) ~ Caramel is more heat-resistant ~ Acid turns Humans into Bone ~ Birds are less flammable + Fish turn to white meat when cooked + Worms can compost Petal, Pistil, and Vine + Rats can eat Hard Yolk + Alcohol calms Humans + Humans panic from bad smells + Smog breaks into Dirty Water ~ Fireworks create less Carbon Dioxide + Bless can fix Brick Rubble + Midas Touch converts some metals to Gold variants + Malware can affect Snake ~ Pointer retains same speed at any TPS ~ Optimized Cell and Cancer ~ Recolored Pipe Wall ~ Improved Slug, Brick, and Ruins buttons ~ Hid Liquid Oxygen ~ Unhid Liquid Hydrogen ~ Moved Liquid Hydrogen to Liquids ~ Moved Poison Gas to Gases + Liquid Nitrogen alias 'LN2' + Electric alias 'Electron' + Light alias 'Photon' + Nut Oil alias 'Cooking Oil' + Epsom Salt alias 'Magnesium Sulfate' + Pyrite alias 'Iron Sulfide' + Limestone alias 'Calcium Carbonate' + Quicklime alias 'Calcium Oxide' + Slaked Lime alias 'Calcium Hydroxide' ~ Petal displays with dark text ~ Slightly moved Porcelain + Built-in dialog boxes ~ Canvas touches the top of the page ~ Wide canvas size takes up more screen space ~ White border no longer shown on wide canvas size ~ Buttons, menus, and the canvas have thicker borders ~ "Elem" in stats bar is no longer uppercase ~ Unknown has no grain - Loading a save no longer changes your selected element + Ctrl+S to bring up save prompt + Ctrl+Shift+S to instantly save canvas + Retroactive changelogs for versions v0.1-v0.4 + Bluesky social link + Partial translations for Ukrainian, Toki Pona, and Halacae + Finished translations for Spanish and Russian [Bug Fixes] ~ Fixed: Oxygen from hydrolysis immediately turns to Foam ~ Fixed: Menu heights vary dramatically with long categories ~ Fixed: Mod Manager and Info Screen text boxes don't stick to bottom ~ Fixed: Lattice Wars appear without borders ~ Fixed: Smash tool breaks harder elements faster ~ Fixed: Error in console on page load ~ Fixed: Artifacts above stats bar text on Chrome ~ Fixed: Console logging when Hail breaks a pixel ~ Fixed: Milk variants still heat into Yogurt ~ Fixed: Controls still show Smooth View keybind ~ Fixed: "Save to File" button cut off on some small screens ~ Fixed: Many aliases can't be used in Element Select ~ Fixed: Prop tool doesn't change pixel state when changing temperature ~ Fixed: Grenades stop moving while charged ~ Fixed: Lightning doesn't reach bottom on large canvases ~ Fixed: Ghost pixels when placing Foam with low air temperature set ~ Fixed: 'CR' behavior cell errors with low air temperature set [Technical] + Portal 'channel' property can be set with the Prop tool (Integer) + runAfterReset function + isBreakable function + 'breakIntoColorMultiplier' element property + 'onMoveInto' element property, called when another pixel moves into it (function(pixel1,pixel2)) + 'chargeStart' pixel property ~ 'breakIntoColor' element property can be used without 'breakInto' + 'sense' sensor property to detect a certain element ~ Optimized electricity ~ Fire is affected by air density + View setting dropdown includes views added by mods ~ currentSaveData is now always defined, and holds metadata about the current canvas, even non-saves + currentSaveData always contains a UUID for seeded randomness ~ Default max pixel count slightly increased ~ Save version is now sb3 ~ Canvas border width is now stored (Default 1 for old saves) ~ Pixel properties with value "undefined" are skipped + Error message in console for broken translation files + GUI translation support + More GUI elements have IDs + Future standalone mode
2025-02-21 13:47:50 -05:00
elements.void.emit = 10;
2025-01-08 13:00:52 -05:00
2025-04-07 14:24:50 -04:00
window.addEventListener("load",()=>{
glowmodCtx2.canvas.width = ctx.canvas.width;
glowmodCtx2.canvas.height = ctx.canvas.height;
glowmodCtx.canvas.width = ctx.canvas.width;
glowmodCtx.canvas.height = ctx.canvas.height;
})
2025-01-08 13:00:52 -05:00
viewInfo[1] = { // Blur Glow (Emissive pixels only)
name: "",
pixel: viewInfo[1].pixel,
effects: true,
colorEffects: true,
Version 1.11.1 - April 1, 2025 - FOOLS-2-5 [Version 1.11.1 - April 1, 2025 - FOOLS-2-5] + Border setting + Void deletes pixels that touch the sides + Loop teleports pixels that touch the sides ~ Improved Thermal View now uses hottest and coldest pixels as bounds + Finnish and Indonesian languages [FOOLS] + Element Modulator + FOOLS Mode is back! ~ Note: FOOLS features will disappear April 4th [Changes] + Keybind: Ctrl+O to load a save file + Keybind: Ctrl+Shift+O to reload the last loaded save + Flame test can be done on elements with fire colors + Honey and Molasses freeze into Candy + 'Golden Wind' Tornado variant + Milk variants can be churned into Butter + Udders can absorb certain liquids to produce Milk variants + Cheese can be made with Cream + Soda foam has a unique color + Candy dissolves in Water + Void is insulative + Bless stops panic in Humans + Gunpowder explodes when shocked + Ozone can cure Infection + Dust and Ash dirty Seltzer + Calcium can react with Steam + Magnesium reacts with Water and Steam + Sponges can release Water absorbed from soils + Sponges separate Water variant contents + Primordial Soup can freeze + Positrons shock Antimatter ~ Antimatter no longer explodes when touching Cloners ~ Thermite burns into Molten Iron + Acid stains Silver ~ Tweaked Acid-Potassium reaction ~ Frogs have a unique egg color ~ Molten Rad Glass is greener ~ Recolored Pilk Cheese ~ Bless removes Filler, Lattice, Vertical, and Horizontal ~ Copper Sulfate is no longer flammable + Copper Sulfate produces Poison Gas when burned + Baking Soda alias 'Sodium Bicarbonate' + Cellulose alias 'Paper Paste' + Cyanide alias 'Hydrogen Cyanide' + Acid Gas alias 'Hydrochloric Acid Gas' + Adobe alias 'Mud Brick' + Saves can keep Limitless Mode if settings are included ~ Saves no longer update cursor size + Partial translations for Dutch, Korean, Italian, Serbian, and Emoji ~ Halacae translations completed ~ Prompt inputs no longer allow autocomplete [Bug Fixes] ~ Fixed: Half-pixels on the edges of smaller canvases ~ Fixed: LEDs can create ghost pixels when absorbing Light ~ Fixed: Eggs break when placed with Drag tool ~ Fixed: Frozen Yogurt variants don't retain color when melting ~ Fixed: Frozen elements aren't generated properly when no state is present ~ Fixed: Tea and Coffee start boiling when placed manually ~ Fixed: Duplicate mods can be added ~ Fixed: Portals can't teleport pixels being dragged ~ Fixed: Embers are never deleted when Burning is disabled ~ Fixed: Mix tool can be used on ghost pixels ~ Fixed: Saves can set cursor size to impossible sizes ~ Fixed: colorOn isn't applied by reactions [Technical] + Mod dependency system, see dependency_test.js for more info + Elements can be added dynamically with addElement() + onAddElement(callback) function, called when element is added dynamically + loadedMods array holds mods that have been loaded + onSelect and onUnselect properties for custom views + Portals display channel on hover + 'mouseColor' setting ~ Unknown is now in the Special category (Still hidden) ~ Save version is now sb4 and includes new border settings
2025-04-01 11:52:52 -04:00
onUnselect: function(ctx) {
glowmodCtx2.canvas.width = ctx.canvas.width;
glowmodCtx2.canvas.height = ctx.canvas.height;
glowmodCtx.canvas.width = ctx.canvas.width;
glowmodCtx.canvas.height = ctx.canvas.height;
},
2025-01-08 13:00:52 -05:00
pre: function(ctx) {
glowmodCtx2.canvas.width = ctx.canvas.width;
glowmodCtx2.canvas.height = ctx.canvas.height;
},
pixel: viewInfo[1].pixel,
post: function(ctx) {
glowmodCtx.canvas.width = ctx.canvas.width;
glowmodCtx.canvas.height = ctx.canvas.height;
glowmodCtx.filter = "blur(30px)";
// Draw the blurred content on the canvas
glowmodCtx.drawImage(glowmodCtx2.canvas, 0, 0);
glowmodCtx.filter = "none";
},
};
renderEachPixel(function(pixel,ctx) {
2025-04-07 14:24:50 -04:00
if (view === 1 && settings.textures !== 0) {
2025-01-08 13:00:52 -05:00
if (elements[pixel.element].emit || pixel.emit || (elements[pixel.element].colorOn && pixel.charge)) {
let a = (settings.textures !== 0) ? pixel.alpha : undefined;
Version 1.11.1 - April 1, 2025 - FOOLS-2-5 [Version 1.11.1 - April 1, 2025 - FOOLS-2-5] + Border setting + Void deletes pixels that touch the sides + Loop teleports pixels that touch the sides ~ Improved Thermal View now uses hottest and coldest pixels as bounds + Finnish and Indonesian languages [FOOLS] + Element Modulator + FOOLS Mode is back! ~ Note: FOOLS features will disappear April 4th [Changes] + Keybind: Ctrl+O to load a save file + Keybind: Ctrl+Shift+O to reload the last loaded save + Flame test can be done on elements with fire colors + Honey and Molasses freeze into Candy + 'Golden Wind' Tornado variant + Milk variants can be churned into Butter + Udders can absorb certain liquids to produce Milk variants + Cheese can be made with Cream + Soda foam has a unique color + Candy dissolves in Water + Void is insulative + Bless stops panic in Humans + Gunpowder explodes when shocked + Ozone can cure Infection + Dust and Ash dirty Seltzer + Calcium can react with Steam + Magnesium reacts with Water and Steam + Sponges can release Water absorbed from soils + Sponges separate Water variant contents + Primordial Soup can freeze + Positrons shock Antimatter ~ Antimatter no longer explodes when touching Cloners ~ Thermite burns into Molten Iron + Acid stains Silver ~ Tweaked Acid-Potassium reaction ~ Frogs have a unique egg color ~ Molten Rad Glass is greener ~ Recolored Pilk Cheese ~ Bless removes Filler, Lattice, Vertical, and Horizontal ~ Copper Sulfate is no longer flammable + Copper Sulfate produces Poison Gas when burned + Baking Soda alias 'Sodium Bicarbonate' + Cellulose alias 'Paper Paste' + Cyanide alias 'Hydrogen Cyanide' + Acid Gas alias 'Hydrochloric Acid Gas' + Adobe alias 'Mud Brick' + Saves can keep Limitless Mode if settings are included ~ Saves no longer update cursor size + Partial translations for Dutch, Korean, Italian, Serbian, and Emoji ~ Halacae translations completed ~ Prompt inputs no longer allow autocomplete [Bug Fixes] ~ Fixed: Half-pixels on the edges of smaller canvases ~ Fixed: LEDs can create ghost pixels when absorbing Light ~ Fixed: Eggs break when placed with Drag tool ~ Fixed: Frozen Yogurt variants don't retain color when melting ~ Fixed: Frozen elements aren't generated properly when no state is present ~ Fixed: Tea and Coffee start boiling when placed manually ~ Fixed: Duplicate mods can be added ~ Fixed: Portals can't teleport pixels being dragged ~ Fixed: Embers are never deleted when Burning is disabled ~ Fixed: Mix tool can be used on ghost pixels ~ Fixed: Saves can set cursor size to impossible sizes ~ Fixed: colorOn isn't applied by reactions [Technical] + Mod dependency system, see dependency_test.js for more info + Elements can be added dynamically with addElement() + onAddElement(callback) function, called when element is added dynamically + loadedMods array holds mods that have been loaded + onSelect and onUnselect properties for custom views + Portals display channel on hover + 'mouseColor' setting ~ Unknown is now in the Special category (Still hidden) ~ Save version is now sb4 and includes new border settings
2025-04-01 11:52:52 -04:00
let d = pixel.emit||elements[pixel.element].emit||true;
2025-01-08 13:00:52 -05:00
if (d === true) d = 5;
let r = Math.floor(d/2);
drawSquare(glowmodCtx2,elements[pixel.element].emitColor||pixel.color,pixel.x-r,pixel.y-r,d,a);
}
if (pixel.charge && !elements[pixel.element].colorOn) {
drawSquare(glowmodCtx2,"#ffff00",pixel.x-1,pixel.y-1,3);
}
}
2025-01-08 14:41:56 -05:00
})
}