← Animals3D assetfogon/libelula
Libélula
Drag to turn it// «Libélula» · gpt-6-sol (medium)
// A cartoon dragonfly with a long thin turquoise body segmented in blue and green along y, a big head with huge green eyes, and four long narrow transparent pale blue wings spread to the sides.
// Little feet keep the dragonfly grounded while its wings flap.
const teal = "#17b9ae";
const lightTeal = "#58dfc5";
const deepTeal = "#087f8e";
const blue = "#239ec0";
for (const side of [-1, 1]) {
for (const y of [19, 24]) {
const hipX = 24 + side * 3;
const footX = 24 + side * 6;
line(hipX, y, 7, footX, y + 1, 3, 0.8, deepTeal);
line(footX, y + 1, 3, footX + side, y - 1, 0, 0.8, teal);
box(footX + side - 1, y - 2, 0, footX + side + 1, y, 0, deepTeal);
}
}
// Each pale-blue wing has its own hinge. The four wings fan apart in plan view.
function wing(name, side, rootY, slope, speed) {
const rootX = 24 + side * 2;
part(name, [rootX, rootY, 15]);
animate(name, { type: "swing", axis: "y", speed, amplitude: 0.4 });
for (let d = 0; d <= 19; d++) {
const x = rootX + side * d;
const centerY = rootY + slope * d;
const width = 0.5 + 2.8 * Math.pow(Math.sin(Math.PI * d / 20), 0.8);
const z = 15 + Math.round(d / 11);
for (let y = Math.ceil(centerY - width); y <= Math.floor(centerY + width); y++) {
const edge = Math.abs(y - centerY) > width - 0.85 || d === 19;
const color = edge
? "#84cfe6"
: rand() < 0.16 ? "#f1ffff" : rand() < 0.35 ? "#b6e7f2" : "#d5f3f7";
set(x, y, z, color);
}
// A bright vein runs from the hinge toward the rounded tip.
if (d < 18) set(x, Math.round(centerY), z + 1, d % 5 === 0 ? "#ffffff" : "#b4e7ee");
}
}
wing("front left wing", -1, 18, -0.39, 14);
wing("front right wing", 1, 18, -0.39, -14);
wing("rear left wing", -1, 24, 0.52, 14);
wing("rear right wing", 1, 24, 0.52, -14);
part("body", [24, 20, 10]);
// Long, bead-like abdomen with bold blue and green segments.
for (let i = 5; i >= 0; i--) {
const y = 27 + i * 3;
const c = i % 3 === 0 ? "#20bbaa" : i % 3 === 1 ? "#168fb5" : "#47c99a";
ellipsoid(24, y, 9, i === 5 ? 2.6 : 2.1, 2.1, 2, c);
box(23, y - 1, 11, 25, y, 11, i % 2 ? "#64d9bd" : "#59c9d7");
if (i < 5) {
set(22, y + 2, 9, deepTeal);
set(26, y + 2, 9, deepTeal);
}
}
ellipsoid(24, 44, 9, 2.5, 1.7, 2, blue);
set(24, 44, 11, "#77ded8");
// Chunky thorax conceals the four wing hinges.
ellipsoid(24, 21, 10, 4.3, 5.4, 4, deepTeal);
ellipsoid(24, 20, 11, 4, 4.5, 4, teal);
ellipsoid(24, 19, 13, 3.3, 3.1, 1.8, lightTeal);
for (let i = 0; i < 28; i++) {
const x = 21 + Math.floor(rand() * 7);
const y = 18 + Math.floor(rand() * 6);
if (get(x, y, 14) === teal) set(x, y, 14, rand() < 0.5 ? lightTeal : "#23c9b6");
}
// Oversized smiling head and enormous green eyes.
ellipsoid(24, 12, 10, 5.6, 5.2, 5.5, deepTeal);
ellipsoid(24, 11.5, 10.5, 5.3, 5, 5.2, teal);
ellipsoid(24, 11, 14, 3.9, 3.4, 1.5, lightTeal);
for (const side of [-1, 1]) {
const eyeX = 24 + side * 5;
ellipsoid(eyeX, 9, 12, 3.1, 3.2, 3.4, "#268e45");
ellipsoid(eyeX, 8.5, 12.5, 2.8, 2.9, 3, "#74dc54");
ellipsoid(eyeX + side * 0.5, 6, 13, 1.25, 0.9, 1.35, "#172d30");
set(eyeX + side * 0.5 - 1, 5, 14, "#ffffff");
set(eyeX + side * 2, 8, 10, "#a6ed79");
}
// Tiny curved smile, visible from the front.
set(22, 6, 7, "#075e6d");
set(23, 5, 6, "#075e6d");
set(24, 5, 6, "#075e6d");
set(25, 5, 6, "#075e6d");
set(26, 6, 7, "#075e6d");import { draw } from "./assets/voxel";
import { libelula } from "./assets/libelula";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, libelula, 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 libelula
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["libelula"] })
# It lands in client/assets/libelula.ts
# https://fogon.page/object/libelula