← Whole house3D assetfogon/pava-electrica
Pava eléctrica
Drag to turn it// «Pava eléctrica» · gpt-6-sol (medium)
// An electric kettle: a round glossy red kettle with a chunky curved handle at the back, a short spout at the front (-y), a lid with a small knob on top, sitting on a round black base, with a small window showing blue water.
// Round black stand
cylinder(24, 23, 0, 16, 3, "#25262b");
cylinder(24, 23, 3, 15, 1, "#42434a");
cylinder(24, 23, 4, 12, 2, "#a92530");
// Glossy red kettle body
ellipsoid(24, 23, 19, 15, 14, 13, "#d9363d");
forEach((x, y, z, color) => {
if (color !== "#d9363d") return;
if (z < 13 || y > 30) {
set(x, y, z, rand() < 0.12 ? "#bb2832" : "#c72e38");
} else if (z > 24 || (y < 15 && x < 23)) {
set(x, y, z, rand() < 0.08 ? "#fa6765" : "#e94b50");
} else if (rand() < 0.035) {
set(x, y, z, "#e84a50");
}
});
// A soft curved reflection on the front
for (let z = 20; z <= 27; z++) {
for (let x = 19; x <= 20; x++) {
for (let y = 8; y <= 15; y++) {
if (get(x, y, z) && !get(x, y - 1, z)) {
set(x, y, z, z > 25 ? "#ff8b80" : "#f6706b");
}
}
}
}
// Silver-edged water-level window, following the front of the round body
for (let z = 12; z <= 22; z++) {
for (let x = 14; x <= 18; x++) {
for (let y = 8; y <= 15; y++) {
if (!get(x, y, z) || get(x, y - 1, z)) continue;
const border = x === 14 || x === 18 || z === 12 || z === 22;
set(x, y - 1, z, border ? "#b9c9cf" : "#295d70");
if (!border) {
set(x, y - 2, z,
z <= 18 ? (x === 15 ? "#a6e8ed" : "#63c7e5") : "#a8dee3");
}
}
}
}
for (let x = 15; x <= 17; x++) {
for (let y = 8; y <= 14; y++) {
if (get(x, y, 19) === "#a8dee3" && !get(x, y - 1, 19)) {
set(x, y, 19, "#ddf5ed");
}
}
}
// Short, raised pouring spout
line(24, 10, 20, 24, 5, 23, 3, "#bc2934");
line(24, 8, 22, 24, 4, 24, 2, "#e74a4b");
line(21, 3, 25, 27, 3, 25, 1, "#f56963");
box(23, 2, 23, 25, 3, 24, "#4a252c");
line(22, 4, 26, 26, 4, 26, 0, "#ffc0a3");
// Chunky C-shaped handle behind the kettle
line(24, 34, 27, 24, 40, 30, 3, "#a82331");
line(24, 40, 30, 24, 44, 29, 3, "#ad2632");
line(24, 44, 29, 24, 44, 17, 3, "#a82331");
line(24, 44, 17, 24, 39, 13, 3, "#a82331");
line(24, 39, 13, 24, 35, 14, 3, "#b72c36");
line(22, 43, 27, 22, 43, 19, 0, "#ed5556");
// Lid, rim, and little grab knob
cylinder(24, 23, 30, 11, 2, "#a92230");
cylinder(24, 23, 32, 11, 1, "#f16a64");
ellipsoid(24, 23, 33, 10, 9, 2, "#e94b4c");
cylinder(24, 23, 35, 2, 2, "#832832");
sphere(24, 23, 38, 3, "#e84b4b");
box(22, 20, 39, 23, 21, 39, "#ff9080");
// Tiny power light on the front of the base
box(23, 7, 1, 25, 7, 2, "#ffc984");
set(24, 6, 2, "#fff1bd");import { draw } from "./assets/voxel";
import { pavaElectrica } from "./assets/pava-electrica";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, pavaElectrica, 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 pava-electrica
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["pava-electrica"] })
# It lands in client/assets/pava-electrica.ts
# https://fogon.page/object/pava-electrica