@nice2dev/game-engine 1.0.5 → 1.0.10

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