← Monstruos y enemigosObjeto 3Dfogon/elemental-de-agua
Elemental de agua
Arrastrá para girarlo// «Elemental de agua» · gpt-6-sol (medium)
// A cartoon water elemental facing -y: a swirling humanoid made of translucent-looking blue water in several shades, foamy white crests on the head and shoulders, two bright white glowing eyes, arms like waves, and the lower body melting into a round puddle on the floor.
const deep = "#07518e";
const blue = "#087fbd";
const light = "#28bce5";
const shine = "#91ecff";
const foam = "#e9fbff";
function waterBlob(cx, cy, cz, rx, ry, rz) {
for (let x = Math.floor(cx - rx); x <= Math.ceil(cx + rx); x++)
for (let y = Math.floor(cy - ry); y <= Math.ceil(cy + ry); y++)
for (let z = Math.max(0, Math.floor(cz - rz)); z <= Math.ceil(cz + rz); z++) {
const d = ((x-cx)/rx)**2 + ((y-cy)/ry)**2 + ((z-cz)/rz)**2;
if (d > 1) continue;
let color = z < cz - rz*0.38 ? deep : z > cz + rz*0.38 ? light : blue;
if (y < cy - ry*0.35 && z >= cz) color = light;
if (rand() < 0.045) color = rand() < 0.5 ? light : shine;
set(x, y, z, color);
}
}
// The broad, low puddle anchors the creature to the floor.
waterBlob(24, 24, 0, 19, 15, 2.3);
waterBlob(24, 24, 1, 16, 12, 2.4);
waterBlob(22, 23, 2, 12, 10, 2.5);
for (let a = 0; a < Math.PI * 2; a += 0.23) {
if (rand() < 0.27) continue;
const x = 24 + Math.cos(a) * 17;
const y = 24 + Math.sin(a) * 13;
sphere(x, y, 1, rand() < 0.22 ? 1.5 : 1, rand() < 0.35 ? shine : light);
}
line(9, 15, 2, 15, 11, 3, 1, shine);
line(32, 12, 2, 39, 16, 2, 1, shine);
// One animated, color-cycling mass forms the twisting torso and big head.
part("upper_body", [24, 23, 7]);
waterBlob(25, 24, 8, 8, 8, 6);
waterBlob(22, 24, 14, 7, 7, 8);
waterBlob(26, 23, 20, 9, 8, 7);
waterBlob(24, 22, 25, 12, 8, 5);
waterBlob(24, 22, 32, 12, 10, 9);
waterBlob(21, 21, 36, 7, 8, 5);
animate("upper_body", {
type: "colors",
palette: [deep, blue, light, "#ffffff"],
pattern: "wave",
glow: 0.3
});
// Curving surface streaks make the water read as a swirl rather than a column.
part("surface_details", [24, 23, 7]);
line(20, 16, 8, 27, 16, 11, 1, shine);
line(27, 16, 11, 29, 15, 15, 1, shine);
line(29, 15, 15, 23, 15, 19, 1, shine);
line(23, 15, 19, 18, 16, 23, 1, shine);
line(17, 17, 12, 19, 16, 16, 1, deep);
line(19, 16, 16, 25, 15, 18, 1, deep);
sphere(30, 15, 21, 2, shine);
sphere(18, 15, 19, 1.5, shine);
// Each curling wave-arm swings from its shoulder.
part("left_arm", [15, 21, 26]);
waterBlob(13, 21, 26, 5, 5, 5);
line(13, 20, 25, 8, 19, 22, 3, blue);
line(8, 19, 22, 5, 19, 26, 3, light);
waterBlob(6, 19, 27, 3, 3, 4);
sphere(5, 18, 30, 2, foam);
sphere(8, 18, 30, 1.5, shine);
line(11, 17, 25, 7, 16, 26, 1, shine);
animate("left_arm", { type: "swing", axis: "y", speed: 2, amplitude: 0.25 });
part("right_arm", [33, 21, 26]);
waterBlob(35, 21, 26, 5, 5, 5);
line(35, 20, 25, 40, 19, 22, 3, blue);
line(40, 19, 22, 43, 19, 26, 3, light);
waterBlob(42, 19, 27, 3, 3, 4);
sphere(43, 18, 30, 2, foam);
sphere(40, 18, 30, 1.5, shine);
line(37, 17, 25, 41, 16, 26, 1, shine);
animate("right_arm", { type: "swing", axis: "y", speed: 2, amplitude: 0.25 });
// White spray breaks over the head and both shoulders.
part("crest", [24, 22, 38]);
waterBlob(17, 20, 40, 5, 4, 2.5);
waterBlob(21, 20, 42, 4, 3, 2);
sphere(14, 19, 39, 2, foam);
sphere(24, 19, 42, 1.5, shine);
sphere(28, 20, 40, 2, foam);
sphere(12, 19, 29, 2, foam);
sphere(15, 18, 31, 1.5, shine);
sphere(36, 19, 29, 2, foam);
sphere(33, 18, 31, 1.5, shine);
// Dark sockets frame oversized, luminous eyes on the front (-y).
part("face", [24, 19, 32]);
box(17, 11, 31, 21, 14, 35, deep);
box(27, 11, 31, 31, 14, 35, deep);
box(18, 10, 32, 20, 11, 34, shine);
box(28, 10, 32, 30, 11, 34, shine);
box(18, 9, 33, 19, 10, 34, foam);
box(28, 9, 33, 29, 10, 34, foam);
line(21, 12, 27, 27, 12, 27, 0, deep);
set(20, 12, 28, deep);
set(28, 12, 28, deep);
sphere(16, 13, 28, 1, shine);
sphere(32, 13, 28, 1, shine);import { draw } from "./assets/voxel";
import { elementalDeAgua } from "./assets/elemental-de-agua";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, elementalDeAgua, 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 elemental-de-agua
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["elemental-de-agua"] })
# Queda en client/assets/elemental-de-agua.ts
# https://fogon.page/object/elemental-de-agua