agentleFS
wolffewolffe/three.js-skills/skills/character/character-model/SKILL.md

character-model

Skill4 starsChanged 15 days agoMITView on GitHub

A procedural blocky humanoid for Three.js 0.187.0 WebGPU, built from boxes with hip, knee and shoulder joints, with a walk cycle, crouch and airborne poses driven by the walker's state. Use when a third-person character needs a visible body without model files. Ships character-model.js.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not scale the root for crouch.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Character model

Target: Three.js 0.187.0 WebGPU, MeshStandardNodeMaterial, flat shading. No model files, no skinning, no animation clips: the figure is a small hierarchy of boxes and the animation is three numbers per frame.

scripts/character-model.js exports createCharacterModel(opts) returning { root, anchorHeight, height, setVisible, setTransform, update, setColors }.

Proportions

Everything is in studs of 0.3 m so the figure reads as a deliberate style, not a failed realistic one.

PartSize (w × h × d)Notes
head1.25 × 1.25 × 1.25 studscube on the shoulders
torso2 × 2 × 1 studs
arm1 × 2 × 1 studshangs from the shoulder joint
thigh, shin1 × 1 × 1 studs eachhip and knee joints

Total height 6.25 studs = 1.875 m; the walker capsule is 1.8 m, so the head just clears it. The orbit anchor is 45 % of the height from the feet (chest).

Joints are empty Groups at the shoulder line, the hips and the knees; the box meshes hang below them so rotating a joint swings the limb from its top. The root's origin is at the feet, on the ground.

Animation

update(dt, { speed, grounded, runSpeed }), three numbers and a flag:

  • swing amplitude eases toward min(1, speed/runSpeed) × 0.85 rad on the ground and toward 0 in the air, at 14 /s. Arms and legs swing in opposite phase; left and right in opposite phase.
  • phase advances by speed × 1.55 × dt, so stride length is constant and the cadence follows speed. Nothing animates while standing.
  • lift eases toward −1.1 rad when airborne: arms rise, legs trail. Landing eases back.
  • crouch (0..1 from the walker's crouch blend): thighs rotate −0.62 rad, knees +1.15 rad, the torso tips 0.14 rad, arms 0.18 rad; the whole upper body drops by the planted-leg geometry so the feet stay on the ground. Swing is reduced by 30 %.
  • A knee bends up to 0.45 rad extra on the trailing leg of each swing so the foot clears the ground.

That is enough to read as walking, running, jumping and sneaking from any distance the camera uses.

Placement

setTransform(feetY, x, z, heading, crouchT) once per frame from the walker: feet at the capsule centre minus the capsule half height, heading from the wish direction eased at 18 /s (the model turns to where it walks).

Materials and colours

Three flat-shaded standard materials (shirt, skin, trousers) with roughness 1 and fog enabled; setColors({ shirt, skin, pants }) changes them. Flat shading keeps the box edges crisp under any light. Keep the figure's materials shared across many figures: with WebGPU, pipeline count is load time.

Pitfalls

  • Hide the model in first person; otherwise the camera sees the inside of the head.
  • Do not scale the root for crouch; the pose handles it and keeps the feet planted.
  • Cast and receive shadows on every box; a figure without a contact shadow floats.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.