← Nature3D assetfogon/colmena
Colmena
Drag to turn it// «Colmena» · gpt-6-sol (medium)
// A beehive hanging from a short branch stub: an oval stack of golden-yellow and brown rings with a dark entrance hole, and three small cartoon bees around it.
// A slim tree stub supports the hanging hive.
box(5, 21, 0, 11, 28, 39, "#986032");
box(6, 21, 2, 9, 22, 38, "#b6783c");
box(10, 26, 1, 11, 28, 37, "#754625");
for (let z = 3; z < 38; z += 6) {
line(5, 21, z, 6, 21, z + 3, 0, "#754625");
line(11, 28, z + 2, 11, 28, z + 5, 0, "#653d28");
}
box(5, 21, 39, 11, 28, 40, "#bb8145");
box(6, 22, 41, 10, 27, 41, "#dfaa65");
line(8, 24, 38, 27, 24, 39, 3, "#986032");
line(9, 22, 40, 25, 22, 40, 1, "#bb8145");
line(13, 27, 37, 22, 27, 38, 0, "#754625");
// A few fresh leaves around the branch stub.
ellipsoid(12, 27, 41, 4, 3, 2, "#4fae49");
ellipsoid(12, 27, 42, 3, 2, 1, "#83ce59");
ellipsoid(19, 27, 41, 3, 2, 2, "#5bb94b");
ellipsoid(19, 27, 42, 2, 1, 1, "#91d662");
// The hive is made of plump, subtly irregular stacked bands.
const hx = 27, hy = 24;
for (let z = 8; z <= 36; z++) {
const taper = Math.sqrt(Math.max(0, 1 - ((z - 22) / 15) ** 2));
const bulge = 0.5 * Math.cos((z - 10) * Math.PI * 2 / 5);
const rx = 12 * taper + bulge;
const ry = 10.5 * taper + bulge;
const groove = [13, 18, 23, 28, 33].includes(z);
for (let x = hx - 13; x <= hx + 13; x++) {
for (let y = hy - 12; y <= hy + 12; y++) {
const d = ((x - hx) / rx) ** 2 + ((y - hy) / ry) ** 2;
if (d > 1) continue;
let color;
if (groove && d > 0.72) color = "#a85f24";
else if (d > 0.88 && z < 22) color = "#cf822a";
else if (z >= 30 || (y < hy - 3 && z >= 19)) color = "#ffd455";
else color = "#edb83e";
if (!groove && d > 0.55 && rand() < 0.055) {
color = z >= 25 ? "#ffe079" : "#d99a31";
}
set(x, y, z, color);
}
}
}
// Short waxy attachment to the branch.
cylinder(27, 24, 35, 3, 4, "#cf852c");
cylinder(27, 24, 38, 2, 2, "#f2bd43");
// Dark, unmistakable entrance on the front.
ellipsoid(27, 12, 20, 4, 2, 4, "#a55b22");
ellipsoid(27, 10, 20, 2.8, 1.5, 2.8, "#422819");
ellipsoid(26, 9, 19, 1, 0.6, 1, "#291d19");
line(24, 12, 16, 30, 12, 16, 0, "#e9a93a");
// Grass and tiny flowers at the foot of the tree.
ellipsoid(8, 25, 0, 8, 8, 1, "#5fae47");
ellipsoid(8, 25, 1, 6, 6, 1, "#85ca57");
for (let i = 0; i < 14; i++) {
const a = i * 2.4;
const x = Math.round(8 + Math.cos(a) * (3 + i % 4));
const y = Math.round(25 + Math.sin(a) * (3 + i % 4));
line(x, y, 1, x + (i % 3) - 1, y, 2 + i % 2, 0, "#398f43");
}
for (const [x, y, petal] of [[3, 28, "#ff7897"], [13, 21, "#ffffff"]]) {
line(x, y, 1, x, y, 3, 0, "#348e45");
set(x, y, 4, petal);
set(x - 1, y, 3, petal);
set(x + 1, y, 3, petal);
set(x, y, 3, "#ffdb54");
}
// All three cartoon bees orbit together around the hive.
part("bees", [27, 24, 25]);
function bee(x, y, z) {
ellipsoid(x, y, z, 2.5, 3, 2, "#ffc638");
// Bands wrap around the abdomen.
for (const yy of [y + 1, y + 3]) {
for (let xx = x - 3; xx <= x + 3; xx++) {
for (let zz = z - 2; zz <= z + 2; zz++) {
if (get(xx, yy, zz)) set(xx, yy, zz, "#513725");
}
}
}
ellipsoid(x, y - 2, z, 1.8, 1.7, 1.7, "#ffe057");
set(x - 1, y - 4, z, "#332b29");
set(x + 1, y - 4, z, "#332b29");
set(x, y - 4, z - 1, "#bd7140");
ellipsoid(x - 3, y, z + 2, 2, 1.5, 1, "#b5edfa");
ellipsoid(x + 3, y, z + 2, 2, 1.5, 1, "#d5f7ff");
set(x - 3, y - 1, z + 2, "#ffffff");
set(x + 3, y - 1, z + 2, "#ffffff");
line(x - 1, y - 3, z + 1, x - 2, y - 4, z + 3, 0, "#513725");
line(x + 1, y - 3, z + 1, x + 2, y - 4, z + 3, 0, "#513725");
}
bee(15, 8, 28);
bee(40, 22, 30);
bee(29, 40, 34);
animate("bees", { type: "spin", axis: "z", speed: 1.5 });import { draw } from "./assets/voxel";
import { colmena } from "./assets/colmena";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, colmena, 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 colmena
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["colmena"] })
# It lands in client/assets/colmena.ts
# https://fogon.page/object/colmena