@nice2dev/game-engine 1.3.15 → 1.3.16

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 (434) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/accessibility/Accessibility.js +152 -165
  3. package/dist/cjs/ai/AI.js +292 -294
  4. package/dist/cjs/ai/BehaviorTree.js +1029 -1113
  5. package/dist/cjs/ai/StateMachine.js +694 -756
  6. package/dist/cjs/animation/Animation.js +232 -241
  7. package/dist/cjs/audio/AudioAdvanced.js +221 -236
  8. package/dist/cjs/audio/AudioBridge.js +441 -435
  9. package/dist/cjs/audio/AudioManager.js +242 -259
  10. package/dist/cjs/build-cloud/BuildOrchestration.js +1059 -1098
  11. package/dist/cjs/build-cloud/GodotBuildCloud.js +641 -670
  12. package/dist/cjs/build-cloud/UnityBuildCloud.js +563 -610
  13. package/dist/cjs/build-cloud/UnrealBuildCloud.js +610 -635
  14. package/dist/cjs/core/EventBus.js +51 -56
  15. package/dist/cjs/core/GameClock.js +62 -66
  16. package/dist/cjs/core/GameConfig.js +72 -79
  17. package/dist/cjs/core/GameLoop.js +80 -89
  18. package/dist/cjs/core/ServiceLocator.js +61 -65
  19. package/dist/cjs/core/Validation.js +72 -82
  20. package/dist/cjs/core/math.js +108 -112
  21. package/dist/cjs/devtools/DevTools.js +542 -563
  22. package/dist/cjs/devtools/DeveloperExperience.js +521 -559
  23. package/dist/cjs/devtools/GameplayAnalytics.js +636 -646
  24. package/dist/cjs/dialogue/DialogueSystem.js +984 -986
  25. package/dist/cjs/docs/DocGenerator.js +339 -364
  26. package/dist/cjs/ecs/World.js +355 -371
  27. package/dist/cjs/editor/AchievementEditor.js +580 -636
  28. package/dist/cjs/editor/AdvancedEditor.js +184 -191
  29. package/dist/cjs/editor/AnimationRetargeting.js +696 -741
  30. package/dist/cjs/editor/AssetBrowser.js +1072 -1160
  31. package/dist/cjs/editor/AssetManager.js +187 -192
  32. package/dist/cjs/editor/ConsolePro.js +971 -1061
  33. package/dist/cjs/editor/CraftingEditor.js +680 -730
  34. package/dist/cjs/editor/DebugTools.js +187 -185
  35. package/dist/cjs/editor/DialogueSystem.js +844 -901
  36. package/dist/cjs/editor/LeaderboardSystem.js +429 -483
  37. package/dist/cjs/editor/NiceGameEditor.js +1903 -1201
  38. package/dist/cjs/editor/PrefabSystem.js +772 -838
  39. package/dist/cjs/editor/ProfilerPanel.js +649 -700
  40. package/dist/cjs/editor/QuestEditor.js +792 -839
  41. package/dist/cjs/editor/ReplaySystem.js +585 -634
  42. package/dist/cjs/editor/SceneEditor.js +176 -200
  43. package/dist/cjs/editor/ScreenshotMode.js +621 -688
  44. package/dist/cjs/editor/ShaderGraph.js +1556 -1582
  45. package/dist/cjs/editor/TimelineEditor.js +715 -778
  46. package/dist/cjs/editor/UndoRedoPro.js +830 -904
  47. package/dist/cjs/editor/VRARMode.js +582 -645
  48. package/dist/cjs/engine/NiceGameEngine.js +141 -164
  49. package/dist/cjs/engine/SaveSystem.js +441 -495
  50. package/dist/cjs/enterprise/Enterprise.js +254 -261
  51. package/dist/cjs/export/BevyExporter.js +927 -967
  52. package/dist/cjs/export/CocosExporter.js +644 -673
  53. package/dist/cjs/export/Construct3Exporter.js +783 -794
  54. package/dist/cjs/export/DefoldExporter.js +1028 -1069
  55. package/dist/cjs/export/GDevelopExporter.js +674 -708
  56. package/dist/cjs/export/GameMakerExporter.js +791 -805
  57. package/dist/cjs/export/GodotExporter.js +1003 -1045
  58. package/dist/cjs/export/MinecraftBedrockExporter.js +573 -578
  59. package/dist/cjs/export/MonoGameExporter.js +1265 -1293
  60. package/dist/cjs/export/Pico8Exporter.js +766 -812
  61. package/dist/cjs/export/PlatformExporter.js +188 -206
  62. package/dist/cjs/export/RPGMakerExporter.js +860 -879
  63. package/dist/cjs/export/RobloxExporter.js +883 -919
  64. package/dist/cjs/export/Solar2DExporter.js +1218 -1256
  65. package/dist/cjs/export/ThreeJSExporter.js +1006 -1073
  66. package/dist/cjs/export/Tic80Exporter.js +1210 -1267
  67. package/dist/cjs/export/UnityExporter.js +1116 -1131
  68. package/dist/cjs/export/UnrealExporter.js +889 -919
  69. package/dist/cjs/export/WebExporter.js +931 -970
  70. package/dist/cjs/export/index.js +42 -65
  71. package/dist/cjs/godot-integration/GodotAssetLibrary.js +659 -692
  72. package/dist/cjs/godot-integration/GodotImport.js +929 -1027
  73. package/dist/cjs/godot-integration/GodotLiveLink.js +915 -945
  74. package/dist/cjs/godot-integration/components/GodotProjectBrowser.js +911 -611
  75. package/dist/cjs/i18n/I18n.js +860 -900
  76. package/dist/cjs/i18n/useTranslation.js +84 -89
  77. package/dist/cjs/import/AsepriteImporter.js +658 -716
  78. package/dist/cjs/import/DragonBonesImporter.js +437 -461
  79. package/dist/cjs/import/GameMakerImporter.js +511 -521
  80. package/dist/cjs/import/GodotSceneImporter.js +788 -822
  81. package/dist/cjs/import/LDtkImporter.js +436 -454
  82. package/dist/cjs/import/Live2DImporter.js +497 -518
  83. package/dist/cjs/import/NdgFormat.js +424 -457
  84. package/dist/cjs/import/OgmoImporter.js +466 -493
  85. package/dist/cjs/import/RPGMakerImporter.js +451 -477
  86. package/dist/cjs/import/SceneImporter.js +378 -423
  87. package/dist/cjs/import/SpineImporter.js +511 -546
  88. package/dist/cjs/import/SpriterImporter.js +590 -613
  89. package/dist/cjs/import/TiledMapImporter.js +811 -846
  90. package/dist/cjs/import/UnitySceneImporter.js +687 -703
  91. package/dist/cjs/import/index.js +206 -251
  92. package/dist/cjs/index.js +275 -278
  93. package/dist/cjs/input/GamepadNavigation.js +185 -205
  94. package/dist/cjs/input/InputManager.js +397 -421
  95. package/dist/cjs/input/useGamepads.js +70 -81
  96. package/dist/cjs/integration/IconSprite.js +129 -256
  97. package/dist/cjs/inventory/InventorySystem.js +920 -995
  98. package/dist/cjs/kids/KidMode.js +997 -1022
  99. package/dist/cjs/kids/KidTools.js +570 -594
  100. package/dist/cjs/monetization/Monetization.js +170 -177
  101. package/dist/cjs/multiplayer/LocalMultiplayer.js +287 -287
  102. package/dist/cjs/multiplayer/MiniGameTypes.js +49 -59
  103. package/dist/cjs/native-engine/AnimationSystem.js +731 -806
  104. package/dist/cjs/native-engine/AssetPipeline.js +454 -515
  105. package/dist/cjs/native-engine/AudioEngine.js +763 -804
  106. package/dist/cjs/native-engine/InputSystem.js +1075 -1145
  107. package/dist/cjs/native-engine/NetworkingSystem.js +733 -793
  108. package/dist/cjs/native-engine/PhysicsEngine.js +583 -607
  109. package/dist/cjs/native-engine/RenderingEngine.js +302 -350
  110. package/dist/cjs/native-engine/SceneGraph.js +769 -808
  111. package/dist/cjs/network/MultiplayerTransport.js +97 -132
  112. package/dist/cjs/network/Networking.js +549 -564
  113. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AbortController.js +21 -29
  114. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +40 -48
  115. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +35 -43
  116. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +10 -15
  117. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Errors.js +103 -135
  118. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +131 -158
  119. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +39 -53
  120. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +5 -8
  121. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +40 -48
  122. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +494 -572
  123. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +826 -953
  124. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +125 -146
  125. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +13 -23
  126. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ILogger.js +11 -25
  127. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ITransport.js +13 -24
  128. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +108 -121
  129. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Loggers.js +10 -14
  130. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +150 -185
  131. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +158 -196
  132. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +90 -105
  133. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Subject.js +30 -35
  134. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +16 -21
  135. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Utils.js +215 -248
  136. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +135 -157
  137. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +76 -85
  138. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/index.js +24 -27
  139. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +3 -4
  140. package/dist/cjs/pathfinding/Pathfinding.js +245 -263
  141. package/dist/cjs/performance/AssetStreaming.js +561 -635
  142. package/dist/cjs/performance/BenchmarkSuite.js +283 -311
  143. package/dist/cjs/performance/DeltaCompression.js +467 -526
  144. package/dist/cjs/performance/DeterministicPhysics.js +450 -498
  145. package/dist/cjs/performance/ECSOptimization.js +644 -695
  146. package/dist/cjs/performance/GameSaveSystem.js +509 -556
  147. package/dist/cjs/performance/HotReload.js +447 -500
  148. package/dist/cjs/performance/InputRecording.js +511 -561
  149. package/dist/cjs/performance/InterestManagement.js +453 -500
  150. package/dist/cjs/performance/LocalizationRuntime.js +376 -423
  151. package/dist/cjs/performance/MemoryManagement.js +410 -470
  152. package/dist/cjs/performance/ModSupport.js +445 -496
  153. package/dist/cjs/performance/MultiThreadedPhysics.js +400 -443
  154. package/dist/cjs/performance/NetworkPrediction.js +424 -482
  155. package/dist/cjs/performance/ObjectPooling.js +569 -617
  156. package/dist/cjs/performance/Performance.js +174 -190
  157. package/dist/cjs/performance/PerformanceAdvanced.js +614 -637
  158. package/dist/cjs/performance/WebGPURenderer.js +656 -683
  159. package/dist/cjs/physics/PhysicsAdvanced.js +345 -379
  160. package/dist/cjs/physics/PhysicsEngine2D.js +391 -427
  161. package/dist/cjs/plugins/PluginSDK.js +432 -466
  162. package/dist/cjs/plugins/PluginTestKit.js +307 -330
  163. package/dist/cjs/procedural/Procedural.js +243 -254
  164. package/dist/cjs/procedural/WorldBuilding.js +297 -314
  165. package/dist/cjs/quest/QuestSystem.js +975 -932
  166. package/dist/cjs/release/MobileExport.js +157 -163
  167. package/dist/cjs/release/Release.js +225 -238
  168. package/dist/cjs/rendering/Camera2D.js +121 -124
  169. package/dist/cjs/rendering/Renderer2D.js +321 -335
  170. package/dist/cjs/rendering/WebGPURenderPipeline.js +632 -651
  171. package/dist/cjs/runtime3d/Runtime3D.js +359 -378
  172. package/dist/cjs/runtime3d/SceneEditor3D.js +252 -263
  173. package/dist/cjs/scene/SceneManager.js +177 -193
  174. package/dist/cjs/scripting/GraphToAST.js +574 -547
  175. package/dist/cjs/scripting/LanguageExporter.js +254 -279
  176. package/dist/cjs/scripting/NodeGraph.js +546 -570
  177. package/dist/cjs/scripting/ScriptAST.js +31 -39
  178. package/dist/cjs/scripting/VisualScripting2.js +1016 -1065
  179. package/dist/cjs/scripting/exporters/CSharpExporter.js +464 -496
  180. package/dist/cjs/scripting/exporters/GDScriptExporter.js +390 -442
  181. package/dist/cjs/scripting/exporters/LuaExporter.js +406 -447
  182. package/dist/cjs/scripting/exporters/PythonExporter.js +484 -549
  183. package/dist/cjs/scripting/exporters/RustExporter.js +459 -512
  184. package/dist/cjs/scripting/exporters/TypeScriptExporter.js +505 -556
  185. package/dist/cjs/social/Social.js +72 -80
  186. package/dist/cjs/systems/LightingSystem.js +844 -931
  187. package/dist/cjs/systems/ParticleSystem2.js +1447 -1451
  188. package/dist/cjs/systems/PhysicsDebugSystem.js +1070 -1141
  189. package/dist/cjs/systems/TerrainSystem.js +985 -1098
  190. package/dist/cjs/templates/ActionTemplates.js +296 -309
  191. package/dist/cjs/templates/FightingTemplate.js +417 -463
  192. package/dist/cjs/templates/MetroidvaniaTemplate.js +353 -405
  193. package/dist/cjs/templates/PartyTemplates.js +190 -202
  194. package/dist/cjs/templates/PuzzleTemplates.js +245 -261
  195. package/dist/cjs/templates/RPGTemplates.js +160 -178
  196. package/dist/cjs/templates/SportsTemplates.js +237 -250
  197. package/dist/cjs/templates/StrategyTemplates.js +143 -153
  198. package/dist/cjs/templates/SurvivalTemplate.js +336 -380
  199. package/dist/cjs/templates/WaveDefense.js +499 -526
  200. package/dist/cjs/tilemap/Tilemap.js +207 -214
  201. package/dist/cjs/tutorials/TutorialBranching.js +396 -417
  202. package/dist/cjs/tutorials/TutorialEngine.js +888 -931
  203. package/dist/cjs/tutorials/TutorialOverlay.js +602 -640
  204. package/dist/cjs/tutorials/content/Tutorials_T05_T08.js +787 -809
  205. package/dist/cjs/tutorials/content/Tutorials_T09_T11.js +736 -756
  206. package/dist/cjs/tutorials/content/Tutorials_T12_T15.js +754 -778
  207. package/dist/cjs/ui/GameUI.js +295 -312
  208. package/dist/cjs/unity-integration/UnityAssetStore.js +700 -741
  209. package/dist/cjs/unity-integration/UnityImport.js +1066 -1176
  210. package/dist/cjs/unity-integration/UnityLiveLink.js +934 -981
  211. package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js +1233 -757
  212. package/dist/cjs/unity-integration/components/UnityProjectBrowser.js +1240 -768
  213. package/dist/cjs/unreal-integration/UnrealImport.js +391 -412
  214. package/dist/cjs/unreal-integration/UnrealLiveLink.js +1102 -1137
  215. package/dist/cjs/unreal-integration/UnrealMarketplace.js +436 -473
  216. package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js +1150 -767
  217. package/dist/cjs/xr/ARVR.js +167 -175
  218. package/dist/esm/accessibility/Accessibility.js +160 -164
  219. package/dist/esm/ai/AI.js +310 -293
  220. package/dist/esm/ai/BehaviorTree.js +1057 -1112
  221. package/dist/esm/ai/StateMachine.js +709 -755
  222. package/dist/esm/animation/Animation.js +237 -240
  223. package/dist/esm/audio/AudioAdvanced.js +239 -235
  224. package/dist/esm/audio/AudioBridge.js +448 -434
  225. package/dist/esm/audio/AudioManager.js +243 -258
  226. package/dist/esm/build-cloud/BuildOrchestration.js +1071 -1097
  227. package/dist/esm/build-cloud/GodotBuildCloud.js +647 -669
  228. package/dist/esm/build-cloud/UnityBuildCloud.js +571 -609
  229. package/dist/esm/build-cloud/UnrealBuildCloud.js +615 -634
  230. package/dist/esm/core/EventBus.js +52 -55
  231. package/dist/esm/core/GameClock.js +63 -65
  232. package/dist/esm/core/GameConfig.js +77 -78
  233. package/dist/esm/core/GameLoop.js +81 -88
  234. package/dist/esm/core/ServiceLocator.js +63 -64
  235. package/dist/esm/core/Validation.js +82 -81
  236. package/dist/esm/core/math.js +109 -111
  237. package/dist/esm/devtools/DevTools.js +546 -562
  238. package/dist/esm/devtools/DeveloperExperience.js +535 -558
  239. package/dist/esm/devtools/GameplayAnalytics.js +647 -645
  240. package/dist/esm/dialogue/DialogueSystem.js +998 -985
  241. package/dist/esm/docs/DocGenerator.js +342 -363
  242. package/dist/esm/ecs/World.js +358 -370
  243. package/dist/esm/editor/AchievementEditor.js +584 -635
  244. package/dist/esm/editor/AdvancedEditor.js +191 -190
  245. package/dist/esm/editor/AnimationRetargeting.js +700 -740
  246. package/dist/esm/editor/AssetBrowser.js +1078 -1159
  247. package/dist/esm/editor/AssetManager.js +188 -191
  248. package/dist/esm/editor/ConsolePro.js +977 -1060
  249. package/dist/esm/editor/CraftingEditor.js +684 -729
  250. package/dist/esm/editor/DebugTools.js +194 -184
  251. package/dist/esm/editor/DialogueSystem.js +849 -900
  252. package/dist/esm/editor/LeaderboardSystem.js +433 -482
  253. package/dist/esm/editor/NiceGameEditor.js +1908 -1200
  254. package/dist/esm/editor/PrefabSystem.js +777 -837
  255. package/dist/esm/editor/ProfilerPanel.js +654 -699
  256. package/dist/esm/editor/QuestEditor.js +795 -838
  257. package/dist/esm/editor/ReplaySystem.js +591 -633
  258. package/dist/esm/editor/SceneEditor.js +189 -199
  259. package/dist/esm/editor/ScreenshotMode.js +628 -687
  260. package/dist/esm/editor/ShaderGraph.js +1565 -1581
  261. package/dist/esm/editor/TimelineEditor.js +733 -777
  262. package/dist/esm/editor/UndoRedoPro.js +835 -903
  263. package/dist/esm/editor/VRARMode.js +586 -644
  264. package/dist/esm/engine/NiceGameEngine.js +142 -163
  265. package/dist/esm/engine/SaveSystem.js +447 -494
  266. package/dist/esm/enterprise/Enterprise.js +265 -260
  267. package/dist/esm/export/BevyExporter.js +929 -966
  268. package/dist/esm/export/CocosExporter.js +646 -672
  269. package/dist/esm/export/Construct3Exporter.js +785 -793
  270. package/dist/esm/export/DefoldExporter.js +1030 -1068
  271. package/dist/esm/export/GDevelopExporter.js +676 -707
  272. package/dist/esm/export/GameMakerExporter.js +793 -804
  273. package/dist/esm/export/GodotExporter.js +1004 -1044
  274. package/dist/esm/export/MinecraftBedrockExporter.js +575 -577
  275. package/dist/esm/export/MonoGameExporter.js +1267 -1292
  276. package/dist/esm/export/Pico8Exporter.js +768 -811
  277. package/dist/esm/export/PlatformExporter.js +193 -205
  278. package/dist/esm/export/RPGMakerExporter.js +862 -878
  279. package/dist/esm/export/RobloxExporter.js +885 -918
  280. package/dist/esm/export/Solar2DExporter.js +1220 -1255
  281. package/dist/esm/export/ThreeJSExporter.js +1007 -1072
  282. package/dist/esm/export/Tic80Exporter.js +1212 -1266
  283. package/dist/esm/export/UnityExporter.js +1117 -1130
  284. package/dist/esm/export/UnrealExporter.js +891 -918
  285. package/dist/esm/export/WebExporter.js +933 -969
  286. package/dist/esm/export/index.js +86 -71
  287. package/dist/esm/godot-integration/GodotAssetLibrary.js +663 -691
  288. package/dist/esm/godot-integration/GodotImport.js +935 -1026
  289. package/dist/esm/godot-integration/GodotLiveLink.js +918 -944
  290. package/dist/esm/godot-integration/components/GodotProjectBrowser.js +912 -610
  291. package/dist/esm/i18n/I18n.js +871 -899
  292. package/dist/esm/i18n/useTranslation.js +88 -88
  293. package/dist/esm/import/AsepriteImporter.js +637 -715
  294. package/dist/esm/import/DragonBonesImporter.js +417 -460
  295. package/dist/esm/import/GameMakerImporter.js +491 -520
  296. package/dist/esm/import/GodotSceneImporter.js +767 -821
  297. package/dist/esm/import/LDtkImporter.js +415 -453
  298. package/dist/esm/import/Live2DImporter.js +477 -517
  299. package/dist/esm/import/NdgFormat.js +410 -456
  300. package/dist/esm/import/OgmoImporter.js +446 -492
  301. package/dist/esm/import/RPGMakerImporter.js +431 -476
  302. package/dist/esm/import/SceneImporter.js +385 -422
  303. package/dist/esm/import/SpineImporter.js +491 -545
  304. package/dist/esm/import/SpriterImporter.js +570 -612
  305. package/dist/esm/import/TiledMapImporter.js +790 -845
  306. package/dist/esm/import/UnitySceneImporter.js +666 -702
  307. package/dist/esm/import/index.js +247 -258
  308. package/dist/esm/index.js +1332 -188
  309. package/dist/esm/input/GamepadNavigation.js +187 -204
  310. package/dist/esm/input/InputManager.js +401 -420
  311. package/dist/esm/input/useGamepads.js +72 -80
  312. package/dist/esm/integration/IconSprite.js +143 -255
  313. package/dist/esm/inventory/InventorySystem.js +925 -994
  314. package/dist/esm/kids/KidMode.js +1003 -1021
  315. package/dist/esm/kids/KidTools.js +573 -593
  316. package/dist/esm/monetization/Monetization.js +180 -176
  317. package/dist/esm/multiplayer/LocalMultiplayer.js +290 -286
  318. package/dist/esm/multiplayer/MiniGameTypes.js +58 -58
  319. package/dist/esm/native-engine/AnimationSystem.js +735 -805
  320. package/dist/esm/native-engine/AssetPipeline.js +456 -514
  321. package/dist/esm/native-engine/AudioEngine.js +765 -803
  322. package/dist/esm/native-engine/InputSystem.js +1079 -1144
  323. package/dist/esm/native-engine/NetworkingSystem.js +740 -792
  324. package/dist/esm/native-engine/PhysicsEngine.js +585 -606
  325. package/dist/esm/native-engine/RenderingEngine.js +304 -349
  326. package/dist/esm/native-engine/SceneGraph.js +773 -807
  327. package/dist/esm/network/MultiplayerTransport.js +99 -131
  328. package/dist/esm/network/Networking.js +556 -563
  329. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AbortController.js +22 -28
  330. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +41 -47
  331. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +36 -42
  332. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +11 -14
  333. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Errors.js +111 -134
  334. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +132 -157
  335. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +40 -52
  336. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +6 -7
  337. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +42 -47
  338. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +496 -571
  339. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +828 -952
  340. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +126 -145
  341. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +14 -23
  342. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ILogger.js +12 -25
  343. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ITransport.js +15 -24
  344. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +109 -120
  345. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Loggers.js +11 -13
  346. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +151 -184
  347. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +159 -195
  348. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +91 -104
  349. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Subject.js +31 -34
  350. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +17 -20
  351. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Utils.js +230 -248
  352. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +136 -156
  353. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +77 -84
  354. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/index.js +31 -12
  355. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +4 -3
  356. package/dist/esm/pathfinding/Pathfinding.js +249 -262
  357. package/dist/esm/performance/AssetStreaming.js +567 -634
  358. package/dist/esm/performance/BenchmarkSuite.js +285 -310
  359. package/dist/esm/performance/DeltaCompression.js +478 -525
  360. package/dist/esm/performance/DeterministicPhysics.js +479 -497
  361. package/dist/esm/performance/ECSOptimization.js +653 -694
  362. package/dist/esm/performance/GameSaveSystem.js +515 -555
  363. package/dist/esm/performance/HotReload.js +454 -499
  364. package/dist/esm/performance/InputRecording.js +520 -560
  365. package/dist/esm/performance/InterestManagement.js +460 -499
  366. package/dist/esm/performance/LocalizationRuntime.js +382 -422
  367. package/dist/esm/performance/MemoryManagement.js +415 -469
  368. package/dist/esm/performance/ModSupport.js +455 -495
  369. package/dist/esm/performance/MultiThreadedPhysics.js +408 -442
  370. package/dist/esm/performance/NetworkPrediction.js +436 -481
  371. package/dist/esm/performance/ObjectPooling.js +582 -616
  372. package/dist/esm/performance/Performance.js +182 -189
  373. package/dist/esm/performance/PerformanceAdvanced.js +621 -636
  374. package/dist/esm/performance/WebGPURenderer.js +660 -682
  375. package/dist/esm/physics/PhysicsAdvanced.js +359 -378
  376. package/dist/esm/physics/PhysicsEngine2D.js +393 -426
  377. package/dist/esm/plugins/PluginSDK.js +435 -465
  378. package/dist/esm/plugins/PluginTestKit.js +315 -329
  379. package/dist/esm/procedural/Procedural.js +248 -253
  380. package/dist/esm/procedural/WorldBuilding.js +316 -313
  381. package/dist/esm/quest/QuestSystem.js +982 -931
  382. package/dist/esm/release/MobileExport.js +163 -162
  383. package/dist/esm/release/Release.js +234 -237
  384. package/dist/esm/rendering/Camera2D.js +122 -123
  385. package/dist/esm/rendering/Renderer2D.js +323 -334
  386. package/dist/esm/rendering/WebGPURenderPipeline.js +647 -650
  387. package/dist/esm/runtime3d/Runtime3D.js +368 -377
  388. package/dist/esm/runtime3d/SceneEditor3D.js +268 -262
  389. package/dist/esm/scene/SceneManager.js +178 -192
  390. package/dist/esm/scripting/GraphToAST.js +576 -546
  391. package/dist/esm/scripting/LanguageExporter.js +263 -278
  392. package/dist/esm/scripting/NodeGraph.js +550 -569
  393. package/dist/esm/scripting/ScriptAST.js +45 -38
  394. package/dist/esm/scripting/VisualScripting2.js +1025 -1064
  395. package/dist/esm/scripting/exporters/CSharpExporter.js +465 -495
  396. package/dist/esm/scripting/exporters/GDScriptExporter.js +391 -441
  397. package/dist/esm/scripting/exporters/LuaExporter.js +407 -446
  398. package/dist/esm/scripting/exporters/PythonExporter.js +485 -548
  399. package/dist/esm/scripting/exporters/RustExporter.js +460 -511
  400. package/dist/esm/scripting/exporters/TypeScriptExporter.js +506 -555
  401. package/dist/esm/social/Social.js +77 -79
  402. package/dist/esm/systems/LightingSystem.js +855 -930
  403. package/dist/esm/systems/ParticleSystem2.js +1453 -1450
  404. package/dist/esm/systems/PhysicsDebugSystem.js +1078 -1140
  405. package/dist/esm/systems/TerrainSystem.js +996 -1097
  406. package/dist/esm/templates/ActionTemplates.js +307 -308
  407. package/dist/esm/templates/FightingTemplate.js +439 -462
  408. package/dist/esm/templates/MetroidvaniaTemplate.js +391 -404
  409. package/dist/esm/templates/PartyTemplates.js +206 -201
  410. package/dist/esm/templates/PuzzleTemplates.js +260 -260
  411. package/dist/esm/templates/RPGTemplates.js +172 -177
  412. package/dist/esm/templates/SportsTemplates.js +251 -249
  413. package/dist/esm/templates/StrategyTemplates.js +158 -152
  414. package/dist/esm/templates/SurvivalTemplate.js +367 -379
  415. package/dist/esm/templates/WaveDefense.js +501 -525
  416. package/dist/esm/tilemap/Tilemap.js +209 -213
  417. package/dist/esm/tutorials/TutorialBranching.js +399 -416
  418. package/dist/esm/tutorials/TutorialEngine.js +893 -930
  419. package/dist/esm/tutorials/TutorialOverlay.js +603 -639
  420. package/dist/esm/tutorials/content/Tutorials_T05_T08.js +792 -808
  421. package/dist/esm/tutorials/content/Tutorials_T09_T11.js +740 -755
  422. package/dist/esm/tutorials/content/Tutorials_T12_T15.js +759 -777
  423. package/dist/esm/ui/GameUI.js +296 -311
  424. package/dist/esm/unity-integration/UnityAssetStore.js +704 -740
  425. package/dist/esm/unity-integration/UnityImport.js +1071 -1175
  426. package/dist/esm/unity-integration/UnityLiveLink.js +938 -980
  427. package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js +1234 -756
  428. package/dist/esm/unity-integration/components/UnityProjectBrowser.js +1241 -767
  429. package/dist/esm/unreal-integration/UnrealImport.js +395 -411
  430. package/dist/esm/unreal-integration/UnrealLiveLink.js +1105 -1136
  431. package/dist/esm/unreal-integration/UnrealMarketplace.js +442 -472
  432. package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js +1151 -766
  433. package/dist/esm/xr/ARVR.js +181 -174
  434. package/package.json +7 -12
