← Casa completaObjeto 3Dfogon/tele-plana
Tele plana
Arrastrá para girarlo// «Tele plana» · gpt-6-sol (medium)
// A flat-screen TV on a small stand: a wide thin black rectangular screen with a slim bezel standing on a short silver foot, the screen showing a bright cartoon picture (blue sky, green hill, a yellow sun).
// Silver pedestal and weighted foot
box(16, 18, 0, 31, 28, 1, "#aeb8bd");
box(17, 18, 2, 30, 27, 2, "#e0e7e8");
box(18, 19, 3, 29, 26, 3, "#c5d0d2");
box(21, 20, 4, 26, 24, 10, "#aab6bb");
box(22, 20, 4, 25, 20, 10, "#e6eded");
box(22, 19, 10, 25, 24, 12, "#c9d3d5");
// Thin TV housing
box(4, 18, 11, 43, 21, 37, "#22292e");
box(5, 21, 12, 42, 21, 36, "#3d464a");
box(4, 17, 11, 43, 17, 37, "#30383d");
box(5, 16, 12, 42, 16, 36, "#11191d");
// Soft highlights along the bezel
box(5, 16, 37, 42, 16, 37, "#626d70");
box(4, 17, 13, 4, 17, 36, "#505b60");
box(43, 17, 12, 43, 17, 36, "#171e22");
box(6, 15, 11, 14, 15, 11, "#434c50");
set(39, 15, 11, "#91dd9c");
set(40, 15, 11, "#d1f5c9");
// The picture is a separate, animated screen surface.
part("screen", [24, 16, 24]);
for (let x = 6; x <= 41; x++) {
const leftHill = 15 + Math.max(0, 8 - Math.floor(Math.abs(x - 15) * 0.55));
const rightHill = 14 + Math.max(0, 6 - Math.floor(Math.abs(x - 36) * 0.6));
for (let z = 13; z <= 35; z++) {
let color;
if (z <= leftHill) {
color = z < 16 ? "#5da950" : "#83c961";
} else if (z <= rightHill) {
color = "#a4d878";
} else {
color = z > 29 ? "#89d9f4" : "#74c8ef";
if (rand() < 0.035) color = "#a2e2f5";
}
set(x, 15, z, color);
}
}
// Golden cartoon sun with a warm center
for (let x = 28; x <= 39; x++) {
for (let z = 24; z <= 35; z++) {
const d = Math.hypot(x - 34, z - 30);
if (d <= 4.4) set(x, 15, z, d < 2.5 ? "#ffe977" : "#ffd34f");
else if (d < 5.7 && (x === 34 || z === 30 || Math.abs(x - 34) === Math.abs(z - 30)))
set(x, 15, z, "#ffe681");
}
}
// Two puffy clouds
for (const [cx, cz] of [[13, 31], [23, 33]]) {
for (let x = cx - 5; x <= cx + 5; x++) {
for (let z = cz - 2; z <= cz + 2; z++) {
if (((x - cx) / 5) ** 2 + ((z - cz) / 2.4) ** 2 <= 1)
set(x, 15, z, z === cz - 2 ? "#dff5fa" : "#fff9ed");
}
}
set(cx - 2, 15, cz + 2, "#fff9ed");
set(cx + 1, 15, cz + 3, "#fff9ed");
}
// Tiny cheerful flowers in the grass
for (const [x, z] of [[10, 16], [25, 15], [38, 16]]) {
set(x, 15, z, "#fff1a8");
set(x - 1, 15, z, "#f5a7b8");
set(x + 1, 15, z, "#f5a7b8");
set(x, 15, z + 1, "#f5a7b8");
}
animate("screen", {
type: "colors",
palette: ["#78cff3", "#a4e2f6", "#83ca72", "#ffe16d", "#f5aec4"],
pattern: "wave",
glow: 0.5
});import { draw } from "./assets/voxel";
import { telePlana } from "./assets/tele-plana";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, telePlana, 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 tele-plana
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["tele-plana"] })
# Queda en client/assets/tele-plana.ts
# https://fogon.page/object/tele-plana