threejs-scenes
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen to use this skill
何时使用此技能
ALWAYS use this skill when the user mentions:
- as root,
Scene, environment or skyball setup at scene levelscene.background - or
Fogparameters (FogExp2,near,far, density) and interaction with camera far planecolor - Organizing render lists conceptually (children of scene)
IMPORTANT: scenes vs textures vs loaders
| Concern | Skill |
|---|---|
| Scene + fog API | threejs-scenes |
| Texture sampling, PMREM generator usage | threejs-textures |
| Fetching HDR/glTF | threejs-loaders |
Trigger phrases include:
- "Scene", "Fog", "FogExp2", "background", "雾"
- "场景根节点", "线性雾", "指数雾"
当用户提及以下内容时,务必使用此技能:
- 作为根节点的、
Scene、场景层级的环境或天空球设置scene.background - 或
Fog的参数(FogExp2、near、far、density)以及与相机远平面的交互color - 从概念上组织渲染列表(场景的子元素)
重要提示:场景、纹理与加载器的区别
| 涉及内容 | 对应技能 |
|---|---|
| 场景+雾效API | threejs-scenes |
| 纹理采样、PMREM生成器使用 | threejs-textures |
| HDR/glTF文件获取 | threejs-loaders |
触发短语包括:
- "Scene"、"Fog"、"FogExp2"、"background"、"雾"
- "场景根节点"、"线性雾"、"指数雾"
How to use this skill
如何使用此技能
- Instantiate and add lights/meshes/cameras as children per graph rules (threejs-objects).
Scene - Choose fog: linear vs exponential
Fogfor outdoor/horizon feel.FogExp2 - Tune fog /
nearalongside camerafarto avoid clipping artifacts.far - Set to
scene.background,Color, or cube map per docs; env lighting still needs matching renderer/material settings.Texture - When user wants IBL from HDR file, point to loaders → textures → materials pipeline explicitly.
- Document that fog does not replace frustum culling for performance.
See examples/workflow-fog-background.md.
- 实例化,并按照场景图规则添加灯光/网格/相机作为子元素(参考threejs-objects技能)。
Scene - 选择雾效类型:线性或指数型
Fog,用于营造户外/地平线效果。FogExp2 - 配合相机的参数调整雾效的
far/near值,避免裁剪伪影。far - 按照文档将设置为
scene.background、Color或立方体贴图;环境光照仍需匹配渲染器/材质设置。Texture - 当用户需要从HDR文件获取IBL时,明确指引其使用加载器→纹理→材质的工作流。
- 说明出于性能考虑,雾效不能替代视锥体剔除。
参见examples/workflow-fog-background.md。
Doc map (official)
文档地图(官方)
| Docs section | Representative links |
|---|---|
| Scenes | https://threejs.org/docs/#Scenes |
| Scenes | https://threejs.org/docs/Scene.html |
| Fog | https://threejs.org/docs/Fog.html |
| FogExp2 | https://threejs.org/docs/FogExp2.html |
| 文档板块 | 代表性链接 |
|---|---|
| 场景(Scenes) | https://threejs.org/docs/#Scenes |
| 场景(Scenes) | https://threejs.org/docs/Scene.html |
| Fog | https://threejs.org/docs/Fog.html |
| FogExp2 | https://threejs.org/docs/FogExp2.html |
Scope
适用范围
- In scope: , fog types, background field semantics at API level.
Scene - Out of scope: HDR / glTF file fetch (threejs-loaders); PMREM and texture sampling (threejs-textures); tone mapping / output color space defaults (threejs-renderers); full-screen fog-only post stack (threejs-postprocessing) unless tying to scene ; custom atmospheric scattering shaders beyond core fog API.
Fog
- 适用范围: 、雾效类型、API层面的背景字段语义。
Scene - 不适用范围: HDR/glTF文件获取(threejs-loaders);PMREM与纹理采样(threejs-textures);色调映射/输出颜色空间默认设置(threejs-renderers);仅含全屏雾效的后处理栈(threejs-postprocessing,与场景关联的情况除外);超出核心雾效API范围的自定义大气散射着色器。
Fog
Common pitfalls and best practices
常见陷阱与最佳实践
- Fog color should harmonize with background to hide the horizon seam.
- Very large on camera with fog still needs scene scale consistency.
far - rotation/intensity features depend on renderer version—cite current docs.
background
- 雾效颜色应与背景相协调,以隐藏地平线接缝。
- 即使使用雾效,相机的值过大时仍需保证场景比例一致。
far - 的旋转/强度特性取决于渲染器版本——请引用当前版本文档。
background
Documentation and version
文档与版本
SceneFogSceneFogAgent response checklist
Agent响应检查清单
When answering under this skill, prefer responses that:
- Link ,
Scene, orFogofficial pages.FogExp2 - Relate fog distances to threejs-camera plane and world scale.
far - Defer PMREM/HDR file steps to threejs-textures / threejs-loaders with one sentence each.
- Avoid duplicating full color-management tutorials—point to renderer + textures skills.
在此技能下回答问题时,优先满足以下要求的响应:
- 附上、
Scene或Fog的官方文档链接。FogExp2 - 将雾效距离与threejs-camera的平面及世界比例关联起来。
far - 将PMREM/HDR文件相关步骤引导至threejs-textures/threejs-loaders技能,每个技能用一句话说明即可。
- 避免重复完整的色彩管理教程——引导用户参考渲染器+纹理相关技能。
References
参考资料
Keywords
关键词
English: scene, fog, fogexp2, background, environment, three.js
中文: 场景、雾、Fog、背景、环境、three.js
英文: scene, fog, fogexp2, background, environment, three.js
中文: 场景、雾、Fog、背景、环境、three.js