@@ -1,956 +1,916 @@
1
- 'use strict';
2
-
3
- var EventBus = require('../core/EventBus.js');
4
-
5
- /* ────────────────────────────────────────────────────────────────
6
- I18nManager — LEGENDARY internationalization engine
7
-
8
- Features:
9
- • Namespace support: t('editor:tools.select')
10
- • Interpolation: t('hello', { name: 'Jan' })
11
- • Pluralization: t('items', { count: 5 })
12
- • Lazy loading per module
13
- • RTL detection
14
- • Date/time/number formatting
15
- • 20 languages supported
16
- • React hook: useTranslation()
17
- ──────────────────────────────────────────────────────────────── */
18
- /** All supported locales as array */
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const EventBus = require("../core/EventBus.js");
19
4
  const SUPPORTED_LOCALES = [
20
- 'pl',
21
- 'en',
22
- 'de',
23
- 'fr',
24
- 'es',
25
- 'it',
26
- 'pt',
27
- 'nl',
28
- 'sv',
29
- 'no',
30
- 'da',
31
- 'fi',
32
- 'cs',
33
- 'sk',
34
- 'hu',
35
- 'ro',
36
- 'bg',
37
- 'uk',
38
- 'ja',
39
- 'ko',
5
+ "pl",
6
+ "en",
7
+ "de",
8
+ "fr",
9
+ "es",
10
+ "it",
11
+ "pt",
12
+ "nl",
13
+ "sv",
14
+ "no",
15
+ "da",
16
+ "fi",
17
+ "cs",
18
+ "sk",
19
+ "hu",
20
+ "ro",
21
+ "bg",
22
+ "uk",
23
+ "ja",
24
+ "ko"
40
25
  ];
