← Whole house3D assetfogon/telefono-fijo
Teléfono fijo
Drag to turn it// «Teléfono fijo» · gpt-6-sol (medium)
// A retro rotary telephone: a chunky red phone body with a round white dial with holes on the front, and the curved handset resting on top, connected by a curly cord. Sitting on a small wooden side table.
const wood = "#bd8248", woodLight = "#d89b58", woodDark = "#8e5833";
const red = "#cf3640", redLight = "#ed5660", redDark = "#a92636";
const cream = "#fff5df", ivory = "#e9dfce", shadow = "#594c4b";
// Small wooden side table.
box(8, 11, 0, 12, 15, 15, woodDark);
box(35, 11, 0, 39, 15, 15, woodDark);
box(8, 32, 0, 12, 36, 15, woodDark);
box(35, 32, 0, 39, 36, 15, woodDark);
for (const x of [9, 36]) for (const y of [12, 33])
box(x, y, 1, x + 1, y + 1, 13, wood);
box(10, 14, 4, 37, 34, 5, wood);
box(11, 15, 5, 36, 33, 5, woodLight);
box(7, 10, 11, 40, 37, 15, woodDark);
box(5, 8, 15, 42, 39, 16, wood);
box(6, 9, 17, 41, 38, 17, woodLight);
box(6, 8, 16, 41, 8, 16, "#ecc083");
box(15, 9, 10, 32, 9, 14, wood);
box(16, 8, 11, 31, 8, 13, woodLight);
box(17, 7, 12, 30, 7, 12, woodDark);
sphere(24, 7, 12, 1.5, "#f5d389");
set(24, 6, 12, cream);
// Subtle grain on the table.
for (let i = 0; i < 36; i++) {
const x = 7 + Math.floor(rand() * 33);
const y = 10 + Math.floor(rand() * 27);
if (get(x, y, 17)) set(x, y, 17, rand() < 0.5 ? "#dfa767" : "#c4894d");
}
for (let i = 0; i < 13; i++) {
const x = 7 + Math.floor(rand() * 33);
set(x, 8, 16, rand() < 0.5 ? "#dca365" : "#ab6d3e");
}
// Rounded, chunky red telephone base.
box(13, 17, 18, 35, 33, 24, redDark);
box(12, 19, 19, 36, 32, 25, red);
ellipsoid(24, 25, 25, 12, 9, 5, red);
box(15, 22, 26, 33, 32, 29, red);
ellipsoid(24, 26, 28, 10, 7, 3, redLight);
box(14, 18, 18, 34, 32, 19, "#b32b38");
line(14, 18, 20, 14, 30, 20, 0, redLight);
line(34, 19, 20, 34, 30, 20, 0, redDark);
// A little shine along the upper shoulders.
line(16, 19, 28, 19, 20, 30, 0, "#f56a6b");
line(29, 21, 30, 33, 22, 28, 0, "#f06469");
// Front-facing rotary dial: pale rim, ten recessed finger holes.
cylinder(24, 13, 25, 7.6, 4, "#b8aeb0", "y");
cylinder(24, 12, 25, 7, 3, ivory, "y");
cylinder(24, 11, 25, 6.5, 2, cream, "y");
for (let i = 0; i < 10; i++) {
const a = (i / 10) * Math.PI * 2 - Math.PI / 2;
const x = Math.round(24 + 4.7 * Math.cos(a));
const z = Math.round(25 + 4.7 * Math.sin(a));
cylinder(x, 10, z, 1.35, 2, shadow, "y");
set(x, 9, z, "#dbcfc2");
}
cylinder(24, 9, 25, 2.25, 4, redDark, "y");
cylinder(24, 8, 25, 1.45, 2, redLight, "y");
set(24, 7, 25, "#ff8180");
line(29, 9, 20, 31, 9, 22, 0, "#a9a2a0");
set(30, 8, 20, cream);
// Two dark rests beneath the receiver.
for (const x of [16, 32]) {
box(x - 2, 22, 29, x + 2, 27, 31, redDark);
box(x - 1, 23, 31, x + 1, 26, 33, shadow);
}
// Curved handset, with generous rounded ends.
line(11, 24, 33, 15, 24, 36, 2, redDark);
line(15, 24, 36, 20, 24, 38, 2, red);
line(20, 24, 38, 28, 24, 38, 2, red);
line(28, 24, 38, 33, 24, 36, 2, red);
line(33, 24, 36, 37, 24, 33, 2, redDark);
line(19, 23, 39, 29, 23, 39, 0, "#f36c70");
for (const x of [11, 37]) {
cylinder(x, 24, 30, 3.4, 5, redDark);
cylinder(x, 24, 31, 3, 4, red);
cylinder(x, 24, 29, 2.5, 1, "#e9c9bd");
cylinder(x, 24, 28, 1.7, 1, shadow);
cylinder(x, 24, 27, 0.8, 1, "#998987");
}
// Curly charcoal cord draped beside the phone.
line(13, 17, 21, 10, 16, 21, 0, shadow);
let previous = [10, 16, 21];
for (let i = 0; i <= 100; i++) {
const t = i / 100;
const a = t * Math.PI * 10;
const next = [
9.5 + 2 * Math.cos(a),
16 + 2 * Math.sin(a),
21 + 8.5 * t
];
line(previous[0], previous[1], previous[2],
next[0], next[1], next[2], 0, i % 9 === 0 ? "#796768" : shadow);
previous = next;
}
line(previous[0], previous[1], previous[2], 10, 21, 31, 0, shadow);
line(10, 21, 31, 11, 24, 32, 0, shadow);import { draw } from "./assets/voxel";
import { telefonoFijo } from "./assets/telefono-fijo";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, telefonoFijo, 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 telefono-fijo
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["telefono-fijo"] })
# It lands in client/assets/telefono-fijo.ts
# https://fogon.page/object/telefono-fijo