← BásicoObjeto 3Dfogon/candelabro
Candelabro
Arrastrá para girarlo// «Candelabro» · gpt-6-sol (medium)
// Candelabra («Candelabro»).
// Gold and ivory five-light candelabrum.
const goldDark = "#92702e";
const goldShadow = "#ae8434";
const gold = "#c59a42";
const goldLight = "#dfb858";
const goldBright = "#f0d47e";
const ivory = "#eeeae0";
const waxShade = "#c9c6bc";
function rod(a, b, r = 1) {
line(...a, ...b, r, goldShadow);
if (r > 0) line(a[0], a[1] - 1, a[2] + 1, b[0], b[1] - 1, b[2] + 1, 0, goldLight);
}
function bead(x, y, z) {
box(x - 1, y - 1, z, x + 1, y + 1, z + 1, gold);
set(x, y - 1, z + 1, goldBright);
}
// Broad, low, stepped foot with bright raised edges.
box(14, 15, 0, 34, 33, 0, goldDark);
box(13, 16, 1, 35, 32, 1, goldShadow);
box(15, 15, 2, 33, 33, 2, goldLight);
box(17, 17, 3, 31, 31, 3, goldDark);
box(16, 18, 4, 32, 30, 4, gold);
box(19, 19, 5, 29, 29, 5, goldLight);
box(21, 21, 6, 27, 27, 7, goldShadow);
box(22, 22, 8, 26, 26, 9, gold);
for (const z of [1, 3, 5]) {
const inset = z === 1 ? 0 : z === 3 ? 3 : 5;
box(14 + inset, 15 + inset, z, 34 - inset, 15 + inset, z, goldBright);
box(14 + inset, 15 + inset, z, 14 + inset, 33 - inset, z, goldLight);
}
for (const x of [15, 33]) for (const y of [17, 31]) bead(x, y, 2);
// Turned central shaft.
box(22, 22, 10, 26, 26, 11, goldLight);
box(23, 23, 12, 25, 25, 26, goldShadow);
box(23, 22, 13, 23, 22, 25, goldLight);
box(22, 22, 16, 26, 26, 17, gold);
box(22, 22, 20, 26, 26, 21, goldLight);
box(22, 22, 26, 26, 26, 27, gold);
bead(24, 23, 13);
// Five ascending, open-work branches.
rod([23, 23, 17], [18, 23, 17]);
rod([18, 23, 17], [15, 24, 20]);
rod([15, 24, 20], [15, 24, 27]);
rod([24, 23, 19], [29, 23, 19]);
rod([29, 23, 19], [33, 22, 23]);
rod([33, 22, 23], [33, 22, 30]);
rod([18, 23, 16], [12, 21, 14]);
rod([12, 21, 14], [8, 19, 17]);
rod([8, 19, 17], [8, 19, 22]);
rod([29, 23, 18], [36, 25, 18]);
rod([36, 25, 18], [41, 27, 22]);
rod([41, 27, 22], [41, 27, 29]);
// Narrow gilded curls and cross-bracing between the larger arms.
line(15, 23, 20, 18, 22, 13, 0, goldBright);
line(18, 22, 13, 22, 22, 12, 0, gold);
line(8, 18, 18, 10, 18, 13, 0, goldLight);
line(10, 18, 13, 14, 21, 12, 0, gold);
line(15, 23, 25, 18, 23, 22, 0, goldLight);
line(18, 23, 22, 23, 23, 22, 0, gold);
line(26, 22, 22, 30, 21, 24, 0, goldLight);
line(30, 21, 24, 33, 21, 27, 0, gold);
line(32, 24, 14, 37, 26, 15, 0, goldBright);
line(37, 26, 15, 40, 26, 20, 0, gold);
line(34, 24, 21, 37, 25, 23, 0, goldLight);
line(37, 25, 23, 41, 26, 23, 0, gold);
for (const [x, y, z] of [
[15, 24, 19], [18, 23, 17], [8, 19, 17],
[29, 23, 19], [33, 22, 23], [36, 25, 18], [41, 27, 23]
]) bead(x, y, z);
// Each candle sits in a little flared, beaded gold socket.
function candle(x, y, cupZ, height) {
box(x - 1, y - 1, cupZ - 3, x + 1, y + 1, cupZ - 1, goldShadow);
box(x - 2, y - 2, cupZ, x + 2, y + 2, cupZ, gold);
box(x - 3, y - 2, cupZ + 1, x + 3, y + 2, cupZ + 1, goldLight);
box(x - 2, y - 1, cupZ + 2, x + 2, y + 1, cupZ + 2, goldShadow);
for (const dx of [-2, 2]) {
set(x + dx, y - 2, cupZ + 2, goldBright);
set(x + dx, y + 2, cupZ + 2, gold);
}
box(x - 1, y - 1, cupZ + 3, x + 1, y + 1, cupZ + height, waxShade);
box(x - 1, y - 1, cupZ + 4, x, y, cupZ + height, ivory);
box(x + 1, y - 1, cupZ + 4, x + 1, y, cupZ + height, "#faf8ef");
box(x - 1, y - 1, cupZ + height + 1, x + 1, y + 1, cupZ + height + 1, "#f7f4e9");
set(x, y - 1, cupZ + height + 1, "#b8aa88");
set(x, y, cupZ + height + 2, "#704d21");
// Small faceted amber flame.
set(x, y, cupZ + height + 3, "#b97615");
box(x, y, cupZ + height + 4, x, y, cupZ + height + 5, "#efa91e");
set(x, y - 1, cupZ + height + 4, "#ffd351");
set(x, y, cupZ + height + 6, "#ffdc65");
set(x + 1, y, cupZ + height + 4, "#d38b16");
}
candle(8, 19, 22, 7);
candle(15, 24, 27, 8);
candle(24, 23, 31, 7);
candle(33, 22, 30, 7);
candle(41, 27, 29, 7);import { draw } from "./assets/voxel";
import { candelabro } from "./assets/candelabro";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, candelabro, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: lo que mide en px su lado más largo
// angle: giro sobre el piso, en radianes
// t: segundos; si se mueve, se anima solo con eso# En una terminal, en la carpeta del juego
fogon assets add candelabro
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["candelabro"] })
# Queda en client/assets/candelabro.ts
# https://fogon.page/object/candelabro