41
- /** Human-readable locale names */
42
26
  const LOCALE_NAMES = {
43
- pl: 'Polski',
44
- en: 'English',
45
- de: 'Deutsch',
46
- fr: 'Français',
47
- es: 'Español',
48
- it: 'Italiano',
49
- pt: 'Português',
50
- nl: 'Nederlands',
51
- sv: 'Svenska',
52
- no: 'Norsk',
53
- da: 'Dansk',
54
- fi: 'Suomi',
55
- cs: 'Čeština',
56
- sk: 'Slovenčina',
57
- hu: 'Magyar',
58
- ro: 'Română',
59
- bg: 'Български',
60
- uk: 'Українська',
61
- ja: '日本語',
62
- ko: '한국어',
27
+ pl: "Polski",
28
+ en: "English",
29
+ de: "Deutsch",
30
+ fr: "Français",
31
+ es: "Español",
32
+ it: "Italiano",
33
+ pt: "Português",
34
+ nl: "Nederlands",
35
+ sv: "Svenska",
36
+ no: "Norsk",
37
+ da: "Dansk",
38
+ fi: "Suomi",
39
+ cs: "Čeština",
40
+ sk: "Slovenčina",
41
+ hu: "Magyar",
42
+ ro: "Română",
43
+ bg: "Български",
44
+ uk: "Українська",
45
+ ja: "日本語",
46
+ ko: "한국어"
63
47
  };
64
- /** RTL locales (none currently, but extensible for ar, he) */
65
- const RTL_LOCALES = new Set([]);
66
- /* ── Plural Rules ─────────────────────────────────────────────── */
67
- /** CLDR-based plural rules for supported languages */
48
+ const RTL_LOCALES = /* @__PURE__ */ new Set([]);
68
49
  const PLURAL_RULES = {
69
- // Germanic / Romance (en, de, nl, sv, no, da, fi, it, pt, es, fr, hu, ro)
70
- oneOther: {
71
- select(n) {
72
- return n === 1 ? 'one' : 'other';
73
- },
74
- },
75
- // Slavic (pl, cs, sk, uk, bg)
76
- slavic: {
77
- select(n) {
78
- if (n === 1) {
79
- return 'one';
80
- }
81
- const mod10 = n % 10;
82
- const mod100 = n % 100;
83
- if (mod10 >= 2 && mod10 <= 4 && (mod100 < 12 || mod100 > 14)) {
84
- return 'few';
85
- }
86
- if (n !== 1 && mod10 >= 0 && mod10 <= 1) {
87
- return 'many';
88
- }
89
- if (mod10 >= 5 && mod10 <= 9) {
90
- return 'many';
91
- }
92
- if (mod100 >= 12 && mod100 <= 14) {
93
- return 'many';
94
- }
95
- return 'other';
96
- },
97
- },
98
- // Japanese, Korean (no plural forms)
99
- eastAsian: {
100
- select(_n) {
101
- return 'other';
102
- },
103
- },
104
- // French (0 and 1 are singular)
105
- french: {
106
- select(n) {
107
- return n === 0 || n === 1 ? 'one' : 'other';
108
- },
109
- },
50
+ // Germanic / Romance (en, de, nl, sv, no, da, fi, it, pt, es, fr, hu, ro)
51
+ oneOther: {
52
+ select(n) {
53
+ return n === 1 ? "one" : "other";
54
+ }
55
+ },
56
+ // Slavic (pl, cs, sk, uk, bg)
57
+ slavic: {
58
+ select(n) {
59
+ if (n === 1) {
60
+ return "one";
61
+ }
62
+ const mod10 = n % 10;
63
+ const mod100 = n % 100;
64
+ if (mod10 >= 2 && mod10 <= 4 && (mod100 < 12 || mod100 > 14)) {
65
+ return "few";
66
+ }
67
+ if (n !== 1 && mod10 >= 0 && mod10 <= 1) {
68
+ return "many";
69
+ }
70
+ if (mod10 >= 5 && mod10 <= 9) {
71
+ return "many";
72
+ }
73
+ if (mod100 >= 12 && mod100 <= 14) {
74
+ return "many";
75
+ }
76
+ return "other";
77
+ }
78
+ },
79
+ // Japanese, Korean (no plural forms)
80
+ eastAsian: {
81
+ select(_n) {
82
+ return "other";
83
+ }
84
+ },
85
+ // French (0 and 1 are singular)
86
+ french: {
87
+ select(n) {
88
+ return n === 0 || n === 1 ? "one" : "other";
89
+ }
90
+ }
110
91
  };
