@leejungkiin/awkit 1.5.5 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +6 -4
  2. package/bin/awk.js +196 -8
  3. package/core/GEMINI.md +24 -8
  4. package/core/work-modes.json +45 -0
  5. package/package.json +3 -3
  6. package/skill-packs/cocos2d/pack.json +8 -0
  7. package/skill-packs/cocos2d/skills/cocos2d-x/LICENSE.txt +8 -0
  8. package/skill-packs/cocos2d/skills/cocos2d-x/SKILL.md +168 -0
  9. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/action.md +278 -0
  10. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/animation.md +220 -0
  11. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/event.md +133 -0
  12. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/input.md +291 -0
  13. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/label.md +184 -0
  14. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/node-scene.md +212 -0
  15. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/scene.md +228 -0
  16. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/sprite.md +206 -0
  17. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/texture.md +186 -0
  18. package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/about-engine.md +53 -0
  19. package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/installation.md +203 -0
  20. package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/quick-start.md +134 -0
  21. package/skill-packs/electron/pack.json +9 -0
  22. package/skill-packs/electron/skills/electron/LICENSE.txt +202 -0
  23. package/skill-packs/electron/skills/electron/SKILL.md +160 -0
  24. package/skill-packs/electron/skills/electron/api/app.md +83 -0
  25. package/skill-packs/electron/skills/electron/api/browser-window.md +84 -0
  26. package/skill-packs/electron/skills/electron/examples/advanced/packaging.md +140 -0
  27. package/skill-packs/electron/skills/electron/examples/api/browser-window.md +182 -0
  28. package/skill-packs/electron/skills/electron/examples/api/menu.md +187 -0
  29. package/skill-packs/electron/skills/electron/examples/getting-started/installation.md +88 -0
  30. package/skill-packs/electron/skills/electron/examples/getting-started/quick-start.md +104 -0
  31. package/skill-packs/electron/skills/electron/examples/processes/ipc-communication.md +140 -0
  32. package/skill-packs/electron/skills/electron/examples/processes/main-process.md +121 -0
  33. package/skill-packs/electron/skills/electron/templates/main-process.md +105 -0
  34. package/skill-packs/electron/skills/electron/templates/preload-script.md +84 -0
  35. package/skill-packs/electron/skills/electron-egg/LICENSE.txt +202 -0
  36. package/skill-packs/electron/skills/electron-egg/SKILL.md +154 -0
  37. package/skill-packs/electron/skills/electron-egg/api/config-api.md +62 -0
  38. package/skill-packs/electron/skills/electron-egg/api/ipc-api.md +55 -0
  39. package/skill-packs/electron/skills/electron-egg/api/main-api.md +54 -0
  40. package/skill-packs/electron/skills/electron-egg/api/renderer-api.md +62 -0
  41. package/skill-packs/electron/skills/electron-egg/api/window-api.md +64 -0
  42. package/skill-packs/electron/skills/electron-egg/examples/features/ipc-communication.md +84 -0
  43. package/skill-packs/electron/skills/electron-egg/examples/features/main-process.md +89 -0
  44. package/skill-packs/electron/skills/electron-egg/examples/features/renderer-process.md +74 -0
  45. package/skill-packs/electron/skills/electron-egg/examples/guide/build.md +77 -0
  46. package/skill-packs/electron/skills/electron-egg/examples/guide/configuration.md +88 -0
  47. package/skill-packs/electron/skills/electron-egg/examples/guide/installation.md +66 -0
  48. package/skill-packs/electron/skills/electron-egg/examples/guide/intro.md +47 -0
  49. package/skill-packs/electron/skills/electron-egg/examples/guide/project-structure.md +73 -0
  50. package/skill-packs/electron/skills/electron-egg/examples/guide/quick-start.md +78 -0
  51. package/skill-packs/electron/skills/electron-egg/templates/configuration.md +63 -0
  52. package/skill-packs/electron/skills/electron-egg/templates/installation.md +42 -0
  53. package/skill-packs/electron/skills/electron-egg/templates/project-setup.md +75 -0
  54. package/skill-packs/flutter/pack.json +9 -0
  55. package/skill-packs/flutter/skills/flutter/LICENSE.txt +202 -0
  56. package/skill-packs/flutter/skills/flutter/SKILL.md +127 -0
  57. package/skill-packs/flutter/skills/flutter-project-creater/LICENSE.txt +202 -0
  58. package/skill-packs/flutter/skills/flutter-project-creater/SKILL.md +106 -0
  59. package/skill-packs/threejs/pack.json +25 -0
  60. package/skill-packs/threejs/skills/README.md +95 -0
  61. package/skill-packs/threejs/skills/threejs-animation/SKILL.md +86 -0
  62. package/skill-packs/threejs/skills/threejs-animation/examples/workflow-mixer-action.md +20 -0
  63. package/skill-packs/threejs/skills/threejs-animation/references/official-sections.md +19 -0
  64. package/skill-packs/threejs/skills/threejs-audio/SKILL.md +112 -0
  65. package/skill-packs/threejs/skills/threejs-audio/examples/workflow-positional-audio.md +15 -0
  66. package/skill-packs/threejs/skills/threejs-audio/references/official-sections.md +16 -0
  67. package/skill-packs/threejs/skills/threejs-camera/SKILL.md +96 -0
  68. package/skill-packs/threejs/skills/threejs-camera/examples/workflow-perspective-resize.md +13 -0
  69. package/skill-packs/threejs/skills/threejs-controls/SKILL.md +101 -0
  70. package/skill-packs/threejs/skills/threejs-controls/examples/workflow-orbit-damping.md +15 -0
  71. package/skill-packs/threejs/skills/threejs-dev-setup/SKILL.md +102 -0
  72. package/skill-packs/threejs/skills/threejs-dev-setup/examples/workflow-scaffold.md +24 -0
  73. package/skill-packs/threejs/skills/threejs-geometries/SKILL.md +108 -0
  74. package/skill-packs/threejs/skills/threejs-geometries/examples/workflow-extrude-shape.md +13 -0
  75. package/skill-packs/threejs/skills/threejs-helpers/SKILL.md +103 -0
  76. package/skill-packs/threejs/skills/threejs-helpers/examples/workflow-light-camera-helpers.md +13 -0
  77. package/skill-packs/threejs/skills/threejs-lights/SKILL.md +103 -0
  78. package/skill-packs/threejs/skills/threejs-lights/examples/workflow-directional-shadow.md +17 -0
  79. package/skill-packs/threejs/skills/threejs-loaders/SKILL.md +89 -0
  80. package/skill-packs/threejs/skills/threejs-loaders/examples/workflow-gltf-draco.md +22 -0
  81. package/skill-packs/threejs/skills/threejs-loaders/references/official-sections.md +27 -0
  82. package/skill-packs/threejs/skills/threejs-materials/SKILL.md +102 -0
  83. package/skill-packs/threejs/skills/threejs-materials/examples/workflow-pbr-transparent.md +15 -0
  84. package/skill-packs/threejs/skills/threejs-math/SKILL.md +102 -0
  85. package/skill-packs/threejs/skills/threejs-math/examples/workflow-ray-aabb.md +11 -0
  86. package/skill-packs/threejs/skills/threejs-node-tsl/SKILL.md +83 -0
  87. package/skill-packs/threejs/skills/threejs-node-tsl/examples/workflow-tsl-entry.md +13 -0
  88. package/skill-packs/threejs/skills/threejs-node-tsl/references/official-links.md +8 -0
  89. package/skill-packs/threejs/skills/threejs-node-tsl/references/tsl-vs-classic.md +23 -0
  90. package/skill-packs/threejs/skills/threejs-objects/SKILL.md +111 -0
  91. package/skill-packs/threejs/skills/threejs-objects/examples/workflow-raycaster-pick.md +17 -0
  92. package/skill-packs/threejs/skills/threejs-postprocessing/SKILL.md +116 -0
  93. package/skill-packs/threejs/skills/threejs-postprocessing/examples/workflow-composer-bloom.md +15 -0
  94. package/skill-packs/threejs/skills/threejs-renderers/SKILL.md +91 -0
  95. package/skill-packs/threejs/skills/threejs-renderers/examples/workflow-renderer-resize.md +21 -0
  96. package/skill-packs/threejs/skills/threejs-renderers/references/official-sections.md +14 -0
  97. package/skill-packs/threejs/skills/threejs-scenes/SKILL.md +90 -0
  98. package/skill-packs/threejs/skills/threejs-scenes/examples/workflow-fog-background.md +13 -0
  99. package/skill-packs/threejs/skills/threejs-textures/SKILL.md +83 -0
  100. package/skill-packs/threejs/skills/threejs-textures/examples/workflow-pmrem-env.md +19 -0
  101. package/skill-packs/threejs/skills/threejs-webxr/SKILL.md +104 -0
  102. package/skill-packs/threejs/skills/threejs-webxr/examples/workflow-xr-button.md +15 -0
  103. package/skills/CATALOG.md +44 -49
  104. package/skills/TRIGGER_INDEX.md +30 -0
  105. package/skills/awf-session-restore/SKILL.md +19 -2
  106. package/skills/brainstorm-agent/SKILL.md +2 -0
  107. package/skills/code-review/SKILL.md +2 -0
  108. package/skills/code-review-system-principles/SKILL.md +154 -0
  109. package/skills/codex-conductor/SKILL.md +6 -4
  110. package/skills/gemini-conductor/SKILL.md +4 -3
  111. package/skills/gitnexus-intelligence/SKILL.md +2 -0
  112. package/skills/module-spec-writer/SKILL.md +2 -0
  113. package/skills/nm-memory-sync/SKILL.md +10 -0
  114. package/skills/skill-creator/SKILL.md +2 -0
  115. package/skills/spec-gate/SKILL.md +2 -0
  116. package/skills/symphony-enforcer/SKILL.md +9 -0
  117. package/skills/symphony-enforcer/examples/mindful-stop.md +141 -0
  118. package/skills/symphony-enforcer/examples/task-completion.md +11 -2
  119. package/skills/symphony-enforcer/examples/trigger-points.md +7 -0
  120. package/skills/symphony-orchestrator/SKILL.md +2 -0
  121. package/skills/telegram-notify/SKILL.md +1 -0
  122. package/skills/trello-sync/SKILL.md +7 -0
  123. package/skills/verification-gate/SKILL.md +2 -0
  124. package/skills/visual-design-gate/SKILL.md +2 -0
  125. package/templates/project-identity/android.json +26 -1
  126. package/templates/project-identity/backend-nestjs.json +26 -1
  127. package/templates/project-identity/expo.json +26 -1
  128. package/templates/project-identity/ios.json +26 -1
  129. package/templates/project-identity/web-nextjs.json +26 -1
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: threejs-lights
3
+ description: "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."
4
+ ---
5
+
6
+ ## When to use this skill
7
+
8
+ **ALWAYS use this skill when the user mentions:**
9
+
10
+ - Enabling `castShadow` / `receiveShadow`, shadow map size, bias, normal bias, camera frusta for shadow casters
11
+ - Physical lights: intensity, distance/decay, angle/penumbra for spots, rect area setup
12
+ - `LightProbe` for irradiance-style probes; `IESSpotLight` with IES data
13
+
14
+ **IMPORTANT: lights vs loaders vs node-tsl**
15
+
16
+ | Topic | Skill |
17
+ |-------|--------|
18
+ | Light classes and shadows | **threejs-lights** |
19
+ | Loading IES/HDR files | **threejs-loaders** |
20
+ | LightNode / TSL lighting | **threejs-node-tsl** |
21
+
22
+ **Trigger phrases include:**
23
+
24
+ - "DirectionalLight", "SpotLight", "RectAreaLight", "castShadow", "shadow map"
25
+ - "阴影", "点光源", "面光源", "LightProbe"
26
+
27
+ ## How to use this skill
28
+
29
+ 1. **Base recipe**: ambient/hemisphere fill + directional sun + local points/spots.
30
+ 2. **Shadows**: enable on renderer, mark casters/receivers, tune map size vs performance, adjust bias to remove acne/peter-panning.
31
+ 3. **RectArea**: initialize addon libs per docs page before using light type.
32
+ 4. **Probes**: place probes; generate data via addon generator when applicable; relate to materials env reflections (**threejs-materials**, **threejs-textures**).
33
+ 5. **IES**: load profile via loader skill, attach to `IESSpotLight` per docs.
34
+ 6. **Performance**: limit shadow-casting lights; use layers (**threejs-objects**) to exclude objects.
35
+
36
+ ### Example: Shadow setup with validation
37
+
38
+ ```javascript
39
+ // 1. Enable shadows on renderer
40
+ renderer.shadowMap.enabled = true;
41
+
42
+ // 2. Configure light as shadow caster
43
+ const light = new THREE.DirectionalLight(0xffffff, 1);
44
+ light.castShadow = true;
45
+ light.shadow.mapSize.set(2048, 2048);
46
+ light.shadow.bias = -0.0001; // Adjust to remove shadow acne
47
+
48
+ // 3. Validate: verify shadow appears before tuning bias
49
+ // Set castShadow on meshes, receiveShadow on ground
50
+ mesh.castShadow = true;
51
+ ground.receiveShadow = true;
52
+ ```
53
+
54
+ See [examples/workflow-directional-shadow.md](examples/workflow-directional-shadow.md).
55
+
56
+ ## Doc map (official)
57
+
58
+ | Docs section | Representative links |
59
+ |--------------|----------------------|
60
+ | Lights | https://threejs.org/docs/Light.html |
61
+ | Directional | https://threejs.org/docs/DirectionalLight.html |
62
+ | Spot | https://threejs.org/docs/SpotLight.html |
63
+ | Rect area | https://threejs.org/docs/RectAreaLight.html |
64
+
65
+ ## Scope
66
+
67
+ - **In scope:** Core lights, shadow maps, probes, listed addons for rect area and probe generation.
68
+ - **Out of scope:** CSM deep theory (see addon Csm docs if user names it); baked lightmaps in DCC.
69
+
70
+ ## Common pitfalls and best practices
71
+
72
+ - Shadow map resolution must match scene scale—tiny shadows on huge worlds look blocky.
73
+ - Point light shadows are six-face expensive—use wisely.
74
+ - `RectAreaLight` without required libs yields black or wrong shading—verify init.
75
+ - Mismatched physical units (intensity vs exposure) with **threejs-renderers** tone mapping causes blown or dim scenes.
76
+ - Shadow **bias** / **normalBias** trade-offs: acne vs peter-paning—tune with helper frusta (**threejs-helpers**).
77
+
78
+ ## Documentation and version
79
+
80
+ Light and shadow classes live under [Lights](https://threejs.org/docs/#Lights) in [three.js docs](https://threejs.org/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.
81
+
82
+ ## Agent response checklist
83
+
84
+ When answering under this skill, prefer responses that:
85
+
86
+ 1. Link the concrete light type (`DirectionalLight`, `SpotLight`, …) and shadow pages when shadows are on.
87
+ 2. Separate **IES loading** to **threejs-loaders** and **LightNode** topics to **threejs-node-tsl**.
88
+ 3. Give practical shadow map size / bias guidance with **threejs-helpers** for frustum visualization.
89
+ 4. Mention `renderer.shadowMap.enabled` alongside light `castShadow` (see **threejs-renderers**).
90
+ 5. Note performance cost of multiple shadow-casting lights.
91
+
92
+ ## References
93
+
94
+ - https://threejs.org/docs/#Lights
95
+ - https://threejs.org/docs/DirectionalLight.html
96
+ - https://threejs.org/docs/SpotLight.html
97
+ - https://threejs.org/docs/LightShadow.html
98
+
99
+ ## Keywords
100
+
101
+ **English:** lights, shadows, directional, spotlight, rectarea, lightprobe, three.js
102
+
103
+ **中文:** 灯光、阴影、平行光、聚光灯、面光源、LightProbe、three.js
@@ -0,0 +1,17 @@
1
+ # Workflow: directional sun with shadows
2
+
3
+ ## Steps
4
+
5
+ 1. `renderer.shadowMap.enabled = true;` (**threejs-renderers**).
6
+
7
+ 2. Create `DirectionalLight`, `light.castShadow = true`, position and `target`.
8
+
9
+ 3. Tune `light.shadow.mapSize`, `camera` frustum on `light.shadow.camera` for your scene bounds.
10
+
11
+ 4. Mark meshes: `mesh.castShadow` / `receiveShadow` as needed.
12
+
13
+ 5. Adjust `bias` / `normalBias` if acne or peter-panning appears.
14
+
15
+ 6. Use `CameraHelper(light.shadow.camera)` temporarily (**threejs-helpers**).
16
+
17
+ Official reference: https://threejs.org/docs/DirectionalLight.html
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: threejs-loaders
3
+ description: "three.js asset I/O using LoadingManager, Cache, FileLoader, image and texture loaders, GLTFLoader with DRACOLoader and KTX2Loader, and common format loaders under Addons; symmetric exporters such as GLTFExporter and texture/buffer exporters. Use when loading or exporting models, HDR, LUT, fonts, or compressed textures; for runtime Texture object parameters after load use threejs-textures; for scene graph placement use threejs-objects."
4
+ ---
5
+
6
+ ## When to use this skill
7
+
8
+ **ALWAYS use this skill when the user mentions:**
9
+
10
+ - `GLTFLoader`, `DRACOLoader`, `KTX2Loader`, `FBXLoader`, `OBJLoader`, progress and error handling
11
+ - `LoadingManager` for global progress, `Cache` for HTTP caching control
12
+ - Export: `GLTFExporter`, `OBJExporter`, HDR/KTX2 export pipelines
13
+ - IES, UltraHDR, or domain-specific loaders listed under Addons Loaders in docs
14
+
15
+ **IMPORTANT: loaders vs textures**
16
+
17
+ - **threejs-loaders** = fetch/decode/parse files into three objects.
18
+ - **threejs-textures** = `Texture`/`DataTexture` parameters, sampling, PMREM after you already have image buffers.
19
+
20
+ **IMPORTANT: loaders vs dev-setup**
21
+
22
+ - Import path issues belong to **threejs-dev-setup**; this skill assumes imports resolve.
23
+
24
+ **Trigger phrases include:**
25
+
26
+ - "GLTFLoader", "DRACO", "KTX2", "LoadingManager", "export gltf"
27
+ - "加载模型", "导出", "进度条"
28
+
29
+ ## How to use this skill
30
+
31
+ 1. **Pick loader** by format; prefer glTF for PBR interchange when possible.
32
+ 2. **Wire LoadingManager** for multi-asset batches; surface `onStart`/`onLoad`/`onProgress`/`onError`.
33
+ 3. **glTF + Draco**: instantiate `DRACOLoader`, set decoder path, attach to `GLTFLoader.setDRACOLoader` per current docs.
34
+ 4. **glTF + KTX2**: configure `KTX2Loader` with transcoder path and connect to `GLTFLoader` when using Basis textures.
35
+ 5. **Export**: use `GLTFExporter` with options matching round-trip needs; note large scenes and binary vs JSON.
36
+ 6. **Security**: only load user URLs with validation; mention CORS for cross-origin assets.
37
+ 7. **After load**: traverse scene for materials/meshes—hand off material tuning to **threejs-materials**.
38
+
39
+ See [examples/workflow-gltf-draco.md](examples/workflow-gltf-draco.md).
40
+
41
+ ## Doc map (official)
42
+
43
+ | Docs section | Representative links |
44
+ |--------------|----------------------|
45
+ | Core Loaders | https://threejs.org/docs/LoadingManager.html |
46
+ | Core Loaders | https://threejs.org/docs/GLTFLoader.html |
47
+ | Addons Exporters | https://threejs.org/docs/GLTFExporter.html |
48
+ | Addons Loaders | https://threejs.org/docs/DRACOLoader.html |
49
+
50
+ Extended list: [references/official-sections.md](references/official-sections.md).
51
+
52
+ ## Scope
53
+
54
+ - **In scope:** Loader and exporter classes, manager/cache, format choice, plugin wiring for Draco/KTX2, export basics.
55
+ - **Out of scope:** Server-side transcoding pipelines; physics or game engine asset tooling outside three docs.
56
+
57
+ ## Common pitfalls and best practices
58
+
59
+ - Draco/KTX2 **decoder paths** must match deployed files; broken paths fail silently until onError surfaces.
60
+ - Duplicate texture instances after merge—consider `renderer.initTexture` implications when cloning materials.
61
+ - Exporters may not round-trip custom shaders; document limitations.
62
+ - Always dispose geometries/materials when replacing loaded scenes to avoid GPU leaks.
63
+
64
+ ## Documentation and version
65
+
66
+ Loader and exporter APIs (especially `GLTFLoader` + `DRACOLoader` / `KTX2Loader` wiring) change between three.js versions. Follow [Loaders](https://threejs.org/docs/#Loaders) and **Addons → Loaders / Exporters** in [three.js docs](https://threejs.org/docs/); decoder WASM paths are deployment-specific, not library-version alone.
67
+
68
+ ## Agent response checklist
69
+
70
+ When answering under this skill, prefer responses that:
71
+
72
+ 1. Link `LoadingManager`, `GLTFLoader`, or the relevant format page on https://threejs.org/docs/.
73
+ 2. Separate **loading** (this skill) from **texture/material tuning** after decode (**threejs-textures**, **threejs-materials**).
74
+ 3. Document Draco/KTX2 **decoder path** and CORS when assets fail silently.
75
+ 4. Mention exporter limitations (custom shaders, extensions) honestly.
76
+ 5. Encourage `dispose()` when replacing entire loaded scenes.
77
+
78
+ ## References
79
+
80
+ - https://threejs.org/docs/#Loaders
81
+ - https://threejs.org/docs/LoadingManager.html
82
+ - https://threejs.org/docs/GLTFLoader.html
83
+ - https://threejs.org/docs/GLTFExporter.html
84
+
85
+ ## Keywords
86
+
87
+ **English:** gltf, gltfloader, dracoloader, ktx2, loadingmanager, cache, exporter, asset pipeline, three.js
88
+
89
+ **中文:** GLTFLoader、加载器、Draco、KTX2、导出、资源、进度、three.js
@@ -0,0 +1,22 @@
1
+ # Workflow: GLTFLoader with DRACOLoader
2
+
3
+ ## Preconditions
4
+
5
+ - **threejs-dev-setup** resolves `three/addons/loaders/GLTFLoader.js` and `DRACOLoader.js`.
6
+ - Draco decoder WASM/js files are hosted at a known URL prefix (often copied to `public/draco/`).
7
+
8
+ ## Steps
9
+
10
+ 1. Create `DRACOLoader()` and `setDecoderPath('/draco/')` (adjust to deployment).
11
+
12
+ 2. Create `GLTFLoader()` and `loader.setDRACOLoader(dracoLoader)`.
13
+
14
+ 3. Call `loader.load('model.glb', onLoad, onProgress, onError)`.
15
+
16
+ 4. In `onLoad`, use `gltf.scene` as root **Object3D**; animations → **threejs-animation**; materials may need color pipeline checks → **threejs-renderers** / **threejs-textures**.
17
+
18
+ 5. Dispose previous scene graphs when swapping models.
19
+
20
+ ## Note
21
+
22
+ Exact API names follow the current [GLTFLoader](https://threejs.org/docs/GLTFLoader.html) page—verify when upgrading three.js major versions.
@@ -0,0 +1,27 @@
1
+ # Loaders and exporters (frequently used)
2
+
3
+ **Core**
4
+
5
+ - https://threejs.org/docs/Loader.html
6
+ - https://threejs.org/docs/LoadingManager.html
7
+ - https://threejs.org/docs/Cache.html
8
+ - https://threejs.org/docs/FileLoader.html
9
+ - https://threejs.org/docs/TextureLoader.html
10
+ - https://threejs.org/docs/GLTFLoader.html
11
+
12
+ **Addons (examples)**
13
+
14
+ - https://threejs.org/docs/DRACOLoader.html
15
+ - https://threejs.org/docs/KTX2Loader.html
16
+ - https://threejs.org/docs/FBXLoader.html
17
+ - https://threejs.org/docs/OBJLoader.html
18
+ - https://threejs.org/docs/HDRLoader.html
19
+ - https://threejs.org/docs/RGBELoader.html (if listed under HDRLoader migration in your version—check index)
20
+
21
+ **Exporters**
22
+
23
+ - https://threejs.org/docs/GLTFExporter.html
24
+ - https://threejs.org/docs/OBJExporter.html
25
+ - https://threejs.org/docs/EXRExporter.html
26
+
27
+ Refresh against https://threejs.org/docs/#Loaders and **Addons → Exporters** for your installed version.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: threejs-materials
3
+ description: "Classic three.js materials (non-Node): MeshStandardMaterial, MeshPhysicalMaterial, Phong/Lambert/Toon/Basic, Line/Points/Sprite materials, MeshMatcapMaterial, MeshNormalMaterial, depth/distance materials, ShaderMaterial and RawShaderMaterial. Use when tuning PBR maps, transparency, depth write, skinning flags, or writing GLSL in ShaderMaterial; for TSL/NodeMaterial/WebGPU shader graphs use threejs-node-tsl instead."
4
+ ---
5
+
6
+ ## When to use this skill
7
+
8
+ **ALWAYS use this skill when the user mentions:**
9
+
10
+ - Choosing among built-in mesh materials, map slots (albedo, normal, roughness, metalness, ao, emissive), `envMap`
11
+ - Transparency sorting issues, `alphaTest`, `depthWrite`, blending modes, side/double-sided rendering
12
+ - `ShaderMaterial` / `RawShaderMaterial` uniforms, includes, and compatibility with lights pipeline
13
+ - Line, points, sprite materials for vector overlays and particles
14
+
15
+ **IMPORTANT: classic materials vs node-tsl**
16
+
17
+ | Need | Skill |
18
+ |------|--------|
19
+ | Standard PBR with maps, physical clearcoat/sheen | **threejs-materials** |
20
+ | TSL nodes, `NodeMaterial`, WebGPU-first shading, compute-style graph | **threejs-node-tsl** |
21
+ | Migrating ShaderMaterial → TSL | **threejs-node-tsl** (conceptual), keep ShaderMaterial here until cutover |
22
+
23
+ **Trigger phrases include:**
24
+
25
+ - "MeshStandardMaterial", "MeshPhysicalMaterial", "ShaderMaterial", "transparent", "alphaTest"
26
+ - "PBR", "物理材质", "透明", "自定义着色器"
27
+
28
+ ## How to use this skill
29
+
30
+ 1. **Select class** by lighting model: `MeshBasic` (unlit), Lambert/Phong (legacy lit), Standard/Physical (PBR).
31
+ 2. **Assign maps** and ensure **color space** correctness for albedo vs data maps (link threejs-textures).
32
+ 3. **Environment**: set `envMap` from cube or equirect; align `metalness`/`roughness`; consider `MeshPhysicalMaterial` for transmission/IOR when needed.
33
+ 4. **Transparency**: order objects or use `alphaTest`/`depthWrite` trade-offs; mention sorting limitations.
34
+ 5. **ShaderMaterial**: minimize re-lit work unless intentional; document required lights and `lights: true` flag behavior per version docs.
35
+ 6. **Performance**: share materials across meshes; avoid cloning per frame.
36
+ 7. **Skinning/morph**: set `skinning`/`morphTargets` where applicable—mesh side in **threejs-objects**.
37
+
38
+ ### Example: Transparency with alphaTest vs depthWrite
39
+
40
+ ```javascript
41
+ // Option A: alphaTest — hard cutoff, no sorting issues
42
+ const matA = new THREE.MeshStandardMaterial({
43
+ map: texture, alphaMap: alphaTexture,
44
+ alphaTest: 0.5, transparent: true
45
+ });
46
+
47
+ // Option B: depthWrite false — soft transparency, needs manual sorting
48
+ const matB = new THREE.MeshStandardMaterial({
49
+ map: texture, transparent: true, opacity: 0.6,
50
+ depthWrite: false // prevents depth-fighting but requires back-to-front sorting
51
+ });
52
+ ```
53
+
54
+ See [examples/workflow-pbr-transparent.md](examples/workflow-pbr-transparent.md).
55
+
56
+ ## Doc map (official)
57
+
58
+ | Docs section | Representative links |
59
+ |--------------|----------------------|
60
+ | Materials (core) | https://threejs.org/docs/Material.html |
61
+ | PBR | https://threejs.org/docs/MeshStandardMaterial.html |
62
+ | Physical | https://threejs.org/docs/MeshPhysicalMaterial.html |
63
+ | Custom GLSL | https://threejs.org/docs/ShaderMaterial.html |
64
+
65
+ ## Scope
66
+
67
+ - **In scope:** Non-Node materials listed under Core **Materials** in docs (except `*NodeMaterial`).
68
+ - **Out of scope:** Full Nodes catalog (threejs-node-tsl); post pass materials inside composer (threejs-postprocessing).
69
+
70
+ ## Common pitfalls and best practices
71
+
72
+ - Wrong normal map `normalMapType` or tangent space breaks lighting; verify geometry has tangents or use appropriate mode.
73
+ - Premultiplied alpha vs straight alpha mismatches cause fringe halos on foliage.
74
+ - `MeshPhysicalMaterial` `transmission` needs thickness and good env—combine with **threejs-textures** / PMREM.
75
+ - Too many unique materials hurts sorting and batching—merge where possible.
76
+
77
+ ## Documentation and version
78
+
79
+ PBR and `ShaderMaterial` behavior track the [Materials](https://threejs.org/docs/#Materials) section in [three.js docs](https://threejs.org/docs/). Color management and default `envMap` handling changed in modern releases—always pair material answers with renderer/output settings from **threejs-renderers** when colors look wrong.
80
+
81
+ ## Agent response checklist
82
+
83
+ When answering under this skill, prefer responses that:
84
+
85
+ 1. Link `MeshStandardMaterial`, `MeshPhysicalMaterial`, or `ShaderMaterial` pages as appropriate.
86
+ 2. Force a clear choice vs **threejs-node-tsl** when the user asks for “shaders” or “nodes”.
87
+ 3. Separate map **roles** (albedo vs roughness vs normal) and `colorSpace` expectations with **threejs-textures**.
88
+ 4. Call out transparency and `depthWrite` trade-offs for sorted rendering.
89
+ 5. Note that `*NodeMaterial` types belong to the node skill, not this one.
90
+
91
+ ## References
92
+
93
+ - https://threejs.org/docs/#Materials
94
+ - https://threejs.org/docs/MeshStandardMaterial.html
95
+ - https://threejs.org/docs/MeshPhysicalMaterial.html
96
+ - https://threejs.org/docs/ShaderMaterial.html
97
+
98
+ ## Keywords
99
+
100
+ **English:** meshstandardmaterial, meshphysicalmaterial, shadermaterial, pbr, transparency, envmap, materials, three.js
101
+
102
+ **中文:** 材质、PBR、MeshStandardMaterial、物理材质、透明、环境贴图、ShaderMaterial、three.js
@@ -0,0 +1,15 @@
1
+ # Workflow: PBR mesh with transparency
2
+
3
+ ## Steps
4
+
5
+ 1. Start from `MeshStandardMaterial` with `transparent: true`, `opacity < 1`, or texture alpha.
6
+
7
+ 2. Decide sorting strategy: opaque first, then transparent; or use `alphaTest` for cutouts (foliage).
8
+
9
+ 3. For refractive glass-like look, consider `MeshPhysicalMaterial` with `transmission`—verify thickness and env map (see **threejs-textures** for PMREM).
10
+
11
+ 4. If depth artifacts appear, tune `depthWrite` (often `false` for transparent) and render order.
12
+
13
+ 5. Validate under correct `outputColorSpace` on renderer (**threejs-renderers**).
14
+
15
+ This file is guidance only—parameter names follow the current [MeshStandardMaterial](https://threejs.org/docs/MeshStandardMaterial.html) page.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: threejs-math
3
+ description: "three.js math library: Vector2/3/4, Matrix3/4, Quaternion, Euler, Color, Box2/Box3, Sphere, Plane, Ray, Line3, Triangle, Frustum, Cylindrical/Spherical coords, MathUtils, and Interpolant base classes; addon math utilities such as OBB, Octree, Capsule, ConvexHull, MeshSurfaceSampler. Use for transforms, intersection tests, and spatial queries; for keyframe interpolation tied to AnimationMixer use threejs-animation; for picking implementation use threejs-objects with Raycaster."
4
+ ---
5
+
6
+ ## When to use this skill
7
+
8
+ **ALWAYS use this skill when the user mentions:**
9
+
10
+ - Vector/matrix math order, `applyQuaternion`, `lookAt`, world vs local transforms
11
+ - Bounding volumes `Box3`/`Sphere`, containment/intersection tests
12
+ - `Ray` vs `Plane` vs `Frustum` tests (without full picking pipeline)
13
+
14
+ **IMPORTANT: math vs objects vs animation**
15
+
16
+ | Need | Skill |
17
+ |------|--------|
18
+ | Raw math types | **threejs-math** |
19
+ | `Raycaster` + layers picking | **threejs-objects** |
20
+ | QuaternionKeyframeTrack playback | **threejs-animation** |
21
+
22
+ **Trigger phrases include:**
23
+
24
+ - "Vector3", "Matrix4", "Quaternion", "Box3", "Ray", "Frustum"
25
+ - "向量", "矩阵", "四元数", "包围盒"
26
+
27
+ ## How to use this skill
28
+
29
+ 1. **Conventions**: multiply vectors by matrices on the left as three.js examples show; call `updateMatrixWorld` before world-space queries (**threejs-objects**).
30
+ 2. **Bounding**: `Box3().setFromObject(object)` for rough bounds; refine per need.
31
+ 3. **Collision-ish checks**: `ray.intersectBox`, `sphere.containsPoint`, etc., per docs.
32
+ 4. **Addon structures**: `Octree`/`OBB` for games—cite addon pages, avoid copying full API tables here.
33
+ 5. **Color**: `Color` conversions relate to materials/textures—cross-link.
34
+ 6. **Random sampling**: `MeshSurfaceSampler` for distributing points on meshes.
35
+
36
+ ### Example: Ray-AABB intersection test
37
+
38
+ ```javascript
39
+ import * as THREE from 'three';
40
+
41
+ const ray = new THREE.Ray(
42
+ new THREE.Vector3(0, 1, 0), // origin
43
+ new THREE.Vector3(0, 0, -1) // direction
44
+ );
45
+ const box = new THREE.Box3(
46
+ new THREE.Vector3(-1, -1, -5),
47
+ new THREE.Vector3(1, 1, -3)
48
+ );
49
+
50
+ const hit = ray.intersectBox(box, new THREE.Vector3());
51
+ if (hit) {
52
+ console.log('Intersection at:', hit);
53
+ }
54
+ ```
55
+
56
+ See [examples/workflow-ray-aabb.md](examples/workflow-ray-aabb.md).
57
+
58
+ ## Doc map (official)
59
+
60
+ | Docs section | Representative links |
61
+ |--------------|----------------------|
62
+ | Math | https://threejs.org/docs/Vector3.html |
63
+ | Math | https://threejs.org/docs/Matrix4.html |
64
+ | Math | https://threejs.org/docs/Quaternion.html |
65
+ | Math | https://threejs.org/docs/Ray.html |
66
+
67
+ ## Scope
68
+
69
+ - **In scope:** Core Math types; addon math entries as pointers.
70
+ - **Out of scope:** Keyframe track evaluation beyond type references (animation skill).
71
+
72
+ ## Common pitfalls and best practices
73
+
74
+ - Euler gimbal lock—prefer quaternions for arbitrary rotations.
75
+ - Reusing temporary vectors reduces GC thrash in hot loops.
76
+ - Frustum culling helpers vary—verify against your three version.
77
+
78
+ ## Documentation and version
79
+
80
+ Core math types are listed under [Math](https://threejs.org/docs/#Math); addon utilities (`Octree`, `OBB`, …) appear under **Addons → Math** in [three.js docs](https://threejs.org/docs/). [Global](https://threejs.org/docs/#Global) also lists constants (e.g. wrapping, blending) sometimes needed alongside materials.
81
+
82
+ ## Agent response checklist
83
+
84
+ When answering under this skill, prefer responses that:
85
+
86
+ 1. Link the concrete type (`Vector3`, `Matrix4`, `Quaternion`, …) from the docs.
87
+ 2. Send `AnimationMixer` / track math to **threejs-animation** when time-sampled.
88
+ 3. Send `Raycaster` picking flows to **threejs-objects** when interaction is the goal.
89
+ 4. Mention numeric stability (epsilon) where comparisons matter.
90
+ 5. Point to **Addons → Math** for game-oriented structures when users need spatial acceleration.
91
+
92
+ ## References
93
+
94
+ - https://threejs.org/docs/#Math
95
+ - https://threejs.org/docs/MathUtils.html
96
+ - https://threejs.org/docs/Ray.html
97
+
98
+ ## Keywords
99
+
100
+ **English:** vector, matrix, quaternion, euler, box3, sphere, ray, frustum, three.js
101
+
102
+ **中文:** 向量、矩阵、四元数、欧拉角、包围盒、射线、three.js
@@ -0,0 +1,11 @@
1
+ # Workflow: test Ray against Box3
2
+
3
+ ## Steps
4
+
5
+ 1. Build `THREE.Ray(origin, direction)`; ensure `direction` is normalized if using distance-sensitive APIs.
6
+
7
+ 2. Compute world-space `Box3` for an object: `new THREE.Box3().setFromObject(mesh)`.
8
+
9
+ 3. `const hit = ray.intersectBox(box, targetPoint);` — check return value per [Ray](https://threejs.org/docs/Ray.html).
10
+
11
+ 4. For mesh-accurate picking, prefer `Raycaster` in **threejs-objects** instead of manual triangle tests unless you optimize custom cases.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: threejs-node-tsl
3
+ description: "three.js node-based shading: Nodes API surface, NodeMaterial and MeshStandardNodeMaterial-style families, TSL (Three.js Shading Language) entry at TSL.html, WebGPURenderer pairing, and core PostProcessing (class) versus addon EffectComposer at a high level. Use when authoring shaders as graphs, using TSL builtins, compute-oriented nodes, or modern WebGPU pipelines; for classic ShaderMaterial GLSL use threejs-materials; for stock EffectComposer passes use threejs-postprocessing; for WebGLRenderer-only tuning use threejs-renderers."
4
+ ---
5
+
6
+ ## When to use this skill
7
+
8
+ **ALWAYS use this skill when the user mentions:**
9
+
10
+ - `NodeMaterial`, `TSL`, imports from `three/nodes` or WebGPU entry points in docs
11
+ - Building materials or post effects from nodes instead of string GLSL
12
+ - `WebGPURenderer`, `PostProcessing` (core class) in a node-centric pipeline
13
+
14
+ **IMPORTANT: node-tsl vs materials vs postprocessing**
15
+
16
+ | Situation | Skill |
17
+ |-----------|--------|
18
+ | Standard PBR tuning, no nodes | **threejs-materials** |
19
+ | TSL graph, NodeMaterial, WGSL path | **threejs-node-tsl** |
20
+ | Classic `EffectComposer` + Pass classes | **threejs-postprocessing** |
21
+ | Node post passes listed under Addons TSL in docs | **threejs-node-tsl** + **threejs-postprocessing** awareness |
22
+
23
+ **Trigger phrases include:**
24
+
25
+ - "TSL", "NodeMaterial", "three/nodes", "WebGPU", "node builder"
26
+ - "节点材质", "着色语言 TSL"
27
+
28
+ ## How to use this skill
29
+
30
+ 1. **Decide path**: WebGPU + nodes vs WebGL + classic materials—do not hybridize blindly.
31
+ 2. **Anchor docs**: start from [Nodes index](https://threejs.org/docs/#Nodes) and [TSL.html](https://threejs.org/docs/TSL.html); use [NodeMaterial](https://threejs.org/docs/NodeMaterial.html) for material entry.
32
+ 3. **Progressive disclosure**: keep SKILL.md navigational; long symbol lists live in [references/official-links.md](references/official-links.md) and [references/tsl-vs-classic.md](references/tsl-vs-classic.md); see [examples/workflow-tsl-entry.md](examples/workflow-tsl-entry.md) for navigation habits.
33
+ 4. **Renderer**: enable `WebGPURenderer` per docs; fall back notes belong in **threejs-renderers**.
34
+ 5. **Debugging**: use version-stamped examples in three.js repo; avoid copying deprecated import paths.
35
+ 6. **Post stack**: if user names `PostProcessing` core class vs addon composer, clarify table in **threejs-renderers** / **threejs-postprocessing**.
36
+
37
+ ## Doc map (official)
38
+
39
+ | Docs section | Representative links |
40
+ |--------------|----------------------|
41
+ | Nodes | https://threejs.org/docs/#Nodes |
42
+ | TSL | https://threejs.org/docs/TSL.html |
43
+ | NodeMaterial | https://threejs.org/docs/NodeMaterial.html |
44
+ | WebGPU renderer | https://threejs.org/docs/WebGPURenderer.html |
45
+
46
+ ## Scope
47
+
48
+ - **In scope:** Nodes/TSL discovery, architecture, renderer pairing, where to look next, migration hints from ShaderMaterial.
49
+ - **Out of scope:** Pasting entire TSL symbol tables into SKILL.md; guaranteeing API stability across rapid releases—always cite "current docs".
50
+
51
+ ## Common pitfalls and best practices
52
+
53
+ - Three.js node APIs evolve quickly—tie answers to a **version** or "current docs".
54
+ - Do not confuse **core** `PostProcessing` class with **addons** `EffectComposer`—names collide in conversation.
55
+ - WGSL vs GLSL expectations differ; TSL abstracts but limits still apply.
56
+ - Keep graphs modular; use references for lookup instead of bloating agent context.
57
+
58
+ ## Documentation and version
59
+
60
+ The [Nodes](https://threejs.org/docs/#Nodes) index and [TSL](https://threejs.org/docs/TSL.html) page are large and **fast-moving**. Treat https://threejs.org/docs/ as the source of truth for the user’s installed three.js; prefer linking [NodeMaterial](https://threejs.org/docs/NodeMaterial.html) and [WebGPURenderer](https://threejs.org/docs/WebGPURenderer.html) over paraphrasing long symbol lists.
61
+
62
+ ## Agent response checklist
63
+
64
+ When answering under this skill, prefer responses that:
65
+
66
+ 1. Anchor on [TSL.html](https://threejs.org/docs/TSL.html) and/or `#Nodes` rather than inventing API names.
67
+ 2. Contrast **threejs-materials** (classic) vs node/TSL path explicitly.
68
+ 3. Warn that WebGPU + nodes examples may require recent minors—cite version when known.
69
+ 4. Point to [references/tsl-vs-classic.md](references/tsl-vs-classic.md) and [references/official-links.md](references/official-links.md) for long lookups.
70
+ 5. Disambiguate core `PostProcessing` vs addon `EffectComposer` (**threejs-postprocessing**).
71
+
72
+ ## References
73
+
74
+ - https://threejs.org/docs/#Nodes
75
+ - https://threejs.org/docs/TSL.html
76
+ - https://threejs.org/docs/NodeMaterial.html
77
+ - https://threejs.org/docs/WebGPURenderer.html
78
+
79
+ ## Keywords
80
+
81
+ **English:** tsl, node material, nodes, webgpu, wgsl, three.js shading language, node builder, nodematerial
82
+
83
+ **中文:** TSL、节点材质、WebGPU、着色语言、NodeMaterial、three.js
@@ -0,0 +1,13 @@
1
+ # Workflow: finding the right TSL entry
2
+
3
+ ## Steps
4
+
5
+ 1. Open https://threejs.org/docs/TSL.html and locate the function or node category matching the effect (lighting, texture, math).
6
+
7
+ 2. Cross-check [Nodes](https://threejs.org/docs/#Nodes) for class-style nodes if TSL links to underlying node types.
8
+
9
+ 3. Pair with `WebGPURenderer` setup from **threejs-renderers**.
10
+
11
+ 4. For post effects expressed as nodes, compare with addon `EffectComposer` path in **threejs-postprocessing** and pick one pipeline per project.
12
+
13
+ Do not duplicate upstream example code here—link to the official example filename instead.
@@ -0,0 +1,8 @@
1
+ # Official entry points (Nodes / TSL)
2
+
3
+ Use these pages as the source of truth; the Nodes catalog is large—link out instead of duplicating.
4
+
5
+ - https://threejs.org/docs/#Nodes
6
+ - https://threejs.org/docs/TSL.html
7
+ - https://threejs.org/docs/NodeMaterial.html
8
+ - https://threejs.org/docs/Node.html
@@ -0,0 +1,23 @@
1
+ # TSL / NodeMaterial vs classic materials
2
+
3
+ ## When to prefer classic (`threejs-materials`)
4
+
5
+ - You need widely documented PBR with `MeshStandardMaterial` / `MeshPhysicalMaterial`.
6
+ - Target is WebGL-only deployments without WebGPU.
7
+ - Team maintains GLSL `ShaderMaterial` with known light setups.
8
+
9
+ ## When to prefer TSL / Node path (`threejs-node-tsl`)
10
+
11
+ - You adopt `WebGPURenderer` and node-based materials in examples.
12
+ - You want composable shader pieces without huge GLSL strings.
13
+ - You follow new three.js examples that import from node/TSL modules.
14
+
15
+ ## Migration sanity
16
+
17
+ - Rebuild lighting model expectations: not every classic knob maps 1:1 on day one.
18
+ - Keep references to official migration notes in the three.js repository for your version.
19
+
20
+ ## Links
21
+
22
+ - https://threejs.org/docs/TSL.html
23
+ - https://threejs.org/docs/ShaderMaterial.html