360 Secure SkillHub
360 安全技能中心

threejs-lighting

该 Skill 以文字指导方式说明 Three.js 灯光与环境贴图搭配、阴影范围和 bias 调整、烘焙光照取舍,以及阴影瑕疵与性能的验证方法;不包含可执行代码或固定参数。

cesartevisual
热度 0.00
最近更新 2026-10-19 06:48:01
分类:开发依赖:纯提示词应用场景:概念解释 / 调试排错 / 教学辅导

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cesartevisual/threejs-skills/threejs-lighting
Metadata
name
threejs-lighting
description
Light Three.js scenes using environment maps, direct lights, baked light, and tuned shadow maps.

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.