← Nature3D assetfogon/roble
Roble
Drag to turn it// «Roble» · gpt-6-sol (medium)
// A big round cartoon oak tree: a thick short brown trunk with darker bark grooves and a few roots spreading on the ground, holding a huge lumpy crown made of 4-5 overlapping green spheres in 3 shades (lighter on top). Wider than tall, about 44 blocks across.
// Thick, short trunk and roots.
cylinder(24, 24, 2, 5, 16, "#a86a35");
ellipsoid(24, 24, 3, 6, 6, 4, "#a86a35");
const roots = [
[24, 24, 4, 13, 23, 1],
[24, 24, 4, 35, 25, 1],
[24, 24, 4, 21, 13, 1],
[24, 24, 4, 27, 35, 1],
[24, 24, 3, 16, 30, 1],
[24, 24, 3, 32, 17, 1]
];
for (const [x0, y0, z0, x1, y1, z1] of roots) {
line(x0, y0, z0, x1, y1, z1, 2, "#a86a35");
}
// Warm, irregular bark shading.
forEach((x, y, z, color) => {
if (z > 17 || color !== "#a86a35") return;
const grain = Math.sin(x * 1.7 + y * 0.8 + z * 0.42);
if (grain > 0.78 && rand() < 0.35) set(x, y, z, "#bd7a3d");
else if (rand() < 0.12) set(x, y, z, "#92572c");
});
// Long dark grooves on the front and sides of the trunk.
for (let z = 5; z <= 16; z++) {
set(22 + (z > 10 ? 1 : 0), 20, z, "#704326");
if (z >= 7 && z <= 14) set(26, 20, z, "#784727");
if (z >= 5 && z <= 12) set(19, 24, z, "#80502b");
}
line(18, 23, 2, 14, 23, 1, 0, "#80502b");
line(30, 25, 2, 34, 25, 1, 0, "#80502b");
// One gently swaying crown, built from five overlapping round clumps.
part("crown", [24, 24, 17]);
sphere(24, 24, 26, 12, "#61bf39");
sphere(13, 24, 26, 10, "#56b636");
sphere(35, 24, 27, 10, "#62c13b");
sphere(24, 15, 26, 10, "#59ba36");
sphere(24, 33, 27, 10, "#51ad35");
// Broad sunlit tops, rich green undersides, and tiny leafy highlights.
forEach((x, y, z, color) => {
if (z < 16 || color[1] === "a" || color[1] === "9") return;
const ripple = Math.sin(x * 0.57 + y * 0.38) * 1.5;
const height = z + ripple + (24 - y) * 0.035;
let leaf = height >= 31 ? "#83dc49" :
height >= 26 ? "#64c83d" : "#409d34";
if (rand() < 0.12) {
leaf = height >= 29 ? "#98e75a" :
height >= 24 ? "#76d348" : "#51ae37";
}
set(x, y, z, leaf);
});
animate("crown", { type: "swing", axis: "y", speed: 1.2, amplitude: 0.08 });import { draw } from "./assets/voxel";
import { roble } from "./assets/roble";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, roble, 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 roble
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["roble"] })
# It lands in client/assets/roble.ts
# https://fogon.page/object/roble