@nice2dev/game-engine 1.0.5 → 1.0.11

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 (721) hide show
  1. package/dist/cjs/accessibility/Accessibility.js +55 -20
  2. package/dist/cjs/accessibility/Accessibility.js.map +1 -1
  3. package/dist/cjs/ai/AI.js +74 -40
  4. package/dist/cjs/ai/AI.js.map +1 -1
  5. package/dist/cjs/ai/BehaviorTree.js +39 -47
  6. package/dist/cjs/ai/BehaviorTree.js.map +1 -1
  7. package/dist/cjs/ai/StateMachine.js +64 -100
  8. package/dist/cjs/ai/StateMachine.js.map +1 -1
  9. package/dist/cjs/animation/Animation.js +58 -34
  10. package/dist/cjs/animation/Animation.js.map +1 -1
  11. package/dist/cjs/audio/AudioAdvanced.js +71 -37
  12. package/dist/cjs/audio/AudioAdvanced.js.map +1 -1
  13. package/dist/cjs/audio/AudioBridge.js +61 -49
  14. package/dist/cjs/audio/AudioBridge.js.map +1 -1
  15. package/dist/cjs/audio/AudioManager.js +45 -29
  16. package/dist/cjs/audio/AudioManager.js.map +1 -1
  17. package/dist/cjs/build-cloud/BuildOrchestration.js +1142 -0
  18. package/dist/cjs/build-cloud/BuildOrchestration.js.map +1 -0
  19. package/dist/cjs/build-cloud/GodotBuildCloud.js +722 -0
  20. package/dist/cjs/build-cloud/GodotBuildCloud.js.map +1 -0
  21. package/dist/cjs/build-cloud/UnityBuildCloud.js +652 -0
  22. package/dist/cjs/build-cloud/UnityBuildCloud.js.map +1 -0
  23. package/dist/cjs/build-cloud/UnrealBuildCloud.js +674 -0
  24. package/dist/cjs/build-cloud/UnrealBuildCloud.js.map +1 -0
  25. package/dist/cjs/core/EventBus.js +2 -1
  26. package/dist/cjs/core/EventBus.js.map +1 -1
  27. package/dist/cjs/core/GameConfig.js +1 -1
  28. package/dist/cjs/core/GameConfig.js.map +1 -1
  29. package/dist/cjs/core/GameLoop.js +6 -3
  30. package/dist/cjs/core/GameLoop.js.map +1 -1
  31. package/dist/cjs/core/ServiceLocator.js +1 -2
  32. package/dist/cjs/core/ServiceLocator.js.map +1 -1
  33. package/dist/cjs/devtools/DevTools.js +73 -43
  34. package/dist/cjs/devtools/DevTools.js.map +1 -1
  35. package/dist/cjs/devtools/DeveloperExperience.js +84 -42
  36. package/dist/cjs/devtools/DeveloperExperience.js.map +1 -1
  37. package/dist/cjs/devtools/GameplayAnalytics.js +71 -43
  38. package/dist/cjs/devtools/GameplayAnalytics.js.map +1 -1
  39. package/dist/cjs/dialogue/DialogueSystem.js +153 -129
  40. package/dist/cjs/dialogue/DialogueSystem.js.map +1 -1
  41. package/dist/cjs/docs/DocGenerator.js +70 -28
  42. package/dist/cjs/docs/DocGenerator.js.map +1 -1
  43. package/dist/cjs/ecs/World.js +159 -33
  44. package/dist/cjs/ecs/World.js.map +1 -1
  45. package/dist/cjs/editor/AchievementEditor.js +650 -0
  46. package/dist/cjs/editor/AchievementEditor.js.map +1 -0
  47. package/dist/cjs/editor/AdvancedEditor.js +95 -23
  48. package/dist/cjs/editor/AdvancedEditor.js.map +1 -1
  49. package/dist/cjs/editor/AnimationRetargeting.js +742 -0
  50. package/dist/cjs/editor/AnimationRetargeting.js.map +1 -0
  51. package/dist/cjs/editor/AssetBrowser.js +1191 -0
  52. package/dist/cjs/editor/AssetBrowser.js.map +1 -0
  53. package/dist/cjs/editor/AssetManager.js +22 -14
  54. package/dist/cjs/editor/AssetManager.js.map +1 -1
  55. package/dist/cjs/editor/ConsolePro.js +1092 -0
  56. package/dist/cjs/editor/ConsolePro.js.map +1 -0
  57. package/dist/cjs/editor/CraftingEditor.js +749 -0
  58. package/dist/cjs/editor/CraftingEditor.js.map +1 -0
  59. package/dist/cjs/editor/DebugTools.js +46 -23
  60. package/dist/cjs/editor/DebugTools.js.map +1 -1
  61. package/dist/cjs/editor/DialogueSystem.js +924 -0
  62. package/dist/cjs/editor/DialogueSystem.js.map +1 -0
  63. package/dist/cjs/editor/LeaderboardSystem.js +496 -0
  64. package/dist/cjs/editor/LeaderboardSystem.js.map +1 -0
  65. package/dist/cjs/editor/NiceGameEditor.js +532 -142
  66. package/dist/cjs/editor/NiceGameEditor.js.map +1 -1
  67. package/dist/cjs/editor/PrefabSystem.js +864 -0
  68. package/dist/cjs/editor/PrefabSystem.js.map +1 -0
  69. package/dist/cjs/editor/ProfilerPanel.js +716 -0
  70. package/dist/cjs/editor/ProfilerPanel.js.map +1 -0
  71. package/dist/cjs/editor/QuestEditor.js +850 -0
  72. package/dist/cjs/editor/QuestEditor.js.map +1 -0
  73. package/dist/cjs/editor/ReplaySystem.js +655 -0
  74. package/dist/cjs/editor/ReplaySystem.js.map +1 -0
  75. package/dist/cjs/editor/SceneEditor.js +33 -13
  76. package/dist/cjs/editor/SceneEditor.js.map +1 -1
  77. package/dist/cjs/editor/ScreenshotMode.js +710 -0
  78. package/dist/cjs/editor/ScreenshotMode.js.map +1 -0
  79. package/dist/cjs/editor/ShaderGraph.js +7 -6
  80. package/dist/cjs/editor/ShaderGraph.js.map +1 -1
  81. package/dist/cjs/editor/TimelineEditor.js +36 -30
  82. package/dist/cjs/editor/TimelineEditor.js.map +1 -1
  83. package/dist/cjs/editor/UndoRedoPro.js +920 -0
  84. package/dist/cjs/editor/UndoRedoPro.js.map +1 -0
  85. package/dist/cjs/editor/VRARMode.js +658 -0
  86. package/dist/cjs/editor/VRARMode.js.map +1 -0
  87. package/dist/cjs/engine/NiceGameEngine.js +12 -10
  88. package/dist/cjs/engine/NiceGameEngine.js.map +1 -1
  89. package/dist/cjs/engine/SaveSystemV2.js +73 -37
  90. package/dist/cjs/engine/SaveSystemV2.js.map +1 -1
  91. package/dist/cjs/enterprise/Enterprise.js +92 -44
  92. package/dist/cjs/enterprise/Enterprise.js.map +1 -1
  93. package/dist/cjs/export/BevyExporter.js +998 -0
  94. package/dist/cjs/export/BevyExporter.js.map +1 -0
  95. package/dist/cjs/export/CocosExporter.js +706 -0
  96. package/dist/cjs/export/CocosExporter.js.map +1 -0
  97. package/dist/cjs/export/Construct3Exporter.js +832 -0
  98. package/dist/cjs/export/Construct3Exporter.js.map +1 -0
  99. package/dist/cjs/export/DefoldExporter.js +1106 -0
  100. package/dist/cjs/export/DefoldExporter.js.map +1 -0
  101. package/dist/cjs/export/GDevelopExporter.js +748 -0
  102. package/dist/cjs/export/GDevelopExporter.js.map +1 -0
  103. package/dist/cjs/export/GameMakerExporter.js +846 -0
  104. package/dist/cjs/export/GameMakerExporter.js.map +1 -0
  105. package/dist/cjs/export/GodotExporter.js +45 -50
  106. package/dist/cjs/export/GodotExporter.js.map +1 -1
  107. package/dist/cjs/export/MinecraftBedrockExporter.js +606 -0
  108. package/dist/cjs/export/MinecraftBedrockExporter.js.map +1 -0
  109. package/dist/cjs/export/MonoGameExporter.js +1334 -0
  110. package/dist/cjs/export/MonoGameExporter.js.map +1 -0
  111. package/dist/cjs/export/Pico8Exporter.js +846 -0
  112. package/dist/cjs/export/Pico8Exporter.js.map +1 -0
  113. package/dist/cjs/export/PlatformExporter.js +4 -5
  114. package/dist/cjs/export/PlatformExporter.js.map +1 -1
  115. package/dist/cjs/export/RPGMakerExporter.js +906 -0
  116. package/dist/cjs/export/RPGMakerExporter.js.map +1 -0
  117. package/dist/cjs/export/RobloxExporter.js +943 -0
  118. package/dist/cjs/export/RobloxExporter.js.map +1 -0
  119. package/dist/cjs/export/Solar2DExporter.js +1283 -0
  120. package/dist/cjs/export/Solar2DExporter.js.map +1 -0
  121. package/dist/cjs/export/ThreeJSExporter.js +52 -55
  122. package/dist/cjs/export/ThreeJSExporter.js.map +1 -1
  123. package/dist/cjs/export/Tic80Exporter.js +1315 -0
  124. package/dist/cjs/export/Tic80Exporter.js.map +1 -0
  125. package/dist/cjs/export/UnityExporter.js +41 -56
  126. package/dist/cjs/export/UnityExporter.js.map +1 -1
  127. package/dist/cjs/export/UnrealExporter.js +962 -0
  128. package/dist/cjs/export/UnrealExporter.js.map +1 -0
  129. package/dist/cjs/export/WebExporter.js +42 -50
  130. package/dist/cjs/export/WebExporter.js.map +1 -1
  131. package/dist/cjs/export/index.js +50 -2
  132. package/dist/cjs/export/index.js.map +1 -1
  133. package/dist/cjs/godot-integration/GodotAssetLibrary.js +716 -0
  134. package/dist/cjs/godot-integration/GodotAssetLibrary.js.map +1 -0
  135. package/dist/cjs/godot-integration/GodotImport.js +1069 -0
  136. package/dist/cjs/godot-integration/GodotImport.js.map +1 -0
  137. package/dist/cjs/godot-integration/GodotLiveLink.js +962 -0
  138. package/dist/cjs/godot-integration/GodotLiveLink.js.map +1 -0
  139. package/dist/cjs/godot-integration/components/GodotProjectBrowser.js +668 -0
  140. package/dist/cjs/godot-integration/components/GodotProjectBrowser.js.map +1 -0
  141. package/dist/cjs/i18n/I18n.js +56 -30
  142. package/dist/cjs/i18n/I18n.js.map +1 -1
  143. package/dist/cjs/i18n/useTranslation.js +4 -4
  144. package/dist/cjs/i18n/useTranslation.js.map +1 -1
  145. package/dist/cjs/import/AsepriteImporter.js +15 -19
  146. package/dist/cjs/import/AsepriteImporter.js.map +1 -1
  147. package/dist/cjs/import/DragonBonesImporter.js +36 -40
  148. package/dist/cjs/import/DragonBonesImporter.js.map +1 -1
  149. package/dist/cjs/import/GameMakerImporter.js +11 -17
  150. package/dist/cjs/import/GameMakerImporter.js.map +1 -1
  151. package/dist/cjs/import/GodotSceneImporter.js +43 -29
  152. package/dist/cjs/import/GodotSceneImporter.js.map +1 -1
  153. package/dist/cjs/import/LDtkImporter.js +16 -17
  154. package/dist/cjs/import/LDtkImporter.js.map +1 -1
  155. package/dist/cjs/import/Live2DImporter.js +16 -19
  156. package/dist/cjs/import/Live2DImporter.js.map +1 -1
  157. package/dist/cjs/import/NdgFormat.js +28 -35
  158. package/dist/cjs/import/NdgFormat.js.map +1 -1
  159. package/dist/cjs/import/OgmoImporter.js +16 -18
  160. package/dist/cjs/import/OgmoImporter.js.map +1 -1
  161. package/dist/cjs/import/RPGMakerImporter.js +5 -6
  162. package/dist/cjs/import/RPGMakerImporter.js.map +1 -1
  163. package/dist/cjs/import/SceneImporter.js +23 -13
  164. package/dist/cjs/import/SceneImporter.js.map +1 -1
  165. package/dist/cjs/import/SpineImporter.js +20 -20
  166. package/dist/cjs/import/SpineImporter.js.map +1 -1
  167. package/dist/cjs/import/SpriterImporter.js +38 -46
  168. package/dist/cjs/import/SpriterImporter.js.map +1 -1
  169. package/dist/cjs/import/TiledMapImporter.js +20 -24
  170. package/dist/cjs/import/TiledMapImporter.js.map +1 -1
  171. package/dist/cjs/import/UnitySceneImporter.js +15 -15
  172. package/dist/cjs/import/UnitySceneImporter.js.map +1 -1
  173. package/dist/cjs/index.js +516 -4
  174. package/dist/cjs/index.js.map +1 -1
  175. package/dist/cjs/input/GamepadNavigation.js +82 -47
  176. package/dist/cjs/input/GamepadNavigation.js.map +1 -1
  177. package/dist/cjs/input/InputManager.js +107 -52
  178. package/dist/cjs/input/InputManager.js.map +1 -1
  179. package/dist/cjs/input/useGamepads.js +35 -29
  180. package/dist/cjs/input/useGamepads.js.map +1 -1
  181. package/dist/cjs/integration/IconSprite.js +39 -21
  182. package/dist/cjs/integration/IconSprite.js.map +1 -1
  183. package/dist/cjs/inventory/InventorySystem.js +218 -127
  184. package/dist/cjs/inventory/InventorySystem.js.map +1 -1
  185. package/dist/cjs/kids/KidMode.js +491 -78
  186. package/dist/cjs/kids/KidMode.js.map +1 -1
  187. package/dist/cjs/kids/KidTools.js +154 -48
  188. package/dist/cjs/kids/KidTools.js.map +1 -1
  189. package/dist/cjs/monetization/Monetization.js +47 -35
  190. package/dist/cjs/monetization/Monetization.js.map +1 -1
  191. package/dist/cjs/multiplayer/LocalMultiplayer.js +48 -26
  192. package/dist/cjs/multiplayer/LocalMultiplayer.js.map +1 -1
  193. package/dist/cjs/multiplayer/MiniGameTypes.js +23 -10
  194. package/dist/cjs/multiplayer/MiniGameTypes.js.map +1 -1
  195. package/dist/cjs/native-engine/AssetPipeline.js +540 -0
  196. package/dist/cjs/native-engine/AssetPipeline.js.map +1 -0
  197. package/dist/cjs/native-engine/AudioEngine.js +825 -0
  198. package/dist/cjs/native-engine/AudioEngine.js.map +1 -0
  199. package/dist/cjs/native-engine/InputSystem.js +1175 -0
  200. package/dist/cjs/native-engine/InputSystem.js.map +1 -0
  201. package/dist/cjs/native-engine/NetworkingSystem.js +825 -0
  202. package/dist/cjs/native-engine/NetworkingSystem.js.map +1 -0
  203. package/dist/cjs/native-engine/PhysicsEngine.js +622 -0
  204. package/dist/cjs/native-engine/PhysicsEngine.js.map +1 -0
  205. package/dist/cjs/native-engine/RenderingEngine.js +371 -0
  206. package/dist/cjs/native-engine/RenderingEngine.js.map +1 -0
  207. package/dist/cjs/native-engine/SceneGraph.js +862 -0
  208. package/dist/cjs/native-engine/SceneGraph.js.map +1 -0
  209. package/dist/cjs/network/MultiplayerTransport.js +63 -33
  210. package/dist/cjs/network/MultiplayerTransport.js.map +1 -1
  211. package/dist/cjs/network/Networking.js +87 -62
  212. package/dist/cjs/network/Networking.js.map +1 -1
  213. package/dist/cjs/pathfinding/Pathfinding.js +71 -26
  214. package/dist/cjs/pathfinding/Pathfinding.js.map +1 -1
  215. package/dist/cjs/performance/AssetStreaming.js +656 -0
  216. package/dist/cjs/performance/AssetStreaming.js.map +1 -0
  217. package/dist/cjs/performance/BenchmarkSuite.js +37 -24
  218. package/dist/cjs/performance/BenchmarkSuite.js.map +1 -1
  219. package/dist/cjs/performance/DeltaCompression.js +566 -0
  220. package/dist/cjs/performance/DeltaCompression.js.map +1 -0
  221. package/dist/cjs/performance/DeterministicPhysics.js +603 -0
  222. package/dist/cjs/performance/DeterministicPhysics.js.map +1 -0
  223. package/dist/cjs/performance/ECSOptimization.js +726 -0
  224. package/dist/cjs/performance/ECSOptimization.js.map +1 -0
  225. package/dist/cjs/performance/HotReload.js +525 -0
  226. package/dist/cjs/performance/HotReload.js.map +1 -0
  227. package/dist/cjs/performance/InputRecording.js +590 -0
  228. package/dist/cjs/performance/InputRecording.js.map +1 -0
  229. package/dist/cjs/performance/InterestManagement.js +532 -0
  230. package/dist/cjs/performance/InterestManagement.js.map +1 -0
  231. package/dist/cjs/performance/LocalizationRuntime.js +472 -0
  232. package/dist/cjs/performance/LocalizationRuntime.js.map +1 -0
  233. package/dist/cjs/performance/MemoryManagement.js +487 -0
  234. package/dist/cjs/performance/MemoryManagement.js.map +1 -0
  235. package/dist/cjs/performance/ModSupport.js +531 -0
  236. package/dist/cjs/performance/ModSupport.js.map +1 -0
  237. package/dist/cjs/performance/MultiThreadedPhysics.js +500 -0
  238. package/dist/cjs/performance/MultiThreadedPhysics.js.map +1 -0
  239. package/dist/cjs/performance/NetworkPrediction.js +521 -0
  240. package/dist/cjs/performance/NetworkPrediction.js.map +1 -0
  241. package/dist/cjs/performance/ObjectPooling.js +653 -0
  242. package/dist/cjs/performance/ObjectPooling.js.map +1 -0
  243. package/dist/cjs/performance/Performance.js +64 -25
  244. package/dist/cjs/performance/Performance.js.map +1 -1
  245. package/dist/cjs/performance/PerformanceAdvanced.js +83 -49
  246. package/dist/cjs/performance/PerformanceAdvanced.js.map +1 -1
  247. package/dist/cjs/performance/SaveSystem.js +574 -0
  248. package/dist/cjs/performance/SaveSystem.js.map +1 -0
  249. package/dist/cjs/performance/WebGPURenderer.js +702 -0
  250. package/dist/cjs/performance/WebGPURenderer.js.map +1 -0
  251. package/dist/cjs/physics/PhysicsAdvanced.js +32 -20
  252. package/dist/cjs/physics/PhysicsAdvanced.js.map +1 -1
  253. package/dist/cjs/physics/PhysicsEngine2D.js +63 -36
  254. package/dist/cjs/physics/PhysicsEngine2D.js.map +1 -1
  255. package/dist/cjs/plugins/PluginSDK.js +46 -34
  256. package/dist/cjs/plugins/PluginSDK.js.map +1 -1
  257. package/dist/cjs/plugins/PluginTestKit.js +28 -29
  258. package/dist/cjs/plugins/PluginTestKit.js.map +1 -1
  259. package/dist/cjs/procedural/Procedural.js +24 -17
  260. package/dist/cjs/procedural/Procedural.js.map +1 -1
  261. package/dist/cjs/procedural/WorldBuilding.js +187 -55
  262. package/dist/cjs/procedural/WorldBuilding.js.map +1 -1
  263. package/dist/cjs/quest/QuestSystem.js +145 -111
  264. package/dist/cjs/quest/QuestSystem.js.map +1 -1
  265. package/dist/cjs/release/Release.js +142 -31
  266. package/dist/cjs/release/Release.js.map +1 -1
  267. package/dist/cjs/rendering/Camera2D.js +12 -7
  268. package/dist/cjs/rendering/Camera2D.js.map +1 -1
  269. package/dist/cjs/rendering/Renderer2D.js +62 -26
  270. package/dist/cjs/rendering/Renderer2D.js.map +1 -1
  271. package/dist/cjs/rendering/WebGPURenderPipeline.js +60 -31
  272. package/dist/cjs/rendering/WebGPURenderPipeline.js.map +1 -1
  273. package/dist/cjs/runtime3d/Runtime3D.js +80 -55
  274. package/dist/cjs/runtime3d/Runtime3D.js.map +1 -1
  275. package/dist/cjs/runtime3d/SceneEditor3D.js +20 -11
  276. package/dist/cjs/runtime3d/SceneEditor3D.js.map +1 -1
  277. package/dist/cjs/scene/SceneManager.js +26 -12
  278. package/dist/cjs/scene/SceneManager.js.map +1 -1
  279. package/dist/cjs/scripting/GraphToAST.js +36 -24
  280. package/dist/cjs/scripting/GraphToAST.js.map +1 -1
  281. package/dist/cjs/scripting/LanguageExporter.js +2 -3
  282. package/dist/cjs/scripting/LanguageExporter.js.map +1 -1
  283. package/dist/cjs/scripting/NodeGraph.js +49 -32
  284. package/dist/cjs/scripting/NodeGraph.js.map +1 -1
  285. package/dist/cjs/scripting/ScriptAST.js +19 -6
  286. package/dist/cjs/scripting/ScriptAST.js.map +1 -1
  287. package/dist/cjs/scripting/VisualScripting2.js +13 -12
  288. package/dist/cjs/scripting/VisualScripting2.js.map +1 -1
  289. package/dist/cjs/scripting/exporters/CSharpExporter.js +16 -16
  290. package/dist/cjs/scripting/exporters/CSharpExporter.js.map +1 -1
  291. package/dist/cjs/scripting/exporters/GDScriptExporter.js +3 -6
  292. package/dist/cjs/scripting/exporters/GDScriptExporter.js.map +1 -1
  293. package/dist/cjs/scripting/exporters/LuaExporter.js +5 -9
  294. package/dist/cjs/scripting/exporters/LuaExporter.js.map +1 -1
  295. package/dist/cjs/scripting/exporters/PythonExporter.js +7 -13
  296. package/dist/cjs/scripting/exporters/PythonExporter.js.map +1 -1
  297. package/dist/cjs/scripting/exporters/RustExporter.js +7 -14
  298. package/dist/cjs/scripting/exporters/RustExporter.js.map +1 -1
  299. package/dist/cjs/scripting/exporters/TypeScriptExporter.js +28 -29
  300. package/dist/cjs/scripting/exporters/TypeScriptExporter.js.map +1 -1
  301. package/dist/cjs/social/Social.js +27 -20
  302. package/dist/cjs/social/Social.js.map +1 -1
  303. package/dist/cjs/systems/LightingSystem.js +980 -0
  304. package/dist/cjs/systems/LightingSystem.js.map +1 -0
  305. package/dist/cjs/systems/ParticleSystem2.js +34 -17
  306. package/dist/cjs/systems/ParticleSystem2.js.map +1 -1
  307. package/dist/cjs/systems/PhysicsDebugSystem.js +1228 -0
  308. package/dist/cjs/systems/PhysicsDebugSystem.js.map +1 -0
  309. package/dist/cjs/systems/TerrainSystem.js +1137 -0
  310. package/dist/cjs/systems/TerrainSystem.js.map +1 -0
  311. package/dist/cjs/templates/ActionTemplates.js +144 -24
  312. package/dist/cjs/templates/ActionTemplates.js.map +1 -1
  313. package/dist/cjs/templates/FightingTemplate.js +536 -0
  314. package/dist/cjs/templates/FightingTemplate.js.map +1 -0
  315. package/dist/cjs/templates/MetroidvaniaTemplate.js +523 -0
  316. package/dist/cjs/templates/MetroidvaniaTemplate.js.map +1 -0
  317. package/dist/cjs/templates/PartyTemplates.js +60 -28
  318. package/dist/cjs/templates/PartyTemplates.js.map +1 -1
  319. package/dist/cjs/templates/PuzzleTemplates.js +63 -22
  320. package/dist/cjs/templates/PuzzleTemplates.js.map +1 -1
  321. package/dist/cjs/templates/RPGTemplates.js +29 -15
  322. package/dist/cjs/templates/RPGTemplates.js.map +1 -1
  323. package/dist/cjs/templates/SportsTemplates.js +41 -17
  324. package/dist/cjs/templates/SportsTemplates.js.map +1 -1
  325. package/dist/cjs/templates/StrategyTemplates.js +45 -18
  326. package/dist/cjs/templates/StrategyTemplates.js.map +1 -1
  327. package/dist/cjs/templates/SurvivalTemplate.js +479 -0
  328. package/dist/cjs/templates/SurvivalTemplate.js.map +1 -0
  329. package/dist/cjs/templates/WaveDefense.js +139 -52
  330. package/dist/cjs/templates/WaveDefense.js.map +1 -1
  331. package/dist/cjs/tilemap/Tilemap.js +48 -32
  332. package/dist/cjs/tilemap/Tilemap.js.map +1 -1
  333. package/dist/cjs/tutorials/TutorialBranching.js +111 -42
  334. package/dist/cjs/tutorials/TutorialBranching.js.map +1 -1
  335. package/dist/cjs/tutorials/TutorialEngine.js +152 -80
  336. package/dist/cjs/tutorials/TutorialEngine.js.map +1 -1
  337. package/dist/cjs/tutorials/TutorialOverlay.js +117 -40
  338. package/dist/cjs/tutorials/TutorialOverlay.js.map +1 -1
  339. package/dist/cjs/ui/GameUI.js +69 -42
  340. package/dist/cjs/ui/GameUI.js.map +1 -1
  341. package/dist/cjs/unity-integration/UnityAssetStore.js +754 -0
  342. package/dist/cjs/unity-integration/UnityAssetStore.js.map +1 -0
  343. package/dist/cjs/unity-integration/UnityImport.js +1252 -0
  344. package/dist/cjs/unity-integration/UnityImport.js.map +1 -0
  345. package/dist/cjs/unity-integration/UnityLiveLink.js +1022 -0
  346. package/dist/cjs/unity-integration/UnityLiveLink.js.map +1 -0
  347. package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js +796 -0
  348. package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js.map +1 -0
  349. package/dist/cjs/unity-integration/components/UnityProjectBrowser.js +833 -0
  350. package/dist/cjs/unity-integration/components/UnityProjectBrowser.js.map +1 -0
  351. package/dist/cjs/unreal-integration/UnrealImport.js +442 -0
  352. package/dist/cjs/unreal-integration/UnrealImport.js.map +1 -0
  353. package/dist/cjs/unreal-integration/UnrealLiveLink.js +1186 -0
  354. package/dist/cjs/unreal-integration/UnrealLiveLink.js.map +1 -0
  355. package/dist/cjs/unreal-integration/UnrealMarketplace.js +497 -0
  356. package/dist/cjs/unreal-integration/UnrealMarketplace.js.map +1 -0
  357. package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js +835 -0
  358. package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js.map +1 -0
  359. package/dist/cjs/xr/ARVR.js +32 -9
  360. package/dist/cjs/xr/ARVR.js.map +1 -1
  361. package/dist/esm/accessibility/Accessibility.js +55 -20
  362. package/dist/esm/accessibility/Accessibility.js.map +1 -1
  363. package/dist/esm/ai/AI.js +74 -40
  364. package/dist/esm/ai/AI.js.map +1 -1
  365. package/dist/esm/ai/BehaviorTree.js +39 -47
  366. package/dist/esm/ai/BehaviorTree.js.map +1 -1
  367. package/dist/esm/ai/StateMachine.js +65 -99
  368. package/dist/esm/ai/StateMachine.js.map +1 -1
  369. package/dist/esm/animation/Animation.js +58 -34
  370. package/dist/esm/animation/Animation.js.map +1 -1
  371. package/dist/esm/audio/AudioAdvanced.js +71 -37
  372. package/dist/esm/audio/AudioAdvanced.js.map +1 -1
  373. package/dist/esm/audio/AudioBridge.js +61 -49
  374. package/dist/esm/audio/AudioBridge.js.map +1 -1
  375. package/dist/esm/audio/AudioManager.js +45 -29
  376. package/dist/esm/audio/AudioManager.js.map +1 -1
  377. package/dist/esm/build-cloud/BuildOrchestration.js +1129 -0
  378. package/dist/esm/build-cloud/BuildOrchestration.js.map +1 -0
  379. package/dist/esm/build-cloud/GodotBuildCloud.js +715 -0
  380. package/dist/esm/build-cloud/GodotBuildCloud.js.map +1 -0
  381. package/dist/esm/build-cloud/UnityBuildCloud.js +643 -0
  382. package/dist/esm/build-cloud/UnityBuildCloud.js.map +1 -0
  383. package/dist/esm/build-cloud/UnrealBuildCloud.js +668 -0
  384. package/dist/esm/build-cloud/UnrealBuildCloud.js.map +1 -0
  385. package/dist/esm/core/EventBus.js +2 -1
  386. package/dist/esm/core/EventBus.js.map +1 -1
  387. package/dist/esm/core/GameConfig.js +1 -1
  388. package/dist/esm/core/GameConfig.js.map +1 -1
  389. package/dist/esm/core/GameLoop.js +6 -3
  390. package/dist/esm/core/GameLoop.js.map +1 -1
  391. package/dist/esm/core/ServiceLocator.js +1 -2
  392. package/dist/esm/core/ServiceLocator.js.map +1 -1
  393. package/dist/esm/devtools/DevTools.js +73 -43
  394. package/dist/esm/devtools/DevTools.js.map +1 -1
  395. package/dist/esm/devtools/DeveloperExperience.js +84 -42
  396. package/dist/esm/devtools/DeveloperExperience.js.map +1 -1
  397. package/dist/esm/devtools/GameplayAnalytics.js +71 -43
  398. package/dist/esm/devtools/GameplayAnalytics.js.map +1 -1
  399. package/dist/esm/dialogue/DialogueSystem.js +153 -129
  400. package/dist/esm/dialogue/DialogueSystem.js.map +1 -1
  401. package/dist/esm/docs/DocGenerator.js +70 -28
  402. package/dist/esm/docs/DocGenerator.js.map +1 -1
  403. package/dist/esm/ecs/World.js +159 -33
  404. package/dist/esm/ecs/World.js.map +1 -1
  405. package/dist/esm/editor/AchievementEditor.js +645 -0
  406. package/dist/esm/editor/AchievementEditor.js.map +1 -0
  407. package/dist/esm/editor/AdvancedEditor.js +95 -23
  408. package/dist/esm/editor/AdvancedEditor.js.map +1 -1
  409. package/dist/esm/editor/AnimationRetargeting.js +738 -0
  410. package/dist/esm/editor/AnimationRetargeting.js.map +1 -0
  411. package/dist/esm/editor/AssetBrowser.js +1184 -0
  412. package/dist/esm/editor/AssetBrowser.js.map +1 -0
  413. package/dist/esm/editor/AssetManager.js +22 -14
  414. package/dist/esm/editor/AssetManager.js.map +1 -1
  415. package/dist/esm/editor/ConsolePro.js +1085 -0
  416. package/dist/esm/editor/ConsolePro.js.map +1 -0
  417. package/dist/esm/editor/CraftingEditor.js +744 -0
  418. package/dist/esm/editor/CraftingEditor.js.map +1 -0
  419. package/dist/esm/editor/DebugTools.js +46 -23
  420. package/dist/esm/editor/DebugTools.js.map +1 -1
  421. package/dist/esm/editor/DialogueSystem.js +918 -0
  422. package/dist/esm/editor/DialogueSystem.js.map +1 -0
  423. package/dist/esm/editor/LeaderboardSystem.js +491 -0
  424. package/dist/esm/editor/LeaderboardSystem.js.map +1 -0
  425. package/dist/esm/editor/NiceGameEditor.js +532 -142
  426. package/dist/esm/editor/NiceGameEditor.js.map +1 -1
  427. package/dist/esm/editor/PrefabSystem.js +858 -0
  428. package/dist/esm/editor/PrefabSystem.js.map +1 -0
  429. package/dist/esm/editor/ProfilerPanel.js +710 -0
  430. package/dist/esm/editor/ProfilerPanel.js.map +1 -0
  431. package/dist/esm/editor/QuestEditor.js +846 -0
  432. package/dist/esm/editor/QuestEditor.js.map +1 -0
  433. package/dist/esm/editor/ReplaySystem.js +648 -0
  434. package/dist/esm/editor/ReplaySystem.js.map +1 -0
  435. package/dist/esm/editor/SceneEditor.js +33 -13
  436. package/dist/esm/editor/SceneEditor.js.map +1 -1
  437. package/dist/esm/editor/ScreenshotMode.js +702 -0
  438. package/dist/esm/editor/ScreenshotMode.js.map +1 -0
  439. package/dist/esm/editor/ShaderGraph.js +7 -6
  440. package/dist/esm/editor/ShaderGraph.js.map +1 -1
  441. package/dist/esm/editor/TimelineEditor.js +37 -30
  442. package/dist/esm/editor/TimelineEditor.js.map +1 -1
  443. package/dist/esm/editor/UndoRedoPro.js +914 -0
  444. package/dist/esm/editor/UndoRedoPro.js.map +1 -0
  445. package/dist/esm/editor/VRARMode.js +653 -0
  446. package/dist/esm/editor/VRARMode.js.map +1 -0
  447. package/dist/esm/engine/NiceGameEngine.js +12 -10
  448. package/dist/esm/engine/NiceGameEngine.js.map +1 -1
  449. package/dist/esm/engine/SaveSystemV2.js +73 -37
  450. package/dist/esm/engine/SaveSystemV2.js.map +1 -1
  451. package/dist/esm/enterprise/Enterprise.js +92 -44
  452. package/dist/esm/enterprise/Enterprise.js.map +1 -1
  453. package/dist/esm/export/BevyExporter.js +995 -0
  454. package/dist/esm/export/BevyExporter.js.map +1 -0
  455. package/dist/esm/export/CocosExporter.js +703 -0
  456. package/dist/esm/export/CocosExporter.js.map +1 -0
  457. package/dist/esm/export/Construct3Exporter.js +829 -0
  458. package/dist/esm/export/Construct3Exporter.js.map +1 -0
  459. package/dist/esm/export/DefoldExporter.js +1103 -0
  460. package/dist/esm/export/DefoldExporter.js.map +1 -0
  461. package/dist/esm/export/GDevelopExporter.js +745 -0
  462. package/dist/esm/export/GDevelopExporter.js.map +1 -0
  463. package/dist/esm/export/GameMakerExporter.js +843 -0
  464. package/dist/esm/export/GameMakerExporter.js.map +1 -0
  465. package/dist/esm/export/GodotExporter.js +45 -50
  466. package/dist/esm/export/GodotExporter.js.map +1 -1
  467. package/dist/esm/export/MinecraftBedrockExporter.js +603 -0
  468. package/dist/esm/export/MinecraftBedrockExporter.js.map +1 -0
  469. package/dist/esm/export/MonoGameExporter.js +1331 -0
  470. package/dist/esm/export/MonoGameExporter.js.map +1 -0
  471. package/dist/esm/export/Pico8Exporter.js +843 -0
  472. package/dist/esm/export/Pico8Exporter.js.map +1 -0
  473. package/dist/esm/export/PlatformExporter.js +4 -5
  474. package/dist/esm/export/PlatformExporter.js.map +1 -1
  475. package/dist/esm/export/RPGMakerExporter.js +903 -0
  476. package/dist/esm/export/RPGMakerExporter.js.map +1 -0
  477. package/dist/esm/export/RobloxExporter.js +940 -0
  478. package/dist/esm/export/RobloxExporter.js.map +1 -0
  479. package/dist/esm/export/Solar2DExporter.js +1280 -0
  480. package/dist/esm/export/Solar2DExporter.js.map +1 -0
  481. package/dist/esm/export/ThreeJSExporter.js +52 -55
  482. package/dist/esm/export/ThreeJSExporter.js.map +1 -1
  483. package/dist/esm/export/Tic80Exporter.js +1312 -0
  484. package/dist/esm/export/Tic80Exporter.js.map +1 -0
  485. package/dist/esm/export/UnityExporter.js +41 -56
  486. package/dist/esm/export/UnityExporter.js.map +1 -1
  487. package/dist/esm/export/UnrealExporter.js +959 -0
  488. package/dist/esm/export/UnrealExporter.js.map +1 -0
  489. package/dist/esm/export/WebExporter.js +42 -50
  490. package/dist/esm/export/WebExporter.js.map +1 -1
  491. package/dist/esm/export/index.js +38 -2
  492. package/dist/esm/export/index.js.map +1 -1
  493. package/dist/esm/godot-integration/GodotAssetLibrary.js +711 -0
  494. package/dist/esm/godot-integration/GodotAssetLibrary.js.map +1 -0
  495. package/dist/esm/godot-integration/GodotImport.js +1062 -0
  496. package/dist/esm/godot-integration/GodotImport.js.map +1 -0
  497. package/dist/esm/godot-integration/GodotLiveLink.js +958 -0
  498. package/dist/esm/godot-integration/GodotLiveLink.js.map +1 -0
  499. package/dist/esm/godot-integration/components/GodotProjectBrowser.js +666 -0
  500. package/dist/esm/godot-integration/components/GodotProjectBrowser.js.map +1 -0
  501. package/dist/esm/i18n/I18n.js +56 -30
  502. package/dist/esm/i18n/I18n.js.map +1 -1
  503. package/dist/esm/i18n/useTranslation.js +4 -4
  504. package/dist/esm/i18n/useTranslation.js.map +1 -1
  505. package/dist/esm/import/AsepriteImporter.js +15 -19
  506. package/dist/esm/import/AsepriteImporter.js.map +1 -1
  507. package/dist/esm/import/DragonBonesImporter.js +36 -40
  508. package/dist/esm/import/DragonBonesImporter.js.map +1 -1
  509. package/dist/esm/import/GameMakerImporter.js +11 -17
  510. package/dist/esm/import/GameMakerImporter.js.map +1 -1
  511. package/dist/esm/import/GodotSceneImporter.js +43 -29
  512. package/dist/esm/import/GodotSceneImporter.js.map +1 -1
  513. package/dist/esm/import/LDtkImporter.js +16 -17
  514. package/dist/esm/import/LDtkImporter.js.map +1 -1
  515. package/dist/esm/import/Live2DImporter.js +16 -19
  516. package/dist/esm/import/Live2DImporter.js.map +1 -1
  517. package/dist/esm/import/NdgFormat.js +28 -35
  518. package/dist/esm/import/NdgFormat.js.map +1 -1
  519. package/dist/esm/import/OgmoImporter.js +16 -18
  520. package/dist/esm/import/OgmoImporter.js.map +1 -1
  521. package/dist/esm/import/RPGMakerImporter.js +5 -6
  522. package/dist/esm/import/RPGMakerImporter.js.map +1 -1
  523. package/dist/esm/import/SceneImporter.js +23 -13
  524. package/dist/esm/import/SceneImporter.js.map +1 -1
  525. package/dist/esm/import/SpineImporter.js +20 -20
  526. package/dist/esm/import/SpineImporter.js.map +1 -1
  527. package/dist/esm/import/SpriterImporter.js +38 -46
  528. package/dist/esm/import/SpriterImporter.js.map +1 -1
  529. package/dist/esm/import/TiledMapImporter.js +20 -24
  530. package/dist/esm/import/TiledMapImporter.js.map +1 -1
  531. package/dist/esm/import/UnitySceneImporter.js +15 -15
  532. package/dist/esm/import/UnitySceneImporter.js.map +1 -1
  533. package/dist/esm/index.js +76 -3
  534. package/dist/esm/index.js.map +1 -1
  535. package/dist/esm/input/GamepadNavigation.js +82 -47
  536. package/dist/esm/input/GamepadNavigation.js.map +1 -1
  537. package/dist/esm/input/InputManager.js +107 -52
  538. package/dist/esm/input/InputManager.js.map +1 -1
  539. package/dist/esm/input/useGamepads.js +35 -29
  540. package/dist/esm/input/useGamepads.js.map +1 -1
  541. package/dist/esm/integration/IconSprite.js +39 -21
  542. package/dist/esm/integration/IconSprite.js.map +1 -1
  543. package/dist/esm/inventory/InventorySystem.js +218 -127
  544. package/dist/esm/inventory/InventorySystem.js.map +1 -1
  545. package/dist/esm/kids/KidMode.js +491 -78
  546. package/dist/esm/kids/KidMode.js.map +1 -1
  547. package/dist/esm/kids/KidTools.js +154 -48
  548. package/dist/esm/kids/KidTools.js.map +1 -1
  549. package/dist/esm/monetization/Monetization.js +47 -35
  550. package/dist/esm/monetization/Monetization.js.map +1 -1
  551. package/dist/esm/multiplayer/LocalMultiplayer.js +48 -26
  552. package/dist/esm/multiplayer/LocalMultiplayer.js.map +1 -1
  553. package/dist/esm/multiplayer/MiniGameTypes.js +23 -10
  554. package/dist/esm/multiplayer/MiniGameTypes.js.map +1 -1
  555. package/dist/esm/native-engine/AssetPipeline.js +537 -0
  556. package/dist/esm/native-engine/AssetPipeline.js.map +1 -0
  557. package/dist/esm/native-engine/AudioEngine.js +822 -0
  558. package/dist/esm/native-engine/AudioEngine.js.map +1 -0
  559. package/dist/esm/native-engine/InputSystem.js +1170 -0
  560. package/dist/esm/native-engine/InputSystem.js.map +1 -0
  561. package/dist/esm/native-engine/NetworkingSystem.js +817 -0
  562. package/dist/esm/native-engine/NetworkingSystem.js.map +1 -0
  563. package/dist/esm/native-engine/PhysicsEngine.js +619 -0
  564. package/dist/esm/native-engine/PhysicsEngine.js.map +1 -0
  565. package/dist/esm/native-engine/RenderingEngine.js +368 -0
  566. package/dist/esm/native-engine/RenderingEngine.js.map +1 -0
  567. package/dist/esm/native-engine/SceneGraph.js +857 -0
  568. package/dist/esm/native-engine/SceneGraph.js.map +1 -0
  569. package/dist/esm/network/MultiplayerTransport.js +63 -33
  570. package/dist/esm/network/MultiplayerTransport.js.map +1 -1
  571. package/dist/esm/network/Networking.js +87 -62
  572. package/dist/esm/network/Networking.js.map +1 -1
  573. package/dist/esm/pathfinding/Pathfinding.js +71 -26
  574. package/dist/esm/pathfinding/Pathfinding.js.map +1 -1
  575. package/dist/esm/performance/AssetStreaming.js +649 -0
  576. package/dist/esm/performance/AssetStreaming.js.map +1 -0
  577. package/dist/esm/performance/BenchmarkSuite.js +37 -24
  578. package/dist/esm/performance/BenchmarkSuite.js.map +1 -1
  579. package/dist/esm/performance/DeltaCompression.js +554 -0
  580. package/dist/esm/performance/DeltaCompression.js.map +1 -0
  581. package/dist/esm/performance/DeterministicPhysics.js +573 -0
  582. package/dist/esm/performance/DeterministicPhysics.js.map +1 -0
  583. package/dist/esm/performance/ECSOptimization.js +716 -0
  584. package/dist/esm/performance/ECSOptimization.js.map +1 -0
  585. package/dist/esm/performance/HotReload.js +517 -0
  586. package/dist/esm/performance/HotReload.js.map +1 -0
  587. package/dist/esm/performance/InputRecording.js +580 -0
  588. package/dist/esm/performance/InputRecording.js.map +1 -0
  589. package/dist/esm/performance/InterestManagement.js +524 -0
  590. package/dist/esm/performance/InterestManagement.js.map +1 -0
  591. package/dist/esm/performance/LocalizationRuntime.js +465 -0
  592. package/dist/esm/performance/LocalizationRuntime.js.map +1 -0
  593. package/dist/esm/performance/MemoryManagement.js +481 -0
  594. package/dist/esm/performance/MemoryManagement.js.map +1 -0
  595. package/dist/esm/performance/ModSupport.js +520 -0
  596. package/dist/esm/performance/ModSupport.js.map +1 -0
  597. package/dist/esm/performance/MultiThreadedPhysics.js +491 -0
  598. package/dist/esm/performance/MultiThreadedPhysics.js.map +1 -0
  599. package/dist/esm/performance/NetworkPrediction.js +508 -0
  600. package/dist/esm/performance/NetworkPrediction.js.map +1 -0
  601. package/dist/esm/performance/ObjectPooling.js +639 -0
  602. package/dist/esm/performance/ObjectPooling.js.map +1 -0
  603. package/dist/esm/performance/Performance.js +64 -25
  604. package/dist/esm/performance/Performance.js.map +1 -1
  605. package/dist/esm/performance/PerformanceAdvanced.js +83 -49
  606. package/dist/esm/performance/PerformanceAdvanced.js.map +1 -1
  607. package/dist/esm/performance/SaveSystem.js +567 -0
  608. package/dist/esm/performance/SaveSystem.js.map +1 -0
  609. package/dist/esm/performance/WebGPURenderer.js +697 -0
  610. package/dist/esm/performance/WebGPURenderer.js.map +1 -0
  611. package/dist/esm/physics/PhysicsAdvanced.js +32 -20
  612. package/dist/esm/physics/PhysicsAdvanced.js.map +1 -1
  613. package/dist/esm/physics/PhysicsEngine2D.js +63 -36
  614. package/dist/esm/physics/PhysicsEngine2D.js.map +1 -1
  615. package/dist/esm/plugins/PluginSDK.js +46 -34
  616. package/dist/esm/plugins/PluginSDK.js.map +1 -1
  617. package/dist/esm/plugins/PluginTestKit.js +28 -29
  618. package/dist/esm/plugins/PluginTestKit.js.map +1 -1
  619. package/dist/esm/procedural/Procedural.js +24 -17
  620. package/dist/esm/procedural/Procedural.js.map +1 -1
  621. package/dist/esm/procedural/WorldBuilding.js +188 -55
  622. package/dist/esm/procedural/WorldBuilding.js.map +1 -1
  623. package/dist/esm/quest/QuestSystem.js +145 -111
  624. package/dist/esm/quest/QuestSystem.js.map +1 -1
  625. package/dist/esm/release/Release.js +142 -31
  626. package/dist/esm/release/Release.js.map +1 -1
  627. package/dist/esm/rendering/Camera2D.js +12 -7
  628. package/dist/esm/rendering/Camera2D.js.map +1 -1
  629. package/dist/esm/rendering/Renderer2D.js +62 -26
  630. package/dist/esm/rendering/Renderer2D.js.map +1 -1
  631. package/dist/esm/rendering/WebGPURenderPipeline.js +60 -31
  632. package/dist/esm/rendering/WebGPURenderPipeline.js.map +1 -1
  633. package/dist/esm/runtime3d/Runtime3D.js +80 -55
  634. package/dist/esm/runtime3d/Runtime3D.js.map +1 -1
  635. package/dist/esm/runtime3d/SceneEditor3D.js +20 -11
  636. package/dist/esm/runtime3d/SceneEditor3D.js.map +1 -1
  637. package/dist/esm/scene/SceneManager.js +26 -12
  638. package/dist/esm/scene/SceneManager.js.map +1 -1
  639. package/dist/esm/scripting/GraphToAST.js +36 -24
  640. package/dist/esm/scripting/GraphToAST.js.map +1 -1
  641. package/dist/esm/scripting/LanguageExporter.js +2 -3
  642. package/dist/esm/scripting/LanguageExporter.js.map +1 -1
  643. package/dist/esm/scripting/NodeGraph.js +49 -32
  644. package/dist/esm/scripting/NodeGraph.js.map +1 -1
  645. package/dist/esm/scripting/ScriptAST.js +19 -6
  646. package/dist/esm/scripting/ScriptAST.js.map +1 -1
  647. package/dist/esm/scripting/VisualScripting2.js +13 -12
  648. package/dist/esm/scripting/VisualScripting2.js.map +1 -1
  649. package/dist/esm/scripting/exporters/CSharpExporter.js +16 -16
  650. package/dist/esm/scripting/exporters/CSharpExporter.js.map +1 -1
  651. package/dist/esm/scripting/exporters/GDScriptExporter.js +3 -6
  652. package/dist/esm/scripting/exporters/GDScriptExporter.js.map +1 -1
  653. package/dist/esm/scripting/exporters/LuaExporter.js +5 -9
  654. package/dist/esm/scripting/exporters/LuaExporter.js.map +1 -1
  655. package/dist/esm/scripting/exporters/PythonExporter.js +7 -13
  656. package/dist/esm/scripting/exporters/PythonExporter.js.map +1 -1
  657. package/dist/esm/scripting/exporters/RustExporter.js +7 -14
  658. package/dist/esm/scripting/exporters/RustExporter.js.map +1 -1
  659. package/dist/esm/scripting/exporters/TypeScriptExporter.js +28 -29
  660. package/dist/esm/scripting/exporters/TypeScriptExporter.js.map +1 -1
  661. package/dist/esm/social/Social.js +27 -20
  662. package/dist/esm/social/Social.js.map +1 -1
  663. package/dist/esm/systems/LightingSystem.js +968 -0
  664. package/dist/esm/systems/LightingSystem.js.map +1 -0
  665. package/dist/esm/systems/ParticleSystem2.js +34 -17
  666. package/dist/esm/systems/ParticleSystem2.js.map +1 -1
  667. package/dist/esm/systems/PhysicsDebugSystem.js +1219 -0
  668. package/dist/esm/systems/PhysicsDebugSystem.js.map +1 -0
  669. package/dist/esm/systems/TerrainSystem.js +1125 -0
  670. package/dist/esm/systems/TerrainSystem.js.map +1 -0
  671. package/dist/esm/templates/ActionTemplates.js +144 -24
  672. package/dist/esm/templates/ActionTemplates.js.map +1 -1
  673. package/dist/esm/templates/FightingTemplate.js +513 -0
  674. package/dist/esm/templates/FightingTemplate.js.map +1 -0
  675. package/dist/esm/templates/MetroidvaniaTemplate.js +484 -0
  676. package/dist/esm/templates/MetroidvaniaTemplate.js.map +1 -0
  677. package/dist/esm/templates/PartyTemplates.js +60 -28
  678. package/dist/esm/templates/PartyTemplates.js.map +1 -1
  679. package/dist/esm/templates/PuzzleTemplates.js +63 -22
  680. package/dist/esm/templates/PuzzleTemplates.js.map +1 -1
  681. package/dist/esm/templates/RPGTemplates.js +29 -15
  682. package/dist/esm/templates/RPGTemplates.js.map +1 -1
  683. package/dist/esm/templates/SportsTemplates.js +41 -17
  684. package/dist/esm/templates/SportsTemplates.js.map +1 -1
  685. package/dist/esm/templates/StrategyTemplates.js +45 -18
  686. package/dist/esm/templates/StrategyTemplates.js.map +1 -1
  687. package/dist/esm/templates/SurvivalTemplate.js +447 -0
  688. package/dist/esm/templates/SurvivalTemplate.js.map +1 -0
  689. package/dist/esm/templates/WaveDefense.js +139 -52
  690. package/dist/esm/templates/WaveDefense.js.map +1 -1
  691. package/dist/esm/tilemap/Tilemap.js +48 -32
  692. package/dist/esm/tilemap/Tilemap.js.map +1 -1
  693. package/dist/esm/tutorials/TutorialBranching.js +111 -42
  694. package/dist/esm/tutorials/TutorialBranching.js.map +1 -1
  695. package/dist/esm/tutorials/TutorialEngine.js +152 -80
  696. package/dist/esm/tutorials/TutorialEngine.js.map +1 -1
  697. package/dist/esm/tutorials/TutorialOverlay.js +117 -40
  698. package/dist/esm/tutorials/TutorialOverlay.js.map +1 -1
  699. package/dist/esm/ui/GameUI.js +69 -42
  700. package/dist/esm/ui/GameUI.js.map +1 -1
  701. package/dist/esm/unity-integration/UnityAssetStore.js +749 -0
  702. package/dist/esm/unity-integration/UnityAssetStore.js.map +1 -0
  703. package/dist/esm/unity-integration/UnityImport.js +1246 -0
  704. package/dist/esm/unity-integration/UnityImport.js.map +1 -0
  705. package/dist/esm/unity-integration/UnityLiveLink.js +1017 -0
  706. package/dist/esm/unity-integration/UnityLiveLink.js.map +1 -0
  707. package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js +794 -0
  708. package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js.map +1 -0
  709. package/dist/esm/unity-integration/components/UnityProjectBrowser.js +831 -0
  710. package/dist/esm/unity-integration/components/UnityProjectBrowser.js.map +1 -0
  711. package/dist/esm/unreal-integration/UnrealImport.js +437 -0
  712. package/dist/esm/unreal-integration/UnrealImport.js.map +1 -0
  713. package/dist/esm/unreal-integration/UnrealLiveLink.js +1182 -0
  714. package/dist/esm/unreal-integration/UnrealLiveLink.js.map +1 -0
  715. package/dist/esm/unreal-integration/UnrealMarketplace.js +490 -0
  716. package/dist/esm/unreal-integration/UnrealMarketplace.js.map +1 -0
  717. package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js +833 -0
  718. package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js.map +1 -0
  719. package/dist/esm/xr/ARVR.js +32 -9
  720. package/dist/esm/xr/ARVR.js.map +1 -1
  721. package/package.json +7 -6