111
92
  const LOCALE_PLURAL_MAP = {
112
- en: PLURAL_RULES.oneOther,
113
- de: PLURAL_RULES.oneOther,
114
- nl: PLURAL_RULES.oneOther,
115
- sv: PLURAL_RULES.oneOther,
116
- no: PLURAL_RULES.oneOther,
117
- da: PLURAL_RULES.oneOther,
118
- fi: PLURAL_RULES.oneOther,
119
- it: PLURAL_RULES.oneOther,
120
- pt: PLURAL_RULES.oneOther,
121
- es: PLURAL_RULES.oneOther,
122
- hu: PLURAL_RULES.oneOther,
123
- ro: PLURAL_RULES.oneOther,
124
- fr: PLURAL_RULES.french,
125
- pl: PLURAL_RULES.slavic,
126
- cs: PLURAL_RULES.slavic,
127
- sk: PLURAL_RULES.slavic,
128
- uk: PLURAL_RULES.slavic,
129
- bg: PLURAL_RULES.slavic,
130
- ja: PLURAL_RULES.eastAsian,
131
- ko: PLURAL_RULES.eastAsian,
93
+ en: PLURAL_RULES.oneOther,
94
+ de: PLURAL_RULES.oneOther,
95
+ nl: PLURAL_RULES.oneOther,
96
+ sv: PLURAL_RULES.oneOther,
97
+ no: PLURAL_RULES.oneOther,
98
+ da: PLURAL_RULES.oneOther,
99
+ fi: PLURAL_RULES.oneOther,
100
+ it: PLURAL_RULES.oneOther,
101
+ pt: PLURAL_RULES.oneOther,
102
+ es: PLURAL_RULES.oneOther,
103
+ hu: PLURAL_RULES.oneOther,
104
+ ro: PLURAL_RULES.oneOther,
105
+ fr: PLURAL_RULES.french,
106
+ pl: PLURAL_RULES.slavic,
107
+ cs: PLURAL_RULES.slavic,
108
+ sk: PLURAL_RULES.slavic,
109
+ uk: PLURAL_RULES.slavic,
110
+ bg: PLURAL_RULES.slavic,
111
+ ja: PLURAL_RULES.eastAsian,
112
+ ko: PLURAL_RULES.eastAsian
132
113
  };
133
- /* ── I18nManager ──────────────────────────────────────────────── */
134
114
  const DEFAULT_I18N_CONFIG = {
135
- defaultLocale: 'en',
136
- fallbackLocale: 'en',
137
- debug: false,
138
- interpolationPrefix: '{{',
139
- interpolationSuffix: '}}',
140
- pluralSeparator: '_',
141
- namespaceSeparator: ':',
142
- keySeparator: '.',
115
+ defaultLocale: "en",
116
+ fallbackLocale: "en",
117
+ debug: false,
118
+ interpolationPrefix: "{{",
119
+ interpolationSuffix: "}}",
120
+ pluralSeparator: "_",
121
+ namespaceSeparator: ":",
122
+ keySeparator: "."
143
123
  };
