← Basics3D assetfogon/helicoptero
Helicóptero
Drag to turn it// «Helicóptero» · gpt-6-sol (medium)
// Helicopter («Helicóptero»).
// Helicopter — nose faces -y.
const yellow = "#e9b82e";
const gold = "#d29a21";
const darkGold = "#a9751d";
const navy = "#173a4c";
const blue = "#236179";
const lightBlue = "#35869a";
const steel = "#53616a";
const darkSteel = "#303b43";
// Rounded, solid yellow fuselage.
for (let y = 8; y <= 33; y++) {
for (let x = 14; x <= 34; x++) {
for (let z = 11; z <= 26; z++) {
const d =
((x - 24) / 10) ** 2 +
((y - 21) / 13.5) ** 2 +
((z - 18) / 8) ** 2;
if (d > 1) continue;
let color = z >= 21 ? "#f1c63b" : z < 15 ? darkGold : gold;
if (x < 20 && z >= 17) color = yellow;
if (rand() < 0.075) color = z >= 19 ? yellow : "#be8820";
set(x, y, z, color);
}
}
}
// Blunt yellow nose and the band beneath its windscreen.
ellipsoid(24, 11, 16, 8, 5, 5, gold);
box(20, 7, 14, 28, 9, 16, "#bb8722");
box(21, 7, 17, 27, 8, 18, "#e6b332");
for (let x = 19; x <= 29; x++) {
set(x, 9, 13, x % 3 === 0 ? "#c69428" : "#e2af2c");
}
// Large curved, faceted blue cockpit canopy.
for (let y = 8; y <= 24; y++) {
for (let x = 15; x <= 33; x++) {
for (let z = 17; z <= 28; z++) {
const d =
((x - 24) / 8.8) ** 2 +
((y - 16) / 9.1) ** 2 +
((z - 21) / 5.8) ** 2;
if (d > 1 || (y > 21 && z < 21)) continue;
let color = navy;
if (z >= 23 || x <= 20) color = blue;
if (z >= 25 && x <= 26) color = lightBlue;
if (y <= 12 && z < 22) color = "#204b60";
if (rand() < 0.13) color = z >= 22 ? "#397c8d" : "#285b71";
set(x, y, z, color);
}
}
}
// Chunky highlights tracing the glazed front and roof.
line(19, 10, 23, 22, 9, 25, 0, "#428ca0");
line(21, 9, 25, 25, 10, 26, 0, "#367c8f");
line(17, 15, 22, 17, 20, 24, 0, "#397b89");
line(30, 13, 24, 31, 18, 22, 0, "#163746");
// Side cabin windows, separated by thick golden pillars.
box(33, 23, 19, 34, 27, 23, navy);
box(34, 24, 21, 34, 26, 23, blue);
box(33, 28, 19, 34, 30, 22, "#214b5c");
box(33, 27, 17, 35, 27, 25, "#dca72b");
box(33, 23, 16, 34, 30, 17, "#b98620");
box(34, 29, 16, 35, 30, 17, "#a66b22");
set(35, 26, 17, "#e9d17a");
set(35, 27, 16, "#bc4931");
// Narrow yellow tail boom, rising gently from the cabin.
line(24, 30, 21, 24, 43, 24, 2, "#d4a12b");
box(22, 33, 22, 26, 41, 24, "#edc13a");
box(23, 35, 24, 25, 42, 24, "#f5d257");
line(22, 32, 21, 21, 39, 23, 0, "#ae7d20");
// Wide horizontal tailplane with red-orange tips.
box(13, 39, 23, 35, 41, 24, "#e9ca68");
box(17, 39, 24, 31, 41, 24, "#f6dc85");
box(12, 39, 23, 14, 41, 24, "#c85031");
box(34, 39, 23, 36, 41, 24, "#c85031");
box(15, 40, 22, 17, 41, 22, "#b99030");
// Upright tail fin and its little dark tail-rotor assembly.
box(23, 42, 24, 27, 45, 31, "#d4a329");
box(23, 43, 29, 27, 45, 32, "#edbd35");
box(24, 44, 33, 27, 45, 34, "#c95732");
box(28, 43, 29, 30, 44, 30, darkSteel);
line(29, 40, 30, 29, 46, 30, 0, "#36414a");
set(29, 43, 30, "#849092");
// Landing-skid struts: two pairs of outward-splayed steel legs.
for (const y of [16, 29]) {
line(20, y, 12, 16, y, 4, 1, steel);
line(28, y, 12, 32, y, 4, 1, steel);
line(20, y, 11, 16, y, 4, 0, "#889397");
line(28, y, 11, 32, y, 4, 0, "#889397");
box(19, y - 1, 11, 21, y + 1, 12, darkSteel);
box(27, y - 1, 11, 29, y + 1, 12, darkSteel);
}
for (const x of [15, 33]) {
line(x, 7, 2, x, 39, 2, 1, darkSteel);
line(x, 11, 3, x, 36, 3, 0, "#879195");
box(x - 1, 6, 1, x + 1, 10, 3, "#29343c");
box(x - 1, 37, 1, x + 1, 41, 3, "#29343c");
// Flat skid shoes touch the floor at z=0.
box(x - 1, 6, 0, x + 1, 10, 0, "#263139");
box(x - 1, 37, 0, x + 1, 41, 0, "#263139");
box(x, 7, 4, x, 9, 4, "#647078");
box(x, 38, 4, x, 40, 4, "#647078");
}
line(15, 16, 3, 33, 16, 3, 0, "#59656a");
line(15, 29, 3, 33, 29, 3, 0, "#59656a");
// Rotor mast and layered mechanical hub.
cylinder(24, 23, 26, 2, 8, darkSteel);
box(22, 21, 29, 26, 25, 32, "#425059");
box(21, 21, 32, 27, 25, 34, "#35424a");
box(23, 22, 34, 25, 24, 36, "#778187");
set(24, 23, 37, "#a7aca7");
// Four broad, straight, stationary rotor blades.
box(4, 22, 35, 20, 24, 36, "#303a42");
box(28, 22, 35, 44, 24, 36, "#303a42");
box(23, 5, 35, 25, 19, 36, "#354149");
box(23, 27, 35, 25, 40, 36, "#354149");
box(7, 22, 37, 18, 22, 37, "#58636a");
box(30, 22, 37, 41, 22, 37, "#58636a");
box(23, 8, 37, 23, 17, 37, "#59656b");
box(23, 29, 37, 23, 37, 37, "#59656b");
// Pale blade tips with small red safety markings.
box(3, 22, 35, 6, 24, 36, "#f2eee0");
box(3, 22, 36, 4, 24, 36, "#c9503d");
box(42, 22, 35, 45, 24, 36, "#f2eee0");
box(44, 22, 36, 45, 24, 36, "#cb503a");
box(23, 4, 35, 25, 7, 36, "#f1eee2");
box(23, 4, 36, 25, 5, 36, "#ca503d");
box(23, 38, 35, 25, 41, 36, "#f1eee2");
box(23, 40, 36, 25, 41, 36, "#ca503d");
box(21, 21, 35, 27, 25, 36, "#29353d");
box(23, 22, 37, 25, 24, 37, "#747f83");import { draw } from "./assets/voxel";
import { helicoptero } from "./assets/helicoptero";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, helicoptero, 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 helicoptero
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["helicoptero"] })
# It lands in client/assets/helicoptero.ts
# https://fogon.page/object/helicoptero