skills/threejs-skills/threejs-lights/SKILL.md
three.js lighting: AmbientLight, HemisphereLight, DirectionalLight, PointLight, SpotLight, RectAreaLight, LightProbe, IESSpotLight, ProjectorLight, shadow subtypes, and addon helpers such as RectAreaLightUniformsLib, RectAreaLightTexturesLib, LightProbeGenerator, TiledLighting. Use when configuring direct/indirect light, shadows, probes, or area lights; for IES file loading use threejs-loaders; for node-based light graphs use threejs-node-tsl; for debug helpers use threejs-helpers.
npx skillsauth add partme-ai/full-stack-skills threejs-lightsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ALWAYS use this skill when the user mentions:
castShadow / receiveShadow, shadow map size, bias, normal bias, camera frusta for shadow castersLightProbe for irradiance-style probes; IESSpotLight with IES dataIMPORTANT: lights vs loaders vs node-tsl
| Topic | Skill | |-------|--------| | Light classes and shadows | threejs-lights | | Loading IES/HDR files | threejs-loaders | | LightNode / TSL lighting | threejs-node-tsl |
Trigger phrases include:
IESSpotLight per docs.// 1. Enable shadows on renderer
renderer.shadowMap.enabled = true;
// 2. Configure light as shadow caster
const light = new THREE.DirectionalLight(0xffffff, 1);
light.castShadow = true;
light.shadow.mapSize.set(2048, 2048);
light.shadow.bias = -0.0001; // Adjust to remove shadow acne
// 3. Validate: verify shadow appears before tuning bias
// Set castShadow on meshes, receiveShadow on ground
mesh.castShadow = true;
ground.receiveShadow = true;
See examples/workflow-directional-shadow.md.
| Docs section | Representative links | |--------------|----------------------| | Lights | https://threejs.org/docs/Light.html | | Directional | https://threejs.org/docs/DirectionalLight.html | | Spot | https://threejs.org/docs/SpotLight.html | | Rect area | https://threejs.org/docs/RectAreaLight.html |
RectAreaLight without required libs yields black or wrong shading—verify init.Light and shadow classes live under Lights in three.js docs. RectAreaLight and probe addons depend on extra init from Addons → Lights; IES profiles require threejs-loaders for file fetch before the light API is usable.
When answering under this skill, prefer responses that:
DirectionalLight, SpotLight, …) and shadow pages when shadows are on.renderer.shadowMap.enabled alongside light castShadow (see threejs-renderers).English: lights, shadows, directional, spotlight, rectarea, lightprobe, three.js
中文: 灯光、阴影、平行光、聚光灯、面光源、LightProbe、three.js
development
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
tools
Creates new uni-app projects via the official CLI or HBuilderX with Vue 2/Vue 3 template selection, manifest.json and pages.json configuration, and directory structure setup. Use when the user wants to scaffold a new uni-app project, initialize project files with a single command, or set up the development environment.
tools
Browses, installs, configures, and manages plugins from the uni-app plugin market (ext.dcloud.net.cn) including component plugins, API plugins, and template plugins with dependency handling. Use when the user needs to find and install uni-app plugins, configure plugin settings, manage plugin dependencies, or integrate third-party components.
tools
Develops native Android and iOS plugins for uni-app including module creation, JavaScript-to-native communication, and plugin packaging for distribution. Use when the user needs to build custom native modules, extend uni-app with native capabilities (camera, Bluetooth, sensors), or create publishable native plugins.