144
124
  class I18nManager {
145
- constructor(config) {
146
- this.namespaces = new Map();
147
- this.loadedNamespaces = new Set();
148
- this.events = new EventBus.EventBus();
149
- this.config = { ...DEFAULT_I18N_CONFIG, ...config };
150
- this.locale = this.config.defaultLocale;
151
- // R1.1.9 / TODO N3 — the built-in dictionary has to be registered or every t() returns
152
- // its own key as the label. `registerEngineTranslations` existed and was exported, but
153
- // nothing in the package ever called it, so wiring t() into the editors would have
154
- // rendered `engine:editor.actions.save` on the button while CI stayed green. Doing it
155
- // here covers every path: the singleton, initI18n(), and an instance a consumer builds
156
- // and passes to I18nProvider. addTranslations deep-merges, so a consumer calling it
157
- // afterwards still overrides these.
158
- registerEngineTranslations(this);
159
- }
160
- /* ── Locale Management ──────────────────────────────────────── */
161
- getLocale() {
162
- return this.locale;
163
- }
164
- setLocale(locale) {
165
- if (!SUPPORTED_LOCALES.includes(locale)) {
166
- if (this.config.debug) {
167
- console.warn(`[I18n] Unsupported locale: "${locale}". Falling back to "${this.config.fallbackLocale}".`);
168
- }
169
- return;
170
- }
171
- const prev = this.locale;
172
- this.locale = locale;
173
- this.events.emit('locale:changed', { from: prev, to: locale });
174
- }
175
- isRTL() {
176
- return RTL_LOCALES.has(this.locale);
177
- }
178
- /** Auto-detect locale from browser settings */
179
- detectLocale() {
180
- if (typeof navigator === 'undefined') {
181
- return this.config.defaultLocale;
182
- }
183
- const browserLang = navigator.language.split('-')[0].toLowerCase();
184
- const match = SUPPORTED_LOCALES.find((l) => l === browserLang);
185
- return match ?? this.config.defaultLocale;
186
- }
187
- /* ── Translation Loading ────────────────────────────────────── */
188
- /**
189
- * Add translations for a namespace + locale.
190
- * Can be called multiple times (merges).
191
- */
192
- addTranslations(namespace, locale, translations) {
193
- let nsMap = this.namespaces.get(namespace);
194
- if (!nsMap) {
195
- nsMap = new Map();
196
- this.namespaces.set(namespace, nsMap);
197
- }
198
- const existing = nsMap.get(locale) ?? {};
199
- nsMap.set(locale, deepMergeDict(existing, translations));
200
- this.loadedNamespaces.add(`${namespace}:${locale}`);
201
- }
202
- /** Check if translations are loaded for namespace + locale */
203
- isLoaded(namespace, locale) {
204
- return this.loadedNamespaces.has(`${namespace}:${locale ?? this.locale}`);
125
+ constructor(config) {
126
+ this.namespaces = /* @__PURE__ */ new Map();
127
+ this.loadedNamespaces = /* @__PURE__ */ new Set();
128
+ this.events = new EventBus.EventBus();
129
+ this.config = { ...DEFAULT_I18N_CONFIG, ...config };
130
+ this.locale = this.config.defaultLocale;
131
+ registerEngineTranslations(this);
132
+ }
133
+ /* ── Locale Management ──────────────────────────────────────── */
134
+ getLocale() {
135
+ return this.locale;
136
+ }
137
+ setLocale(locale) {
138
+ if (!SUPPORTED_LOCALES.includes(locale)) {
139
+ if (this.config.debug) {
140
+ console.warn(
141
+ `[I18n] Unsupported locale: "${locale}". Falling back to "${this.config.fallbackLocale}".`
142
+ );
143
+ }
144
+ return;
205
145
  }
206
- /** Load translations from async source (e.g., dynamic import) */
207
- async loadNamespace(namespace, locale, loader) {
208
- const key = `${namespace}:${locale}`;
209
- if (this.loadedNamespaces.has(key)) {
210
- return;
211
- }
212
- const dict = await loader();
213
- this.addTranslations(namespace, locale, dict);
214
- this.events.emit('namespace:loaded', { namespace, locale });
146
+ const prev = this.locale;
147
+ this.locale = locale;
148
+ this.events.emit("locale:changed", { from: prev, to: locale });
149
+ }
150
+ isRTL() {
151
+ return RTL_LOCALES.has(this.locale);
152
+ }
153
+ /** Auto-detect locale from browser settings */
154
+ detectLocale() {
155
+ if (typeof navigator === "undefined") {
156
+ return this.config.defaultLocale;
215
157
  }
216
- /* ── Translation ────────────────────────────────────────────── */
217
- /**
218
- * Translate a key.
219
- *
220
- * @param fullKey - Key with optional namespace: 'ns:path.to.key' or just 'path.to.key'
221
- * @param values - Interpolation values (including `count` for pluralization)
222
- * @returns Translated string or fallback
223
- *
224
- * @example
225
- * i18n.t('editor:tools.select') // → 'Select'
226
- * i18n.t('game:score', { score: 100 }) // → 'Score: 100'
227
- * i18n.t('items', { count: 5 }) // → '5 items' (pluralized)
228
- */
229
- t(fullKey, values) {
230
- const { ns, key } = this.parseKey(fullKey);
231
- const count = values?.count;
232
- // Try current locale
233
- let result = this.resolve(ns, this.locale, key, typeof count === 'number' ? count : undefined);
234
- // Fallback to default locale
235
- if (result === undefined && this.locale !== this.config.fallbackLocale) {
236
- result = this.resolve(ns, this.config.fallbackLocale, key, typeof count === 'number' ? count : undefined);
237
- }
238
- // Missing key handler
239
- if (result === undefined) {
240
- if (this.config.missingKeyHandler) {
241
- return this.config.missingKeyHandler(this.locale, ns, key);
242
- }
243
- if (this.config.debug) {
244
- console.warn(`[I18n] Missing translation: "${fullKey}" (${this.locale})`);
245
- }
246
- return fullKey;
247
- }
248
- // Interpolation
249
- if (values) {
250
- return this.interpolate(result, values);
251
- }
252
- return result;
158
+ const browserLang = navigator.language.split("-")[0].toLowerCase();
159
+ const match = SUPPORTED_LOCALES.find((l) => l === browserLang);
160
+ return match ?? this.config.defaultLocale;
161
+ }
162
+ /* ── Translation Loading ────────────────────────────────────── */
163
+ /**
164
+ * Add translations for a namespace + locale.
165
+ * Can be called multiple times (merges).
166
+ */
167
+ addTranslations(namespace, locale, translations) {
168
+ let nsMap = this.namespaces.get(namespace);
169
+ if (!nsMap) {
170
+ nsMap = /* @__PURE__ */ new Map();
171
+ this.namespaces.set(namespace, nsMap);
253
172
  }
254
- /** Get plural category for current locale */
255
- getPluralCategory(count) {
256
- const rule = LOCALE_PLURAL_MAP[this.locale];
257
- return rule.select(count);
173
+ const existing = nsMap.get(locale) ?? {};
174
+ nsMap.set(locale, deepMergeDict(existing, translations));
175
+ this.loadedNamespaces.add(`${namespace}:${locale}`);
176
+ }
177
+ /** Check if translations are loaded for namespace + locale */
178
+ isLoaded(namespace, locale) {
179
+ return this.loadedNamespaces.has(`${namespace}:${locale ?? this.locale}`);
180
+ }
181
+ /** Load translations from async source (e.g., dynamic import) */
182
+ async loadNamespace(namespace, locale, loader) {
183
+ const key = `${namespace}:${locale}`;
184
+ if (this.loadedNamespaces.has(key)) {
185
+ return;
258
186
  }
259
- /* ── Formatting ─────────────────────────────────────────────── */
260
- /** Format number using locale conventions */
261
- formatNumber(value, options) {
262
- return new Intl.NumberFormat(this.locale, options).format(value);
187
+ const dict = await loader();
188
+ this.addTranslations(namespace, locale, dict);
189
+ this.events.emit("namespace:loaded", { namespace, locale });
190
+ }
191
+ /* ── Translation ────────────────────────────────────────────── */
192
+ /**
193
+ * Translate a key.
194
+ *
195
+ * @param fullKey - Key with optional namespace: 'ns:path.to.key' or just 'path.to.key'
196
+ * @param values - Interpolation values (including `count` for pluralization)
197
+ * @returns Translated string or fallback
198
+ *
199
+ * @example
200
+ * i18n.t('editor:tools.select') // → 'Select'
201
+ * i18n.t('game:score', { score: 100 }) // → 'Score: 100'
202
+ * i18n.t('items', { count: 5 }) // → '5 items' (pluralized)
203
+ */
204
+ t(fullKey, values) {
205
+ const { ns, key } = this.parseKey(fullKey);
206
+ const count = values?.count;
207
+ let result = this.resolve(ns, this.locale, key, typeof count === "number" ? count : void 0);
208
+ if (result === void 0 && this.locale !== this.config.fallbackLocale) {
209
+ result = this.resolve(
210
+ ns,
211
+ this.config.fallbackLocale,
212
+ key,
213
+ typeof count === "number" ? count : void 0
214
+ );
263
215
  }
264
- /** Format date using locale conventions */
265
- formatDate(date, options) {
266
- return new Intl.DateTimeFormat(this.locale, options).format(date);
216
+ if (result === void 0) {
217
+ if (this.config.missingKeyHandler) {
218
+ return this.config.missingKeyHandler(this.locale, ns, key);
219
+ }
220
+ if (this.config.debug) {
221
+ console.warn(`[I18n] Missing translation: "${fullKey}" (${this.locale})`);
222
+ }
223
+ return fullKey;
267
224
  }
268
- /** Format relative time (e.g., "2 days ago") — requires ES2020+ runtime */
269
- formatRelativeTime(value, unit) {
270
- const Ctor = Intl.RelativeTimeFormat;
271
- if (!Ctor) {
272
- return `${value} ${unit}`;
273
- }
274
- return new Ctor(this.locale, { numeric: 'auto' }).format(value, unit);
225
+ if (values) {
226
+ return this.interpolate(result, values);
275
227
  }
276
- /* ── Internals ──────────────────────────────────────────────── */
277
- parseKey(fullKey) {
278
- const sepIdx = fullKey.indexOf(this.config.namespaceSeparator);
279
- if (sepIdx > 0) {
280
- return {
281
- ns: fullKey.slice(0, sepIdx),
282
- key: fullKey.slice(sepIdx + 1),
283
- };
284
- }
285
- return { ns: 'common', key: fullKey };
228
+ return result;
229
+ }
230
+ /** Get plural category for current locale */
231
+ getPluralCategory(count) {
232
+ const rule = LOCALE_PLURAL_MAP[this.locale];
233
+ return rule.select(count);
234
+ }
235
+ /* ── Formatting ─────────────────────────────────────────────── */
236
+ /** Format number using locale conventions */
237
+ formatNumber(value, options) {
238
+ return new Intl.NumberFormat(this.locale, options).format(value);
239
+ }
240
+ /** Format date using locale conventions */
241
+ formatDate(date, options) {
242
+ return new Intl.DateTimeFormat(this.locale, options).format(date);
243
+ }
244
+ /** Format relative time (e.g., "2 days ago") — requires ES2020+ runtime */
245
+ formatRelativeTime(value, unit) {
246
+ const Ctor = Intl.RelativeTimeFormat;
247
+ if (!Ctor) {
248
+ return `${value} ${unit}`;
286
249
  }
287
- resolve(ns, locale, key, count) {
288
- const nsMap = this.namespaces.get(ns);
289
- if (!nsMap) {
290
- return undefined;
291
- }
292
- const dict = nsMap.get(locale);
293
- if (!dict) {
294
- return undefined;
295
- }
296
- // With pluralization
297
- if (count !== undefined) {
298
- const category = LOCALE_PLURAL_MAP[locale].select(count);
299
- const pluralKey = `${key}${this.config.pluralSeparator}${category}`;
300
- const pluralResult = lookupKey(dict, pluralKey, this.config.keySeparator);
301
- if (typeof pluralResult === 'string') {
302
- return pluralResult;
303
- }
304
- // Fallback to _other
305
- const otherKey = `${key}${this.config.pluralSeparator}other`;
306
- const otherResult = lookupKey(dict, otherKey, this.config.keySeparator);
307
- if (typeof otherResult === 'string') {
308
- return otherResult;
309
- }
310
- }
311
- const result = lookupKey(dict, key, this.config.keySeparator);
312
- return typeof result === 'string' ? result : undefined;
250
+ return new Ctor(this.locale, { numeric: "auto" }).format(value, unit);
251
+ }
252
+ /* ── Internals ──────────────────────────────────────────────── */
253
+ parseKey(fullKey) {
254
+ const sepIdx = fullKey.indexOf(this.config.namespaceSeparator);
255
+ if (sepIdx > 0) {
256
+ return {
257
+ ns: fullKey.slice(0, sepIdx),
258
+ key: fullKey.slice(sepIdx + 1)
259
+ };
313
260
  }
314
- interpolate(text, values) {
315
- const { interpolationPrefix: pre, interpolationSuffix: suf } = this.config;
316
- let result = text;
317
- for (const [k, v] of Object.entries(values)) {
318
- const placeholder = `${pre}${k}${suf}`;
319
- // Replace all occurrences without regex
320
- while (result.includes(placeholder)) {
321
- result = result.replace(placeholder, String(v));
322
- }
323
- }
324
- return result;
261
+ return { ns: "common", key: fullKey };
262
+ }
263
+ resolve(ns, locale, key, count) {
264
+ const nsMap = this.namespaces.get(ns);
265
+ if (!nsMap) {
266
+ return void 0;
325
267
  }
326
- /* ── Export / Inspect ───────────────────────────────────────── */
327
- /** Get all loaded namespaces */
328
- getLoadedNamespaces() {
329
- return Array.from(this.namespaces.keys());
268
+ const dict = nsMap.get(locale);
269
+ if (!dict) {
270
+ return void 0;
330
271
  }
331
- /** Get all translations for a namespace + locale (for debugging) */
332
- getTranslations(namespace, locale) {
333
- const nsMap = this.namespaces.get(namespace);
334
- return nsMap?.get(locale ?? this.locale);
272
+ if (count !== void 0) {
273
+ const category = LOCALE_PLURAL_MAP[locale].select(count);
274
+ const pluralKey = `${key}${this.config.pluralSeparator}${category}`;
275
+ const pluralResult = lookupKey(dict, pluralKey, this.config.keySeparator);
276
+ if (typeof pluralResult === "string") {
277
+ return pluralResult;
278
+ }
279
+ const otherKey = `${key}${this.config.pluralSeparator}other`;
280
+ const otherResult = lookupKey(dict, otherKey, this.config.keySeparator);
281
+ if (typeof otherResult === "string") {
282
+ return otherResult;
283
+ }
335
284
  }
336
- /** Get count of missing translations for a locale compared to fallback */
337
- getMissingKeys(namespace, locale) {
338
- const fallbackDict = this.namespaces.get(namespace)?.get(this.config.fallbackLocale);
339
- const targetDict = this.namespaces.get(namespace)?.get(locale);
340
- if (!fallbackDict) {
341
- return [];
342
- }
343
- const missing = [];
344
- collectKeys(fallbackDict, '', (key) => {
345
- if (!targetDict || lookupKey(targetDict, key, this.config.keySeparator) === undefined) {
346
- missing.push(key);
347
- }
348
- });
349
- return missing;
285
+ const result = lookupKey(dict, key, this.config.keySeparator);
286
+ return typeof result === "string" ? result : void 0;
287
+ }
288
+ interpolate(text, values) {
289
+ const { interpolationPrefix: pre, interpolationSuffix: suf } = this.config;
290
+ let result = text;
291
+ for (const [k, v] of Object.entries(values)) {
292
+ const placeholder = `${pre}${k}${suf}`;
293
+ while (result.includes(placeholder)) {
294
+ result = result.replace(placeholder, String(v));
295
+ }
350
296
  }
351
- dispose() {
352
- this.namespaces.clear();
353
- this.loadedNamespaces.clear();
297
+ return result;
298
+ }
299
+ /* ── Export / Inspect ───────────────────────────────────────── */
300
+ /** Get all loaded namespaces */
301
+ getLoadedNamespaces() {
302
+ return Array.from(this.namespaces.keys());
303
+ }
304
+ /** Get all translations for a namespace + locale (for debugging) */
305
+ getTranslations(namespace, locale) {
306
+ const nsMap = this.namespaces.get(namespace);
307
+ return nsMap?.get(locale ?? this.locale);
308
+ }
309
+ /** Get count of missing translations for a locale compared to fallback */
310
+ getMissingKeys(namespace, locale) {
311
+ const fallbackDict = this.namespaces.get(namespace)?.get(this.config.fallbackLocale);
312
+ const targetDict = this.namespaces.get(namespace)?.get(locale);
313
+ if (!fallbackDict) {
314
+ return [];
354
315
  }
316
+ const missing = [];
317
+ collectKeys(fallbackDict, "", (key) => {
318
+ if (!targetDict || lookupKey(targetDict, key, this.config.keySeparator) === void 0) {
319
+ missing.push(key);
320
+ }
321
+ });
322
+ return missing;
323
+ }
324
+ dispose() {
325
+ this.namespaces.clear();
326
+ this.loadedNamespaces.clear();
327
+ }
355
328
  }
356
- /* ── Helpers ──────────────────────────────────────────────────── */
357
329
  function lookupKey(dict, key, separator) {
358
- const parts = key.split(separator);
359
- let current = dict;
360
- for (const part of parts) {
361
- if (typeof current !== 'object' || current === null) {
362
- return undefined;
363
- }
364
- current = current[part];
330
+ const parts = key.split(separator);
331
+ let current = dict;
332
+ for (const part of parts) {
333
+ if (typeof current !== "object" || current === null) {
334
+ return void 0;
365
335
  }
366
- return current;
336
+ current = current[part];
337
+ }
338
+ return current;
367
339
  }
368
340
  function deepMergeDict(target, source) {
369
- const result = { ...target };
370
- for (const key of Object.keys(source)) {
371
- const sv = source[key];
372
- const tv = target[key];
373
- if (typeof sv === 'object' && sv !== null && typeof tv === 'object' && tv !== null) {
374
- result[key] = deepMergeDict(tv, sv);
375
- }
376
- else {
377
- result[key] = sv;
378
- }
341
+ const result = { ...target };
342
+ for (const key of Object.keys(source)) {
343
+ const sv = source[key];
344
+ const tv = target[key];
345
+ if (typeof sv === "object" && sv !== null && typeof tv === "object" && tv !== null) {
346
+ result[key] = deepMergeDict(tv, sv);
347
+ } else {
348
+ result[key] = sv;
379
349
  }
380
- return result;
350
+ }
351
+ return result;
381
352
  }
382
353
  function collectKeys(dict, prefix, callback) {
383
- for (const [key, value] of Object.entries(dict)) {
384
- const fullKey = prefix ? `${prefix}.${key}` : key;
385
- if (typeof value === 'string') {
386
- callback(fullKey);
387
- }
388
- else {
389
- collectKeys(value, fullKey, callback);
390
- }
354
+ for (const [key, value] of Object.entries(dict)) {
355
+ const fullKey = prefix ? `${prefix}.${key}` : key;
356
+ if (typeof value === "string") {
357
+ callback(fullKey);
358
+ } else {
359
+ collectKeys(value, fullKey, callback);
391
360
  }
361
+ }
392
362
  }
393
- /* ── Singleton convenience ────────────────────────────────────── */
394
363
  let _defaultManager;
395
- /** Get or create the default I18nManager instance */
396
364
  function getI18n() {
397
- if (!_defaultManager) {
398
- _defaultManager = new I18nManager();
399
- }
400
- return _defaultManager;
365
+ if (!_defaultManager) {
366
+ _defaultManager = new I18nManager();
367
+ }
368
+ return _defaultManager;
401
369
  }
402
- /** Initialize the default I18nManager with config */
403
370
  function initI18n(config) {
404
- _defaultManager = new I18nManager(config);
405
- return _defaultManager;
371
+ _defaultManager = new I18nManager(config);
372
+ return _defaultManager;
406
373
  }
407
- /** Convenience shorthand for getI18n().t() */
408
374
  function t(key, values) {
409
- return getI18n().t(key, values);
375
+ return getI18n().t(key, values);
410
376
  }
411
- /* ── Built-in engine translations ─────────────────────────────── */
412
- /** Core engine UI strings in English */
413
377
  const ENGINE_TRANSLATIONS_EN = {
414
- editor: {
415
- tools: {
416
- select: 'Select',
417
- move: 'Move',
418
- rotate: 'Rotate',
419
- scale: 'Scale',
420
- pan: 'Pan',
421
- },
422
- panels: {
423
- hierarchy: 'Hierarchy',
424
- inspector: 'Inspector',
425
- assets: 'Assets',
426
- console: 'Console',
427
- viewport: 'Viewport',
428
- },
429
- actions: {
430
- save: 'Save',
431
- undo: 'Undo',
432
- redo: 'Redo',
433
- copy: 'Copy',
434
- paste: 'Paste',
435
- delete: 'Delete',
436
- duplicate: 'Duplicate',
437
- play: 'Play',
438
- pause: 'Pause',
439
- stop: 'Stop',
440
- },
441
- messages: {
442
- noSelection: 'No selection',
443
- unsavedChanges: 'You have unsaved changes. Save before closing?',
444
- projectSaved: 'Project saved successfully!',
445
- assetImported: '{{count}} asset(s) imported',
446
- consoleReady: 'Console ready.',
447
- },
448
- terrain: {
449
- raise: 'Raise',
450
- lower: 'Lower',
451
- smooth: 'Smooth',
452
- flatten: 'Flatten',
453
- paint: 'Paint',
454
- foliage: 'Foliage',
455
- erase: 'Erase',
456
- createSpline: 'Create Spline',
457
- editSpline: 'Edit Spline',
458
- placeProbe: 'Place Probe',
459
- measure: 'Measure',
460
- },
461
- search: {
462
- objects: 'Search objects…',
463
- nodes: 'Search nodes…',
464
- },
465
- background: {
466
- color: 'Color',
467
- gradient: 'Gradient',
468
- skybox: 'Skybox',
469
- },
470
- valueMode: {
471
- constant: 'Constant',
472
- curve: 'Curve',
473
- random: 'Random',
474
- gradient: 'Gradient',
475
- },
476
- emitter: {
477
- sphere: 'Sphere',
478
- hemisphere: 'Hemisphere',
479
- cone: 'Cone',
480
- box: 'Box',
481
- circle: 'Circle',
482
- },
483
- space: {
484
- local: 'Local',
485
- world: 'World',
486
- planes: 'Planes',
487
- },
488
- range: {
489
- min: 'Min',
490
- max: 'Max',
491
- },
492
- gizmos: {
493
- toggle: 'Toggle Gizmos',
494
- },
495
- title: {
496
- game: 'Game editor',
497
- level: 'Level editor',
498
- material: 'Material editor',
499
- particle: 'Particle editor',
500
- },
501
- entity: {
502
- empty: 'Empty',
503
- sprite: 'Sprite',
504
- shape: 'Shape',
505
- text: 'Text',
506
- physicsBody: 'Physics Body',
507
- camera: 'Camera',
508
- },
509
- view: {
510
- zoomIn: 'Zoom In',
511
- zoomOut: 'Zoom Out',
512
- resetView: 'Reset View',
513
- toggleGrid: 'Toggle Grid',
514
- toggleSnap: 'Toggle Snap',
515
- playStop: 'Play/Stop',
516
- },
517
- fields: {
518
- shape: 'Shape',
519
- visible: 'Visible',
520
- text: 'Text',
521
- align: 'Align',
522
- body: 'Body',
523
- },
524
- shape: {
525
- rect: 'Rectangle',
526
- circle: 'Circle',
527
- polygon: 'Polygon',
528
- line: 'Line',
529
- },
530
- align: {
531
- left: 'Left',
532
- center: 'Center',
533
- right: 'Right',
534
- },
535
- body: {
536
- dynamic: 'Dynamic',
537
- static: 'Static',
538
- kinematic: 'Kinematic',
539
- },
540
- assets: {
541
- import: 'Import Asset',
542
- addEntity: 'Add Entity',
543
- addChild: 'Add Child',
544
- removeComponent: 'Remove {{type}}',
545
- },
546
- },
547
- game: {
548
- menu: {
549
- start: 'Start Game',
550
- resume: 'Resume',
551
- restart: 'Restart',
552
- quit: 'Quit',
553
- settings: 'Settings',
554
- controls: 'Controls',
555
- },
556
- hud: {
557
- score: 'Score: {{score}}',
558
- lives: 'Lives: {{lives}}',
559
- level: 'Level {{level}}',
560
- time: 'Time: {{time}}',
561
- wave: 'Wave {{wave}}',
562
- },
563
- items_one: '{{count}} item',
564
- items_other: '{{count}} items',
565
- players_one: '{{count}} player',
566
- players_other: '{{count}} players',
567
- },
568
- accessibility: {
569
- colorblind: {
570
- protanopia: 'Protanopia',
571
- deuteranopia: 'Deuteranopia',
572
- tritanopia: 'Tritanopia',
573
- achromatopsia: 'Achromatopsia',
574
- },
575
- difficulty: {
576
- easy: 'Easy',
577
- medium: 'Medium',
578
- hard: 'Hard',
579
- custom: 'Custom',
580
- },
581
- settings: {
582
- highContrast: 'High Contrast',
583
- screenReader: 'Screen Reader',
584
- subtitles: 'Subtitles',
585
- fontSize: 'Font Size',
586
- },
378
+ editor: {
379
+ tools: {
380
+ select: "Select",
381
+ move: "Move",
382
+ rotate: "Rotate",
383
+ scale: "Scale",
384
+ pan: "Pan"
385
+ },
386
+ panels: {
387
+ hierarchy: "Hierarchy",
388
+ inspector: "Inspector",
389
+ assets: "Assets",
390
+ console: "Console",
391
+ viewport: "Viewport"
392
+ },
393
+ actions: {
394
+ save: "Save",
395
+ undo: "Undo",
396
+ redo: "Redo",
397
+ copy: "Copy",
398
+ paste: "Paste",
399
+ delete: "Delete",
400
+ duplicate: "Duplicate",
401
+ play: "Play",
402
+ pause: "Pause",
403
+ stop: "Stop"
404
+ },
405
+ messages: {
406
+ noSelection: "No selection",
407
+ unsavedChanges: "You have unsaved changes. Save before closing?",
408
+ projectSaved: "Project saved successfully!",
409
+ assetImported: "{{count}} asset(s) imported",
410
+ consoleReady: "Console ready."
411
+ },
412
+ terrain: {
413
+ raise: "Raise",
414
+ lower: "Lower",
415
+ smooth: "Smooth",
416
+ flatten: "Flatten",
417
+ paint: "Paint",
418
+ foliage: "Foliage",
419
+ erase: "Erase",
420
+ createSpline: "Create Spline",
421
+ editSpline: "Edit Spline",
422
+ placeProbe: "Place Probe",
423
+ measure: "Measure"
424
+ },
425
+ search: {
426
+ objects: "Search objects…",
427
+ nodes: "Search nodes…"
428
+ },
429
+ background: {
430
+ color: "Color",
431
+ gradient: "Gradient",
432
+ skybox: "Skybox"
433
+ },
434
+ valueMode: {
435
+ constant: "Constant",
436
+ curve: "Curve",
437
+ random: "Random",
438
+ gradient: "Gradient"
587
439
  },
440
+ emitter: {
441
+ sphere: "Sphere",
442
+ hemisphere: "Hemisphere",
443
+ cone: "Cone",
444
+ box: "Box",
445
+ circle: "Circle"
446
+ },
447
+ space: {
448
+ local: "Local",
449
+ world: "World",
450
+ planes: "Planes"
451
+ },
452
+ range: {
453
+ min: "Min",
454
+ max: "Max"
455
+ },
456
+ gizmos: {
457
+ toggle: "Toggle Gizmos"
458
+ },
459
+ title: {
460
+ game: "Game editor",
461
+ level: "Level editor",
462
+ material: "Material editor",
463
+ particle: "Particle editor"
464
+ },
465
+ entity: {
466
+ empty: "Empty",
467
+ sprite: "Sprite",
468
+ shape: "Shape",
469
+ text: "Text",
470
+ physicsBody: "Physics Body",
471
+ camera: "Camera"
472
+ },
473
+ view: {
474
+ zoomIn: "Zoom In",
475
+ zoomOut: "Zoom Out",
476
+ resetView: "Reset View",
477
+ toggleGrid: "Toggle Grid",
478
+ toggleSnap: "Toggle Snap",
479
+ playStop: "Play/Stop"
480
+ },
481
+ fields: {
482
+ shape: "Shape",
483
+ visible: "Visible",
484
+ text: "Text",
485
+ align: "Align",
486
+ body: "Body"
487
+ },
488
+ shape: {
489
+ rect: "Rectangle",
490
+ circle: "Circle",
491
+ polygon: "Polygon",
492
+ line: "Line"
493
+ },
494
+ align: {
495
+ left: "Left",
496
+ center: "Center",
497
+ right: "Right"
498
+ },
499
+ body: {
500
+ dynamic: "Dynamic",
501
+ static: "Static",
502
+ kinematic: "Kinematic"
503
+ },
504
+ assets: {
505
+ import: "Import Asset",
506
+ addEntity: "Add Entity",
507
+ addChild: "Add Child",
508
+ removeComponent: "Remove {{type}}"
509
+ }
510
+ },
511
+ game: {
512
+ menu: {
513
+ start: "Start Game",
514
+ resume: "Resume",
515
+ restart: "Restart",
516
+ quit: "Quit",
517
+ settings: "Settings",
518
+ controls: "Controls"
519
+ },
520
+ hud: {
521
+ score: "Score: {{score}}",
522
+ lives: "Lives: {{lives}}",
523
+ level: "Level {{level}}",
524
+ time: "Time: {{time}}",
525
+ wave: "Wave {{wave}}"
526
+ },
527
+ items_one: "{{count}} item",
528
+ items_other: "{{count}} items",
529
+ players_one: "{{count}} player",
530
+ players_other: "{{count}} players"
531
+ },
532
+ accessibility: {
533
+ colorblind: {
534
+ protanopia: "Protanopia",
535
+ deuteranopia: "Deuteranopia",
536
+ tritanopia: "Tritanopia",
537
+ achromatopsia: "Achromatopsia"
538
+ },
539
+ difficulty: {
540
+ easy: "Easy",
541
+ medium: "Medium",
542
+ hard: "Hard",
543
+ custom: "Custom"
544
+ },
545
+ settings: {
546
+ highContrast: "High Contrast",
547
+ screenReader: "Screen Reader",
548
+ subtitles: "Subtitles",
549
+ fontSize: "Font Size"
550
+ }
551
+ }
588
552
  };
589
- /** Core engine UI strings in Polish */
590
553
  const ENGINE_TRANSLATIONS_PL = {
591
- editor: {
592
- tools: {
593
- select: 'Zaznacz',
594
- move: 'Przesuń',
595
- rotate: 'Obróć',
596
- scale: 'Skaluj',
597
- pan: 'Przesuń widok',
598
- },
599
- panels: {
600
- hierarchy: 'Hierarchia',
601
- inspector: 'Inspektor',
602
- assets: 'Zasoby',
603
- console: 'Konsola',
604
- viewport: 'Widok',
605
- },
606
- actions: {
607
- save: 'Zapisz',
608
- undo: 'Cofnij',
609
- redo: 'Ponów',
610
- copy: 'Kopiuj',
611
- paste: 'Wklej',
612
- delete: 'Usuń',
613
- duplicate: 'Duplikuj',
614
- play: 'Graj',
615
- pause: 'Pauza',
616
- stop: 'Stop',
617
- },
618
- messages: {
619
- noSelection: 'Brak zaznaczenia',
620
- unsavedChanges: 'Masz niezapisane zmiany. Zapisać przed zamknięciem?',
621
- projectSaved: 'Projekt zapisany!',
622
- assetImported: 'Zaimportowano {{count}} zasób/zasobów',
623
- consoleReady: 'Konsola gotowa.',
624
- },
625
- terrain: {
626
- raise: 'Podnieś',
627
- lower: 'Obniż',
628
- smooth: 'Wygładź',
629
- flatten: 'Spłaszcz',
630
- paint: 'Maluj',
631
- foliage: 'Roślinność',
632
- erase: 'Wymaż',
633
- createSpline: 'Utwórz splajn',
634
- editSpline: 'Edytuj splajn',
635
- placeProbe: 'Umieść sondę',
636
- measure: 'Zmierz',
637
- },
638
- search: {
639
- objects: 'Szukaj obiektów…',
640
- nodes: 'Szukaj węzłów…',
641
- },
642
- background: {
643
- color: 'Kolor',
644
- gradient: 'Gradient',
645
- skybox: 'Skybox',
646
- },
647
- valueMode: {
648
- constant: 'Stała',
649
- curve: 'Krzywa',
650
- random: 'Losowo',
651
- gradient: 'Gradient',
652
- },
653
- emitter: {
654
- sphere: 'Kula',
655
- hemisphere: 'Półkula',
656
- cone: 'Stożek',
657
- box: 'Prostopadłościan',
658
- circle: 'Okrąg',
659
- },
660
- space: {
661
- local: 'Lokalna',
662
- world: 'Świata',
663
- planes: 'Płaszczyzny',
664
- },
665
- range: {
666
- min: 'Min',
667
- max: 'Maks',
668
- },
669
- gizmos: {
670
- toggle: 'Przełącz gizma',
671
- },
672
- title: {
673
- game: 'Edytor gry',
674
- level: 'Edytor poziomu',
675
- material: 'Edytor materiału',
676
- particle: 'Edytor cząstek',
677
- },
678
- entity: {
679
- empty: 'Pusty',
680
- sprite: 'Sprite',
681
- shape: 'Kształt',
682
- text: 'Tekst',
683
- physicsBody: 'Ciało fizyczne',
684
- camera: 'Kamera',
685
- },
686
- view: {
687
- zoomIn: 'Przybliż',
688
- zoomOut: 'Oddal',
689
- resetView: 'Resetuj widok',
690
- toggleGrid: 'Przełącz siatkę',
691
- toggleSnap: 'Przełącz przyciąganie',
692
- playStop: 'Uruchom/zatrzymaj',
693
- },
694
- fields: {
695
- shape: 'Kształt',
696
- visible: 'Widoczny',
697
- text: 'Tekst',
698
- align: 'Wyrównanie',
699
- body: 'Ciało',
700
- },
701
- shape: {
702
- rect: 'Prostokąt',
703
- circle: 'Okrąg',
704
- polygon: 'Wielokąt',
705
- line: 'Linia',
706
- },
707
- align: {
708
- left: 'Do lewej',
709
- center: 'Do środka',
710
- right: 'Do prawej',
711
- },
712
- body: {
713
- dynamic: 'Dynamiczne',
714
- static: 'Statyczne',
715
- kinematic: 'Kinematyczne',
716
- },
717
- assets: {
718
- import: 'Importuj zasób',
719
- addEntity: 'Dodaj obiekt',
720
- addChild: 'Dodaj dziecko',
721
- removeComponent: 'Usuń {{type}}',
722
- },
723
- },
724
- game: {
725
- menu: {
726
- start: 'Rozpocznij grę',
727
- resume: 'Wznów',
728
- restart: 'Od nowa',
729
- quit: 'Wyjdź',
730
- settings: 'Ustawienia',
731
- controls: 'Sterowanie',
732
- },
733
- hud: {
734
- score: 'Wynik: {{score}}',
735
- lives: 'Życia: {{lives}}',
736
- level: 'Poziom {{level}}',
737
- time: 'Czas: {{time}}',
738
- wave: 'Fala {{wave}}',
739
- },
740
- items_one: '{{count}} element',
741
- items_few: '{{count}} elementy',
742
- items_many: '{{count}} elementów',
743
- items_other: '{{count}} elementów',
744
- players_one: '{{count}} gracz',
745
- players_few: '{{count}} graczy',
746
- players_many: '{{count}} graczy',
747
- players_other: '{{count}} graczy',
748
- },
749
- accessibility: {
750
- colorblind: {
751
- protanopia: 'Protanopia',
752
- deuteranopia: 'Deuteranopia',
753
- tritanopia: 'Tritanopia',
754
- achromatopsia: 'Achromatopsja',
755
- },
756
- difficulty: {
757
- easy: 'Łatwy',
758
- medium: 'Średni',
759
- hard: 'Trudny',
760
- custom: 'Własny',
761
- },
762
- settings: {
763
- highContrast: 'Wysoki kontrast',
764
- screenReader: 'Czytnik ekranowy',
765
- subtitles: 'Napisy',
766
- fontSize: 'Rozmiar czcionki',
767
- },
554
+ editor: {
555
+ tools: {
556
+ select: "Zaznacz",
557
+ move: "Przesuń",
558
+ rotate: "Obróć",
559
+ scale: "Skaluj",
560
+ pan: "Przesuń widok"
561
+ },
562
+ panels: {
563
+ hierarchy: "Hierarchia",
564
+ inspector: "Inspektor",
565
+ assets: "Zasoby",
566
+ console: "Konsola",
567
+ viewport: "Widok"
568
+ },
569
+ actions: {
570
+ save: "Zapisz",
571
+ undo: "Cofnij",
572
+ redo: "Ponów",
573
+ copy: "Kopiuj",
574
+ paste: "Wklej",
575
+ delete: "Usuń",
576
+ duplicate: "Duplikuj",
577
+ play: "Graj",
578
+ pause: "Pauza",
579
+ stop: "Stop"
580
+ },
581
+ messages: {
582
+ noSelection: "Brak zaznaczenia",
583
+ unsavedChanges: "Masz niezapisane zmiany. Zapisać przed zamknięciem?",
584
+ projectSaved: "Projekt zapisany!",
585
+ assetImported: "Zaimportowano {{count}} zasób/zasobów",
586
+ consoleReady: "Konsola gotowa."
587
+ },
588
+ terrain: {
589
+ raise: "Podnieś",
590
+ lower: "Obniż",
591
+ smooth: "Wygładź",
592
+ flatten: "Spłaszcz",
593
+ paint: "Maluj",
594
+ foliage: "Roślinność",
595
+ erase: "Wymaż",
596
+ createSpline: "Utwórz splajn",
597
+ editSpline: "Edytuj splajn",
598
+ placeProbe: "Umieść sondę",
599
+ measure: "Zmierz"
600
+ },
601
+ search: {
602
+ objects: "Szukaj obiektów…",
603
+ nodes: "Szukaj węzłów…"
768
604
  },
605
+ background: {
606
+ color: "Kolor",
607
+ gradient: "Gradient",
608
+ skybox: "Skybox"
609
+ },
610
+ valueMode: {
611
+ constant: "Stała",
612
+ curve: "Krzywa",
613
+ random: "Losowo",
614
+ gradient: "Gradient"
615
+ },
616
+ emitter: {
617
+ sphere: "Kula",
618
+ hemisphere: "Półkula",
619
+ cone: "Stożek",
620
+ box: "Prostopadłościan",
621
+ circle: "Okrąg"
622
+ },
623
+ space: {
624
+ local: "Lokalna",
625
+ world: "Świata",
626
+ planes: "Płaszczyzny"
627
+ },
628
+ range: {
629
+ min: "Min",
630
+ max: "Maks"
631
+ },
632
+ gizmos: {
633
+ toggle: "Przełącz gizma"
634
+ },
635
+ title: {
636
+ game: "Edytor gry",
637
+ level: "Edytor poziomu",
638
+ material: "Edytor materiału",
639
+ particle: "Edytor cząstek"
640
+ },
641
+ entity: {
642
+ empty: "Pusty",
643
+ sprite: "Sprite",
644
+ shape: "Kształt",
645
+ text: "Tekst",
646
+ physicsBody: "Ciało fizyczne",
647
+ camera: "Kamera"
648
+ },
649
+ view: {
650
+ zoomIn: "Przybliż",
651
+ zoomOut: "Oddal",
652
+ resetView: "Resetuj widok",
653
+ toggleGrid: "Przełącz siatkę",
654
+ toggleSnap: "Przełącz przyciąganie",
655
+ playStop: "Uruchom/zatrzymaj"
656
+ },
657
+ fields: {
658
+ shape: "Kształt",
659
+ visible: "Widoczny",
660
+ text: "Tekst",
661
+ align: "Wyrównanie",
662
+ body: "Ciało"
663
+ },
664
+ shape: {
665
+ rect: "Prostokąt",
666
+ circle: "Okrąg",
667
+ polygon: "Wielokąt",
668
+ line: "Linia"
669
+ },
670
+ align: {
671
+ left: "Do lewej",
672
+ center: "Do środka",
673
+ right: "Do prawej"
674
+ },
675
+ body: {
676
+ dynamic: "Dynamiczne",
677
+ static: "Statyczne",
678
+ kinematic: "Kinematyczne"
679
+ },
680
+ assets: {
681
+ import: "Importuj zasób",
682
+ addEntity: "Dodaj obiekt",
683
+ addChild: "Dodaj dziecko",
684
+ removeComponent: "Usuń {{type}}"
685
+ }
686
+ },
687
+ game: {
688
+ menu: {
689
+ start: "Rozpocznij grę",
690
+ resume: "Wznów",
691
+ restart: "Od nowa",
692
+ quit: "Wyjdź",
693
+ settings: "Ustawienia",
694
+ controls: "Sterowanie"
695
+ },
696
+ hud: {
697
+ score: "Wynik: {{score}}",
698
+ lives: "Życia: {{lives}}",
699
+ level: "Poziom {{level}}",
700
+ time: "Czas: {{time}}",
701
+ wave: "Fala {{wave}}"
702
+ },
703
+ items_one: "{{count}} element",
704
+ items_few: "{{count}} elementy",
705
+ items_many: "{{count}} elementów",
706
+ items_other: "{{count}} elementów",
707
+ players_one: "{{count}} gracz",
708
+ players_few: "{{count}} graczy",
709
+ players_many: "{{count}} graczy",
710
+ players_other: "{{count}} graczy"
711
+ },
712
+ accessibility: {
713
+ colorblind: {
714
+ protanopia: "Protanopia",
715
+ deuteranopia: "Deuteranopia",
716
+ tritanopia: "Tritanopia",
717
+ achromatopsia: "Achromatopsja"
718
+ },
719
+ difficulty: {
720
+ easy: "Łatwy",
721
+ medium: "Średni",
722
+ hard: "Trudny",
723
+ custom: "Własny"
724
+ },
725
+ settings: {
726
+ highContrast: "Wysoki kontrast",
727
+ screenReader: "Czytnik ekranowy",
728
+ subtitles: "Napisy",
729
+ fontSize: "Rozmiar czcionki"
730
+ }
731
+ }
769
732
  };
770
- /** Core engine UI strings in German */
771
733
  const ENGINE_TRANSLATIONS_DE = {
772
- editor: {
773
- tools: {
774
- select: 'Auswählen',
775
- move: 'Verschieben',
776
- rotate: 'Drehen',
777
- scale: 'Skalieren',
778
- pan: 'Schwenken',
779
- },
780
- panels: {
781
- hierarchy: 'Hierarchie',
782
- inspector: 'Inspektor',
783
- assets: 'Ressourcen',
784
- console: 'Konsole',
785
- viewport: 'Ansicht',
786
- },
787
- actions: {
788
- save: 'Speichern',
789
- undo: 'Rückgängig',
790
- redo: 'Wiederholen',
791
- copy: 'Kopieren',
792
- paste: 'Einfügen',
793
- delete: 'Löschen',
794
- duplicate: 'Duplizieren',
795
- play: 'Spielen',
796
- pause: 'Pause',
797
- stop: 'Stoppen',
798
- },
799
- messages: {
800
- noSelection: 'Keine Auswahl',
801
- unsavedChanges: 'Sie haben ungespeicherte Änderungen. Vor dem Schließen speichern?',
802
- projectSaved: 'Projekt erfolgreich gespeichert!',
803
- assetImported: '{{count}} Ressource(n) importiert',
804
- consoleReady: 'Konsole bereit.',
805
- },
806
- terrain: {
807
- raise: 'Anheben',
808
- lower: 'Absenken',
809
- smooth: 'Glätten',
810
- flatten: 'Einebnen',
811
- paint: 'Malen',
812
- foliage: 'Bewuchs',
813
- erase: 'Löschen',
814
- createSpline: 'Spline erstellen',
815
- editSpline: 'Spline bearbeiten',
816
- placeProbe: 'Sonde platzieren',
817
- measure: 'Messen',
818
- },
819
- search: {
820
- objects: 'Objekte suchen…',
821
- nodes: 'Knoten suchen…',
822
- },
823
- background: {
824
- color: 'Farbe',
825
- gradient: 'Gradient',
826
- skybox: 'Skybox',
827
- },
828
- valueMode: {
829
- constant: 'Konstante',
830
- curve: 'Kurve',
831
- random: 'Zufällig',
832
- gradient: 'Gradient',
833
- },
834
- emitter: {
835
- sphere: 'Kugel',
836
- hemisphere: 'Halbkugel',
837
- cone: 'Kegel',
838
- box: 'Box',
839
- circle: 'Kreis',
840
- },
841
- space: {
842
- local: 'Lokal',
843
- world: 'Welt',
844
- planes: 'Ebenen',
845
- },
846
- range: {
847
- min: 'Min',
848
- max: 'Max',
849
- },
850
- gizmos: {
851
- toggle: 'Gizmos umschalten',
852
- },
853
- title: {
854
- game: 'Spiel-Editor',
855
- level: 'Level-Editor',
856
- material: 'Material-Editor',
857
- particle: 'Partikel-Editor',
858
- },
859
- entity: {
860
- empty: 'Leer',
861
- sprite: 'Sprite',
862
- shape: 'Form',
863
- text: 'Text',
864
- physicsBody: 'Physikkörper',
865
- camera: 'Kamera',
866
- },
867
- view: {
868
- zoomIn: 'Vergrößern',
869
- zoomOut: 'Verkleinern',
870
- resetView: 'Ansicht zurücksetzen',
871
- toggleGrid: 'Raster umschalten',
872
- toggleSnap: 'Einrasten umschalten',
873
- playStop: 'Start/Stopp',
874
- },
875
- fields: {
876
- shape: 'Form',
877
- visible: 'Sichtbar',
878
- text: 'Text',
879
- align: 'Ausrichtung',
880
- body: 'Körper',
881
- },
882
- shape: {
883
- rect: 'Rechteck',
884
- circle: 'Kreis',
885
- polygon: 'Polygon',
886
- line: 'Linie',
887
- },
888
- align: {
889
- left: 'Links',
890
- center: 'Mitte',
891
- right: 'Rechts',
892
- },
893
- body: {
894
- dynamic: 'Dynamisch',
895
- static: 'Statisch',
896
- kinematic: 'Kinematisch',
897
- },
898
- assets: {
899
- import: 'Asset importieren',
900
- addEntity: 'Entität hinzufügen',
901
- addChild: 'Kind hinzufügen',
902
- removeComponent: '{{type}} entfernen',
903
- },
904
- },
905
- game: {
906
- menu: {
907
- start: 'Spiel starten',
908
- resume: 'Fortsetzen',
909
- restart: 'Neustart',
910
- quit: 'Beenden',
911
- settings: 'Einstellungen',
912
- controls: 'Steuerung',
913
- },
914
- hud: {
915
- score: 'Punkte: {{score}}',
916
- lives: 'Leben: {{lives}}',
917
- level: 'Level {{level}}',
918
- time: 'Zeit: {{time}}',
919
- wave: 'Welle {{wave}}',
920
- },
921
- items_one: '{{count}} Element',
922
- items_other: '{{count}} Elemente',
923
- players_one: '{{count}} Spieler',
924
- players_other: '{{count}} Spieler',
925
- },
926
- accessibility: {
927
- colorblind: {
928
- protanopia: 'Protanopie',
929
- deuteranopia: 'Deuteranopie',
930
- tritanopia: 'Tritanopie',
931
- achromatopsia: 'Achromatopsie',
932
- },
933
- difficulty: {
934
- easy: 'Leicht',
935
- medium: 'Mittel',
936
- hard: 'Schwer',
937
- custom: 'Benutzerdefiniert',
938
- },
939
- settings: {
940
- highContrast: 'Hoher Kontrast',
941
- screenReader: 'Bildschirmleser',
942
- subtitles: 'Untertitel',
943
- fontSize: 'Schriftgröße',
944
- },
734
+ editor: {
735
+ tools: {
736
+ select: "Auswählen",
737
+ move: "Verschieben",
738
+ rotate: "Drehen",
739
+ scale: "Skalieren",
740
+ pan: "Schwenken"
741
+ },
742
+ panels: {
743
+ hierarchy: "Hierarchie",
744
+ inspector: "Inspektor",
745
+ assets: "Ressourcen",
746
+ console: "Konsole",
747
+ viewport: "Ansicht"
748
+ },
749
+ actions: {
750
+ save: "Speichern",
751
+ undo: "Rückgängig",
752
+ redo: "Wiederholen",
753
+ copy: "Kopieren",
754
+ paste: "Einfügen",
755
+ delete: "Löschen",
756
+ duplicate: "Duplizieren",
757
+ play: "Spielen",
758
+ pause: "Pause",
759
+ stop: "Stoppen"
760
+ },
761
+ messages: {
762
+ noSelection: "Keine Auswahl",
763
+ unsavedChanges: "Sie haben ungespeicherte Änderungen. Vor dem Schließen speichern?",
764
+ projectSaved: "Projekt erfolgreich gespeichert!",
765
+ assetImported: "{{count}} Ressource(n) importiert",
766
+ consoleReady: "Konsole bereit."
945
767
  },
768
+ terrain: {
769
+ raise: "Anheben",
770
+ lower: "Absenken",
771
+ smooth: "Glätten",
772
+ flatten: "Einebnen",
773
+ paint: "Malen",
774
+ foliage: "Bewuchs",
775
+ erase: "Löschen",
776
+ createSpline: "Spline erstellen",
777
+ editSpline: "Spline bearbeiten",
778
+ placeProbe: "Sonde platzieren",
779
+ measure: "Messen"
780
+ },
781
+ search: {
782
+ objects: "Objekte suchen…",
783
+ nodes: "Knoten suchen…"
784
+ },
785
+ background: {
786
+ color: "Farbe",
787
+ gradient: "Gradient",
788
+ skybox: "Skybox"
789
+ },
790
+ valueMode: {
791
+ constant: "Konstante",
792
+ curve: "Kurve",
793
+ random: "Zufällig",
794
+ gradient: "Gradient"
795
+ },
796
+ emitter: {
797
+ sphere: "Kugel",
798
+ hemisphere: "Halbkugel",
799
+ cone: "Kegel",
800
+ box: "Box",
801
+ circle: "Kreis"
802
+ },
803
+ space: {
804
+ local: "Lokal",
805
+ world: "Welt",
806
+ planes: "Ebenen"
807
+ },
808
+ range: {
809
+ min: "Min",
810
+ max: "Max"
811
+ },
812
+ gizmos: {
813
+ toggle: "Gizmos umschalten"
814
+ },
815
+ title: {
816
+ game: "Spiel-Editor",
817
+ level: "Level-Editor",
818
+ material: "Material-Editor",
819
+ particle: "Partikel-Editor"
820
+ },
821
+ entity: {
822
+ empty: "Leer",
823
+ sprite: "Sprite",
824
+ shape: "Form",
825
+ text: "Text",
826
+ physicsBody: "Physikkörper",
827
+ camera: "Kamera"
828
+ },
829
+ view: {
830
+ zoomIn: "Vergrößern",
831
+ zoomOut: "Verkleinern",
832
+ resetView: "Ansicht zurücksetzen",
833
+ toggleGrid: "Raster umschalten",
834
+ toggleSnap: "Einrasten umschalten",
835
+ playStop: "Start/Stopp"
836
+ },
837
+ fields: {
838
+ shape: "Form",
839
+ visible: "Sichtbar",
840
+ text: "Text",
841
+ align: "Ausrichtung",
842
+ body: "Körper"
843
+ },
844
+ shape: {
845
+ rect: "Rechteck",
846
+ circle: "Kreis",
847
+ polygon: "Polygon",
848
+ line: "Linie"
849
+ },
850
+ align: {
851
+ left: "Links",
852
+ center: "Mitte",
853
+ right: "Rechts"
854
+ },
855
+ body: {
856
+ dynamic: "Dynamisch",
857
+ static: "Statisch",
858
+ kinematic: "Kinematisch"
859
+ },
860
+ assets: {
861
+ import: "Asset importieren",
862
+ addEntity: "Entität hinzufügen",
863
+ addChild: "Kind hinzufügen",
864
+ removeComponent: "{{type}} entfernen"
865
+ }
866
+ },
867
+ game: {
868
+ menu: {
869
+ start: "Spiel starten",
870
+ resume: "Fortsetzen",
871
+ restart: "Neustart",
872
+ quit: "Beenden",
873
+ settings: "Einstellungen",
874
+ controls: "Steuerung"
875
+ },
876
+ hud: {
877
+ score: "Punkte: {{score}}",
878
+ lives: "Leben: {{lives}}",
879
+ level: "Level {{level}}",
880
+ time: "Zeit: {{time}}",
881
+ wave: "Welle {{wave}}"
882
+ },
883
+ items_one: "{{count}} Element",
884
+ items_other: "{{count}} Elemente",
885
+ players_one: "{{count}} Spieler",
886
+ players_other: "{{count}} Spieler"
887
+ },
888
+ accessibility: {
889
+ colorblind: {
890
+ protanopia: "Protanopie",
891
+ deuteranopia: "Deuteranopie",
892
+ tritanopia: "Tritanopie",
893
+ achromatopsia: "Achromatopsie"
894
+ },
895
+ difficulty: {
896
+ easy: "Leicht",
897
+ medium: "Mittel",
898
+ hard: "Schwer",
899
+ custom: "Benutzerdefiniert"
900
+ },
901
+ settings: {
902
+ highContrast: "Hoher Kontrast",
903
+ screenReader: "Bildschirmleser",
904
+ subtitles: "Untertitel",
905
+ fontSize: "Schriftgröße"
906
+ }
907
+ }
946
908
  };
947
- /** Register built-in translations on an I18nManager instance */
948
909
  function registerEngineTranslations(i18n) {
949
- i18n.addTranslations('engine', 'en', ENGINE_TRANSLATIONS_EN);
950
- i18n.addTranslations('engine', 'pl', ENGINE_TRANSLATIONS_PL);
951
- i18n.addTranslations('engine', 'de', ENGINE_TRANSLATIONS_DE);
910
+ i18n.addTranslations("engine", "en", ENGINE_TRANSLATIONS_EN);
911
+ i18n.addTranslations("engine", "pl", ENGINE_TRANSLATIONS_PL);
912
+ i18n.addTranslations("engine", "de", ENGINE_TRANSLATIONS_DE);
952
913
  }
953
-
954
914
  exports.ENGINE_TRANSLATIONS_DE = ENGINE_TRANSLATIONS_DE;
955
915
  exports.ENGINE_TRANSLATIONS_EN = ENGINE_TRANSLATIONS_EN;
956
916
  exports.ENGINE_TRANSLATIONS_PL = ENGINE_TRANSLATIONS_PL;