mcpField
T
threejs-lighting

threejs-lighting

github.com/cesartevisualDevelopment11385 installsUpdated 7w ago
Repository

About threejs-lighting

threejs-lighting is a skill for planning and validating lighting and shadows in Three.js scenes. It covers environment lighting, shadow configuration, performance trade-offs, and visual checks, with guidance to consult version-specific documentation.

Key features

  1. 01Plan mood and material readability
  2. 02Configure environment lighting
  3. 03Tune shadow coverage and bias
  4. 04Choose baked or dynamic lighting
  5. 05Check artifacts and device cost

Use cases

  1. 01Lighting a PBR subject
  2. 02Reducing shadow artifacts
  3. 03Evaluating shadow cost on a target device

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/cesartevisual/threejs-skills --skill threejs-lighting

After installing, type/threejs-lightingin Claude Code to confirm it loaded.

Details

From the project README

Lighting and Shadows

Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions.

Establish the intended mood and material readability before adding lights. For a PBR subject, test an environment plus a controlled key light. Metallic surfaces need reflected surroundings; increasing ambient intensity is not a substitute for meaningful reflection.

Use environment preprocessing and mapping appropriate to the renderer/version. Decide whether background and illumination should share an image. Dispose owned preprocessing resources and replaced environments without releasing shared loader cache entries.

Enable shadows only on lights and objects that need them. Tighten directional/spot shadow coverage before raising map resolution. Inspect the shadow camera with helpers; adjust bias and normal bias in relation to scene scale. Excessive bias detaches contact shadows. Point-light shadows require multiple views and can be expensive.

Choose baked lighting for static scenes when dynamic lights add little value. Keep shadow updates demand-driven for static arrangements where supported. Add contact-shadow approximations only when they remain believable during interaction.

Verify shadow acne, detached feet, thin surfaces, moving objects at shadow-frustum edges, dark metallic surfaces, and texture seams. Compare the scene with and without shadows on a target device before accepting the cost.

API reference

Consult the official documentation for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.

Comments

Markdown supported