@@ -0,0 +1,1069 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @file GodotImport.ts
5
+ * @description Godot Engine Project Import for Nice2Dev Game Engine
6
+ * PRO-1.9.1: Godot Project Import
7
+ *
8
+ * Features:
9
+ * - .tscn (text scene) parsing
10
+ * - .scn (binary scene) detection
11
+ * - .tres resource parsing
12
+ * - GDScript parser and AST extraction
13
+ * - Node tree reconstruction
14
+ * - Signal/connection mapping
15
+ */
16
+ // ============================================================
17
+ // TSCN Parser
18
+ // ============================================================
19
+ /**
20
+ * Parses Godot's text scene format (.tscn)
21
+ */
22
+ function parseGodotScene(content) {
23
+ const lines = content.split('\n');
24
+ const scene = {
25
+ header: { loadSteps: 0, format: 3 },
26
+ extResources: [],
27
+ subResources: [],
28
+ rootNode: null,
29
+ connections: [],
30
+ editable: [],
31
+ };
32
+ let currentSection = 'header';
33
+ let currentNode = null;
34
+ const nodeMap = new Map();
35
+ let currentSubResource = null;
36
+ let multiLineValue = '';
37
+ let multiLineKey = '';
38
+ let inMultiLine = false;
39
+ for (let i = 0; i < lines.length; i++) {
40
+ let line = lines[i];
41
+ // Handle multi-line values (strings, arrays, etc.)
42
+ if (inMultiLine) {
43
+ multiLineValue += '\n' + line;
44
+ if (line.includes(']') || (line.includes('"') && line.trim().endsWith('"'))) {
45
+ if (currentNode) {
46
+ currentNode.properties[multiLineKey] = parseGodotValue(multiLineValue);
47
+ }
48
+ else if (currentSubResource) {
49
+ currentSubResource.properties[multiLineKey] = parseGodotValue(multiLineValue);
50
+ }
51
+ inMultiLine = false;
52
+ multiLineValue = '';
53
+ multiLineKey = '';
54
+ }
55
+ continue;
56
+ }
57
+ line = line.trim();
58
+ if (!line || line.startsWith(';')) {
59
+ continue;
60
+ }
61
+ // Section headers
62
+ if (line.startsWith('[')) {
63
+ const sectionMatch = line.match(/^\[(\w+)(?:\s+(.+))?\]$/);
64
+ if (sectionMatch) {
65
+ const sectionType = sectionMatch[1];
66
+ const sectionParams = sectionMatch[2] || '';
67
+ switch (sectionType) {
68
+ case 'gd_scene':
69
+ currentSection = 'header';
70
+ scene.header = parseGodotSceneHeader(sectionParams);
71
+ break;
72
+ case 'ext_resource':
73
+ currentSection = 'ext_resource';
74
+ scene.extResources.push(parseExtResource(sectionParams));
75
+ break;
76
+ case 'sub_resource':
77
+ currentSection = 'sub_resource';
78
+ currentSubResource = parseSubResourceHeader(sectionParams);
79
+ scene.subResources.push(currentSubResource);
80
+ break;
81
+ case 'node':
82
+ currentSection = 'node';
83
+ currentNode = parseNodeHeader(sectionParams);
84
+ if (!currentNode.parent) {
85
+ // Root node
86
+ scene.rootNode = currentNode;
87
+ nodeMap.set('.', currentNode);
88
+ }
89
+ else {
90
+ // Find parent and add as child
91
+ const parentPath = currentNode.parent;
92
+ const parentNode = nodeMap.get(parentPath);
93
+ if (parentNode) {
94
+ parentNode.children.push(currentNode);
95
+ }
96
+ // Calculate this node's path
97
+ const nodePath = parentPath === '.' ? currentNode.name : `${parentPath}/${currentNode.name}`;
98
+ nodeMap.set(nodePath, currentNode);
99
+ }
100
+ break;
101
+ case 'connection':
102
+ currentSection = 'connection';
103
+ scene.connections.push(parseConnectionHeader(sectionParams));
104
+ break;
105
+ case 'editable':
106
+ currentSection = 'editable';
107
+ const pathMatch = sectionParams.match(/path="([^"]+)"/);
108
+ if (pathMatch) {
109
+ scene.editable.push(pathMatch[1]);
110
+ }
111
+ break;
112
+ }
113
+ continue;
114
+ }
115
+ }
116
+ // Property assignment
117
+ if (line.includes('=')) {
118
+ const eqIndex = line.indexOf('=');
119
+ const key = line.substring(0, eqIndex).trim();
120
+ const valueStr = line.substring(eqIndex + 1).trim();
121
+ // Check for multi-line value start
122
+ if ((valueStr.startsWith('[') && !valueStr.includes(']')) ||
123
+ (valueStr.startsWith('"') && !valueStr.endsWith('"') && valueStr.length > 1)) {
124
+ inMultiLine = true;
125
+ multiLineKey = key;
126
+ multiLineValue = valueStr;
127
+ continue;
128
+ }
129
+ const value = parseGodotValue(valueStr);
130
+ if (currentSection === 'node' && currentNode) {
131
+ currentNode.properties[key] = value;
132
+ }
133
+ else if (currentSection === 'sub_resource' && currentSubResource) {
134
+ currentSubResource.properties[key] = value;
135
+ }
136
+ }
137
+ }
138
+ return scene;
139
+ }
140
+ function parseGodotSceneHeader(params) {
141
+ const header = { loadSteps: 0, format: 3 };
142
+ const loadStepsMatch = params.match(/load_steps=(\d+)/);
143
+ if (loadStepsMatch) {
144
+ header.loadSteps = parseInt(loadStepsMatch[1], 10);
145
+ }
146
+ const formatMatch = params.match(/format=(\d+)/);
147
+ if (formatMatch) {
148
+ header.format = parseInt(formatMatch[1], 10);
149
+ }
150
+ const uidMatch = params.match(/uid="([^"]+)"/);
151
+ if (uidMatch) {
152
+ header.uid = uidMatch[1];
153
+ }
154
+ const typeMatch = params.match(/type="([^"]+)"/);
155
+ if (typeMatch) {
156
+ header.type = typeMatch[1];
157
+ }
158
+ return header;
159
+ }
160
+ function parseExtResource(params) {
161
+ const resource = { id: '', type: '', path: '' };
162
+ const typeMatch = params.match(/type="([^"]+)"/);
163
+ if (typeMatch) {
164
+ resource.type = typeMatch[1];
165
+ }
166
+ const pathMatch = params.match(/path="([^"]+)"/);
167
+ if (pathMatch) {
168
+ resource.path = pathMatch[1];
169
+ }
170
+ const idMatch = params.match(/id="?([^"\s]+)"?/);
171
+ if (idMatch) {
172
+ resource.id = idMatch[1];
173
+ }
174
+ const uidMatch = params.match(/uid="([^"]+)"/);
175
+ if (uidMatch) {
176
+ resource.uid = uidMatch[1];
177
+ }
178
+ return resource;
179
+ }
180
+ function parseSubResourceHeader(params) {
181
+ const resource = { id: '', type: '', properties: {} };
182
+ const typeMatch = params.match(/type="([^"]+)"/);
183
+ if (typeMatch) {
184
+ resource.type = typeMatch[1];
185
+ }
186
+ const idMatch = params.match(/id="?([^"\s]+)"?/);
187
+ if (idMatch) {
188
+ resource.id = idMatch[1];
189
+ }
190
+ return resource;
191
+ }
192
+ function parseNodeHeader(params) {
193
+ const node = {
194
+ name: '',
195
+ type: 'Node',
196
+ properties: {},
197
+ children: [],
198
+ };
199
+ const nameMatch = params.match(/name="([^"]+)"/);
200
+ if (nameMatch) {
201
+ node.name = nameMatch[1];
202
+ }
203
+ const typeMatch = params.match(/type="([^"]+)"/);
204
+ if (typeMatch) {
205
+ node.type = typeMatch[1];
206
+ }
207
+ const parentMatch = params.match(/parent="([^"]+)"/);
208
+ if (parentMatch) {
209
+ node.parent = parentMatch[1];
210
+ }
211
+ const instanceMatch = params.match(/instance=ExtResource\(\s*"?([^")]+)"?\s*\)/);
212
+ if (instanceMatch) {
213
+ node.instance = instanceMatch[1];
214
+ }
215
+ const groupsMatch = params.match(/groups=\[([^\]]+)\]/);
216
+ if (groupsMatch) {
217
+ node.groups = groupsMatch[1].split(',').map((g) => g.trim().replace(/"/g, ''));
218
+ }
219
+ const indexMatch = params.match(/index="?(\d+)"?/);
220
+ if (indexMatch) {
221
+ node.index = parseInt(indexMatch[1], 10);
222
+ }
223
+ return node;
224
+ }
225
+ function parseConnectionHeader(params) {
226
+ const connection = {
227
+ signal: '',
228
+ from: '',
229
+ to: '',
230
+ method: '',
231
+ };
232
+ const signalMatch = params.match(/signal="([^"]+)"/);
233
+ if (signalMatch) {
234
+ connection.signal = signalMatch[1];
235
+ }
236
+ const fromMatch = params.match(/from="([^"]+)"/);
237
+ if (fromMatch) {
238
+ connection.from = fromMatch[1];
239
+ }
240
+ const toMatch = params.match(/to="([^"]+)"/);
241
+ if (toMatch) {
242
+ connection.to = toMatch[1];
243
+ }
244
+ const methodMatch = params.match(/method="([^"]+)"/);
245
+ if (methodMatch) {
246
+ connection.method = methodMatch[1];
247
+ }
248
+ const flagsMatch = params.match(/flags=(\d+)/);
249
+ if (flagsMatch) {
250
+ connection.flags = parseInt(flagsMatch[1], 10);
251
+ }
252
+ return connection;
253
+ }
254
+ function parseGodotValue(valueStr) {
255
+ valueStr = valueStr.trim();
256
+ // null
257
+ if (valueStr === 'null') {
258
+ return null;
259
+ }
260
+ // Boolean
261
+ if (valueStr === 'true') {
262
+ return true;
263
+ }
264
+ if (valueStr === 'false') {
265
+ return false;
266
+ }
267
+ // Integer
268
+ if (/^-?\d+$/.test(valueStr)) {
269
+ return parseInt(valueStr, 10);
270
+ }
271
+ // Float
272
+ if (/^-?\d+\.\d+$/.test(valueStr)) {
273
+ return parseFloat(valueStr);
274
+ }
275
+ // String
276
+ if (valueStr.startsWith('"') && valueStr.endsWith('"')) {
277
+ return valueStr.slice(1, -1);
278
+ }
279
+ // Vector2
280
+ const vec2Match = valueStr.match(/^Vector2\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/);
281
+ if (vec2Match) {
282
+ return { x: parseFloat(vec2Match[1]), y: parseFloat(vec2Match[2]) };
283
+ }
284
+ // Vector2i
285
+ const vec2iMatch = valueStr.match(/^Vector2i\(\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/);
286
+ if (vec2iMatch) {
287
+ return { x: parseInt(vec2iMatch[1], 10), y: parseInt(vec2iMatch[2], 10) };
288
+ }
289
+ // Vector3
290
+ const vec3Match = valueStr.match(/^Vector3\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/);
291
+ if (vec3Match) {
292
+ return {
293
+ x: parseFloat(vec3Match[1]),
294
+ y: parseFloat(vec3Match[2]),
295
+ z: parseFloat(vec3Match[3]),
296
+ };
297
+ }
298
+ // Vector3i
299
+ const vec3iMatch = valueStr.match(/^Vector3i\(\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/);
300
+ if (vec3iMatch) {
301
+ return {
302
+ x: parseInt(vec3iMatch[1], 10),
303
+ y: parseInt(vec3iMatch[2], 10),
304
+ z: parseInt(vec3iMatch[3], 10),
305
+ };
306
+ }
307
+ // Color
308
+ const colorMatch = valueStr.match(/^Color\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)$/);
309
+ if (colorMatch) {
310
+ return {
311
+ r: parseFloat(colorMatch[1]),
312
+ g: parseFloat(colorMatch[2]),
313
+ b: parseFloat(colorMatch[3]),
314
+ a: colorMatch[4] ? parseFloat(colorMatch[4]) : 1,
315
+ };
316
+ }
317
+ // Rect2
318
+ const rect2Match = valueStr.match(/^Rect2\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);
319
+ if (rect2Match) {
320
+ return {
321
+ x: parseFloat(rect2Match[1]),
322
+ y: parseFloat(rect2Match[2]),
323
+ width: parseFloat(rect2Match[3]),
324
+ height: parseFloat(rect2Match[4]),
325
+ };
326
+ }
327
+ // Transform2D
328
+ const transform2dMatch = valueStr.match(/^Transform2D\(\s*([\d.e+-]+)\s*,\s*([\d.e+-]+)\s*,\s*([\d.e+-]+)\s*,\s*([\d.e+-]+)\s*,\s*([\d.e+-]+)\s*,\s*([\d.e+-]+)\s*\)$/);
329
+ if (transform2dMatch) {
330
+ return {
331
+ type: 'Transform2D',
332
+ x: { x: parseFloat(transform2dMatch[1]), y: parseFloat(transform2dMatch[2]) },
333
+ y: { x: parseFloat(transform2dMatch[3]), y: parseFloat(transform2dMatch[4]) },
334
+ origin: { x: parseFloat(transform2dMatch[5]), y: parseFloat(transform2dMatch[6]) },
335
+ };
336
+ }
337
+ // Transform3D
338
+ const transform3dMatch = valueStr.match(/^Transform3D\(([^)]+)\)$/);
339
+ if (transform3dMatch) {
340
+ const values = transform3dMatch[1].split(',').map((v) => parseFloat(v.trim()));
341
+ if (values.length === 12) {
342
+ return {
343
+ type: 'Transform3D',
344
+ basis: {
345
+ x: { x: values[0], y: values[1], z: values[2] },
346
+ y: { x: values[3], y: values[4], z: values[5] },
347
+ z: { x: values[6], y: values[7], z: values[8] },
348
+ },
349
+ origin: { x: values[9], y: values[10], z: values[11] },
350
+ };
351
+ }
352
+ }
353
+ // NodePath
354
+ const nodePathMatch = valueStr.match(/^NodePath\("([^"]*)"\)$/);
355
+ if (nodePathMatch) {
356
+ return { type: 'NodePath', path: nodePathMatch[1] };
357
+ }
358
+ // ExtResource reference
359
+ const extResMatch = valueStr.match(/^ExtResource\(\s*"?([^")]+)"?\s*\)$/);
360
+ if (extResMatch) {
361
+ return { type: 'ExtResource', id: extResMatch[1] };
362
+ }
363
+ // SubResource reference
364
+ const subResMatch = valueStr.match(/^SubResource\(\s*"?([^")]+)"?\s*\)$/);
365
+ if (subResMatch) {
366
+ return { type: 'SubResource', id: subResMatch[1] };
367
+ }
368
+ // Array
369
+ if (valueStr.startsWith('[') && valueStr.endsWith(']')) {
370
+ const inner = valueStr.slice(1, -1).trim();
371
+ if (!inner) {
372
+ return [];
373
+ }
374
+ // Simple split for basic arrays (doesn't handle nested structures well)
375
+ return inner.split(/,(?![^(]*\))/).map((v) => parseGodotValue(v.trim()));
376
+ }
377
+ // Dictionary
378
+ if (valueStr.startsWith('{') && valueStr.endsWith('}')) {
379
+ // Simple dict parsing
380
+ const inner = valueStr.slice(1, -1).trim();
381
+ if (!inner) {
382
+ return {};
383
+ }
384
+ const dict = {};
385
+ // Match key: value pairs
386
+ const pairRegex = /"([^"]+)":\s*([^,}]+)/g;
387
+ let match;
388
+ while ((match = pairRegex.exec(inner)) !== null) {
389
+ dict[match[1]] = parseGodotValue(match[2].trim());
390
+ }
391
+ return dict;
392
+ }
393
+ // PackedStringArray
394
+ const packedStrMatch = valueStr.match(/^PackedStringArray\(\s*([^)]*)\s*\)$/);
395
+ if (packedStrMatch) {
396
+ const inner = packedStrMatch[1].trim();
397
+ if (!inner) {
398
+ return [];
399
+ }
400
+ return inner.split(',').map((s) => s.trim().replace(/^"|"$/g, ''));
401
+ }
402
+ // PackedVector2Array
403
+ const packedVec2Match = valueStr.match(/^PackedVector2Array\(\s*([^)]*)\s*\)$/);
404
+ if (packedVec2Match) {
405
+ const inner = packedVec2Match[1].trim();
406
+ if (!inner) {
407
+ return [];
408
+ }
409
+ const nums = inner.split(',').map((n) => parseFloat(n.trim()));
410
+ const vectors = [];
411
+ for (let i = 0; i < nums.length; i += 2) {
412
+ vectors.push({ x: nums[i], y: nums[i + 1] });
413
+ }
414
+ return vectors;
415
+ }
416
+ // Return as-is for unknown types
417
+ return valueStr;
418
+ }
419
+ // ============================================================
420
+ // TRES Resource Parser
421
+ // ============================================================
422
+ /**
423
+ * Parses Godot's text resource format (.tres)
424
+ */
425
+ function parseGodotResource(content) {
426
+ const lines = content.split('\n');
427
+ const resource = {
428
+ header: { type: '', format: 3 },
429
+ extResources: [],
430
+ subResources: [],
431
+ resource: { type: '', properties: {} },
432
+ };
433
+ let currentSection = 'header';
434
+ let currentSubResource = null;
435
+ for (let line of lines) {
436
+ line = line.trim();
437
+ if (!line || line.startsWith(';')) {
438
+ continue;
439
+ }
440
+ // Section headers
441
+ if (line.startsWith('[')) {
442
+ const sectionMatch = line.match(/^\[(\w+)(?:\s+(.+))?\]$/);
443
+ if (sectionMatch) {
444
+ const sectionType = sectionMatch[1];
445
+ const sectionParams = sectionMatch[2] || '';
446
+ switch (sectionType) {
447
+ case 'gd_resource':
448
+ currentSection = 'header';
449
+ resource.header = parseResourceHeader(sectionParams);
450
+ break;
451
+ case 'ext_resource':
452
+ currentSection = 'ext_resource';
453
+ resource.extResources.push(parseExtResource(sectionParams));
454
+ break;
455
+ case 'sub_resource':
456
+ currentSection = 'sub_resource';
457
+ currentSubResource = parseSubResourceHeader(sectionParams);
458
+ resource.subResources.push(currentSubResource);
459
+ break;
460
+ case 'resource':
461
+ currentSection = 'resource';
462
+ break;
463
+ }
464
+ continue;
465
+ }
466
+ }
467
+ // Property assignment
468
+ if (line.includes('=')) {
469
+ const eqIndex = line.indexOf('=');
470
+ const key = line.substring(0, eqIndex).trim();
471
+ const valueStr = line.substring(eqIndex + 1).trim();
472
+ const value = parseGodotValue(valueStr);
473
+ if (currentSection === 'resource') {
474
+ resource.resource.properties[key] = value;
475
+ }
476
+ else if (currentSection === 'sub_resource' && currentSubResource) {
477
+ currentSubResource.properties[key] = value;
478
+ }
479
+ }
480
+ }
481
+ resource.resource.type = resource.header.type;
482
+ return resource;
483
+ }
484
+ function parseResourceHeader(params) {
485
+ const header = { type: '', format: 3 };
486
+ const typeMatch = params.match(/type="([^"]+)"/);
487
+ if (typeMatch) {
488
+ header.type = typeMatch[1];
489
+ }
490
+ const loadStepsMatch = params.match(/load_steps=(\d+)/);
491
+ if (loadStepsMatch) {
492
+ header.loadSteps = parseInt(loadStepsMatch[1], 10);
493
+ }
494
+ const formatMatch = params.match(/format=(\d+)/);
495
+ if (formatMatch) {
496
+ header.format = parseInt(formatMatch[1], 10);
497
+ }
498
+ const uidMatch = params.match(/uid="([^"]+)"/);
499
+ if (uidMatch) {
500
+ header.uid = uidMatch[1];
501
+ }
502
+ return header;
503
+ }
504
+ // ============================================================
505
+ // GDScript Parser
506
+ // ============================================================
507
+ /**
508
+ * Parses GDScript files and extracts structure
509
+ */
510
+ function parseGDScript(content, filePath = '') {
511
+ const script = {
512
+ path: filePath,
513
+ extends: 'Node',
514
+ isToolScript: false,
515
+ signals: [],
516
+ enums: [],
517
+ constants: [],
518
+ exportVars: [],
519
+ onreadyVars: [],
520
+ variables: [],
521
+ functions: [],
522
+ innerClasses: [],
523
+ staticFunctions: [],
524
+ annotations: [],
525
+ };
526
+ const lines = content.split('\n');
527
+ let currentFunction = null;
528
+ let functionIndent = 0;
529
+ let currentEnum = null;
530
+ let enumIndent = 0;
531
+ let pendingDocComment;
532
+ let pendingAnnotations = [];
533
+ for (let i = 0; i < lines.length; i++) {
534
+ const line = lines[i];
535
+ const trimmed = line.trim();
536
+ const indent = line.length - line.trimStart().length;
537
+ // Skip empty lines and comments (but capture doc comments)
538
+ if (!trimmed) {
539
+ continue;
540
+ }
541
+ if (trimmed.startsWith('##')) {
542
+ pendingDocComment = (pendingDocComment || '') + trimmed.substring(2).trim() + '\n';
543
+ continue;
544
+ }
545
+ if (trimmed.startsWith('#')) {
546
+ continue;
547
+ }
548
+ // Handle being inside function body
549
+ if (currentFunction && indent > functionIndent) {
550
+ currentFunction.body += line + '\n';
551
+ continue;
552
+ }
553
+ else if (currentFunction && indent <= functionIndent) {
554
+ currentFunction = null;
555
+ }
556
+ // Handle being inside enum
557
+ if (currentEnum && indent > enumIndent) {
558
+ // Parse enum value
559
+ const enumValMatch = trimmed.match(/^(\w+)(?:\s*=\s*(-?\d+))?,?$/);
560
+ if (enumValMatch) {
561
+ const name = enumValMatch[1];
562
+ const value = enumValMatch[2]
563
+ ? parseInt(enumValMatch[2], 10)
564
+ : Object.keys(currentEnum.values).length;
565
+ currentEnum.values[name] = value;
566
+ }
567
+ continue;
568
+ }
569
+ else if (currentEnum && indent <= enumIndent) {
570
+ currentEnum = null;
571
+ }
572
+ // @tool annotation
573
+ if (trimmed === '@tool') {
574
+ script.isToolScript = true;
575
+ continue;
576
+ }
577
+ // Annotations
578
+ if (trimmed.startsWith('@')) {
579
+ const annotationMatch = trimmed.match(/^@(\w+)(?:\(([^)]*)\))?/);
580
+ if (annotationMatch) {
581
+ const annotation = { name: annotationMatch[1] };
582
+ if (annotationMatch[2]) {
583
+ annotation.arguments = annotationMatch[2].split(',').map((a) => a.trim());
584
+ }
585
+ pendingAnnotations.push(annotation);
586
+ // Handle @icon specifically
587
+ if (annotation.name === 'icon' && annotation.arguments?.[0]) {
588
+ script.iconPath = annotation.arguments[0].replace(/"/g, '');
589
+ }
590
+ }
591
+ continue;
592
+ }
593
+ // class_name
594
+ const classNameMatch = trimmed.match(/^class_name\s+(\w+)/);
595
+ if (classNameMatch) {
596
+ script.className = classNameMatch[1];
597
+ script.classNameToken = classNameMatch[1];
598
+ continue;
599
+ }
600
+ // extends
601
+ const extendsMatch = trimmed.match(/^extends\s+(.+)$/);
602
+ if (extendsMatch) {
603
+ script.extends = extendsMatch[1].trim();
604
+ continue;
605
+ }
606
+ // signal
607
+ const signalMatch = trimmed.match(/^signal\s+(\w+)(?:\(([^)]*)\))?/);
608
+ if (signalMatch) {
609
+ const sig = {
610
+ name: signalMatch[1],
611
+ parameters: [],
612
+ documentation: pendingDocComment?.trim(),
613
+ };
614
+ if (signalMatch[2]) {
615
+ sig.parameters = parseGDScriptParameters(signalMatch[2]);
616
+ }
617
+ script.signals.push(sig);
618
+ pendingDocComment = undefined;
619
+ continue;
620
+ }
621
+ // enum
622
+ const enumMatch = trimmed.match(/^enum\s+(\w+)\s*{?/);
623
+ if (enumMatch) {
624
+ currentEnum = {
625
+ name: enumMatch[1],
626
+ values: {},
627
+ documentation: pendingDocComment?.trim(),
628
+ };
629
+ enumIndent = indent;
630
+ // Check for single-line enum
631
+ const inlineMatch = trimmed.match(/^enum\s+\w+\s*{([^}]+)}/);
632
+ if (inlineMatch) {
633
+ const entries = inlineMatch[1].split(',');
634
+ let nextVal = 0;
635
+ for (const entry of entries) {
636
+ const valMatch = entry.trim().match(/^(\w+)(?:\s*=\s*(-?\d+))?$/);
637
+ if (valMatch) {
638
+ const val = valMatch[2] ? parseInt(valMatch[2], 10) : nextVal;
639
+ currentEnum.values[valMatch[1]] = val;
640
+ nextVal = val + 1;
641
+ }
642
+ }
643
+ script.enums.push(currentEnum);
644
+ currentEnum = null;
645
+ }
646
+ else {
647
+ script.enums.push(currentEnum);
648
+ }
649
+ pendingDocComment = undefined;
650
+ continue;
651
+ }
652
+ // const
653
+ const constMatch = trimmed.match(/^const\s+(\w+)(?:\s*:\s*(\w+))?\s*=\s*(.+)$/);
654
+ if (constMatch) {
655
+ script.constants.push({
656
+ name: constMatch[1],
657
+ type: constMatch[2],
658
+ value: constMatch[3],
659
+ documentation: pendingDocComment?.trim(),
660
+ });
661
+ pendingDocComment = undefined;
662
+ continue;
663
+ }
664
+ // @export var
665
+ if (trimmed.startsWith('@export')) {
666
+ // This is an export annotation, the var should follow
667
+ const exportAnnotations = [trimmed];
668
+ // Look for subsequent export annotations or the var line
669
+ let j = i + 1;
670
+ while (j < lines.length && lines[j].trim().startsWith('@export')) {
671
+ exportAnnotations.push(lines[j].trim());
672
+ j++;
673
+ }
674
+ if (j < lines.length) {
675
+ const varLine = lines[j].trim();
676
+ const varMatch = varLine.match(/^var\s+(\w+)(?:\s*:\s*(\w+))?(?:\s*=\s*(.+))?$/);
677
+ if (varMatch) {
678
+ script.exportVars.push({
679
+ name: varMatch[1],
680
+ type: varMatch[2],
681
+ default: varMatch[3],
682
+ exportAnnotations: exportAnnotations,
683
+ documentation: pendingDocComment?.trim(),
684
+ });
685
+ i = j; // Skip to after the var line
686
+ pendingDocComment = undefined;
687
+ pendingAnnotations = [];
688
+ }
689
+ }
690
+ continue;
691
+ }
692
+ // @onready var
693
+ const onreadyMatch = trimmed.match(/^@onready\s+var\s+(\w+)(?:\s*:\s*(\w+))?(?:\s*=\s*(.+))?$/);
694
+ if (onreadyMatch) {
695
+ script.onreadyVars.push({
696
+ name: onreadyMatch[1],
697
+ type: onreadyMatch[2],
698
+ default: onreadyMatch[3],
699
+ documentation: pendingDocComment?.trim(),
700
+ });
701
+ pendingDocComment = undefined;
702
+ continue;
703
+ }
704
+ // Regular var
705
+ const varMatch = trimmed.match(/^var\s+(\w+)(?:\s*:\s*(\w+))?(?:\s*=\s*(.+))?(?:\s*:\s*(?:get\s*=\s*(\w+))?(?:\s*,?\s*set\s*=\s*(\w+))?)?$/);
706
+ if (varMatch) {
707
+ const variable = {
708
+ name: varMatch[1],
709
+ type: varMatch[2],
710
+ default: varMatch[3],
711
+ documentation: pendingDocComment?.trim(),
712
+ };
713
+ if (varMatch[4] || varMatch[5]) {
714
+ variable.setget = {
715
+ getter: varMatch[4],
716
+ setter: varMatch[5],
717
+ };
718
+ }
719
+ script.variables.push(variable);
720
+ pendingDocComment = undefined;
721
+ continue;
722
+ }
723
+ // Function
724
+ const funcMatch = trimmed.match(/^(?:(static)\s+)?func\s+(\w+)\(([^)]*)\)(?:\s*->\s*(\w+))?(?:\s*:\s*)?$/);
725
+ if (funcMatch) {
726
+ currentFunction = {
727
+ name: funcMatch[2],
728
+ parameters: parseGDScriptParameters(funcMatch[3]),
729
+ returnType: funcMatch[4],
730
+ isVirtual: funcMatch[2].startsWith('_'),
731
+ isStatic: !!funcMatch[1],
732
+ isCoroutine: false,
733
+ body: '',
734
+ documentation: pendingDocComment?.trim(),
735
+ };
736
+ functionIndent = indent;
737
+ if (currentFunction.isStatic) {
738
+ script.staticFunctions.push(currentFunction);
739
+ }
740
+ else {
741
+ script.functions.push(currentFunction);
742
+ }
743
+ pendingDocComment = undefined;
744
+ continue;
745
+ }
746
+ // Inner class
747
+ const classMatch = trimmed.match(/^class\s+(\w+)(?:\s+extends\s+(\w+))?(?:\s*:\s*)?$/);
748
+ if (classMatch) {
749
+ script.innerClasses.push({
750
+ name: classMatch[1],
751
+ extends: classMatch[2],
752
+ signals: [],
753
+ variables: [],
754
+ functions: [],
755
+ });
756
+ pendingDocComment = undefined;
757
+ continue;
758
+ }
759
+ pendingDocComment = undefined;
760
+ pendingAnnotations = [];
761
+ }
762
+ return script;
763
+ }
764
+ function parseGDScriptParameters(paramString) {
765
+ if (!paramString.trim()) {
766
+ return [];
767
+ }
768
+ const params = [];
769
+ const parts = paramString.split(',');
770
+ for (const part of parts) {
771
+ const trimmed = part.trim();
772
+ const paramMatch = trimmed.match(/^(\w+)(?:\s*:\s*(\w+))?(?:\s*=\s*(.+))?$/);
773
+ if (paramMatch) {
774
+ params.push({
775
+ name: paramMatch[1],
776
+ type: paramMatch[2],
777
+ default: paramMatch[3],
778
+ });
779
+ }
780
+ }
781
+ return params;
782
+ }
783
+ class GodotProjectImporter {
784
+ constructor(callbacks) {
785
+ this.projectPath = '';
786
+ this.config = null;
787
+ this.scenes = new Map();
788
+ this.resources = new Map();
789
+ this.scripts = new Map();
790
+ this.callbacks = {};
791
+ if (callbacks) {
792
+ this.callbacks = callbacks;
793
+ }
794
+ }
795
+ /**
796
+ * Parses project.godot configuration file
797
+ */
798
+ parseProjectConfig(content) {
799
+ const config = {
800
+ configVersion: 5,
801
+ name: 'Untitled',
802
+ features: [],
803
+ autoloads: {},
804
+ inputMap: {},
805
+ layers: { layer2d: {}, layer3d: {} },
806
+ };
807
+ let currentSection = '';
808
+ const lines = content.split('\n');
809
+ for (let line of lines) {
810
+ line = line.trim();
811
+ if (!line || line.startsWith(';')) {
812
+ continue;
813
+ }
814
+ // Section header
815
+ if (line.startsWith('[')) {
816
+ const match = line.match(/^\[(.+)\]$/);
817
+ if (match) {
818
+ currentSection = match[1];
819
+ }
820
+ continue;
821
+ }
822
+ // Key-value pair
823
+ if (line.includes('=')) {
824
+ const eqIndex = line.indexOf('=');
825
+ const key = line.substring(0, eqIndex).trim();
826
+ const valueStr = line.substring(eqIndex + 1).trim();
827
+ const value = parseGodotValue(valueStr);
828
+ switch (currentSection) {
829
+ case '':
830
+ if (key === 'config_version') {
831
+ config.configVersion = value;
832
+ }
833
+ break;
834
+ case 'application':
835
+ if (key === 'config/name') {
836
+ config.name = value;
837
+ }
838
+ if (key === 'config/features') {
839
+ config.features = value;
840
+ }
841
+ if (key === 'config/icon') {
842
+ config.icon = value;
843
+ }
844
+ if (key === 'run/main_scene') {
845
+ config.mainScene = value;
846
+ }
847
+ break;
848
+ case 'autoload':
849
+ const autoloadMatch = key.match(/^(.+)$/);
850
+ if (autoloadMatch) {
851
+ const autoloadPath = value.replace(/^\*/, '');
852
+ config.autoloads[autoloadMatch[1]] = autoloadPath;
853
+ }
854
+ break;
855
+ case 'input':
856
+ const inputMatch = key.match(/^(.+)$/);
857
+ if (inputMatch) {
858
+ const inputValue = value;
859
+ config.inputMap[inputMatch[1]] = {
860
+ deadzone: inputValue.deadzone ?? 0.5,
861
+ events: inputValue.events ?? [],
862
+ };
863
+ }
864
+ break;
865
+ case 'layer_names':
866
+ if (key.startsWith('2d_physics/layer_')) {
867
+ const layerNum = parseInt(key.split('_').pop(), 10);
868
+ config.layers.layer2d[value] = layerNum;
869
+ }
870
+ if (key.startsWith('3d_physics/layer_')) {
871
+ const layerNum = parseInt(key.split('_').pop(), 10);
872
+ config.layers.layer3d[value] = layerNum;
873
+ }
874
+ break;
875
+ }
876
+ }
877
+ }
878
+ this.config = config;
879
+ return config;
880
+ }
881
+ /**
882
+ * Imports a scene file and all its dependencies
883
+ */
884
+ async importScene(content, filePath) {
885
+ const scene = parseGodotScene(content);
886
+ this.scenes.set(filePath, scene);
887
+ this.callbacks.onSceneParsed?.(scene);
888
+ return this.convertSceneToImported(scene, filePath);
889
+ }
890
+ /**
891
+ * Imports a resource file
892
+ */
893
+ async importResource(content, filePath) {
894
+ const resource = parseGodotResource(content);
895
+ this.resources.set(filePath, resource);
896
+ this.callbacks.onResourceParsed?.(resource);
897
+ return resource;
898
+ }
899
+ /**
900
+ * Imports a GDScript file
901
+ */
902
+ async importScript(content, filePath) {
903
+ const script = parseGDScript(content, filePath);
904
+ this.scripts.set(filePath, script);
905
+ this.callbacks.onScriptParsed?.(script);
906
+ return script;
907
+ }
908
+ convertSceneToImported(scene, filePath) {
909
+ const imported = {
910
+ name: filePath.split('/').pop()?.replace('.tscn', '') ?? 'Scene',
911
+ path: filePath,
912
+ nodes: [],
913
+ rootNode: null,
914
+ connections: scene.connections,
915
+ resources: new Map(),
916
+ };
917
+ // Build resource map
918
+ for (const extRes of scene.extResources) {
919
+ imported.resources.set(String(extRes.id), extRes);
920
+ }
921
+ // Convert nodes
922
+ if (scene.rootNode) {
923
+ imported.rootNode = this.convertNode(scene.rootNode, imported.resources);
924
+ imported.nodes = this.flattenNodes(imported.rootNode);
925
+ }
926
+ return imported;
927
+ }
928
+ convertNode(node, resources, parentId) {
929
+ const id = parentId ? `${parentId}/${node.name}` : node.name;
930
+ const imported = {
931
+ id,
932
+ name: node.name,
933
+ type: node.type,
934
+ parentId,
935
+ properties: { ...node.properties },
936
+ children: [],
937
+ groups: node.groups ?? [],
938
+ };
939
+ // Extract position/rotation/scale from properties
940
+ if (node.properties.position) {
941
+ imported.position = node.properties.position;
942
+ }
943
+ if (node.properties.global_position) {
944
+ imported.position = node.properties.global_position;
945
+ }
946
+ if (node.properties.rotation) {
947
+ imported.rotation = node.properties.rotation;
948
+ }
949
+ if (node.properties.scale) {
950
+ imported.scale = node.properties.scale;
951
+ }
952
+ // 3D transforms
953
+ if (node.properties.transform) {
954
+ const t = node.properties.transform;
955
+ imported.position = t.origin;
956
+ }
957
+ // Resolve script reference
958
+ if (node.script) {
959
+ const scriptRes = resources.get(String(node.script));
960
+ if (scriptRes) {
961
+ const cachedScript = this.scripts.get(scriptRes.path);
962
+ if (cachedScript) {
963
+ imported.script = cachedScript;
964
+ }
965
+ }
966
+ }
967
+ // Convert children
968
+ for (const child of node.children) {
969
+ imported.children.push(this.convertNode(child, resources, id));
970
+ }
971
+ return imported;
972
+ }
973
+ flattenNodes(node) {
974
+ const nodes = [node];
975
+ for (const child of node.children) {
976
+ nodes.push(...this.flattenNodes(child));
977
+ }
978
+ return nodes;
979
+ }
980
+ /**
981
+ * Gets all imported data
982
+ */
983
+ getImportedData() {
984
+ return {
985
+ config: this.config,
986
+ scenes: this.scenes,
987
+ resources: this.resources,
988
+ scripts: this.scripts,
989
+ };
990
+ }
991
+ setCallbacks(callbacks) {
992
+ this.callbacks = { ...this.callbacks, ...callbacks };
993
+ }
994
+ }
995
+ // ============================================================
996
+ // Node Type Mapping
997
+ // ============================================================
998
+ const GODOT_NODE_MAPPING = {
999
+ // 2D Nodes
1000
+ Node2D: 'Entity2D',
1001
+ Sprite2D: 'Sprite',
1002
+ AnimatedSprite2D: 'AnimatedSprite',
1003
+ Camera2D: 'Camera2D',
1004
+ CharacterBody2D: 'KinematicBody2D',
1005
+ RigidBody2D: 'RigidBody2D',
1006
+ StaticBody2D: 'StaticBody2D',
1007
+ Area2D: 'Area2D',
1008
+ CollisionShape2D: 'CollisionShape2D',
1009
+ TileMap: 'TileMap',
1010
+ TileMapLayer: 'TileMapLayer',
1011
+ GPUParticles2D: 'ParticleEmitter2D',
1012
+ CPUParticles2D: 'ParticleEmitter2D',
1013
+ NavigationAgent2D: 'NavigationAgent2D',
1014
+ AudioStreamPlayer2D: 'AudioSource2D',
1015
+ // 3D Nodes
1016
+ Node3D: 'Entity3D',
1017
+ MeshInstance3D: 'MeshRenderer',
1018
+ Camera3D: 'Camera3D',
1019
+ CharacterBody3D: 'KinematicBody3D',
1020
+ RigidBody3D: 'RigidBody3D',
1021
+ StaticBody3D: 'StaticBody3D',
1022
+ Area3D: 'Area3D',
1023
+ CollisionShape3D: 'CollisionShape3D',
1024
+ DirectionalLight3D: 'DirectionalLight',
1025
+ OmniLight3D: 'PointLight',
1026
+ SpotLight3D: 'SpotLight',
1027
+ GPUParticles3D: 'ParticleEmitter3D',
1028
+ CPUParticles3D: 'ParticleEmitter3D',
1029
+ NavigationAgent3D: 'NavigationAgent3D',
1030
+ AudioStreamPlayer3D: 'AudioSource3D',
1031
+ WorldEnvironment: 'Environment',
1032
+ // Audio
1033
+ AudioStreamPlayer: 'AudioSource',
1034
+ // Animation
1035
+ AnimationPlayer: 'AnimationPlayer',
1036
+ AnimationTree: 'AnimationTree',
1037
+ // UI
1038
+ Control: 'UIElement',
1039
+ Button: 'UIButton',
1040
+ Label: 'UILabel',
1041
+ TextureRect: 'UIImage',
1042
+ Panel: 'UIPanel',
1043
+ VBoxContainer: 'UIVBox',
1044
+ HBoxContainer: 'UIHBox',
1045
+ GridContainer: 'UIGrid',
1046
+ LineEdit: 'UIInput',
1047
+ TextEdit: 'UITextArea',
1048
+ ProgressBar: 'UIProgressBar',
1049
+ Slider: 'UISlider',
1050
+ TabContainer: 'UITabs',
1051
+ CanvasLayer: 'UILayer',
1052
+ // Other
1053
+ Timer: 'Timer',
1054
+ Node: 'Entity',
1055
+ };
1056
+ // ============================================================
1057
+ // Factory Functions
1058
+ // ============================================================
1059
+ function createGodotProjectImporter(callbacks) {
1060
+ return new GodotProjectImporter(callbacks);
1061
+ }
1062
+
1063
+ exports.GODOT_NODE_MAPPING = GODOT_NODE_MAPPING;
1064
+ exports.GodotProjectImporter = GodotProjectImporter;
1065
+ exports.createGodotProjectImporter = createGodotProjectImporter;
1066
+ exports.parseGDScript = parseGDScript;
1067
+ exports.parseGodotResource = parseGodotResource;
1068
+ exports.parseGodotScene = parseGodotScene;
1069
+ //# sourceMappingURL=GodotImport.js.map