Skip to content
SkillModel-led2,290 tokens in use

threejs-materials-lighting

Light and shade three.js r187 scenes: PBR materials, key and fill lights, shadow cameras, HDR environment lighting and tone mapping.

9,684 stars on the repository Apache License 2.0gamedev-skills/awesome-gamedev-agent-skills · skills/web-engines/threejs-materials-lighting
npx skills add gamedev-skills/awesome-gamedev-agent-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing threejs-materials-lighting costs

91tokens idle
2,290tokens in use
3,970tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure25/25
  • Examples12/15
  • Output15/15
  • Size10/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity92
  • Maintenance96
  • Community60
  • Maturity24
  • Momentum40

This skill helps a coding agent make three.js surfaces read correctly. It picks a material (MeshStandardMaterial by default), builds a light rig of an environment or hemisphere fill plus one directional key, turns shadows on in the renderer, the light and the meshes, and sets colour spaces and tone mapping once.

It targets three.js r187, where lighting has been physically based since r155, so intensities copied from older tutorials come out too dark. It starts every debugging session by swapping in MeshNormalMaterial to tell a geometry problem from a lighting problem.

What You Get

  • Five code patterns: a PBR material under key and fill, an unlit textured material, shadows with a fitted shadow camera, a PBR texture set, and image-based lighting from an HDR file
  • A probe expression that lists lights, shadow casters, the environment, the tone mapping value and any colour maps missing sRGB
  • A gotcha list for black meshes, missing or blocky shadows, shadow acne, washed-out colour and a dark image after post-processing
  • A reference table of materials and lights with starting intensities, transparency sorting and RoomEnvironment lighting without an HDR file

Common Use Cases

  • Fixing a mesh that renders pure black
  • Adding a sun with shadows that cover the play area without blocky edges
  • Setting up HDR reflections so imported glTF models look right
  • Restoring brightness after adding EffectComposer post-processing

What Makes It Unique

The skill orders three.js debugging so that each step rules something out, starting with a normal material that proves the geometry is visible. It names the three switches shadows need, gives a starting key intensity for the post-r155 lighting model, and moves the light and its target with the player for large levels, because a bigger shadow frustum spreads the same shadow map over more ground.

Under The Hood

The agent loads the SKILL.md and reads the materials and lights reference only when it needs a lookup table. It edits your game source and runs the project build or type check. For the runtime check it exposes the renderer and scene on window and evaluates a probe expression in your local page, using Playwright if present or asking you to paste it into the browser console. It does not fetch web pages or call outside services.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers