cesartevisual/threejs-skills

threejs-lighting

Light Three.js scenes using environment maps, direct lights, baked light, and tuned shadow maps.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/cesartevisual/threejs-skills --skill threejs-lighting

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

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.

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills