← Piratas y marObjeto 3Dfogon/capitan-pirata
Capitán pirata
Arrastrá para girarlo// «Capitán pirata» · gpt-6-sol (medium)
// A chunky cartoon pirate captain standing, facing -y: big black tricorn hat with a white skull and gold trim, long curly black beard, an eye patch, a long red coat with gold buttons over a white shirt, a wide brown belt with a gold buckle, black boots, holding a curved silver cutlass in the right hand.
// Chunky cartoon pirate captain, facing -y.
const RED = "#bd2630", RED_DARK = "#851e29", RED_LIGHT = "#e24443";
const GOLD = "#f4bd38", GOLD_LIGHT = "#ffe27a", GOLD_DARK = "#bd8024";
const BLACK = "#161820", BLACK_LIGHT = "#30313b";
const SKIN = "#e9ad74", SKIN_LIGHT = "#ffd09a";
const WHITE = "#fff4dd";
function trimButton(x, z) {
box(x, 16, z, x + 1, 16, z + 1, GOLD_DARK);
set(x, 15, z + 1, GOLD_LIGHT);
}
// Walking legs, each attached at its hip.
part("leftLeg", [20, 24, 15]);
box(17, 21, 7, 22, 28, 16, "#413b3c");
box(17, 20, 5, 22, 28, 10, BLACK);
box(16, 19, 0, 23, 29, 6, "#202129");
box(16, 17, 0, 23, 24, 3, BLACK);
box(17, 17, 1, 22, 17, 2, BLACK_LIGHT);
box(16, 19, 6, 23, 28, 7, "#3a3031");
animate("leftLeg", { type: "swing", axis: "x", speed: 5, amplitude: 0.3 });
part("rightLeg", [28, 24, 15]);
box(26, 21, 7, 31, 28, 16, "#413b3c");
box(26, 20, 5, 31, 28, 10, BLACK);
box(25, 19, 0, 32, 29, 6, "#202129");
box(25, 17, 0, 32, 24, 3, BLACK);
box(26, 17, 1, 31, 17, 2, BLACK_LIGHT);
box(25, 19, 6, 32, 28, 7, "#3a3031");
animate("rightLeg", { type: "swing", axis: "x", speed: -5, amplitude: 0.3 });
// Long coat and broad, rounded torso.
part("body");
ellipsoid(24, 24, 22, 9, 7, 9, RED_DARK);
box(16, 20, 13, 32, 29, 19, RED);
box(17, 18, 18, 31, 29, 28, RED);
box(18, 20, 28, 30, 29, 30, RED_LIGHT);
box(17, 17, 14, 21, 28, 20, RED_DARK);
box(28, 17, 14, 31, 28, 20, RED_DARK);
box(17, 18, 13, 20, 28, 14, GOLD_DARK);
box(29, 18, 13, 31, 28, 14, GOLD_DARK);
// Shirt visible between the open red lapels.
box(22, 17, 21, 27, 20, 29, WHITE);
box(23, 16, 27, 26, 17, 29, "#ffffff");
box(23, 16, 21, 25, 17, 26, "#e2e2dc");
line(19, 16, 29, 23, 16, 23, 1, RED_LIGHT);
line(29, 16, 29, 27, 16, 23, 1, RED_LIGHT);
line(19, 15, 28, 22, 15, 23, 0, GOLD);
line(29, 15, 28, 27, 15, 23, 0, GOLD);
for (const z of [22, 25, 28]) {
trimButton(20, z);
trimButton(28, z);
}
// Wide belt, square buckle and hanging coat tails.
box(17, 16, 18, 31, 19, 20, "#704128");
box(17, 16, 18, 31, 16, 18, "#9c6334");
box(22, 15, 17, 27, 16, 21, GOLD_DARK);
box(23, 14, 18, 26, 15, 20, GOLD_LIGHT);
box(24, 14, 19, 25, 14, 19, "#684029");
box(17, 17, 12, 20, 19, 17, RED);
box(29, 17, 12, 32, 19, 17, RED);
box(18, 16, 12, 19, 16, 15, GOLD_DARK);
box(30, 16, 12, 31, 16, 15, GOLD_DARK);
// Neck, round face, nose, and ears.
box(22, 21, 28, 26, 27, 32, SKIN);
ellipsoid(24, 23, 33, 6, 6, 5, SKIN);
ellipsoid(24, 18, 33, 4, 2, 3, SKIN_LIGHT);
box(23, 16, 31, 25, 18, 33, SKIN_LIGHT);
box(18, 19, 31, 19, 22, 34, SKIN);
box(29, 19, 31, 30, 22, 34, SKIN);
set(18, 18, 30, GOLD_LIGHT); // Earring.
set(18, 18, 29, GOLD_DARK);
// One bright eye and one unmistakable eye patch.
box(20, 16, 33, 22, 16, 34, "#fffdf2");
set(21, 15, 33, "#243a41");
set(21, 15, 34, BLACK);
box(26, 15, 32, 29, 16, 35, BLACK);
box(27, 14, 33, 28, 14, 34, BLACK_LIGHT);
line(28, 17, 35, 30, 24, 34, 0, BLACK);
line(25, 17, 35, 19, 23, 34, 0, BLACK);
// Big curly beard, moustache, and dangling ringlets.
ellipsoid(24, 19, 28, 6, 3, 4, BLACK);
box(19, 17, 28, 29, 19, 30, BLACK);
for (const [x, z, r] of [
[19, 28, 2], [22, 27, 2], [25, 26, 2],
[28, 27, 2], [30, 29, 1]
]) {
sphere(x, 17, z, r, BLACK);
set(x, 15, z + 1, BLACK_LIGHT);
}
line(20, 16, 31, 23, 15, 30, 1, BLACK);
line(25, 15, 30, 28, 16, 31, 1, BLACK);
set(23, 14, 30, "#f7e5c9"); // Grin peeking through.
// Oversized tricorn: broad brim and three high, upturned corners.
box(12, 16, 36, 36, 32, 38, BLACK);
box(10, 18, 37, 16, 29, 39, BLACK);
box(32, 18, 37, 38, 29, 39, BLACK);
box(17, 18, 38, 31, 31, 41, BLACK);
box(19, 19, 41, 29, 29, 43, BLACK);
box(21, 20, 43, 27, 27, 44, BLACK);
line(11, 19, 39, 17, 19, 42, 1, BLACK);
line(37, 19, 39, 31, 19, 42, 1, BLACK);
box(17, 15, 38, 31, 17, 40, BLACK);
box(20, 16, 40, 28, 18, 42, BLACK);
// Gold piping follows the curled brim and triangular crown.
line(11, 17, 38, 18, 15, 39, 0, GOLD);
line(18, 15, 39, 30, 15, 39, 0, GOLD);
line(30, 15, 39, 37, 17, 38, 0, GOLD);
line(12, 17, 39, 18, 17, 42, 0, GOLD_DARK);
line(30, 17, 42, 36, 17, 39, 0, GOLD_DARK);
line(19, 17, 42, 24, 17, 44, 0, GOLD);
line(24, 17, 44, 29, 17, 42, 0, GOLD);
// White skull-and-crossbones centered on the hat's front.
line(20, 14, 39, 28, 14, 42, 0, WHITE);
line(20, 14, 42, 28, 14, 39, 0, WHITE);
box(22, 13, 40, 26, 14, 42, WHITE);
box(23, 13, 39, 25, 14, 40, WHITE);
set(23, 12, 41, BLACK);
set(25, 12, 41, BLACK);
set(24, 12, 40, BLACK);
set(23, 12, 39, GOLD_DARK);
set(25, 12, 39, GOLD_DARK);
// Left arm and little open hand.
part("leftArm", [16, 24, 28]);
ellipsoid(15, 24, 25, 4, 5, 4, RED);
box(12, 20, 17, 17, 28, 25, RED_DARK);
box(12, 19, 20, 15, 22, 25, RED_LIGHT);
box(12, 19, 16, 17, 27, 18, GOLD_DARK);
box(13, 19, 13, 16, 23, 16, SKIN);
box(13, 18, 13, 15, 19, 15, SKIN_LIGHT);
animate("leftArm", { type: "swing", axis: "x", speed: -5, amplitude: 0.25 });
// Right arm, hand, and raised curved cutlass all move together.
part("rightArm", [32, 24, 28]);
ellipsoid(33, 24, 25, 4, 5, 4, RED);
box(32, 20, 17, 37, 28, 25, RED_DARK);
box(35, 19, 20, 38, 22, 25, RED_LIGHT);
box(32, 19, 16, 37, 27, 18, GOLD_DARK);
box(34, 18, 14, 38, 22, 17, SKIN);
box(36, 17, 15, 38, 18, 17, SKIN_LIGHT);
// Dark grip, bright basket guard, and broad silvery curved blade.
line(37, 17, 15, 39, 16, 20, 1, "#483029");
line(36, 16, 19, 40, 16, 20, 0, GOLD_LIGHT);
line(36, 16, 19, 37, 16, 16, 0, GOLD);
line(39, 16, 20, 41, 16, 24, 1, "#9daebb");
line(41, 16, 24, 43, 16, 29, 1, "#c8d6db");
line(43, 16, 29, 43, 16, 32, 1, "#c8d6db");
line(43, 16, 32, 41, 16, 35, 0, "#f5ffff");
line(39, 15, 21, 41, 15, 25, 0, "#f5ffff");
line(42, 15, 26, 43, 15, 31, 0, "#f5ffff");
animate("rightArm", { type: "swing", axis: "x", speed: 5, amplitude: 0.25 });import { draw } from "./assets/voxel";
import { capitanPirata } from "./assets/capitan-pirata";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, capitanPirata, 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 capitan-pirata
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["capitan-pirata"] })
# Queda en client/assets/capitan-pirata.ts
# https://fogon.page/object/capitan-pirata