← Level pieces 23D assetfogon/nivel-trampa-de-fuego
Trampa de fuego
Drag to turn it// «Trampa de fuego» · gpt-6-sol (medium)
// A fire jet trap: a square dark iron floor grate 48x48 x 4 thick (z 0..3) with a grid of dark slots and orange-hot rims, and in its center a round nozzle; from the nozzle a tall column of flame rises to z 36: bright yellow core, orange middle, red tips, wider at the bottom (radius 7) and narrowing to flickering tongues on top.
// 48×48 dark iron grate, four blocks thick.
box(0, 0, 0, 47, 47, 0, "#252c35");
box(0, 0, 1, 47, 47, 2, "#343d47");
box(0, 0, 3, 47, 47, 3, "#56616c");
// Recessed square vents with orange-hot rims.
for (let i = 0; i < 6; i++) {
for (let j = 0; j < 6; j++) {
const x = 4 + i * 7;
const y = 4 + j * 7;
box(x - 1, y - 1, 3, x + 5, y + 5, 3, "#a94a20");
box(x - 1, y - 1, 3, x + 5, y - 1, 3, "#ed7423");
box(x - 1, y - 1, 3, x - 1, y + 5, 3, "#dc6120");
box(x, y, 3, x + 4, y + 4, 3, "#161d25");
}
}
// Crisp outer frame and corner fasteners.
box(0, 0, 3, 47, 1, 3, "#737d86");
box(0, 46, 3, 47, 47, 3, "#343d47");
box(0, 0, 3, 1, 47, 3, "#737d86");
box(46, 0, 3, 47, 47, 3, "#343d47");
for (const x of [2, 45]) {
for (const y of [2, 45]) {
box(x, y, 3, x + 1, y + 1, 3, "#a8afb2");
set(x, y, 3, "#d1d3cb");
}
}
// Raised circular iron nozzle and glowing inner lip.
cylinder(24, 24, 4, 9, 2, "#303943");
cylinder(24, 24, 5, 8, 1, "#75818b");
cylinder(24, 24, 5, 6, 2, "#bd4c1b");
cylinder(24, 24, 6, 7, 1, "#ff9427");
cylinder(24, 24, 6, 5, 1, "#351f1d");
// The entire flame flickers as one animated part.
part("fuego", [24, 24, 6]);
for (let z = 7; z <= 29; z++) {
const t = (z - 7) / 22;
const radius = z <= 13 ? 7 : 7 - (z - 13) * 0.27;
const cx = 24 + Math.sin(z * 0.48) * 0.7;
const cy = 24 + Math.sin(z * 0.37 + 1) * 0.5;
for (let x = 16; x <= 32; x++) {
for (let y = 16; y <= 32; y++) {
const d = Math.hypot(x - cx, y - cy);
const edge = radius + (rand() - 0.5) * 0.65;
if (d > edge) continue;
const shade = d / radius;
let color;
if (shade > 0.82) color = t > 0.62 ? "#d92e12" : "#f04a16";
else if (shade > 0.46) color = "#ff8d19";
else color = z > 25 ? "#ffb524" : "#ffe14a";
set(x, y, z, color);
}
}
}
// Distinct rising tongues give the column a lively, tapered silhouette.
line(23, 24, 25, 21, 23, 34, 2, "#ff7518");
line(23, 24, 28, 21, 23, 34, 1, "#ffb927");
line(26, 24, 24, 28, 23, 32, 2, "#e83b14");
line(26, 24, 26, 28, 23, 31, 1, "#ff9a1f");
line(24, 25, 28, 25, 24, 35, 2, "#ff9a1f");
line(24, 25, 29, 25, 24, 35, 1, "#ffe14a");
line(25, 24, 34, 25, 23, 36, 0, "#ffb927");
animate("fuego", {
type: "colors",
palette: ["#ffe14a", "#ff9a1f", "#ff4a1a", "#c81e0a"],
pattern: "flicker",
glow: 0.9
});import { draw } from "./assets/voxel";
import { nivelTrampaDeFuego } from "./assets/nivel-trampa-de-fuego";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, nivelTrampaDeFuego, 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 nivel-trampa-de-fuego
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["nivel-trampa-de-fuego"] })
# It lands in client/assets/nivel-trampa-de-fuego.ts
# https://fogon.page/object/nivel-trampa-de-fuego