← FantasíaObjeto 3Dfogon/dragoncito-bebe
Dragoncito bebé
Arrastrá para girarlo// «Dragoncito bebé» · gpt-6-sol (medium)
// A cute chubby baby dragon sitting facing front (-y): a round mint-green body with a pale yellow belly, huge sparkly eyes, two tiny white horns, small stubby legs, a curled tail with a spade tip, and two little bat wings that are light purple inside.
// Curled tail, tucked behind the dragon's right side.
part("tail", [33, 29, 9]);
const tailMint = "#65bea5";
line(33, 29, 9, 38, 34, 7, 3, tailMint);
line(38, 34, 7, 41, 37, 10, 3, tailMint);
line(41, 37, 10, 41, 38, 15, 2, tailMint);
line(41, 38, 15, 39, 37, 18, 2, "#79d2b6");
ellipsoid(39, 37, 20, 3, 2, 3, "#66bfa9");
ellipsoid(39, 36, 21, 2, 1, 2, "#8ce0c6");
set(39, 37, 24, "#a6ead4");
animate("tail", { type: "swing", axis: "z", speed: 1.5, amplitude: 0.3 });
// Little bat wings. Each membrane is filled between its knuckled edges.
const wingShape = [
[12, 27], [9, 34], [3, 38], [4, 30],
[7, 27], [9, 28], [10, 23], [12, 26]
];
function insideWing(x, z) {
let inside = false;
for (let i = 0, j = wingShape.length - 1; i < wingShape.length; j = i++) {
const a = wingShape[i], b = wingShape[j];
if ((a[1] > z) !== (b[1] > z) &&
x < (b[0] - a[0]) * (z - a[1]) / (b[1] - a[1]) + a[0]) {
inside = !inside;
}
}
return inside;
}
for (const side of [-1, 1]) {
const mirror = x => side === -1 ? x : 48 - x;
const name = side === -1 ? "leftWing" : "rightWing";
part(name, [mirror(12), 29, 27]);
for (let x = 3; x <= 12; x++) {
for (let z = 23; z <= 38; z++) {
if (!insideWing(x + 0.5, z + 0.5)) continue;
const color = z > 31 ? "#c99cf2" : "#ae80dd";
for (let y = 29; y <= 30; y++) set(mirror(x), y, z, color);
if (rand() < 0.12) set(mirror(x), 28, z, "#d9b5fa");
}
}
const edge = "#478f89";
for (let i = 0; i < wingShape.length; i++) {
const a = wingShape[i], b = wingShape[(i + 1) % wingShape.length];
line(mirror(a[0]), 28, a[1], mirror(b[0]), 28, b[1], 1, edge);
}
line(mirror(12), 28, 27, mirror(3), 28, 38, 1, "#70c7b4");
line(mirror(12), 28, 27, mirror(7), 28, 27, 0, "#e3c4fc");
line(mirror(12), 28, 27, mirror(10), 28, 23, 0, "#e3c4fc");
animate(name, {
type: "swing", axis: "y",
speed: side === -1 ? 6 : -6, amplitude: 0.4
});
}
part("body", [24, 24, 15]);
// Round body and oversized head.
ellipsoid(24, 24, 15, 11, 10, 13, "#78cdae");
ellipsoid(24, 19, 29, 12, 10, 10, "#8dddc1");
// Gentle shading and sparse storybook speckles.
forEach((x, y, z, color) => {
if (color === "#78cdae") {
if (z < 10 && rand() < 0.65) set(x, y, z, "#65baa0");
else if (z > 20 && rand() < 0.28) set(x, y, z, "#90dfbd");
else if (rand() < 0.055) set(x, y, z, "#6ac3a7");
} else if (color === "#8dddc1") {
if (z > 33 && rand() < 0.4) set(x, y, z, "#a5ebcf");
else if (rand() < 0.055) set(x, y, z, "#7bd0b4");
}
});
// Soft yellow belly, protruding just enough to read from the front.
ellipsoid(24, 14, 15, 8, 3, 10, "#f7e6a1");
ellipsoid(24, 11, 17, 6, 1, 7, "#fff0b4");
ellipsoid(24, 11, 11, 5, 1, 3, "#eecf88");
// Stubby seated legs and little toes.
for (const x of [16, 32]) {
ellipsoid(x, 16, 4, 5, 5, 4, "#70c5a8");
ellipsoid(x, 12, 2, 4, 4, 2, "#8bdbbb");
for (const dx of [-2, 0, 2]) {
ellipsoid(x + dx, 9, 1, 1, 2, 1, "#fff6db");
}
}
// Tiny paws resting against the belly.
for (const x of [13, 35]) {
ellipsoid(x, 16, 17, 3, 4, 5, "#73cbaa");
ellipsoid(x, 13, 15, 2, 2, 2, "#94dfbd");
set(x - 1, 11, 14, "#fff2cf");
set(x + 1, 11, 14, "#fff2cf");
}
// Two tiny ivory horns.
for (const side of [-1, 1]) {
const x = 24 + side * 9;
line(x, 19, 37, x + side * 2, 19, 42, 2, "#e8e2dc");
line(x + side * 2, 19, 41, x + side * 2, 19, 44, 0, "#fff9ed");
set(x + side, 18, 40, "#ffffff");
}
// Round muzzle, freckles, blush and a small smile.
ellipsoid(24, 9, 25, 6, 4, 3, "#a3e7c5");
ellipsoid(24, 6, 25, 4, 1, 2, "#baf2cf");
for (const x of [21, 27]) {
ellipsoid(x, 5, 25, 1, 1, 1, "#498e82");
set(x, 4, 26, "#6aa79a");
}
for (const x of [15, 33]) {
ellipsoid(x, 10, 24, 2, 1, 2, "#efa8b4");
set(x, 9, 25, "#ffc2c4");
}
set(22, 4, 22, "#658c7d");
set(23, 4, 21, "#658c7d");
set(24, 4, 21, "#658c7d");
set(25, 4, 21, "#658c7d");
set(26, 4, 22, "#658c7d");
// Huge glossy eyes, dark violet irises and oversized sparkles.
for (const x of [18, 30]) {
ellipsoid(x, 9, 31, 4, 3, 5, "#eafff5");
ellipsoid(x, 6, 31, 3, 2, 4, "#493760");
ellipsoid(x, 4, 32, 2, 1, 3, "#211f3e");
set(x - 1, 3, 33, "#ffffff");
set(x, 3, 34, "#ffffff");
set(x + 1, 3, 30, "#d6c5ff");
set(x - 1, 4, 29, "#bd9df0");
}import { draw } from "./assets/voxel";
import { dragoncitoBebe } from "./assets/dragoncito-bebe";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, dragoncitoBebe, 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 dragoncito-bebe
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["dragoncito-bebe"] })
# Queda en client/assets/dragoncito-bebe.ts
# https://fogon.page/object/dragoncito-bebe