← Monsters and enemies3D assetfogon/ojo-flotante
Ojo flotante
Drag to turn it// «Ojo flotante» · gpt-6-sol (medium)
// A floating cartoon eye monster: a big round purple fleshy ball with one huge eye on the front (-y): white with a glowing red iris and black pupil, an angry eyelid, and six short wiggly tentacles hanging below. It floats above the floor.
// Floating one-eyed monster
part("body", [24, 25, 29]);
sphere(24, 25, 29, 16, "#8236ba");
// Shade the round body, with a little variation on its surface.
forEach((x, y, z, color) => {
if (color !== "#8236ba") return;
const exposed =
!get(x - 1, y, z) || !get(x + 1, y, z) ||
!get(x, y - 1, z) || !get(x, y + 1, z) ||
!get(x, y, z - 1) || !get(x, y, z + 1);
if (!exposed) return;
if (z < 23) set(x, y, z, rand() < 0.16 ? "#63268f" : "#7130a4");
else if (z > 35 && rand() < 0.72) set(x, y, z, "#a34bd0");
else if (rand() < 0.07) set(x, y, z, "#9845c5");
});
// Small fleshy bumps and a highlight across the crown.
sphere(12, 23, 36, 2, "#a34bd0");
sphere(36, 28, 34, 2, "#7130a4");
sphere(18, 32, 42, 2, "#a34bd0");
line(17, 18, 42, 24, 17, 44, 1, "#b45bdd");
// Bold socket, white eyeball, and glowing red iris.
ellipsoid(24, 9, 30, 12, 5, 11, "#512077");
ellipsoid(24, 7, 30, 10.5, 4.5, 9.5, "#c9c9db");
ellipsoid(24, 6, 31, 9.5, 3.8, 8.5, "#fffaf2");
ellipsoid(25, 3.2, 29, 6.4, 2.4, 6.4, "#8b193e");
ellipsoid(25, 2.6, 29, 5.4, 2.1, 5.4, "#ff5345");
ellipsoid(25, 1.9, 29, 4.1, 1.5, 4.2, "#ef2539");
ellipsoid(25, 1.1, 29, 2.8, 1.2, 3.2, "#17101f");
sphere(23, 0, 31, 1.3, "#ffffff");
set(27, 0, 27, "#ffb5a1");
// A heavy, slanted brow makes the single eye look comically angry.
line(13, 7, 39, 20, 4, 38, 2, "#512077");
line(20, 4, 38, 30, 4, 35, 2.5, "#512077");
line(30, 4, 35, 35, 7, 38, 2, "#512077");
line(14, 7, 40, 20, 4, 39, 1, "#ad4cce");
line(20, 4, 39, 29, 4, 36, 1, "#ad4cce");
animate("body", { type: "bob", axis: "z", speed: 2, amplitude: 3 });
// Six chunky tentacles curl beneath the body. One reaches the floor at z=0.
part("tentacles", [24, 25, 15]);
const roots = [
[15, 19, -1, -2, 1],
[24, 17, 2, -1, 4],
[33, 19, 2, -2, 6],
[15, 30, -2, 2, 6],
[24, 33, -1, 2, 4],
[33, 30, 2, 2, 5]
];
for (const [x, y, dx, dy, tipZ] of roots) {
ellipsoid(x, y, 15, 3, 3, 3, "#67268f");
line(x, y, 15, x + dx, y + dy, 11, 2.2, "#8535b5");
line(x + dx, y + dy, 11, x + dx * 0.5, y + dy * 1.5, 8, 1.8, "#74309f");
line(x + dx * 0.5, y + dy * 1.5, 8,
x + dx * 1.4, y + dy * 1.7, tipZ, 1.3, "#64278e");
sphere(x + dx * 1.4, y + dy * 1.7, tipZ, 1.5, "#9c43c3");
set(x - 1, y - 1, 15, "#ad55d0");
}
// Ensure the lowest tentacle has a block on the floor.
set(14, 16, 0, "#9c43c3");
animate("tentacles", { type: "swing", axis: "y", speed: 2, amplitude: 0.2 });import { draw } from "./assets/voxel";
import { ojoFlotante } from "./assets/ojo-flotante";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, ojoFlotante, 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 ojo-flotante
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["ojo-flotante"] })
# It lands in client/assets/ojo-flotante.ts
# https://fogon.page/object/ojo-flotante