← Piezas de nivel 2Objeto 3Dfogon/nivel-pared-de-hielo
Pared de hielo
Arrastrá para girarlo// «Pared de hielo» · gpt-6-sol (medium)
// A modular wall segment: exactly 48 blocks long on x (x 0..47), 10 thick on y (y 19..28), 40 tall, with flat clean ends so segments join seamlessly. Big translucent-looking ice bricks (8-12 wide, 6 tall) in pale cyan and sky blue with white edges and a few white cracks, light frosty highlights near the top, and small icicles hanging 2-4 blocks down from the top edge on the front face; the top has a soft white snow cap 2 blocks thick.
// Modular ice wall: x 0..47, y 19..28, z 0..39.
const ice = ["#91dcf0", "#a4e8f5", "#81d0eb", "#b6edfa"];
const edge = "#ddfaff";
const mortar = "#c9f3fb";
const shadow = "#65bddc";
// Six courses of large, staggered ice bricks.
const courses = [
[12, 12, 12, 12],
[8, 10, 10, 10, 10]
];
for (let z = 0; z < 36; z++) {
const row = Math.floor(z / 6);
const widths = courses[row % 2];
for (let x = 0; x < 48; x++) {
let start = 0, brick = 0;
while (x >= start + widths[brick]) start += widths[brick++];
const offset = x - start;
for (let y = 19; y <= 28; y++) {
let color = ice[(brick * 3 + row * 2) % ice.length];
// Fine, bright joints and crisp bevels on both visible faces.
if (z % 6 === 0) color = mortar;
else if (offset === 0) color = edge;
else if (z % 6 === 5) color = shadow;
else if (y === 19 || y === 28) {
if (z % 6 === 1) color = "#c4f3fb";
else if (offset === 1) color = "#bceff9";
else if (rand() < 0.025) color = "#cff5fb";
}
set(x, y, z, color);
}
}
}
// A pale frosted rim beneath the snow, still within the exact footprint.
for (let x = 0; x < 48; x++) {
for (let y = 19; y <= 28; y++) {
set(x, y, 36, "#a9e8f4");
set(x, y, 37, y === 19 || y === 28 ? "#e1faff" : "#c5f1fa");
}
}
// A few short, branching white cracks on the front bricks.
const cracks = [
[5, 3], [27, 9], [40, 15], [15, 21],
[35, 27], [9, 33], [44, 33]
];
for (const [x, z] of cracks) {
set(x, 19, z, "#f0feff");
set(x + 1, 19, z + 1, "#e4fbff");
set(x + 2, 19, z + 1, "#f0feff");
if (z % 6 < 4) set(x + 2, 19, z + 2, "#d7f7ff");
}
// Icicles descend from the front edge, without extending the footprint.
for (const [x, length] of [[3, 3], [10, 4], [18, 3], [25, 4], [33, 3], [41, 4], [46, 3]]) {
for (let i = 0; i < length; i++) {
set(x, 19, 37 - i, i === length - 1 ? "#e9fcff" : "#f2feff");
if (i < 2 && x < 47) set(x + 1, 19, 37 - i, "#c9f4fc");
}
}
// Clean, two-block-thick snow cap with a softly shaded lower layer.
for (let x = 0; x < 48; x++) {
for (let y = 19; y <= 28; y++) {
set(x, y, 38, y === 19 ? "#f5feff" : "#dff7fc");
set(x, y, 39, rand() < 0.035 ? "#eafaff" : "#ffffff");
}
}import { draw } from "./assets/voxel";
import { nivelParedDeHielo } from "./assets/nivel-pared-de-hielo";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, nivelParedDeHielo, 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 nivel-pared-de-hielo
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["nivel-pared-de-hielo"] })
# Queda en client/assets/nivel-pared-de-hielo.ts
# https://fogon.page/object/nivel-pared-de-hielo