← FantasíaObjeto 3Dfogon/cofre-mimico
Cofre mímico
Arrastrá para girarlo// «Cofre mímico» · gpt-6-sol (medium)
// A mimic: a monster disguised as a wooden treasure chest, clearly ALIVE. The chest box is brown planks with dark iron bands and brass corners. The lid is open about 45 degrees like a gaping mouth: along the front edge of the box AND along the front edge of the lid, a row of big pointy white fangs (triangular, 3-4 blocks tall each) pointing toward each other. Inside is dark red flesh, and a long fat pink tongue hangs out of the mouth down over the front of the box. On top of the lid's front face, two big round yellow eyes with black vertical slit pupils and angry dark brows, clearly visible from the front. Two small stubby wooden legs at the front corners.
const wood = ["#71442e", "#805034", "#925d3a", "#a46d43"];
const darkWood = "#4d302a";
const iron = "#302d35";
const ironLight = "#504955";
const brass = "#d5a64e";
const brassLight = "#f2cf78";
// Short, planted feet.
for (const x of [11, 35]) {
box(x - 3, 15, 0, x + 3, 21, 6, darkWood);
box(x - 3, 13, 0, x + 3, 17, 2, wood[2]);
box(x - 3, 13, 1, x + 3, 13, 1, brass);
}
// Solid wooden chest, with distinct horizontal planks.
box(8, 12, 5, 40, 38, 20, wood[0]);
for (let z = 6; z <= 19; z++) {
const shade = wood[Math.min(3, Math.floor((z - 5) / 4))];
for (let x = 9; x <= 39; x++)
for (let y = 11; y <= 12; y++)
set(x, y, z, rand() < 0.13 ? wood[Math.floor(rand() * 4)] : shade);
for (const x of [8, 40])
for (let y = 13; y <= 37; y++)
set(x, y, z, rand() < 0.12 ? wood[1] : shade);
}
for (const z of [9, 14, 19]) {
box(9, 10, z, 39, 11, z, darkWood);
box(8, 12, z, 8, 38, z, darkWood);
box(40, 12, z, 40, 38, z, darkWood);
}
// Bands wrap over the front and sides.
for (const x of [14, 35]) {
box(x, 9, 5, x + 2, 10, 19, iron);
box(x, 9, 11, x + 2, 9, 11, ironLight);
for (const z of [7, 17]) set(x + 1, 8, z, brassLight);
}
for (const z of [6, 18]) {
box(8, 12, z, 8, 38, z + 1, iron);
box(40, 12, z, 40, 38, z + 1, iron);
}
// Warm corner caps and rivets.
for (const x of [8, 38]) {
box(x, 9, 5, x + 2, 11, 7, brass);
box(x, 9, 17, x + 2, 11, 19, brass);
for (const z of [6, 18]) set(x + 1, 8, z, brassLight);
}
// The dark, fleshy opening and its lower lip.
box(11, 12, 20, 37, 34, 22, "#341d2a");
box(12, 12, 21, 36, 30, 21, "#782e40");
box(10, 10, 19, 38, 12, 21, "#4a2630");
box(11, 9, 19, 37, 9, 19, "#a64b59");
// Fat tongue curling out and hanging over the front.
ellipsoid(24, 16, 22, 7, 8, 2, "#b64c70");
ellipsoid(24, 11, 19, 6, 5, 3, "#df7292");
ellipsoid(24, 8, 14, 5, 3, 6, "#da688a");
ellipsoid(24, 7, 10, 5, 3, 3, "#eb86a3");
line(24, 5, 11, 24, 6, 18, 0, "#a93f68");
for (const x of [19, 29]) set(x, 7, 13, "#f49db1");
// Lower teeth: broad roots and tapered, upward-pointing tips.
for (const cx of [13, 19, 25, 31, 37]) {
for (let z = 21; z <= 26; z++) {
const half = z <= 22 ? 2 : z <= 24 ? 1 : 0;
box(cx - half, 8, z, cx + half, 10, z,
z >= 25 ? "#ffffff" : "#f0e9df");
}
box(cx - 1, 7, 21, cx + 1, 7, 22, "#d9d1c9");
}
// Hinges at the back of the chest.
for (const x of [12, 35]) {
cylinder(x, 36, 20, 2, 4, iron, "x");
set(x, 34, 21, brass);
}
// Everything below is attached to the chomping lid.
part("lid", [24, 36, 20]);
// Raised lid: back edge low, front edge high.
for (let y = 15; y <= 38; y++) {
const z = Math.round(20 + (37 - y) * 0.68);
const plank = wood[Math.min(3, Math.floor((38 - y) / 6))];
box(8, y, z, 40, y, z + 3, plank);
box(11, y, z - 1, 37, y, z - 1, "#672d3e");
if ([19, 25, 31, 37].includes(y))
box(9, y, z + 3, 39, y, z + 3, darkWood);
if (rand() < 0.6)
for (let i = 0; i < 5; i++)
set(11 + Math.floor(rand() * 27), y, z + 3,
rand() < 0.5 ? "#a66e45" : "#68402e");
// Chunky side rails and iron edging.
box(7, y, z - 1, 10, y, z + 4, darkWood);
box(38, y, z - 1, 41, y, z + 4, darkWood);
box(8, y, z + 4, 9, y, z + 4, iron);
box(39, y, z + 4, 40, y, z + 4, iron);
}
// Thick front rim, with brass corner guards.
box(8, 13, 33, 40, 16, 37, wood[2]);
box(9, 12, 33, 39, 13, 34, "#482733");
box(8, 12, 36, 40, 13, 37, darkWood);
for (const x of [8, 38]) {
box(x, 12, 34, x + 2, 14, 37, brass);
set(x + 1, 11, 36, brassLight);
}
// Upper fangs descend from the lip toward the lower row.
for (const cx of [12, 18, 24, 30, 36]) {
for (let z = 28; z <= 34; z++) {
const half = z >= 32 ? 2 : z >= 30 ? 1 : 0;
box(cx - half, 10, z, cx + half, 12, z,
z <= 29 ? "#ffffff" : "#eee8df");
}
}
// Oversized eyes protrude from the lid's front face.
for (const cx of [17, 32]) {
ellipsoid(cx, 11, 39, 4, 3, 3, "#583729");
ellipsoid(cx, 9, 39, 3, 2, 3, "#f5c957");
ellipsoid(cx, 7, 39, 1, 1, 2, "#211d29");
set(cx - 1, 6, 40, "#fff4a9");
}
// Angry brows slant inward above the eyes.
line(12, 9, 43, 20, 9, 41, 1, darkWood);
line(29, 9, 41, 37, 9, 43, 1, darkWood);
for (const x of [11, 39]) set(x, 12, 38, brassLight);
animate("lid", { type: "swing", axis: "x", speed: 3, amplitude: 0.35 });import { draw } from "./assets/voxel";
import { cofreMimico } from "./assets/cofre-mimico";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, cofreMimico, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: lo que mide en px su lado más largo
// angle: giro sobre el piso, en radianes
// t: segundos; si se mueve, se anima solo con eso# En una terminal, en la carpeta del juego
fogon assets add cofre-mimico
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["cofre-mimico"] })
# Queda en client/assets/cofre-mimico.ts
# https://fogon.page/object/cofre-mimico