mesheditor 0.0.0-stage → 1.0.3

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 (258) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +853 -2
  3. package/dist-lib/esm/AIAgentService.d.ts +106 -0
  4. package/dist-lib/esm/AIAgentService.js +1471 -0
  5. package/dist-lib/esm/MeshEditorApp.d.ts +412 -0
  6. package/dist-lib/esm/MeshEditorApp.js +9092 -0
  7. package/dist-lib/esm/MeshEditorService.d.ts +459 -0
  8. package/dist-lib/esm/MeshEditorService.js +7083 -0
  9. package/dist-lib/esm/Neural3DGeneratorService.d.ts +88 -0
  10. package/dist-lib/esm/Neural3DGeneratorService.js +1397 -0
  11. package/dist-lib/esm/adapters/BrowserPlatformAdapter.d.ts +16 -0
  12. package/dist-lib/esm/adapters/BrowserPlatformAdapter.js +25 -0
  13. package/dist-lib/esm/adapters/ElectronPlatformAdapter.d.ts +32 -0
  14. package/dist-lib/esm/adapters/ElectronPlatformAdapter.js +336 -0
  15. package/dist-lib/esm/adapters/HostAppAdapter.d.ts +54 -0
  16. package/dist-lib/esm/adapters/HostAppAdapter.js +75 -0
  17. package/dist-lib/esm/adapters/PlatformAdapter.d.ts +98 -0
  18. package/dist-lib/esm/adapters/PlatformAdapter.js +1 -0
  19. package/dist-lib/esm/adapters/index.d.ts +13 -0
  20. package/dist-lib/esm/adapters/index.js +15 -0
  21. package/dist-lib/esm/assets/fonts/Droid_Sans_Bold.json +1 -0
  22. package/dist-lib/esm/assets/fonts/Droid_Sans_Regular.json +1 -0
  23. package/dist-lib/esm/assets/fonts/Kenney_Future_Regular.json +1 -0
  24. package/dist-lib/esm/baking/TextureBaker.d.ts +84 -0
  25. package/dist-lib/esm/baking/TextureBaker.js +709 -0
  26. package/dist-lib/esm/builtInSkills.d.ts +19 -0
  27. package/dist-lib/esm/builtInSkills.js +186 -0
  28. package/dist-lib/esm/compression/ModelCompressor.d.ts +87 -0
  29. package/dist-lib/esm/compression/ModelCompressor.js +553 -0
  30. package/dist-lib/esm/decals/DecalController.d.ts +147 -0
  31. package/dist-lib/esm/decals/DecalController.js +1031 -0
  32. package/dist-lib/esm/decals/decalAssetUrls.d.ts +1 -0
  33. package/dist-lib/esm/decals/decalAssetUrls.js +16 -0
  34. package/dist-lib/esm/geometry/architecture.d.ts +114 -0
  35. package/dist-lib/esm/geometry/architecture.js +832 -0
  36. package/dist-lib/esm/geometry/bevelModifier.d.ts +59 -0
  37. package/dist-lib/esm/geometry/bevelModifier.js +345 -0
  38. package/dist-lib/esm/geometry/facetSurfaceUtils.d.ts +127 -0
  39. package/dist-lib/esm/geometry/facetSurfaceUtils.js +676 -0
  40. package/dist-lib/esm/geometry/roundedBox.d.ts +15 -0
  41. package/dist-lib/esm/geometry/roundedBox.js +133 -0
  42. package/dist-lib/esm/index.d.ts +21 -0
  43. package/dist-lib/esm/index.js +50 -0
  44. package/dist-lib/esm/pathExtrusion/PathExtrusionController.d.ts +59 -0
  45. package/dist-lib/esm/pathExtrusion/PathExtrusionController.js +483 -0
  46. package/dist-lib/esm/pathExtrusion/PathExtrusionStudio.d.ts +76 -0
  47. package/dist-lib/esm/pathExtrusion/PathExtrusionStudio.js +1792 -0
  48. package/dist-lib/esm/pathExtrusion/PathFactory.d.ts +95 -0
  49. package/dist-lib/esm/pathExtrusion/PathFactory.js +627 -0
  50. package/dist-lib/esm/pathExtrusion/index.d.ts +4 -0
  51. package/dist-lib/esm/pathExtrusion/index.js +4 -0
  52. package/dist-lib/esm/pathExtrusion/types.d.ts +50 -0
  53. package/dist-lib/esm/pathExtrusion/types.js +1 -0
  54. package/dist-lib/esm/plugin.d.ts +250 -0
  55. package/dist-lib/esm/plugin.js +144 -0
  56. package/dist-lib/esm/rigging/WeightPaintController.d.ts +162 -0
  57. package/dist-lib/esm/rigging/WeightPaintController.js +1421 -0
  58. package/dist-lib/esm/sculpting/SculptController.d.ts +146 -0
  59. package/dist-lib/esm/sculpting/SculptController.js +2038 -0
  60. package/dist-lib/esm/sdf/index.d.ts +2 -0
  61. package/dist-lib/esm/sdf/index.js +2 -0
  62. package/dist-lib/esm/sdf/sdfPrimitives.d.ts +97 -0
  63. package/dist-lib/esm/sdf/sdfPrimitives.js +402 -0
  64. package/dist-lib/esm/sdf/surfaceNets.d.ts +29 -0
  65. package/dist-lib/esm/sdf/surfaceNets.js +399 -0
  66. package/dist-lib/esm/styles.d.ts +11 -0
  67. package/dist-lib/esm/styles.js +32 -0
  68. package/dist-lib/esm/template.d.ts +12 -0
  69. package/dist-lib/esm/template.js +19 -0
  70. package/dist-lib/esm/textMesh/TextMeshController.d.ts +61 -0
  71. package/dist-lib/esm/textMesh/TextMeshController.js +405 -0
  72. package/dist-lib/esm/textures/AITextureGenerator.d.ts +119 -0
  73. package/dist-lib/esm/textures/AITextureGenerator.js +945 -0
  74. package/dist-lib/esm/textures/ExternalImageGeneratorService.d.ts +62 -0
  75. package/dist-lib/esm/textures/ExternalImageGeneratorService.js +879 -0
  76. package/dist-lib/esm/tools/AbstractTool.d.ts +68 -0
  77. package/dist-lib/esm/tools/AbstractTool.js +128 -0
  78. package/dist-lib/esm/tools/ToolExecutionContext.d.ts +40 -0
  79. package/dist-lib/esm/tools/ToolExecutionContext.js +1 -0
  80. package/dist-lib/esm/tools/ToolInterface.d.ts +104 -0
  81. package/dist-lib/esm/tools/ToolInterface.js +1 -0
  82. package/dist-lib/esm/tools/ToolRegistry.d.ts +43 -0
  83. package/dist-lib/esm/tools/ToolRegistry.js +115 -0
  84. package/dist-lib/esm/tools/builtin/ApplyMaterialTool.d.ts +34 -0
  85. package/dist-lib/esm/tools/builtin/ApplyMaterialTool.js +48 -0
  86. package/dist-lib/esm/tools/builtin/AutoUVMappingTool.d.ts +34 -0
  87. package/dist-lib/esm/tools/builtin/AutoUVMappingTool.js +54 -0
  88. package/dist-lib/esm/tools/builtin/BakeTexturesTool.d.ts +42 -0
  89. package/dist-lib/esm/tools/builtin/BakeTexturesTool.js +81 -0
  90. package/dist-lib/esm/tools/builtin/BooleanOperationTool.d.ts +51 -0
  91. package/dist-lib/esm/tools/builtin/BooleanOperationTool.js +86 -0
  92. package/dist-lib/esm/tools/builtin/BuildVoxelMeshTool.d.ts +78 -0
  93. package/dist-lib/esm/tools/builtin/BuildVoxelMeshTool.js +170 -0
  94. package/dist-lib/esm/tools/builtin/CloneArrayTool.d.ts +75 -0
  95. package/dist-lib/esm/tools/builtin/CloneArrayTool.js +115 -0
  96. package/dist-lib/esm/tools/builtin/CreateArchTool.d.ts +118 -0
  97. package/dist-lib/esm/tools/builtin/CreateArchTool.js +89 -0
  98. package/dist-lib/esm/tools/builtin/CreateColumnTool.d.ts +114 -0
  99. package/dist-lib/esm/tools/builtin/CreateColumnTool.js +105 -0
  100. package/dist-lib/esm/tools/builtin/CreateLatheTool.d.ts +87 -0
  101. package/dist-lib/esm/tools/builtin/CreateLatheTool.js +60 -0
  102. package/dist-lib/esm/tools/builtin/CreateMaterialTool.d.ts +114 -0
  103. package/dist-lib/esm/tools/builtin/CreateMaterialTool.js +212 -0
  104. package/dist-lib/esm/tools/builtin/CreateMoldingTool.d.ts +120 -0
  105. package/dist-lib/esm/tools/builtin/CreateMoldingTool.js +95 -0
  106. package/dist-lib/esm/tools/builtin/CreatePrimitiveTool.d.ts +162 -0
  107. package/dist-lib/esm/tools/builtin/CreatePrimitiveTool.js +302 -0
  108. package/dist-lib/esm/tools/builtin/CreateRoofTool.d.ts +120 -0
  109. package/dist-lib/esm/tools/builtin/CreateRoofTool.js +108 -0
  110. package/dist-lib/esm/tools/builtin/CreateRoundedBoxTool.d.ts +101 -0
  111. package/dist-lib/esm/tools/builtin/CreateRoundedBoxTool.js +79 -0
  112. package/dist-lib/esm/tools/builtin/CreateSdfMeshTool.d.ts +224 -0
  113. package/dist-lib/esm/tools/builtin/CreateSdfMeshTool.js +238 -0
  114. package/dist-lib/esm/tools/builtin/CreateStairsTool.d.ts +135 -0
  115. package/dist-lib/esm/tools/builtin/CreateStairsTool.js +119 -0
  116. package/dist-lib/esm/tools/builtin/CreateTextMeshTool.d.ts +94 -0
  117. package/dist-lib/esm/tools/builtin/CreateTextMeshTool.js +131 -0
  118. package/dist-lib/esm/tools/builtin/CreateTubeTool.d.ts +87 -0
  119. package/dist-lib/esm/tools/builtin/CreateTubeTool.js +59 -0
  120. package/dist-lib/esm/tools/builtin/CreateWallTool.d.ts +145 -0
  121. package/dist-lib/esm/tools/builtin/CreateWallTool.js +124 -0
  122. package/dist-lib/esm/tools/builtin/DecalTool.d.ts +76 -0
  123. package/dist-lib/esm/tools/builtin/DecalTool.js +143 -0
  124. package/dist-lib/esm/tools/builtin/DeleteMeshTool.d.ts +20 -0
  125. package/dist-lib/esm/tools/builtin/DeleteMeshTool.js +42 -0
  126. package/dist-lib/esm/tools/builtin/ExecuteBabylonCodeTool.d.ts +21 -0
  127. package/dist-lib/esm/tools/builtin/ExecuteBabylonCodeTool.js +96 -0
  128. package/dist-lib/esm/tools/builtin/ExtrudePolygonTool.d.ts +114 -0
  129. package/dist-lib/esm/tools/builtin/ExtrudePolygonTool.js +77 -0
  130. package/dist-lib/esm/tools/builtin/ExtrudeShapeTool.d.ts +104 -0
  131. package/dist-lib/esm/tools/builtin/ExtrudeShapeTool.js +68 -0
  132. package/dist-lib/esm/tools/builtin/FacetArcTool.d.ts +36 -0
  133. package/dist-lib/esm/tools/builtin/FacetArcTool.js +57 -0
  134. package/dist-lib/esm/tools/builtin/FacetCutThroughTool.d.ts +30 -0
  135. package/dist-lib/esm/tools/builtin/FacetCutThroughTool.js +49 -0
  136. package/dist-lib/esm/tools/builtin/FacetExtrudeTool.d.ts +30 -0
  137. package/dist-lib/esm/tools/builtin/FacetExtrudeTool.js +49 -0
  138. package/dist-lib/esm/tools/builtin/FacetInsetTool.d.ts +34 -0
  139. package/dist-lib/esm/tools/builtin/FacetInsetTool.js +55 -0
  140. package/dist-lib/esm/tools/builtin/GenerateNeuralMeshTool.d.ts +131 -0
  141. package/dist-lib/esm/tools/builtin/GenerateNeuralMeshTool.js +455 -0
  142. package/dist-lib/esm/tools/builtin/GenerateTextureTool.d.ts +87 -0
  143. package/dist-lib/esm/tools/builtin/GenerateTextureTool.js +216 -0
  144. package/dist-lib/esm/tools/builtin/GetSceneInfoTool.d.ts +11 -0
  145. package/dist-lib/esm/tools/builtin/GetSceneInfoTool.js +12 -0
  146. package/dist-lib/esm/tools/builtin/MergeMeshesTool.d.ts +28 -0
  147. package/dist-lib/esm/tools/builtin/MergeMeshesTool.js +56 -0
  148. package/dist-lib/esm/tools/builtin/PlanModelTool.d.ts +87 -0
  149. package/dist-lib/esm/tools/builtin/PlanModelTool.js +155 -0
  150. package/dist-lib/esm/tools/builtin/RetopologizeMeshTool.d.ts +50 -0
  151. package/dist-lib/esm/tools/builtin/RetopologizeMeshTool.js +116 -0
  152. package/dist-lib/esm/tools/builtin/RigWeightTool.d.ts +55 -0
  153. package/dist-lib/esm/tools/builtin/RigWeightTool.js +139 -0
  154. package/dist-lib/esm/tools/builtin/SculptMeshTool.d.ts +138 -0
  155. package/dist-lib/esm/tools/builtin/SculptMeshTool.js +255 -0
  156. package/dist-lib/esm/tools/builtin/SeparateMeshTool.d.ts +21 -0
  157. package/dist-lib/esm/tools/builtin/SeparateMeshTool.js +31 -0
  158. package/dist-lib/esm/tools/builtin/SolidifyMeshTool.d.ts +30 -0
  159. package/dist-lib/esm/tools/builtin/SolidifyMeshTool.js +57 -0
  160. package/dist-lib/esm/tools/builtin/SpawnBaseMeshTool.d.ts +66 -0
  161. package/dist-lib/esm/tools/builtin/SpawnBaseMeshTool.js +105 -0
  162. package/dist-lib/esm/tools/builtin/SubDSmoothTool.d.ts +23 -0
  163. package/dist-lib/esm/tools/builtin/SubDSmoothTool.js +37 -0
  164. package/dist-lib/esm/tools/builtin/SubdivideMeshTool.d.ts +23 -0
  165. package/dist-lib/esm/tools/builtin/SubdivideMeshTool.js +39 -0
  166. package/dist-lib/esm/tools/builtin/TransformMeshTool.d.ts +78 -0
  167. package/dist-lib/esm/tools/builtin/TransformMeshTool.js +69 -0
  168. package/dist-lib/esm/tools/builtin/UVUnwrapTool.d.ts +48 -0
  169. package/dist-lib/esm/tools/builtin/UVUnwrapTool.js +107 -0
  170. package/dist-lib/esm/tools/builtin/VoxelPainterTool.d.ts +60 -0
  171. package/dist-lib/esm/tools/builtin/VoxelPainterTool.js +153 -0
  172. package/dist-lib/esm/tools/builtin/index.d.ts +44 -0
  173. package/dist-lib/esm/tools/builtin/index.js +44 -0
  174. package/dist-lib/esm/tools/editor/AIAgentEditorTool.d.ts +18 -0
  175. package/dist-lib/esm/tools/editor/AIAgentEditorTool.js +43 -0
  176. package/dist-lib/esm/tools/editor/AITextureEditorTool.d.ts +15 -0
  177. package/dist-lib/esm/tools/editor/AITextureEditorTool.js +28 -0
  178. package/dist-lib/esm/tools/editor/AbstractEditorTool.d.ts +29 -0
  179. package/dist-lib/esm/tools/editor/AbstractEditorTool.js +56 -0
  180. package/dist-lib/esm/tools/editor/AnimationPlayerEditorTool.d.ts +17 -0
  181. package/dist-lib/esm/tools/editor/AnimationPlayerEditorTool.js +29 -0
  182. package/dist-lib/esm/tools/editor/BakingEditorTool.d.ts +21 -0
  183. package/dist-lib/esm/tools/editor/BakingEditorTool.js +44 -0
  184. package/dist-lib/esm/tools/editor/CSGEditorTool.d.ts +20 -0
  185. package/dist-lib/esm/tools/editor/CSGEditorTool.js +42 -0
  186. package/dist-lib/esm/tools/editor/CompressModelEditorTool.d.ts +20 -0
  187. package/dist-lib/esm/tools/editor/CompressModelEditorTool.js +48 -0
  188. package/dist-lib/esm/tools/editor/CreatePrimitiveEditorTool.d.ts +17 -0
  189. package/dist-lib/esm/tools/editor/CreatePrimitiveEditorTool.js +36 -0
  190. package/dist-lib/esm/tools/editor/DecalEditorTool.d.ts +17 -0
  191. package/dist-lib/esm/tools/editor/DecalEditorTool.js +36 -0
  192. package/dist-lib/esm/tools/editor/FacetEditorTool.d.ts +23 -0
  193. package/dist-lib/esm/tools/editor/FacetEditorTool.js +80 -0
  194. package/dist-lib/esm/tools/editor/MaterialEditorTool.d.ts +18 -0
  195. package/dist-lib/esm/tools/editor/MaterialEditorTool.js +43 -0
  196. package/dist-lib/esm/tools/editor/MeshPropertiesEditorTool.d.ts +17 -0
  197. package/dist-lib/esm/tools/editor/MeshPropertiesEditorTool.js +37 -0
  198. package/dist-lib/esm/tools/editor/OutlinerEditorTool.d.ts +17 -0
  199. package/dist-lib/esm/tools/editor/OutlinerEditorTool.js +34 -0
  200. package/dist-lib/esm/tools/editor/PathExtrusionEditorTool.d.ts +26 -0
  201. package/dist-lib/esm/tools/editor/PathExtrusionEditorTool.js +72 -0
  202. package/dist-lib/esm/tools/editor/RiggingEditorTool.d.ts +27 -0
  203. package/dist-lib/esm/tools/editor/RiggingEditorTool.js +66 -0
  204. package/dist-lib/esm/tools/editor/SceneEnvironmentEditorTool.d.ts +17 -0
  205. package/dist-lib/esm/tools/editor/SceneEnvironmentEditorTool.js +35 -0
  206. package/dist-lib/esm/tools/editor/SculptEditorTool.d.ts +28 -0
  207. package/dist-lib/esm/tools/editor/SculptEditorTool.js +70 -0
  208. package/dist-lib/esm/tools/editor/TextMeshEditorTool.d.ts +16 -0
  209. package/dist-lib/esm/tools/editor/TextMeshEditorTool.js +30 -0
  210. package/dist-lib/esm/tools/editor/TextureOptimizerEditorTool.d.ts +17 -0
  211. package/dist-lib/esm/tools/editor/TextureOptimizerEditorTool.js +28 -0
  212. package/dist-lib/esm/tools/editor/UVUnwrapEditorTool.d.ts +27 -0
  213. package/dist-lib/esm/tools/editor/UVUnwrapEditorTool.js +70 -0
  214. package/dist-lib/esm/tools/editor/VoxelPainterEditorTool.d.ts +26 -0
  215. package/dist-lib/esm/tools/editor/VoxelPainterEditorTool.js +68 -0
  216. package/dist-lib/esm/tools/editor/aiQuickPrompts.d.ts +30 -0
  217. package/dist-lib/esm/tools/editor/aiQuickPrompts.js +228 -0
  218. package/dist-lib/esm/tools/editor/index.d.ts +32 -0
  219. package/dist-lib/esm/tools/editor/index.js +54 -0
  220. package/dist-lib/esm/tools/editor/toolViews.d.ts +10 -0
  221. package/dist-lib/esm/tools/editor/toolViews.js +53 -0
  222. package/dist-lib/esm/tools/editorTools.d.ts +5 -0
  223. package/dist-lib/esm/tools/editorTools.js +5 -0
  224. package/dist-lib/esm/tools/index.d.ts +8 -0
  225. package/dist-lib/esm/tools/index.js +8 -0
  226. package/dist-lib/esm/tools/textureUtils.d.ts +18 -0
  227. package/dist-lib/esm/tools/textureUtils.js +288 -0
  228. package/dist-lib/esm/types.d.ts +164 -0
  229. package/dist-lib/esm/types.js +1 -0
  230. package/dist-lib/esm/uv/UVUnwrapController.d.ts +108 -0
  231. package/dist-lib/esm/uv/UVUnwrapController.js +1022 -0
  232. package/dist-lib/esm/voxel/CustomVoxelMesher.d.ts +15 -0
  233. package/dist-lib/esm/voxel/CustomVoxelMesher.js +169 -0
  234. package/dist-lib/esm/voxel/TextureAtlasManager.d.ts +54 -0
  235. package/dist-lib/esm/voxel/TextureAtlasManager.js +630 -0
  236. package/dist-lib/esm/voxel/VoxelPainterController.d.ts +100 -0
  237. package/dist-lib/esm/voxel/VoxelPainterController.js +671 -0
  238. package/dist-lib/esm/voxel/index.d.ts +4 -0
  239. package/dist-lib/esm/voxel/index.js +4 -0
  240. package/dist-lib/esm/voxel/types.d.ts +78 -0
  241. package/dist-lib/esm/voxel/types.js +1 -0
  242. package/dist-lib/esm/web-component/MeshEditorElement.d.ts +103 -0
  243. package/dist-lib/esm/web-component/MeshEditorElement.js +246 -0
  244. package/dist-lib/esm/web-component/index.d.ts +1 -0
  245. package/dist-lib/esm/web-component/index.js +1 -0
  246. package/dist-lib/index.umd.js +3 -0
  247. package/dist-lib/mesheditor.css +2 -0
  248. package/dist-lib/mesheditor.css.map +1 -0
  249. package/dist-lib/standalone/mesheditor-element.bundle.js +3 -0
  250. package/package.json +114 -4
  251. package/skills/README.md +48 -0
  252. package/skills/figure-sculptor.md +297 -0
  253. package/skills/image-to-mesh.md +18 -0
  254. package/skills/mesh-updater.md +27 -0
  255. package/skills/neural-3d-generator.md +53 -0
  256. package/skills/procedural-modeler.md +267 -0
  257. package/skills/voxel-painter.md +21 -0
  258. package/src/mesheditor.css +6477 -0
