← Animals3D assetfogon/escarabajo
Escarabajo
Drag to turn it// «Escarabajo» · gpt-6-sol (medium)
// A cartoon rhinoceros beetle, horizontal along y, head at the front (-y): a glossy domed shell in dark metallic green with shiny highlights, a big curved horn on its head, small eyes, six bent black legs.
// Rounded body and dark underside
ellipsoid(24, 26, 16, 10, 13, 8, "#263a31");
ellipsoid(24, 26, 12, 8, 11, 5, "#354b35");
// Domed metallic-green wing case
for (let x = 12; x <= 36; x++) {
for (let y = 12; y <= 40; y++) {
for (let z = 18; z <= 33; z++) {
const d = ((x - 24) / 11.5) ** 2 +
((y - 26) / 13.5) ** 2 +
((z - 18) / 14) ** 2;
if (d > 1) continue;
let c = z >= 28 ? "#238565" : z >= 23 ? "#176b55" : "#115040";
if (rand() < 0.07) c = z >= 25 ? "#329775" : "#206f57";
set(x, y, z, c);
}
}
}
// Dark dividing line between the two wing covers, following the dome
for (let y = 15; y <= 38; y++) {
const q = 1 - ((y - 26) / 13.5) ** 2;
if (q <= 0) continue;
const top = Math.round(18 + 14 * Math.sqrt(q));
for (let z = top - 1; z <= top; z++) set(24, y, z, "#103a35");
}
// Broad, curved reflections on the glossy shell
for (let y = 19; y <= 32; y++) {
for (const x of [17, 18]) {
const q = 1 - ((x - 24) / 11.5) ** 2 - ((y - 26) / 13.5) ** 2;
if (q > 0) set(x, y, Math.round(18 + 14 * Math.sqrt(q)), "#55b996");
}
}
for (let y = 22; y <= 30; y++) {
const x = 31;
const q = 1 - ((x - 24) / 11.5) ** 2 - ((y - 26) / 13.5) ** 2;
if (q > 0) set(x, y, Math.round(18 + 14 * Math.sqrt(q)), "#319f79");
}
// Shell's heavy lower lip
for (let a = 0; a < Math.PI * 2; a += 0.045) {
const x = Math.round(24 + 11.3 * Math.cos(a));
const y = Math.round(26 + 13.2 * Math.sin(a));
set(x, y, 18, "#103d36");
set(x, y, 19, "#185844");
}
// Large, friendly head, overlapping the front of the shell
ellipsoid(24, 15, 20, 9, 9, 9, "#276d4e");
ellipsoid(24, 13, 22, 8, 7, 7, "#368b60");
ellipsoid(24, 10, 17, 6, 4, 3, "#24583f");
// Two simple black eyes visible from the front and sides
ellipsoid(17, 8, 22, 2, 1.5, 2, "#101b19");
ellipsoid(31, 8, 22, 2, 1.5, 2, "#101b19");
set(17, 7, 23, "#ffffff");
set(31, 7, 23, "#ffffff");
// Oversized curved rhinoceros horn
line(24, 8, 26, 24, 5, 30, 2.8, "#263d30");
line(24, 5, 30, 24, 4, 35, 2.4, "#304b37");
line(24, 4, 35, 24, 6, 39, 1.8, "#405c3b");
line(24, 6, 39, 24, 10, 41, 1, "#526b42");
line(23, 5, 31, 23, 5, 36, 0, "#70906a");
line(23, 6, 37, 23, 8, 39, 0, "#84a075");
// Six bent legs in two alternating walking groups
function leg(side, y, footY) {
const hipX = 24 + side * 9;
const kneeX = 24 + side * 15;
const footX = 24 + side * 18;
sphere(hipX, y, 14, 2.5, "#1a3029");
line(hipX, y, 14, kneeX, y, 9, 2, "#172620");
sphere(kneeX, y, 9, 2, "#263a2f");
line(kneeX, y, 9, footX, footY, 2, 1.5, "#111d1b");
line(footX, footY, 2, footX + side, footY - 1, 1, 1, "#24332a");
}
part("walkingA", [24, 24, 13]);
leg(-1, 17, 12);
leg( 1, 26, 26);
leg(-1, 34, 38);
animate("walkingA", { type: "swing", axis: "x", speed: 6, amplitude: 0.3 });
part("walkingB", [24, 24, 13]);
leg( 1, 17, 12);
leg(-1, 26, 26);
leg( 1, 34, 38);
animate("walkingB", { type: "swing", axis: "x", speed: -6, amplitude: 0.3 });import { draw } from "./assets/voxel";
import { escarabajo } from "./assets/escarabajo";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, escarabajo, 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 escarabajo
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["escarabajo"] })
# It lands in client/assets/escarabajo.ts
# https://fogon.page/object/escarabajo