← AsiáticoObjeto 3Dfogon/campana-de-templo
Campana de templo
Arrastrá para girarlo// «Campana de templo» · gpt-6-sol (medium)
// A big bronze temple bell hanging inside a small open wooden tower with a tiled roof, and a horizontal log striker hanging beside it on ropes. The bell is the moving part.
// Stone plinth and front steps
box(5, 5, 0, 42, 42, 1, "#b4b0a0");
box(6, 6, 2, 41, 41, 2, "#ded9c6");
box(16, 2, 0, 31, 5, 0, "#aaa89b");
box(16, 4, 1, 31, 5, 1, "#d4cfbd");
for (let x = 7; x <= 40; x += 6) {
set(x, 6, 2, "#eee9d8");
set(x, 41, 2, "#eee9d8");
}
// Four red lacquered posts, on stone feet
for (const x of [8, 39]) for (const y of [8, 39]) {
box(x - 2, y - 2, 3, x + 2, y + 2, 4, "#e7dfc9");
box(x - 1, y - 1, 5, x + 1, y + 1, 35, "#8d2924");
box(x - 1, y - 1, 5, x, y - 1, 35, "#bf4030");
box(x - 1, y - 1, 5, x + 1, y + 1, 6, "#d19a45");
box(x - 1, y - 1, 31, x + 1, y + 1, 32, "#d19a45");
}
// Open lower railings, leaving the front clear
for (const y of [8, 39]) {
box(9, y, 8, 38, y, 9, "#a33329");
box(9, y, 8, 38, y, 8, "#d29a47");
}
for (const x of [8, 39]) {
box(x, 9, 8, x, 38, 9, "#a33329");
box(x, 9, 8, x, 38, 8, "#d29a47");
}
for (let x = 13; x <= 35; x += 7)
box(x, 39, 4, x + 1, 39, 8, "#a33329");
for (let y = 15; y <= 33; y += 8)
for (const x of [8, 39])
box(x, y, 4, x, y + 1, 8, "#a33329");
// Heavy beams, brackets, and the bell's stationary support
for (const y of [8, 39]) {
box(7, y - 1, 33, 40, y + 1, 35, "#922d27");
box(7, y - 1, 33, 40, y - 1, 33, "#d3a04c");
}
for (const x of [8, 39])
box(x - 1, 8, 33, x + 1, 39, 35, "#982e27");
box(8, 23, 33, 39, 25, 35, "#a7372b");
box(9, 23, 33, 38, 23, 33, "#dea84d");
for (const x of [12, 35]) for (const y of [8, 39]) {
line(x, y, 32, x + (x < 24 ? 3 : -3), y, 35, 1, "#be4933");
}
// Glazed hip-gable roof: layered tiles, raised seams, curled eaves
for (let x = 2; x <= 45; x++) for (let y = 2; y <= 45; y++) {
const dx = Math.abs(x - 23.5), dy = Math.abs(y - 23.5);
let z = 44
- Math.round(Math.max(0, dy - 2) * 0.43)
- Math.round(Math.max(0, dx - 12) * 0.23);
if (dy >= 19) z += 1;
if (dy >= 21 && dx >= 18) z += 1;
set(x, y, z - 1, "#33483a");
const seam = x % 4 === 0;
const course = y % 4 === 0;
const tile = seam ? "#263f35"
: course ? "#44705a"
: rand() < 0.11 ? "#58836b" : "#365c4b";
set(x, y, z, tile);
if (seam && dy < 20) set(x, y, z + 1, "#4c765f");
}
// Golden fascia follows the lifted perimeter
for (let x = 2; x <= 45; x++) for (const y of [2, 45]) {
const dx = Math.abs(x - 23.5), dy = Math.abs(y - 23.5);
const z = 44 - Math.round(Math.max(0, dy - 2) * 0.43)
- Math.round(Math.max(0, dx - 12) * 0.23)
+ 1 + (dx >= 18 ? 1 : 0);
set(x, y, z - 1, "#ba9145");
}
for (let x = 12; x <= 35; x++) {
box(x, 22, 45, x, 25, 45, x % 4 === 0 ? "#d5aa59" : "#31513f");
}
for (const x of [2, 45]) for (const y of [2, 45])
sphere(x, y, 38, 1, "#d7ad5b");
// Suspended horizontal wooden striker, in front of the bell
for (const x of [16, 33]) {
line(x, 11, 33, x, 11, 21, 0, "#d7ad69");
line(x + 1, 11, 32, x + 1, 11, 21, 0, "#79502b");
}
cylinder(13, 11, 18, 2, 23, "#925126", "x");
box(14, 9, 19, 35, 9, 19, "#b87535");
for (const x of [13, 35]) {
cylinder(x, 11, 18, 2, 1, "#60371f", "x");
set(x, 11, 18, "#c68d48");
}
for (const x of [16, 33]) {
box(x - 1, 9, 19, x + 1, 13, 20, "#bc8845");
set(x, 9, 20, "#e0b66b");
}
// Only the bronze bell swings; its pivot is at the top hanger
part("bell", [24, 24, 34]);
box(23, 23, 31, 25, 25, 34, "#b97731");
box(23, 23, 33, 25, 23, 34, "#e2af5e");
cylinder(24, 24, 30, 4, 2, "#a7662e");
// Broad flared mouth, rounded shoulders, and a dark hollow underside
for (let z = 12; z <= 30; z++) {
let r;
if (z <= 15) r = 11.6 - (z - 12) * 0.12;
else if (z <= 20) r = 11.2 - (z - 15) * 0.26;
else if (z <= 25) r = 9.9 - (z - 20) * 0.28;
else r = 8.5 - (z - 25) * 0.79;
for (let x = 11; x <= 37; x++) for (let y = 11; y <= 37; y++) {
const d = Math.hypot(x - 24, y - 24);
if (d > r || (z <= 16 && d < r - 2.2)) continue;
let color = z <= 15 ? "#96511f"
: z <= 20 ? "#b46d2d"
: z <= 25 ? "#c48237" : "#cf9143";
if (y < 21 && rand() < 0.18) color = "#dfa250";
if (rand() < 0.065) color = "#88491e";
if (z === 12 || z === 13 || z === 19 || z === 25)
color = y < 24 ? "#e6ae58" : "#b87630";
if (z <= 16 && d < r - 0.8) color = "#63391f";
set(x, y, z, color);
}
}
// Raised lip and bronze ornament on the visible front
for (let x = 17; x <= 31; x++) {
set(x, 13, 13, "#e8b35e");
if (x >= 19 && x <= 29) set(x, 14, 19, "#e0a650");
}
for (const x of [19, 24, 29]) {
box(x, 15, 21, x + 1, 15, 24, "#a55b25");
set(x, 14, 22, "#edbd69");
set(x + 1, 14, 23, "#d99b48");
}
for (const x of [17, 31]) {
sphere(x, 18, 22, 1, "#e2a954");
set(x, 17, 22, "#915020");
}
for (const x of [21, 27]) {
set(x, 16, 27, "#edbc67");
set(x + 1, 16, 28, "#edbc67");
}
animate("bell", { type: "swing", axis: "x", speed: 1.2, amplitude: 0.26 });import { draw } from "./assets/voxel";
import { campanaDeTemplo } from "./assets/campana-de-templo";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, campanaDeTemplo, 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 campana-de-templo
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["campana-de-templo"] })
# Queda en client/assets/campana-de-templo.ts
# https://fogon.page/object/campana-de-templo