← GranjaObjeto 3Dfogon/oveja
Oveja
Arrastrá para girarlo// «Oveja» · gpt-6-sol (medium)
// A fluffy cartoon sheep: a big cloud-like body of lumpy white-cream wool made of overlapping bumps, a small dark charcoal face facing front (-y) poking out with white dot eyes and a tuft of wool on top of the head, dark floppy ears sideways, and four thin dark charcoal legs with black hooves under the wool.
// Four walking legs, each hinged beneath the wool.
const legs = [
{ name: "frontLeft", x: 16, y: 16, speed: 5 },
{ name: "frontRight", x: 32, y: 16, speed: -5 },
{ name: "rearLeft", x: 16, y: 33, speed: -5 },
{ name: "rearRight", x: 32, y: 33, speed: 5 }
];
for (const leg of legs) {
part(leg.name, [leg.x, leg.y, 15]);
box(leg.x - 1, leg.y - 1, 3, leg.x + 1, leg.y + 1, 15, "#414347");
box(leg.x - 1, leg.y - 2, 1, leg.x + 1, leg.y + 1, 4, "#292b2e");
box(leg.x - 1, leg.y - 2, 0, leg.x + 1, leg.y + 1, 1, "#1e2022");
animate(leg.name, { type: "swing", axis: "x", speed: leg.speed, amplitude: 0.3 });
}
part("body");
// A solid, rounded body under overlapping woolly puffs.
ellipsoid(24, 25, 23, 15, 14, 11, "#eee8d5");
ellipsoid(24, 25, 28, 13, 12, 9, "#fff9e9");
const woolRings = [
{ z: 14, rx: 11, ry: 10, count: 12, radius: 4 },
{ z: 22, rx: 13, ry: 12, count: 17, radius: 5 },
{ z: 30, rx: 11, ry: 10, count: 15, radius: 5 },
{ z: 35, rx: 7, ry: 7, count: 9, radius: 4 }
];
for (let ringIndex = 0; ringIndex < woolRings.length; ringIndex++) {
const ring = woolRings[ringIndex];
for (let i = 0; i < ring.count; i++) {
const angle = 2 * Math.PI * (i + ringIndex * 0.31) / ring.count;
const x = Math.round(24 + Math.cos(angle) * ring.rx);
const y = Math.round(25 + Math.sin(angle) * ring.ry);
const z = ring.z + Math.round((rand() - 0.5) * 2);
const shade = ringIndex === 0
? ["#e7deca", "#eee6d2", "#f2e9d7"]
: ["#fff9e9", "#f8f0df", "#fffdf2", "#f4ecd9"];
sphere(x, y, z, ring.radius, shade[Math.floor(rand() * shade.length)]);
}
}
sphere(24, 25, 36, 5, "#fffaf0");
sphere(19, 23, 36, 4, "#fffdf3");
sphere(29, 27, 36, 4, "#fff9e9");
// A few soft highlights keep the broad wool surfaces lively.
forEach((x, y, z, color) => {
if (color === "#fff9e9" && rand() < 0.012) {
set(x, y, z, "#fffdf3");
}
});
// The whole head gently bobs, including its ears and woolly fringe.
part("head", [24, 12, 27]);
ellipsoid(24, 9, 26, 6, 6, 7, "#383b3e");
ellipsoid(24, 6, 24, 5, 4, 5, "#484a4c");
ellipsoid(24, 4, 22, 4, 3, 3, "#555454");
// Floppy ears spread sideways from the head.
ellipsoid(16, 9, 29, 5, 2, 2, "#343639");
ellipsoid(32, 9, 29, 5, 2, 2, "#343639");
ellipsoid(15, 7, 29, 3, 1, 1, "#69605d");
ellipsoid(33, 7, 29, 3, 1, 1, "#69605d");
// Bright eyes with tiny black pupils, on the front-facing side.
box(20, 3, 27, 21, 4, 28, "#fffdf4");
box(27, 3, 27, 28, 4, 28, "#fffdf4");
set(21, 2, 27, "#17191a");
set(27, 2, 27, "#17191a");
ellipsoid(24, 2, 22, 2, 1, 1, "#202224");
set(24, 1, 20, "#292b2d");
// Cloud-shaped fringe above the face.
sphere(20, 7, 32, 3, "#f7efdd");
sphere(24, 6, 34, 4, "#fffaf0");
sphere(28, 7, 32, 3, "#f8f1e0");
sphere(23, 5, 32, 2, "#fffdf3");
animate("head", { type: "bob", axis: "z", speed: 2.5, amplitude: 0.45 });import { draw } from "./assets/voxel";
import { oveja } from "./assets/oveja";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, oveja, 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 oveja
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["oveja"] })
# Queda en client/assets/oveja.ts
# https://fogon.page/object/oveja