← Monstruos y enemigosObjeto 3Dfogon/calabaza-malvada
Calabaza malvada
Arrastrá para girarlo// «Calabaza malvada» · gpt-6-sol (medium)
// A cartoon evil pumpkin creature facing -y: a big orange ribbed pumpkin head with a carved angry face (triangular eyes, jagged grin) glowing with orange-yellow light from inside, a curly green stem, sitting on a small body made of twisting dark green vines with leafy arms.
// Twisted vine body and rooted feet
const vine = "#24552b", vineLight = "#398047", vineDark = "#173d25";
const leaf = "#48a34e", leafLight = "#79c95b";
for (const side of [-1, 1]) {
const x = 24 + side * 4;
line(24, 25, 11, x, 25, 6, 2, vine);
line(x, 25, 6, x + side * 2, 21, 1, 2, vineDark);
ellipsoid(x + side * 2, 21, 1, 3, 4, 1, vine);
line(x, 24, 5, x + side * 2, 21, 2, 1, vineLight);
}
line(24, 25, 7, 23, 24, 17, 3, vineDark);
line(23, 24, 9, 27, 26, 14, 2, vine);
line(27, 26, 14, 22, 24, 18, 2, vineLight);
line(22, 24, 17, 25, 24, 20, 2, vine);
ellipsoid(24, 25, 13, 6, 5, 4, vineDark);
// Solid, overlapping lobes give the pumpkin its ribbed silhouette.
const lobes = [
{ x: 12, rx: 5.7, ry: 10.5, rz: 11.5 },
{ x: 18, rx: 6.2, ry: 12.4, rz: 12.7 },
{ x: 30, rx: 6.2, ry: 12.4, rz: 12.7 },
{ x: 36, rx: 5.7, ry: 10.5, rz: 11.5 },
{ x: 24, rx: 6.4, ry: 13.7, rz: 13.0 }
];
ellipsoid(24, 24, 29, 16, 12, 12, "#9a3b15");
for (const l of lobes) {
for (let x = Math.ceil(l.x - l.rx); x <= l.x + l.rx; x++)
for (let y = 9; y <= 39; y++)
for (let z = 16; z <= 42; z++) {
const d = ((x - l.x) / l.rx) ** 2 +
((y - 24) / l.ry) ** 2 +
((z - 29) / l.rz) ** 2;
if (d > 1) continue;
const edge = Math.abs(x - l.x) / l.rx;
let c = z < 21 ? "#a94417" : "#e56a20";
if (edge > 0.79) c = "#b84919";
else if (z > 34 || (y < 16 && edge < 0.5)) c = "#f58a2a";
else if (rand() < 0.045) c = "#d45c1d";
set(x, y, z, c);
}
}
// The carved face follows the curved front surface, rather than a flat panel.
function front(x, z) {
for (let y = 6; y <= 24; y++) if (get(x, y, z)) return y;
return -1;
}
function carving(x, z) {
// Slanted, narrowing triangular eyes
if (x >= 14 && x <= 21) {
const t = x - 14;
if (z >= 31 + t * 0.17 && z <= 37 - t * 0.65) return true;
}
if (x >= 27 && x <= 34) {
const t = 34 - x;
if (z >= 31 + t * 0.17 && z <= 37 - t * 0.65) return true;
}
// Little triangular nose
if (x >= 22 && x <= 26 && z >= 27 && z <= 30 &&
Math.abs(x - 24) <= (31 - z) * 0.7) return true;
// Wide, dipped grin with angular pumpkin teeth interrupting the glow
if (x >= 14 && x <= 34) {
const towardMiddle = 10 - Math.abs(x - 24);
const top = 27 - towardMiddle * 0.12;
const bottom = 24 - towardMiddle * 0.43;
if (z >= bottom && z <= top) {
if ((x >= 17 && x <= 18 || x >= 23 && x <= 24 ||
x >= 30 && x <= 31) && z > top - 2) return false;
if ((x >= 20 && x <= 21 || x >= 27 && x <= 28) &&
z < bottom + 2) return false;
return true;
}
}
return false;
}
// Dark recessed border around each glowing opening
for (let x = 12; x <= 36; x++)
for (let z = 19; z <= 39; z++) {
const y = front(x, z);
if (y < 0) continue;
let nearby = false;
for (let dx = -1; dx <= 1; dx++)
for (let dz = -1; dz <= 1; dz++)
if (carving(x + dx, z + dz)) nearby = true;
if (nearby) {
set(x, y - 1, z, "#613014");
set(x, y - 2, z, "#472714");
}
}
// Curly green stem, with a small leaf at its base
cylinder(24, 24, 41, 2, 3, vineDark);
line(24, 24, 43, 25, 24, 45, 1, vine);
line(25, 24, 45, 28, 23, 45, 1, vineLight);
line(28, 23, 45, 29, 22, 43, 1, vineLight);
ellipsoid(20, 25, 43, 4, 2, 1, leaf);
line(19, 25, 43, 23, 24, 43, 0, leafLight);
// Independent swinging leafy arms
for (const side of [-1, 1]) {
const name = side < 0 ? "leftArm" : "rightArm";
const shoulder = 24 + side * 14;
part(name, [shoulder, 24, 18]);
line(shoulder, 24, 18, shoulder + side * 4, 22, 16, 2, vineDark);
line(shoulder + side * 4, 22, 16, shoulder + side * 5, 19, 21, 2, vine);
line(shoulder, 23, 19, shoulder + side * 4, 21, 17, 1, vineLight);
ellipsoid(shoulder + side * 5, 19, 21, 2, 3, 3, leaf);
ellipsoid(shoulder + side * 4, 18, 23, 2, 2, 2, leafLight);
ellipsoid(shoulder + side * 6, 20, 22, 1, 2, 2, vineLight);
animate(name, { type: "swing", axis: "y", speed: side * 2, amplitude: 0.3 });
}
part("body");
// Flickering light inside the carved openings
part("face", [24, 10, 29]);
for (let x = 14; x <= 34; x++)
for (let z = 20; z <= 37; z++) {
if (!carving(x, z)) continue;
const y = front(x, z);
if (y < 0) continue;
set(x, y - 3, z, z > 30 ? "#fff37b" : "#ffd448");
}
animate("face", {
type: "colors",
palette: ["#ff9d27", "#ffd13e", "#fff179", "#ffe25c"],
pattern: "flicker",
glow: 0.9
});
part("body");import { draw } from "./assets/voxel";
import { calabazaMalvada } from "./assets/calabaza-malvada";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, calabazaMalvada, 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 calabaza-malvada
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["calabaza-malvada"] })
# Queda en client/assets/calabaza-malvada.ts
# https://fogon.page/object/calabaza-malvada