@@ -0,0 +1,43 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * AI Mesh Agent Tool.
4
+ * Text-to-Mesh and Image-to-Mesh generator and conversational scene assistant.
5
+ */
6
+ export class AIAgentEditorTool extends AbstractEditorTool {
7
+ name = 'ai_agent';
8
+ dialogId = 'dialog-ai-agent';
9
+ triggerButtonId = 'btnToggleAIAgent';
10
+ menuId = 'menuTools';
11
+ menuLabel = 'AI Mesh Agent';
12
+ icon = 'bot';
13
+ order = 2;
14
+ defaultOpen = false;
15
+ description = 'Text-to-Mesh and Image-to-Mesh generator and conversational scene assistant.';
16
+ helpText = `
17
+ <h4><i class="app-icon" data-lucide="info"></i> Overview</h4>
18
+ <p>The <strong>AI Mesh Agent</strong> is an autonomous 3D modeling assistant powered by large language and vision models. It understands natural language descriptions and image references to build, modify, and compose complete 3D scenes.</p>
19
+
20
+ <h4><i class="app-icon" data-lucide="sparkles"></i> Capabilities</h4>
21
+ <ul>
22
+ <li><strong>Text-to-Mesh:</strong> Type prompts like <em>"Build a medieval watchtower with stone walls and wooden roof"</em> to generate detailed multi-part 3D models.</li>
23
+ <li><strong>Image-to-Mesh:</strong> Attach reference photos, sketches, or concept art. The AI inspects silhouette, colors, and proportions to reproduce the subject in 3D.</li>
24
+ <li><strong>Mesh Update:</strong> Select an existing mesh in the viewport and ask the AI to modify it (e.g. <em>"Scale this mesh by 1.5 and change material to gold"</em>).</li>
25
+ <li><strong>Speech-to-Text:</strong> Click the microphone icon to speak your modeling instructions hands-free.</li>
26
+ <li><strong>Viewport Capture:</strong> Click the camera icon to send a screenshot of your active 3D view to the AI for visual feedback and adjustments.</li>
27
+ <li><strong>OpenAI-Compatible:</strong> Connects to Ollama (local), OpenAI (GPT-4o), OpenRouter, LM Studio, or any OpenAI-compatible API endpoint.</li>
28
+ </ul>
29
+
30
+ <h4><i class="app-icon" data-lucide="book-open"></i> Prompting Guide &amp; AI Tools Directory</h4>
31
+ <p>Discover best practices for writing effective 3D prompts, referencing modeling tools directly by name (e.g. <code>modeler_create_lathe</code>, <code>modeler_boolean_operation</code>, <code>modeler_create_wall</code>), and browse the complete directory of all 40+ available Babylon.js modeling tools.</p>
32
+ <div style="margin-top: 10px;">
33
+ <button type="button" class="tool-btn btn-primary" id="btnOpenPromptGuideFromHelp" style="width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 6px;">
34
+ <span class="btn-icon"><i class="app-icon" data-lucide="book-open"></i></span>
35
+ <span class="btn-label">Open Prompting &amp; Tools Guide</span>
36
+ </button>
37
+ </div>
38
+ `.trim();
39
+ isActive(app) {
40
+ const dlg = app?.getElement?.('dialog-ai-agent');
41
+ return !!(dlg && dlg.style.display !== 'none');
42
+ }
43
+ }
@@ -0,0 +1,15 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ export declare class AITextureEditorTool extends AbstractEditorTool {
3
+ readonly name = "ai_texture_generator";
4
+ readonly dialogId = "dialog-ai-texture";
5
+ readonly triggerButtonId = "btnToggleAITextureTool";
6
+ readonly menuId = "menuTools";
7
+ readonly menuLabel = "AI Texture Generator";
8
+ readonly icon = "wand-2";
9
+ readonly order = 16;
10
+ readonly isExclusive3DTool = false;
11
+ readonly description = "Generate seamless 2D PBR textures and normal maps using the built-in procedural synthesizer or external AI image generators (Pollinations, OpenAI DALL-E, SD WebUI, Fal.ai, Replicate).";
12
+ readonly helpText = "\n <h4>AI Texture Generator</h4>\n <p>Synthesize seamless tileable Albedo and Tangent-Space Normal Map textures from natural language prompts using either the offline Procedural Synthesizer or external AI Image Generators.</p>\n <ul>\n <li><strong>Generator Engines:</strong> Choose between the built-in <em>Procedural Synthesizer</em> (fast offline mathematical noise) or external <em>AI Image Generators</em> (Free Pollinations.ai, OpenAI DALL-E 3/2, Stable Diffusion WebUI / Automatic1111, Fal.ai Flux, Replicate, or Custom REST endpoints).</li>\n <li><strong>Seamless Tiling & Normal Maps:</strong> Automatically generates matching tangent-space normal maps for realistic 3D depth and enhances prompts with orthogonal seamless tiling modifiers.</li>\n <li><strong>Prompt & Presets:</strong> Describe the surface material (e.g., <em>\"Weathered dungeon cobblestone floor with mossy crevices\"</em>) or pick a quick preset.</li>\n <li><strong>Apply, Decal & Download:</strong> Click <strong>Apply to Mesh</strong> to assign the PBR texture to the selected mesh, <strong>Use as Decal</strong> to paint with it in the Decal Painter, or <strong>Download PNG</strong> to save it locally.</li>\n </ul>\n ";
13
+ onOpen(app: any): void;
14
+ onUpdateUI(app: any): void;
15
+ }
@@ -0,0 +1,28 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ export class AITextureEditorTool extends AbstractEditorTool {
3
+ name = 'ai_texture_generator';
4
+ dialogId = 'dialog-ai-texture';
5
+ triggerButtonId = 'btnToggleAITextureTool';
6
+ menuId = 'menuTools';
7
+ menuLabel = 'AI Texture Generator';
8
+ icon = 'wand-2';
9
+ order = 16;
10
+ isExclusive3DTool = false;
11
+ description = 'Generate seamless 2D PBR textures and normal maps using the built-in procedural synthesizer or external AI image generators (Pollinations, OpenAI DALL-E, SD WebUI, Fal.ai, Replicate).';
12
+ helpText = `
13
+ <h4>AI Texture Generator</h4>
14
+ <p>Synthesize seamless tileable Albedo and Tangent-Space Normal Map textures from natural language prompts using either the offline Procedural Synthesizer or external AI Image Generators.</p>
15
+ <ul>
16
+ <li><strong>Generator Engines:</strong> Choose between the built-in <em>Procedural Synthesizer</em> (fast offline mathematical noise) or external <em>AI Image Generators</em> (Free Pollinations.ai, OpenAI DALL-E 3/2, Stable Diffusion WebUI / Automatic1111, Fal.ai Flux, Replicate, or Custom REST endpoints).</li>
17
+ <li><strong>Seamless Tiling & Normal Maps:</strong> Automatically generates matching tangent-space normal maps for realistic 3D depth and enhances prompts with orthogonal seamless tiling modifiers.</li>
18
+ <li><strong>Prompt & Presets:</strong> Describe the surface material (e.g., <em>"Weathered dungeon cobblestone floor with mossy crevices"</em>) or pick a quick preset.</li>
19
+ <li><strong>Apply, Decal & Download:</strong> Click <strong>Apply to Mesh</strong> to assign the PBR texture to the selected mesh, <strong>Use as Decal</strong> to paint with it in the Decal Painter, or <strong>Download PNG</strong> to save it locally.</li>
20
+ </ul>
21
+ `;
22
+ onOpen(app) {
23
+ app.updateAITextureUI?.();
24
+ }
25
+ onUpdateUI(app) {
26
+ app.updateAITextureUI?.();
27
+ }
28
+ }
@@ -0,0 +1,29 @@
1
+ import { ToolInterface } from '../ToolInterface';
2
+ /**
3
+ * Base class for built-in editor tools that provides automatic
4
+ * view template loading and DOM rendering from its associated EJS view template.
5
+ */
6
+ export declare abstract class AbstractEditorTool implements ToolInterface {
7
+ abstract readonly name: string;
8
+ abstract readonly description: string;
9
+ readonly helpText?: string;
10
+ readonly icon?: string;
11
+ readonly dialogId?: string;
12
+ readonly triggerButtonId?: string;
13
+ readonly menuId?: string;
14
+ readonly menuLabel?: string;
15
+ readonly isExclusive3DTool?: boolean;
16
+ readonly defaultOpen?: boolean;
17
+ order?: number;
18
+ readonly viewTemplate?: string;
19
+ /**
20
+ * Returns the HTML view template markup for this tool dialog,
21
+ * dynamically retrieved from the compiled EJS view template.
22
+ */
23
+ getViewTemplate(): string;
24
+ /**
25
+ * Mounts or retrieves the tool's dialog DOM element.
26
+ * If the dialog element is not already present in the DOM, mounts it from `getViewTemplate()`.
27
+ */
28
+ renderView(container?: HTMLElement): HTMLElement | null;
29
+ }
@@ -0,0 +1,56 @@
1
+ import { getToolViewTemplate } from './toolViews';
2
+ /**
3
+ * Base class for built-in editor tools that provides automatic
4
+ * view template loading and DOM rendering from its associated EJS view template.
5
+ */
6
+ export class AbstractEditorTool {
7
+ helpText;
8
+ icon;
9
+ dialogId;
10
+ triggerButtonId;
11
+ menuId;
12
+ menuLabel;
13
+ isExclusive3DTool;
14
+ defaultOpen;
15
+ order;
16
+ viewTemplate;
17
+ /**
18
+ * Returns the HTML view template markup for this tool dialog,
19
+ * dynamically retrieved from the compiled EJS view template.
20
+ */
21
+ getViewTemplate() {
22
+ if (this.viewTemplate)
23
+ return this.viewTemplate;
24
+ if (this.dialogId) {
25
+ const byDialog = getToolViewTemplate(this.dialogId);
26
+ if (byDialog)
27
+ return byDialog;
28
+ }
29
+ return getToolViewTemplate(this.constructor.name) || '';
30
+ }
31
+ /**
32
+ * Mounts or retrieves the tool's dialog DOM element.
33
+ * If the dialog element is not already present in the DOM, mounts it from `getViewTemplate()`.
34
+ */
35
+ renderView(container) {
36
+ if (typeof document === 'undefined')
37
+ return null;
38
+ if (this.dialogId) {
39
+ const existing = document.getElementById(this.dialogId);
40
+ if (existing)
41
+ return existing;
42
+ }
43
+ const template = this.getViewTemplate();
44
+ if (!template)
45
+ return null;
46
+ const target = container || document.getElementById('stackpanelRightSidebar') || document.body;
47
+ const wrapper = document.createElement('div');
48
+ wrapper.innerHTML = template.trim();
49
+ const element = wrapper.firstElementChild;
50
+ if (element && target) {
51
+ target.appendChild(element);
52
+ return element;
53
+ }
54
+ return null;
55
+ }
56
+ }
@@ -0,0 +1,17 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Animation Player Tool.
4
+ * Play, pause, scrub, and inspect skeletal animations and animation groups imported with 3D models.
5
+ */
6
+ export declare class AnimationPlayerEditorTool extends AbstractEditorTool {
7
+ readonly name = "animation_player";
8
+ readonly dialogId = "dialog-anim";
9
+ readonly triggerButtonId = "btnToggleAnimPanel";
10
+ readonly menuId = "menuTools";
11
+ readonly menuLabel = "Animation Player";
12
+ readonly icon = "film";
13
+ readonly order = 14;
14
+ readonly defaultOpen = true;
15
+ readonly description = "Play, pause, scrub, and inspect skeletal animations and animation groups imported with 3D models.";
16
+ readonly helpText: string;
17
+ }
@@ -0,0 +1,29 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Animation Player Tool.
4
+ * Play, pause, scrub, and inspect skeletal animations and animation groups imported with 3D models.
5
+ */
6
+ export class AnimationPlayerEditorTool extends AbstractEditorTool {
7
+ name = 'animation_player';
8
+ dialogId = 'dialog-anim';
9
+ triggerButtonId = 'btnToggleAnimPanel';
10
+ menuId = 'menuTools';
11
+ menuLabel = 'Animation Player';
12
+ icon = 'film';
13
+ order = 14;
14
+ defaultOpen = true;
15
+ description = 'Play, pause, scrub, and inspect skeletal animations and animation groups imported with 3D models.';
16
+ helpText = `
17
+ <h4><i class="app-icon" data-lucide="info"></i> Overview</h4>
18
+ <p>The <strong>Animation Player</strong> lets you preview, scrub, and manage skeletal and morph target animations imported with animated GLTF / GLB 3D models.</p>
19
+
20
+ <h4><i class="app-icon" data-lucide="play"></i> Playback Controls</h4>
21
+ <ul>
22
+ <li><strong>Animation Group Selector:</strong> Dropdown listing all animation tracks packaged in the imported model (e.g. Walk, Run, Attack, Idle).</li>
23
+ <li><strong>Play / Pause / Stop:</strong> Standard transport playback controls.</li>
24
+ <li><strong>Interactive Scrub Bar:</strong> Drag the timeline slider to inspect individual animation frames with precision.</li>
25
+ <li><strong>Speed Multiplier:</strong> Adjust playback speed from 0.25x slow motion up to 2.0x fast forward.</li>
26
+ <li><strong>Looping:</strong> Toggle continuous seamless loop playback.</li>
27
+ </ul>
28
+ `.trim();
29
+ }
@@ -0,0 +1,21 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Normal Map & Ambient Occlusion Baking Studio Tool.
4
+ * Projects high-poly surface details (creases, pores, bolts, bevels) onto a low-poly game mesh's
5
+ * 2D Tangent-Space Normal Map and Ambient Occlusion (AO) Map using an inflated Projection Cage.
6
+ */
7
+ export declare class BakingEditorTool extends AbstractEditorTool {
8
+ readonly name = "texture_baker";
9
+ readonly dialogId = "dialog-baking";
10
+ readonly triggerButtonId = "btnToggleBakingTool";
11
+ readonly menuId = "menuTools";
12
+ readonly menuLabel = "Normal & AO Baker";
13
+ readonly icon = "flame";
14
+ readonly order = 11;
15
+ readonly defaultOpen = false;
16
+ readonly description = "Bake High-Poly surface detail into Tangent-Space Normal Maps and Ambient Occlusion with automatic Cage generation.";
17
+ readonly helpText: string;
18
+ onOpen(app: any): void;
19
+ onClose(app: any): void;
20
+ onUpdateUI(app: any): void;
21
+ }
@@ -0,0 +1,44 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Normal Map & Ambient Occlusion Baking Studio Tool.
4
+ * Projects high-poly surface details (creases, pores, bolts, bevels) onto a low-poly game mesh's
5
+ * 2D Tangent-Space Normal Map and Ambient Occlusion (AO) Map using an inflated Projection Cage.
6
+ */
7
+ export class BakingEditorTool extends AbstractEditorTool {
8
+ name = 'texture_baker';
9
+ dialogId = 'dialog-baking';
10
+ triggerButtonId = 'btnToggleBakingTool';
11
+ menuId = 'menuTools';
12
+ menuLabel = 'Normal & AO Baker';
13
+ icon = 'flame';
14
+ order = 11;
15
+ defaultOpen = false;
16
+ description = 'Bake High-Poly surface detail into Tangent-Space Normal Maps and Ambient Occlusion with automatic Cage generation.';
17
+ helpText = `
18
+ <h4><i class="app-icon" data-lucide="info"></i> Overview</h4>
19
+ <p>The <strong>Normal &amp; AO Baker</strong> transfers microscopic geometric detail (wrinkles, armor rivets, bevels, pores) from a High-Poly sculpt onto a flat 2D texture for a Low-Poly game mesh so it reacts realistically to dynamic lighting at a fraction of the polygon cost.</p>
20
+
21
+ <h4><i class="app-icon" data-lucide="box"></i> Projection Cage Generation</h4>
22
+ <ul>
23
+ <li><strong>Smooth Averaged Cage:</strong> Extrudes a gap-free wireframe envelope around your Low-Poly mesh along welded vertex normals so rays never miss along hard edges.</li>
24
+ <li><strong>Auto Cage Fit:</strong> Automatically measures bounding volume offsets between your High-Poly and Low-Poly meshes to set an optimal cage distance.</li>
25
+ <li><strong>3D Cage Preview:</strong> Toggle the cyan wireframe envelope in the 3D viewport to visually verify that all high-poly features sit inside the cage.</li>
26
+ </ul>
27
+
28
+ <h4><i class="app-icon" data-lucide="flame"></i> Baked Maps &amp; Seam Dilation</h4>
29
+ <ul>
30
+ <li><strong>Tangent-Space Normal Map:</strong> Encodes XYZ surface normal perturbations in tangent space (supports both OpenGL +Y and DirectX -Y conventions).</li>
31
+ <li><strong>Ambient Occlusion (AO):</strong> Captures soft contact shadows in crevices, folds, and recessed cavities.</li>
32
+ <li><strong>Edge Padding (Dilation):</strong> Expands island border pixels outward so mipmapping never causes visible seam lines.</li>
33
+ </ul>
34
+ `.trim();
35
+ onOpen(app) {
36
+ app.updateBakingUI?.();
37
+ }
38
+ onClose(app) {
39
+ app.service?.textureBaker?.clearCagePreview();
40
+ }
41
+ onUpdateUI(app) {
42
+ app.updateBakingUI?.();
43
+ }
44
+ }
@@ -0,0 +1,20 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * CSG Sculpting & Non-Destructive Bevel Modifier Tool.
4
+ * Constructive Solid Geometry operations (Subtract, Union, Intersect) with
5
+ * non-destructive base mesh preservation and real-time Chamfer / Fillet Bevel Modifier.
6
+ */
7
+ export declare class CSGEditorTool extends AbstractEditorTool {
8
+ readonly name = "csg_sculpting";
9
+ readonly dialogId = "dialog-csg";
10
+ readonly triggerButtonId = "btnToggleCSG";
11
+ readonly menuId = "menuTools";
12
+ readonly menuLabel = "Constructive Solid Geometry";
13
+ readonly icon = "shapes";
14
+ readonly order = 8;
15
+ readonly defaultOpen = true;
16
+ readonly description = "Constructive Solid Geometry operations (Subtract, Union, Intersect) with Non-Destructive workflow and Bevel Modifier.";
17
+ readonly helpText: string;
18
+ onOpen(app: any): void;
19
+ onUpdateUI(app: any): void;
20
+ }
@@ -0,0 +1,42 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * CSG Sculpting & Non-Destructive Bevel Modifier Tool.
4
+ * Constructive Solid Geometry operations (Subtract, Union, Intersect) with
5
+ * non-destructive base mesh preservation and real-time Chamfer / Fillet Bevel Modifier.
6
+ */
7
+ export class CSGEditorTool extends AbstractEditorTool {
8
+ name = 'csg_sculpting';
9
+ dialogId = 'dialog-csg';
10
+ triggerButtonId = 'btnToggleCSG';
11
+ menuId = 'menuTools';
12
+ menuLabel = 'Constructive Solid Geometry';
13
+ icon = 'shapes';
14
+ order = 8;
15
+ defaultOpen = true;
16
+ description = 'Constructive Solid Geometry operations (Subtract, Union, Intersect) with Non-Destructive workflow and Bevel Modifier.';
17
+ helpText = `
18
+ <h4><i class="app-icon" data-lucide="info"></i> Overview</h4>
19
+ <p><strong>Constructive Solid Geometry (CSG) &amp; Bevel Modifier</strong> lets you perform Boolean modeling operations between two solid 3D meshes and round sharp edges non-destructively without permanently destroying your underlying mesh.</p>
20
+
21
+ <h4><i class="app-icon" data-lucide="sparkles"></i> Boolean Operations</h4>
22
+ <ul>
23
+ <li><strong>Subtract (Carve / Cut):</strong> Carves the cutting tool mesh shape out of the target mesh. Ideal for cutting doorways, windows, screw holes, and notches.</li>
24
+ <li><strong>Union (Merge Solids):</strong> Seamlessly fuses two overlapping meshes into a single contiguous 3D solid without internal overlapping geometry.</li>
25
+ <li><strong>Intersect:</strong> Retains only the shared overlapping volume where both meshes intersect, discarding the rest.</li>
26
+ </ul>
27
+
28
+ <h4><i class="app-icon" data-lucide="shield-check"></i> Non-Destructive Bevel Modifier</h4>
29
+ <ul>
30
+ <li><strong>Non-Destructive Mode:</strong> Preserves a pristine snapshot of the underlying mesh geometry so you can tweak bevel parameters at any time or revert to the un-beveled / pre-boolean base mesh.</li>
31
+ <li><strong>Bevel Width &amp; Segments:</strong> Round sharp boolean cuts and 90&deg; corners using 1 segment (flat Chamfer) or 2&ndash;4 segments (smooth Rounded Fillet).</li>
32
+ <li><strong>Angle Threshold:</strong> Only bevels crease edges whose dihedral angle exceeds the threshold (e.g. 30&deg;), keeping curved surfaces untouched.</li>
33
+ <li><strong>Revert &amp; Bake:</strong> Click <em>Revert to Base</em> to restore original sharp geometry, or <em>Bake Modifier</em> to permanently commit the beveled mesh.</li>
34
+ </ul>
35
+ `.trim();
36
+ onOpen(app) {
37
+ app.updateCSGGUI?.();
38
+ }
39
+ onUpdateUI(app) {
40
+ app.updateCSGGUI?.();
41
+ }
42
+ }
@@ -0,0 +1,20 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Compress Model Editor Tool.
4
+ * In-browser 3D model size optimizer: welds duplicate vertices, culls unused geometry
5
+ * and degenerate facets, applies Draco compression, and optimizes textures.
6
+ */
7
+ export declare class CompressModelEditorTool extends AbstractEditorTool {
8
+ readonly name = "compress_model";
9
+ readonly dialogId = "dialog-compress-model";
10
+ readonly triggerButtonId = "btnToggleCompressModel";
11
+ readonly menuId = "menuTools";
12
+ readonly menuLabel = "Compress Model";
13
+ readonly icon = "file-archive";
14
+ readonly order = 12;
15
+ readonly defaultOpen = false;
16
+ readonly description = "Reduce 3D model file size in browser: weld duplicate vertices, cull unused geometry, and apply Draco compression.";
17
+ readonly helpText: string;
18
+ onOpen(app: any): void;
19
+ onUpdateUI(app: any): void;
20
+ }
@@ -0,0 +1,48 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Compress Model Editor Tool.
4
+ * In-browser 3D model size optimizer: welds duplicate vertices, culls unused geometry
5
+ * and degenerate facets, applies Draco compression, and optimizes textures.
6
+ */
7
+ export class CompressModelEditorTool extends AbstractEditorTool {
8
+ name = 'compress_model';
9
+ dialogId = 'dialog-compress-model';
10
+ triggerButtonId = 'btnToggleCompressModel';
11
+ menuId = 'menuTools';
12
+ menuLabel = 'Compress Model';
13
+ icon = 'file-archive';
14
+ order = 12;
15
+ defaultOpen = false;
16
+ description = 'Reduce 3D model file size in browser: weld duplicate vertices, cull unused geometry, and apply Draco compression.';
17
+ helpText = `
18
+ <h4><i class="app-icon" data-lucide="info"></i> Overview</h4>
19
+ <p>The <strong>Compress Model</strong> tool reduces 3D file size directly in your browser. All processing is 100% client-side with zero cloud uploads and no account required.</p>
20
+
21
+ <h4><i class="app-icon" data-lucide="layers"></i> Supported Formats</h4>
22
+ <ul>
23
+ <li><strong>Input:</strong> GLB, GLTF, OBJ, STL, PLY, and FBX files.</li>
24
+ <li><strong>Output:</strong> GLB (with Draco support), standard glTF, OBJ, or STL.</li>
25
+ </ul>
26
+
27
+ <h4><i class="app-icon" data-lucide="sparkles"></i> Compression Levels</h4>
28
+ <ul>
29
+ <li><strong>Lossless (Standard):</strong> Welds duplicate vertices, removes unreferenced vertex buffers, and cleans degenerate zero-area faces. <em>100% of valid polygons are preserved with zero visual degradation.</em></li>
30
+ <li><strong>Draco Compression (High):</strong> Applies geometry cleanup plus Khronos Draco bitstream encoding (GLB/GLTF) for drastic file size reductions (up to 70%–85%).</li>
31
+ <li><strong>Draco Compression (Ultra):</strong> Maximizes Draco quantization for ultra-compact network streaming and mobile transmission.</li>
32
+ <li><strong>Polygon Decimation (Lossy):</strong> Simplifies mesh face count to a target percentage using Quadric Error Metrics while retaining overall shape and silhouette.</li>
33
+ <li><strong>Custom:</strong> Fine-tune vertex welding tolerances, normal and UV preservation, and WebP texture compression.</li>
34
+ </ul>
35
+
36
+ <h4><i class="app-icon" data-lucide="mouse-pointer"></i> Workflow</h4>
37
+ <ul>
38
+ <li><strong>Active Scene:</strong> Optimize the currently selected 3D mesh or whole scene in-place with full Undo (<kbd>Cmd+Z</kbd>) support.</li>
39
+ <li><strong>Import 3D File:</strong> Drag and drop any 3D model file into the drop zone to compress and download immediately without disrupting your active canvas.</li>
40
+ </ul>
41
+ `.trim();
42
+ onOpen(app) {
43
+ app.updateCompressModelUI?.();
44
+ }
45
+ onUpdateUI(app) {
46
+ app.updateCompressModelUI?.();
47
+ }
48
+ }
@@ -0,0 +1,17 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Create Mesh Primitive Generator Tool.
4
+ * Interactive 3D primitive mesh generation with raycast pick-and-place.
5
+ */
6
+ export declare class CreatePrimitiveEditorTool extends AbstractEditorTool {
7
+ readonly name = "create_primitive";
8
+ readonly dialogId = "dialog-create-primitive";
9
+ readonly triggerButtonId = "btnCreatePrimitive";
10
+ readonly menuId = "menuTools";
11
+ readonly menuLabel = "Create Mesh";
12
+ readonly icon = "plus-circle";
13
+ readonly order = 3;
14
+ readonly defaultOpen = true;
15
+ readonly description = "Interactive 3D primitive mesh generation with raycast pick-and-place.";
16
+ readonly helpText: string;
17
+ }
@@ -0,0 +1,36 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Create Mesh Primitive Generator Tool.
4
+ * Interactive 3D primitive mesh generation with raycast pick-and-place.
5
+ */
6
+ export class CreatePrimitiveEditorTool extends AbstractEditorTool {
7
+ name = 'create_primitive';
8
+ dialogId = 'dialog-create-primitive';
9
+ triggerButtonId = 'btnCreatePrimitive';
10
+ menuId = 'menuTools';
11
+ menuLabel = 'Create Mesh';
12
+ icon = 'plus-circle';
13
+ order = 3;
14
+ defaultOpen = true;
15
+ description = 'Interactive 3D primitive mesh generation with raycast pick-and-place.';
16
+ helpText = `
17
+ <h4><i class="app-icon" data-lucide="info"></i> Overview</h4>
18
+ <p>The <strong>Create Mesh</strong> tool allows you to spawn standard and advanced geometric primitives directly into your 3D world with full dimensional control.</p>
19
+
20
+ <h4><i class="app-icon" data-lucide="shapes"></i> Supported Primitive Types</h4>
21
+ <ul>
22
+ <li><strong>Basic Solids:</strong> Box (Cube), Sphere, Cylinder, Cone, Torus (Donut), Plane, and Disc.</li>
23
+ <li><strong>Advanced Geometry:</strong> Capsule, IcoSphere, Polyhedron, Tube, and Lathe (Rotational Extrusion).</li>
24
+ </ul>
25
+
26
+ <h4><i class="app-icon" data-lucide="sparkles"></i> Surface Raycast Pick & Place</h4>
27
+ <p>When creating a primitive, you can click directly on the ground grid or on the surface of any existing 3D mesh in the viewport to spawn the new object precisely at the cursor raycast hit point.</p>
28
+
29
+ <h4><i class="app-icon" data-lucide="sliders"></i> Parameters</h4>
30
+ <ul>
31
+ <li>Adjust width, height, depth, tessellation subdivisions, and radius.</li>
32
+ <li>Pick an initial base color or leave it to use the active material palette.</li>
33
+ <li>Transforms are automatically centered with clean origins ready for sculpting or export.</li>
34
+ </ul>
35
+ `.trim();
36
+ }
@@ -0,0 +1,17 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ export declare class DecalEditorTool extends AbstractEditorTool {
3
+ readonly name = "decal_painter";
4
+ readonly dialogId = "dialog-decal";
5
+ readonly triggerButtonId = "btnToggleDecalTool";
6
+ readonly menuId = "menuTools";
7
+ readonly menuLabel = "Decal Painter";
8
+ readonly icon = "stamp";
9
+ readonly order = 18;
10
+ readonly isExclusive3DTool = true;
11
+ readonly description = "Project and paint 2D decals (foliage, cracks, bullet impacts, runes, or AI-generated textures) onto 3D meshes and fuse them into the mesh on export.";
12
+ readonly helpText = "\n <h4>Decal Painter Tool</h4>\n <p>Paint surface details, stickers, foliage, wear-and-tear, or custom AI textures directly onto 3D meshes.</p>\n <ul>\n <li><strong>Left-Click on Mesh:</strong> Projects and stamps the selected decal onto the surface under your cursor.</li>\n <li><strong>Right-Click on Decal:</strong> Removes an unmerged decal under the cursor.</li>\n <li><strong>Keyboard Shortcuts:</strong> Press <kbd>Q</kbd> / <kbd>E</kbd> to rotate the decal by 15&deg;, or <kbd>[</kbd> / <kbd>]</kbd> to resize the decal projector.</li>\n <li><strong>Mesh Fusion &amp; Export:</strong> Click <strong>Merge Decals into Mesh</strong> at any time to fuse placed decals into the target mesh geometry (with normal-offset submeshes), or simply export your model &mdash; unmerged decals are automatically fused into the mesh during export.</li>\n </ul>\n ";
13
+ onOpen(app: any): void;
14
+ onClose(app: any): void;
15
+ onUpdateUI(app: any): void;
16
+ isActive(app: any): boolean;
17
+ }
@@ -0,0 +1,36 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ export class DecalEditorTool extends AbstractEditorTool {
3
+ name = 'decal_painter';
4
+ dialogId = 'dialog-decal';
5
+ triggerButtonId = 'btnToggleDecalTool';
6
+ menuId = 'menuTools';
7
+ menuLabel = 'Decal Painter';
8
+ icon = 'stamp';
9
+ order = 18;
10
+ isExclusive3DTool = true;
11
+ description = 'Project and paint 2D decals (foliage, cracks, bullet impacts, runes, or AI-generated textures) onto 3D meshes and fuse them into the mesh on export.';
12
+ helpText = `
13
+ <h4>Decal Painter Tool</h4>
14
+ <p>Paint surface details, stickers, foliage, wear-and-tear, or custom AI textures directly onto 3D meshes.</p>
15
+ <ul>
16
+ <li><strong>Left-Click on Mesh:</strong> Projects and stamps the selected decal onto the surface under your cursor.</li>
17
+ <li><strong>Right-Click on Decal:</strong> Removes an unmerged decal under the cursor.</li>
18
+ <li><strong>Keyboard Shortcuts:</strong> Press <kbd>Q</kbd> / <kbd>E</kbd> to rotate the decal by 15&deg;, or <kbd>[</kbd> / <kbd>]</kbd> to resize the decal projector.</li>
19
+ <li><strong>Mesh Fusion &amp; Export:</strong> Click <strong>Merge Decals into Mesh</strong> at any time to fuse placed decals into the target mesh geometry (with normal-offset submeshes), or simply export your model &mdash; unmerged decals are automatically fused into the mesh during export.</li>
20
+ </ul>
21
+ `;
22
+ onOpen(app) {
23
+ app.service?.decalController?.setActive(true);
24
+ app.updateDecalUI?.();
25
+ }
26
+ onClose(app) {
27
+ app.service?.decalController?.setActive(false);
28
+ app.updateDecalUI?.();
29
+ }
30
+ onUpdateUI(app) {
31
+ app.updateDecalUI?.();
32
+ }
33
+ isActive(app) {
34
+ return Boolean(app.service?.decalController?.isActive);
35
+ }
36
+ }
@@ -0,0 +1,23 @@
1
+ import { AbstractEditorTool } from './AbstractEditorTool';
2
+ /**
3
+ * Facet & Vertex Editor Tool.
4
+ * Advanced 3D polygon modeling, face manipulation, extrusion, inset, bevel, subdivision, and topology editing.
5
+ */
6
+ export declare class FacetEditorTool extends AbstractEditorTool {
7
+ readonly name = "facet_editor";
8
+ readonly dialogId = "dialog-facet";
9
+ readonly triggerButtonId = "btnToggleFacetEditor";
10
+ readonly menuId = "menuTools";
11
+ readonly menuLabel = "Facet & Vertex Editor";
12
+ readonly icon = "triangle";
13
+ readonly order = 4;
14
+ readonly defaultOpen = true;
15
+ readonly isExclusive3DTool = true;
16
+ readonly description = "Advanced polygon modeling plus per-facet UV mapping, atlas tiles, and per-facet material/texture assignment.";
17
+ readonly helpText: string;
18
+ isActive(app: any): boolean;
19
+ onOpen(app: any): void;
20
+ onClose(app: any): void;
21
+ onActivate(app: any): void;
22
+ onDeactivate(app: any): void;
23
+ }