← Whole house3D assetfogon/heladera
Heladera
Drag to turn it// «Heladera» · gpt-6-sol (medium)
// A tall white two-door refrigerator: freezer door on top and a bigger fridge door below, each with a long vertical chrome handle, slightly rounded corners, a small water dispenser on the freezer door, and three colorful magnets and a note on the lower door.
const white = "#f8f8f3";
const light = "#ffffff";
const shade = "#e6e9e7";
const trim = "#cbd1d1";
const darkTrim = "#889395";
const chrome = "#dce7e8";
const chromeBright = "#ffffff";
const chromeDark = "#839398";
// Small feet and the solid, softly rounded refrigerator cabinet.
box(14, 21, 0, 18, 31, 1, darkTrim);
box(30, 21, 0, 34, 31, 1, darkTrim);
for (let z = 1; z <= 42; z++) {
for (let y = 17; y <= 34; y++) {
for (let x = 11; x <= 37; x++) {
const corner = (x === 11 || x === 37) && (z === 1 || z === 42);
if (corner) continue;
let c = white;
if (x >= 36 || y >= 33) c = shade;
if (z >= 40) c = rand() < 0.15 ? light : white;
if ((x === 11 || x === 37) && y === 17) c = trim;
set(x, y, z, c);
}
}
}
// Front opening and a few cool-colored shelves visible when the door swings.
box(12, 16, 3, 36, 16, 40, trim);
box(14, 16, 5, 34, 16, 25, "#aab7b8");
box(15, 16, 6, 33, 16, 24, "#dbe9e8");
for (const z of [11, 18]) {
box(15, 15, z, 33, 16, z, "#f9ffff");
box(16, 14, z, 32, 14, z, "#a9cdd2");
}
box(17, 15, 6, 31, 15, 9, "#add6de");
box(18, 14, 8, 30, 14, 8, "#e8fbfa");
// Stationary hinge barrels and the separation between the two doors.
for (const z of [5, 22]) {
box(10, 15, z, 12, 18, z + 2, "#a6b2b3");
box(10, 14, z + 1, 11, 16, z + 1, chrome);
}
box(12, 15, 27, 36, 17, 28, "#a8b2b2");
box(13, 14, 28, 35, 16, 28, "#e1e4e1");
// Freezer-door gasket, then its softly beveled white face.
box(12, 16, 29, 36, 16, 40, "#94a1a1");
for (let z = 29; z <= 40; z++) {
for (let y = 13; y <= 15; y++) {
for (let x = 12; x <= 36; x++) {
if ((x === 12 || x === 36) && z === 40) continue;
let c = white;
if (z === 40 || x === 13) c = light;
if (x >= 35 || z === 29) c = shade;
if (rand() < 0.025) c = "#f1f3f0";
set(x, y, z, c);
}
}
}
box(14, 12, 29, 34, 12, 29, "#dce1df");
// Chunky recessed water dispenser on the freezer door.
box(18, 12, 31, 27, 12, 37, "#c5cdcd");
box(19, 11, 32, 26, 11, 36, "#e9eeee");
box(20, 10, 32, 25, 10, 35, "#5f777e");
box(20, 10, 32, 25, 10, 32, "#91b7bd");
box(21, 9, 34, 24, 10, 34, "#304b55");
box(22, 8, 34, 23, 9, 34, chrome);
box(20, 9, 36, 21, 10, 36, "#8bcbd2");
box(23, 9, 36, 24, 10, 36, "#f2d5a7");
box(19, 10, 31, 26, 10, 31, "#bbc7c8");
// Chrome handles: dark edges, bright glints, and substantial mounting posts.
function handle(x, z0, z1) {
for (const z of [z0 + 1, z1 - 1]) {
box(x - 1, 11, z, x + 1, 13, z + 1, chromeDark);
box(x - 1, 10, z + 1, x, 11, z + 1, chrome);
}
box(x - 1, 9, z0, x + 1, 10, z1, chrome);
box(x - 1, 9, z0 + 1, x - 1, 9, z1 - 1, chromeBright);
box(x + 1, 9, z0 + 1, x + 1, 9, z1 - 1, chromeDark);
box(x, 8, z0 + 1, x, 8, z1 - 1, "#eef7f7");
}
handle(33, 31, 39);
// The lower door and everything stuck to it rotate around its left hinge.
part("lower_fridge_door", [12, 16, 14]);
box(12, 16, 3, 36, 16, 26, "#8e9b9c");
for (let z = 3; z <= 26; z++) {
for (let y = 13; y <= 15; y++) {
for (let x = 12; x <= 36; x++) {
if ((x === 12 || x === 36) && (z === 3 || z === 26)) continue;
let c = white;
if (x === 13 || z === 26) c = light;
if (x >= 35 || z <= 4) c = shade;
if (rand() < 0.025) c = "#f0f2ef";
set(x, y, z, c);
}
}
}
box(14, 12, 4, 34, 12, 4, "#e1e5e2");
handle(33, 10, 24);
// Cream paper note, peach tape, and legible little lines of writing.
box(20, 11, 14, 27, 11, 20, "#efe5c9");
box(21, 10, 14, 26, 10, 19, "#fff7dd");
box(23, 9, 20, 25, 10, 21, "#f4ac91");
for (const z of [17, 19]) box(22, 9, z, 25, 9, z, "#8d9990");
box(22, 9, 15, 24, 9, 15, "#8d9990");
// Three bright, chunky magnets: a heart, a flower, and a sunny star.
box(16, 10, 22, 18, 11, 23, "#ec7280");
set(16, 9, 23, "#ff9aa1");
set(18, 9, 23, "#ff9aa1");
set(17, 9, 22, "#e14d68");
set(29, 9, 21, "#f7cb65");
for (const [dx, dz] of [[-1, 0], [1, 0], [0, -1], [0, 1]]) {
set(29 + dx, 9, 21 + dz, "#85cfba");
}
set(29, 10, 21, "#eab264");
set(17, 9, 10, "#ffe17b");
for (const [dx, dz] of [[-1, 0], [1, 0], [0, -1], [0, 1]]) {
set(17 + dx, 9, 10 + dz, "#ffc856");
}
set(17, 10, 10, "#f0a94e");
animate("lower_fridge_door", {
type: "swing",
axis: "z",
speed: 1,
amplitude: 0.4
});import { draw } from "./assets/voxel";
import { heladera } from "./assets/heladera";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, heladera, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: its longest side, in px
// angle: turn on the floor, in radians
// t: seconds; if it moves, that animates it# In a terminal, in the game's folder
fogon assets add heladera
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["heladera"] })
# It lands in client/assets/heladera.ts
# https://fogon.page/object/heladera