← Fantasy3D assetfogon/pociones
Pociones
Drag to turn it// «Pociones» · gpt-6-sol (medium)
// Three big chunky potion bottles standing side by side on a thick wooden shelf board, filling the frame: on the left a big round-bellied flask (sphere about 14 blocks wide) with a short neck and a brown cork, FILLED almost to the top with solid glowing bright green liquid; in the middle a tall bottle (cylinder) with a long neck, filled with solid deep red liquid; on the right a small square bottle filled with solid blue-violet liquid. The glass is only a thin 1-block outline in pale light blue at the rims, necks and the empty top part; the colored liquid is solid and fills most of each bottle so the three colors read clearly. Brown corks, a small cream paper label on the big flask.
const wood = "#54372f", woodLight = "#825642", woodDark = "#36272b";
const glass = "#b9e9ed", glassShade = "#78b8c7", glassBright = "#e4ffff";
const gold = "#d6ab65";
function circle(cx, cy, z, r, color) {
for (let x = Math.ceil(cx-r); x <= Math.floor(cx+r); x++)
for (let y = Math.ceil(cy-r); y <= Math.floor(cy+r); y++)
if ((x-cx)**2 + (y-cy)**2 <= r*r) set(x,y,z,color);
}
// A thick, weathered shelf with a broad front edge.
box(2,14,0,45,34,3,wood);
box(1,13,3,46,35,4,woodLight);
box(2,14,4,45,34,4,"#98704d");
box(2,13,0,45,13,2,woodDark);
box(3,13,2,44,13,2,"#a6754e");
box(3,13,0,44,13,0,"#674333");
for (let x=5; x<=42; x+=9) {
box(x,13,1,x+4,13,1,"#704932");
set(x+2,12,2,gold);
}
for (let i=0; i<100; i++) {
const x=3+Math.floor(rand()*42), y=15+Math.floor(rand()*19);
set(x,y,4,rand()<0.5?"#a27a53":"#795239");
}
box(2,14,4,2,34,4,"#bb8a59");
box(45,14,4,45,34,4,"#684735");
// Left flask: a round, nearly full belly and an outlined glass neck.
for (let x=2; x<=18; x++)
for (let y=17; y<=31; y++)
for (let z=5; z<=25; z++) {
const d=((x-10)/8)**2+((y-24)/7)**2+((z-15)/10)**2;
if (d<=1 && (
d>=0.77 && (Math.abs(x-10)>=6 || y>=28 || z<=6 || z>=23)
)) set(x,y,z, z>=22?glass:glassShade);
}
for (let z=24; z<=33; z++) {
for (let x=7; x<=13; x++)
for (let y=21; y<=27; y++) {
const d=((x-10)/3)**2+((y-24)/3)**2;
if (d<=1.2 && d>=0.43) set(x,y,z,z>=30?glass:glassShade);
}
}
circle(10,24,33,3.3,glassBright);
circle(10,24,34,2.2,"#774d35");
cylinder(10,24,34,2.5,4,"#8b5a38");
circle(10,24,37,2.5,"#b58452");
for (let z=35;z<=36;z++) {
set(8,22,z,"#bc8d5c");
set(12,22,z,"#583c30");
}
// Middle bottle: tall cylindrical body, sloping shoulders and long neck.
for (let z=5;z<=29;z++) {
for (let x=20;x<=32;x++)
for (let y=18;y<=30;y++) {
const d=(x-26)**2+(y-24)**2;
if (d<=36 && d>=25 && (Math.abs(x-26)>=5 || y>=27 || z<=6 || z>=28))
set(x,y,z,z>=28?glass:glassShade);
}
}
for (let z=30;z<=33;z++) {
const r=6-(z-29)*0.72;
for (let x=20;x<=32;x++)
for (let y=18;y<=30;y++) {
const d=(x-26)**2+(y-24)**2;
if (d<=r*r && d>=(r-1.1)**2) set(x,y,z,glass);
}
}
for (let z=33;z<=39;z++)
for (let x=23;x<=29;x++)
for (let y=21;y<=27;y++) {
const d=(x-26)**2+(y-24)**2;
if (d<=9 && d>=3.5) set(x,y,z,z>=37?glassBright:glassShade);
}
circle(26,24,39,3.2,glassBright);
cylinder(26,24,40,2.4,4,"#865339");
circle(26,24,43,2.5,"#b48555");
set(24,22,41,"#b88758");
// Right bottle: squared-off violet glass.
box(35,19,5,45,29,5,glassShade);
box(35,19,21,45,29,21,glass);
for (let z=6;z<=20;z++) {
box(35,19,z,35,29,z,glassShade);
box(45,19,z,45,29,z,glassShade);
box(36,29,z,44,29,z,glassShade);
}
box(36,19,20,44,19,20,glassBright);
for (let z=22;z<=24;z++) {
const inset=z-21;
box(35+inset,20+inset,z,45-inset,28-inset,z,glass);
}
for (let z=24;z<=29;z++) {
box(38,22,z,38,26,z,glassShade);
box(42,22,z,42,26,z,glassShade);
box(39,26,z,41,26,z,glass);
}
box(38,22,29,42,26,29,glassBright);
box(39,23,30,41,25,32,"#875739");
box(39,23,32,41,25,32,"#b78654");
// Each solid liquid has its own independently animated, single-hue palette.
part("green liquid",[10,24,15]);
for (let x=3;x<=17;x++)
for (let y=18;y<=30;y++)
for (let z=6;z<=23;z++) {
const d=((x-10)/7.1)**2+((y-24)/6.1)**2+((z-15)/9)**2;
if (d<=1) set(x,y,z,rand()<0.15?"#b6ff8a":"#3ddc4a");
}
for (let z=23;z<=29;z++)
circle(10,24,z,1.75,"#7cff6b");
animate("green liquid",{
type:"colors",palette:["#3ddc4a","#7cff6b","#b6ff8a"],
pattern:"wave",glow:0.6
});
part("red liquid",[26,24,19]);
for (let z=6;z<=27;z++) circle(26,24,z,4.9,rand()<0.3?"#ff4060":"#c81e3a");
for (let z=28;z<=32;z++)
circle(26,24,z,Math.max(1.9,5-(z-27)*0.65),"#ff4060");
for (let z=33;z<=36;z++) circle(26,24,z,1.8,"#c81e3a");
animate("red liquid",{
type:"colors",palette:["#c81e3a","#ff4060","#ff7a8a"],
pattern:"wave",glow:0.6
});
part("violet liquid",[40,24,14]);
box(36,19,6,44,28,19,"#5b3fd6");
box(37,20,20,43,27,21,"#8a6bff");
box(38,22,22,42,26,23,"#5b3fd6");
box(39,23,24,41,25,26,"#8a6bff");
animate("violet liquid",{
type:"colors",palette:["#5b3fd6","#8a6bff","#b9a3ff"],
pattern:"wave",glow:0.6
});
part("body",[0,0,0]);
// Sparse bright glass glints leave the colorful contents clearly visible.
line(4,20,17,5,19,20,0,glassBright);
line(7,19,22,8,18,23,0,glassBright);
line(21,20,12,21,20,23,0,glassBright);
line(24,21,35,24,21,38,0,glassBright);
line(36,19,10,36,19,17,0,glassBright);
set(44,19,19,glassBright);
// Cream paper label, fixed to the front of the round flask.
box(7,16,11,13,16,16,"#b38d62");
box(8,15,12,12,15,15,"#f4dfaa");
box(9,14,13,11,14,14,"#ead19a");
set(10,13,13,"#548b49");
set(10,13,14,"#548b49");
set(9,13,14,"#79a75b");
set(11,13,14,"#79a75b");
set(10,13,15,"#bd914d");import { draw } from "./assets/voxel";
import { pociones } from "./assets/pociones";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, pociones, 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 pociones
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["pociones"] })
# It lands in client/assets/pociones.ts
# https://fogon.page/object/pociones