@nice2dev/game-engine 1.1.7 → 1.1.9
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.
- package/CHANGELOG.md +77 -0
- package/dist/cjs/devtools/DeveloperExperience.js +5 -5
- package/dist/cjs/dialogue/DialogueSystem.js +1 -1
- package/dist/cjs/editor/AssetBrowser.js +26 -25
- package/dist/cjs/editor/NiceGameEditor.js +66 -49
- package/dist/cjs/godot-integration/components/GodotProjectBrowser.js +33 -32
- package/dist/cjs/i18n/I18n.js +305 -0
- package/dist/cjs/kids/KidMode.js +36 -36
- package/dist/cjs/kids/KidTools.js +31 -31
- package/dist/cjs/native-engine/InputSystem.js +9 -2
- package/dist/cjs/plugins/PluginSDK.js +1 -1
- package/dist/cjs/plugins/PluginTestKit.js +1 -1
- package/dist/cjs/quest/QuestSystem.js +5 -1
- package/dist/cjs/tutorials/TutorialBranching.js +12 -12
- package/dist/cjs/tutorials/TutorialEngine.js +35 -35
- package/dist/cjs/tutorials/content/Tutorials_T05_T08.js +75 -75
- package/dist/cjs/tutorials/content/Tutorials_T09_T11.js +24 -24
- package/dist/cjs/tutorials/content/Tutorials_T12_T15.js +33 -33
- package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js +25 -24
- package/dist/cjs/unity-integration/components/UnityProjectBrowser.js +28 -27
- package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js +31 -30
- package/dist/esm/devtools/DeveloperExperience.js +5 -5
- package/dist/esm/dialogue/DialogueSystem.js +1 -1
- package/dist/esm/editor/AssetBrowser.js +26 -25
- package/dist/esm/editor/NiceGameEditor.js +67 -50
- package/dist/esm/godot-integration/components/GodotProjectBrowser.js +33 -32
- package/dist/esm/i18n/I18n.js +305 -0
- package/dist/esm/kids/KidMode.js +36 -36
- package/dist/esm/kids/KidTools.js +31 -31
- package/dist/esm/native-engine/InputSystem.js +9 -2
- package/dist/esm/plugins/PluginSDK.js +1 -1
- package/dist/esm/plugins/PluginTestKit.js +1 -1
- package/dist/esm/quest/QuestSystem.js +5 -1
- package/dist/esm/tutorials/TutorialBranching.js +12 -12
- package/dist/esm/tutorials/TutorialEngine.js +35 -35
- package/dist/esm/tutorials/content/Tutorials_T05_T08.js +75 -75
- package/dist/esm/tutorials/content/Tutorials_T09_T11.js +24 -24
- package/dist/esm/tutorials/content/Tutorials_T12_T15.js +33 -33
- package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js +25 -24
- package/dist/esm/unity-integration/components/UnityProjectBrowser.js +28 -27
- package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js +31 -30
- package/dist/types/editor/AssetBrowser.d.ts +1 -0
- package/dist/types/editor/behavior-tree/BTEditorNode.d.ts +2 -1
- package/dist/types/editor/behavior-tree/BTEditorToolbar.d.ts +1 -0
- package/dist/types/kids/KidMode.d.ts +4 -2
- package/dist/types/kids/KidTools.d.ts +1 -1
- package/dist/types/tutorials/TutorialBranching.d.ts +1 -1
- package/package.json +3 -2
- package/dist/cjs/accessibility/Accessibility.js.map +0 -1
- package/dist/cjs/ai/AI.js.map +0 -1
- package/dist/cjs/ai/BehaviorTree.js.map +0 -1
- package/dist/cjs/ai/StateMachine.js.map +0 -1
- package/dist/cjs/animation/Animation.js.map +0 -1
- package/dist/cjs/audio/AudioAdvanced.js.map +0 -1
- package/dist/cjs/audio/AudioBridge.js.map +0 -1
- package/dist/cjs/audio/AudioManager.js.map +0 -1
- package/dist/cjs/build-cloud/BuildOrchestration.js.map +0 -1
- package/dist/cjs/build-cloud/GodotBuildCloud.js.map +0 -1
- package/dist/cjs/build-cloud/UnityBuildCloud.js.map +0 -1
- package/dist/cjs/build-cloud/UnrealBuildCloud.js.map +0 -1
- package/dist/cjs/core/EventBus.js.map +0 -1
- package/dist/cjs/core/GameClock.js.map +0 -1
- package/dist/cjs/core/GameConfig.js.map +0 -1
- package/dist/cjs/core/GameLoop.js.map +0 -1
- package/dist/cjs/core/ServiceLocator.js.map +0 -1
- package/dist/cjs/core/Validation.js.map +0 -1
- package/dist/cjs/core/math.js.map +0 -1
- package/dist/cjs/devtools/DevTools.js.map +0 -1
- package/dist/cjs/devtools/DeveloperExperience.js.map +0 -1
- package/dist/cjs/devtools/GameplayAnalytics.js.map +0 -1
- package/dist/cjs/dialogue/DialogueSystem.js.map +0 -1
- package/dist/cjs/docs/DocGenerator.js.map +0 -1
- package/dist/cjs/ecs/World.js.map +0 -1
- package/dist/cjs/editor/AchievementEditor.js.map +0 -1
- package/dist/cjs/editor/AdvancedEditor.js.map +0 -1
- package/dist/cjs/editor/AnimationRetargeting.js.map +0 -1
- package/dist/cjs/editor/AssetBrowser.js.map +0 -1
- package/dist/cjs/editor/AssetManager.js.map +0 -1
- package/dist/cjs/editor/ConsolePro.js.map +0 -1
- package/dist/cjs/editor/CraftingEditor.js.map +0 -1
- package/dist/cjs/editor/DebugTools.js.map +0 -1
- package/dist/cjs/editor/DialogueSystem.js.map +0 -1
- package/dist/cjs/editor/LeaderboardSystem.js.map +0 -1
- package/dist/cjs/editor/NiceGameEditor.js.map +0 -1
- package/dist/cjs/editor/PrefabSystem.js.map +0 -1
- package/dist/cjs/editor/ProfilerPanel.js.map +0 -1
- package/dist/cjs/editor/QuestEditor.js.map +0 -1
- package/dist/cjs/editor/ReplaySystem.js.map +0 -1
- package/dist/cjs/editor/SceneEditor.js.map +0 -1
- package/dist/cjs/editor/ScreenshotMode.js.map +0 -1
- package/dist/cjs/editor/ShaderGraph.js.map +0 -1
- package/dist/cjs/editor/TimelineEditor.js.map +0 -1
- package/dist/cjs/editor/UndoRedoPro.js.map +0 -1
- package/dist/cjs/editor/VRARMode.js.map +0 -1
- package/dist/cjs/engine/NiceGameEngine.js.map +0 -1
- package/dist/cjs/engine/SaveSystem.js.map +0 -1
- package/dist/cjs/engine/SaveSystemV2.js +0 -530
- package/dist/cjs/engine/SaveSystemV2.js.map +0 -1
- package/dist/cjs/enterprise/Enterprise.js.map +0 -1
- package/dist/cjs/export/BevyExporter.js.map +0 -1
- package/dist/cjs/export/CocosExporter.js.map +0 -1
- package/dist/cjs/export/Construct3Exporter.js.map +0 -1
- package/dist/cjs/export/DefoldExporter.js.map +0 -1
- package/dist/cjs/export/GDevelopExporter.js.map +0 -1
- package/dist/cjs/export/GameMakerExporter.js.map +0 -1
- package/dist/cjs/export/GodotExporter.js.map +0 -1
- package/dist/cjs/export/MinecraftBedrockExporter.js.map +0 -1
- package/dist/cjs/export/MonoGameExporter.js.map +0 -1
- package/dist/cjs/export/Pico8Exporter.js.map +0 -1
- package/dist/cjs/export/PlatformExporter.js.map +0 -1
- package/dist/cjs/export/RPGMakerExporter.js.map +0 -1
- package/dist/cjs/export/RobloxExporter.js.map +0 -1
- package/dist/cjs/export/Solar2DExporter.js.map +0 -1
- package/dist/cjs/export/ThreeJSExporter.js.map +0 -1
- package/dist/cjs/export/Tic80Exporter.js.map +0 -1
- package/dist/cjs/export/UnityExporter.js.map +0 -1
- package/dist/cjs/export/UnrealExporter.js.map +0 -1
- package/dist/cjs/export/WebExporter.js.map +0 -1
- package/dist/cjs/export/index.js.map +0 -1
- package/dist/cjs/godot-integration/GodotAssetLibrary.js.map +0 -1
- package/dist/cjs/godot-integration/GodotImport.js.map +0 -1
- package/dist/cjs/godot-integration/GodotLiveLink.js.map +0 -1
- package/dist/cjs/godot-integration/components/GodotProjectBrowser.js.map +0 -1
- package/dist/cjs/i18n/I18n.js.map +0 -1
- package/dist/cjs/i18n/useTranslation.js.map +0 -1
- package/dist/cjs/import/AsepriteImporter.js.map +0 -1
- package/dist/cjs/import/DragonBonesImporter.js.map +0 -1
- package/dist/cjs/import/GameMakerImporter.js.map +0 -1
- package/dist/cjs/import/GodotSceneImporter.js.map +0 -1
- package/dist/cjs/import/LDtkImporter.js.map +0 -1
- package/dist/cjs/import/Live2DImporter.js.map +0 -1
- package/dist/cjs/import/NdgFormat.js.map +0 -1
- package/dist/cjs/import/OgmoImporter.js.map +0 -1
- package/dist/cjs/import/RPGMakerImporter.js.map +0 -1
- package/dist/cjs/import/SceneImporter.js.map +0 -1
- package/dist/cjs/import/SpineImporter.js.map +0 -1
- package/dist/cjs/import/SpriterImporter.js.map +0 -1
- package/dist/cjs/import/TiledMapImporter.js.map +0 -1
- package/dist/cjs/import/UnitySceneImporter.js.map +0 -1
- package/dist/cjs/import/index.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/input/GamepadNavigation.js.map +0 -1
- package/dist/cjs/input/InputManager.js.map +0 -1
- package/dist/cjs/input/useGamepads.js.map +0 -1
- package/dist/cjs/integration/IconSprite.js.map +0 -1
- package/dist/cjs/inventory/InventorySystem.js.map +0 -1
- package/dist/cjs/kids/KidMode.js.map +0 -1
- package/dist/cjs/kids/KidTools.js.map +0 -1
- package/dist/cjs/monetization/Monetization.js.map +0 -1
- package/dist/cjs/multiplayer/LocalMultiplayer.js.map +0 -1
- package/dist/cjs/multiplayer/MiniGameTypes.js.map +0 -1
- package/dist/cjs/native-engine/AssetPipeline.js.map +0 -1
- package/dist/cjs/native-engine/AudioEngine.js.map +0 -1
- package/dist/cjs/native-engine/InputSystem.js.map +0 -1
- package/dist/cjs/native-engine/NetworkingSystem.js.map +0 -1
- package/dist/cjs/native-engine/PhysicsEngine.js.map +0 -1
- package/dist/cjs/native-engine/RenderingEngine.js.map +0 -1
- package/dist/cjs/native-engine/SceneGraph.js.map +0 -1
- package/dist/cjs/network/MultiplayerTransport.js.map +0 -1
- package/dist/cjs/network/Networking.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AbortController.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Errors.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpClient.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnection.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ILogger.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ITransport.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Loggers.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Subject.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Utils.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/index.js.map +0 -1
- package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/pkg-version.js.map +0 -1
- package/dist/cjs/pathfinding/Pathfinding.js.map +0 -1
- package/dist/cjs/performance/AssetStreaming.js.map +0 -1
- package/dist/cjs/performance/BenchmarkSuite.js.map +0 -1
- package/dist/cjs/performance/DeltaCompression.js.map +0 -1
- package/dist/cjs/performance/DeterministicPhysics.js.map +0 -1
- package/dist/cjs/performance/ECSOptimization.js.map +0 -1
- package/dist/cjs/performance/GameSaveSystem.js.map +0 -1
- package/dist/cjs/performance/HotReload.js.map +0 -1
- package/dist/cjs/performance/InputRecording.js.map +0 -1
- package/dist/cjs/performance/InterestManagement.js.map +0 -1
- package/dist/cjs/performance/LocalizationRuntime.js.map +0 -1
- package/dist/cjs/performance/MemoryManagement.js.map +0 -1
- package/dist/cjs/performance/ModSupport.js.map +0 -1
- package/dist/cjs/performance/MultiThreadedPhysics.js.map +0 -1
- package/dist/cjs/performance/NetworkPrediction.js.map +0 -1
- package/dist/cjs/performance/ObjectPooling.js.map +0 -1
- package/dist/cjs/performance/Performance.js.map +0 -1
- package/dist/cjs/performance/PerformanceAdvanced.js.map +0 -1
- package/dist/cjs/performance/SaveSystem.js +0 -574
- package/dist/cjs/performance/SaveSystem.js.map +0 -1
- package/dist/cjs/performance/WebGPURenderer.js.map +0 -1
- package/dist/cjs/physics/PhysicsAdvanced.js.map +0 -1
- package/dist/cjs/physics/PhysicsEngine2D.js.map +0 -1
- package/dist/cjs/plugins/PluginSDK.js.map +0 -1
- package/dist/cjs/plugins/PluginTestKit.js.map +0 -1
- package/dist/cjs/procedural/Procedural.js.map +0 -1
- package/dist/cjs/procedural/WorldBuilding.js.map +0 -1
- package/dist/cjs/quest/QuestSystem.js.map +0 -1
- package/dist/cjs/release/MobileExport.js.map +0 -1
- package/dist/cjs/release/Release.js.map +0 -1
- package/dist/cjs/rendering/Camera2D.js.map +0 -1
- package/dist/cjs/rendering/Renderer2D.js.map +0 -1
- package/dist/cjs/rendering/WebGPURenderPipeline.js.map +0 -1
- package/dist/cjs/runtime3d/Runtime3D.js.map +0 -1
- package/dist/cjs/runtime3d/SceneEditor3D.js.map +0 -1
- package/dist/cjs/scene/SceneManager.js.map +0 -1
- package/dist/cjs/scripting/GraphToAST.js.map +0 -1
- package/dist/cjs/scripting/LanguageExporter.js.map +0 -1
- package/dist/cjs/scripting/NodeGraph.js.map +0 -1
- package/dist/cjs/scripting/ScriptAST.js.map +0 -1
- package/dist/cjs/scripting/VisualScripting2.js.map +0 -1
- package/dist/cjs/scripting/exporters/CSharpExporter.js.map +0 -1
- package/dist/cjs/scripting/exporters/GDScriptExporter.js.map +0 -1
- package/dist/cjs/scripting/exporters/LuaExporter.js.map +0 -1
- package/dist/cjs/scripting/exporters/PythonExporter.js.map +0 -1
- package/dist/cjs/scripting/exporters/RustExporter.js.map +0 -1
- package/dist/cjs/scripting/exporters/TypeScriptExporter.js.map +0 -1
- package/dist/cjs/social/Social.js.map +0 -1
- package/dist/cjs/systems/LightingSystem.js.map +0 -1
- package/dist/cjs/systems/ParticleSystem2.js.map +0 -1
- package/dist/cjs/systems/PhysicsDebugSystem.js.map +0 -1
- package/dist/cjs/systems/TerrainSystem.js.map +0 -1
- package/dist/cjs/templates/ActionTemplates.js.map +0 -1
- package/dist/cjs/templates/FightingTemplate.js.map +0 -1
- package/dist/cjs/templates/MetroidvaniaTemplate.js.map +0 -1
- package/dist/cjs/templates/PartyTemplates.js.map +0 -1
- package/dist/cjs/templates/PuzzleTemplates.js.map +0 -1
- package/dist/cjs/templates/RPGTemplates.js.map +0 -1
- package/dist/cjs/templates/SportsTemplates.js.map +0 -1
- package/dist/cjs/templates/StrategyTemplates.js.map +0 -1
- package/dist/cjs/templates/SurvivalTemplate.js.map +0 -1
- package/dist/cjs/templates/WaveDefense.js.map +0 -1
- package/dist/cjs/tilemap/Tilemap.js.map +0 -1
- package/dist/cjs/tutorials/TutorialBranching.js.map +0 -1
- package/dist/cjs/tutorials/TutorialEngine.js.map +0 -1
- package/dist/cjs/tutorials/TutorialOverlay.js.map +0 -1
- package/dist/cjs/tutorials/content/Tutorials_T05_T08.js.map +0 -1
- package/dist/cjs/tutorials/content/Tutorials_T09_T11.js.map +0 -1
- package/dist/cjs/tutorials/content/Tutorials_T12_T15.js.map +0 -1
- package/dist/cjs/ui/GameUI.js.map +0 -1
- package/dist/cjs/unity-integration/UnityAssetStore.js.map +0 -1
- package/dist/cjs/unity-integration/UnityImport.js.map +0 -1
- package/dist/cjs/unity-integration/UnityLiveLink.js.map +0 -1
- package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js.map +0 -1
- package/dist/cjs/unity-integration/components/UnityProjectBrowser.js.map +0 -1
- package/dist/cjs/unreal-integration/UnrealImport.js.map +0 -1
- package/dist/cjs/unreal-integration/UnrealLiveLink.js.map +0 -1
- package/dist/cjs/unreal-integration/UnrealMarketplace.js.map +0 -1
- package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js.map +0 -1
- package/dist/cjs/xr/ARVR.js.map +0 -1
- package/dist/esm/accessibility/Accessibility.js.map +0 -1
- package/dist/esm/ai/AI.js.map +0 -1
- package/dist/esm/ai/BehaviorTree.js.map +0 -1
- package/dist/esm/ai/StateMachine.js.map +0 -1
- package/dist/esm/animation/Animation.js.map +0 -1
- package/dist/esm/audio/AudioAdvanced.js.map +0 -1
- package/dist/esm/audio/AudioBridge.js.map +0 -1
- package/dist/esm/audio/AudioManager.js.map +0 -1
- package/dist/esm/build-cloud/BuildOrchestration.js.map +0 -1
- package/dist/esm/build-cloud/GodotBuildCloud.js.map +0 -1
- package/dist/esm/build-cloud/UnityBuildCloud.js.map +0 -1
- package/dist/esm/build-cloud/UnrealBuildCloud.js.map +0 -1
- package/dist/esm/core/EventBus.js.map +0 -1
- package/dist/esm/core/GameClock.js.map +0 -1
- package/dist/esm/core/GameConfig.js.map +0 -1
- package/dist/esm/core/GameLoop.js.map +0 -1
- package/dist/esm/core/ServiceLocator.js.map +0 -1
- package/dist/esm/core/Validation.js.map +0 -1
- package/dist/esm/core/math.js.map +0 -1
- package/dist/esm/devtools/DevTools.js.map +0 -1
- package/dist/esm/devtools/DeveloperExperience.js.map +0 -1
- package/dist/esm/devtools/GameplayAnalytics.js.map +0 -1
- package/dist/esm/dialogue/DialogueSystem.js.map +0 -1
- package/dist/esm/docs/DocGenerator.js.map +0 -1
- package/dist/esm/ecs/World.js.map +0 -1
- package/dist/esm/editor/AchievementEditor.js.map +0 -1
- package/dist/esm/editor/AdvancedEditor.js.map +0 -1
- package/dist/esm/editor/AnimationRetargeting.js.map +0 -1
- package/dist/esm/editor/AssetBrowser.js.map +0 -1
- package/dist/esm/editor/AssetManager.js.map +0 -1
- package/dist/esm/editor/ConsolePro.js.map +0 -1
- package/dist/esm/editor/CraftingEditor.js.map +0 -1
- package/dist/esm/editor/DebugTools.js.map +0 -1
- package/dist/esm/editor/DialogueSystem.js.map +0 -1
- package/dist/esm/editor/LeaderboardSystem.js.map +0 -1
- package/dist/esm/editor/NiceGameEditor.js.map +0 -1
- package/dist/esm/editor/PrefabSystem.js.map +0 -1
- package/dist/esm/editor/ProfilerPanel.js.map +0 -1
- package/dist/esm/editor/QuestEditor.js.map +0 -1
- package/dist/esm/editor/ReplaySystem.js.map +0 -1
- package/dist/esm/editor/SceneEditor.js.map +0 -1
- package/dist/esm/editor/ScreenshotMode.js.map +0 -1
- package/dist/esm/editor/ShaderGraph.js.map +0 -1
- package/dist/esm/editor/TimelineEditor.js.map +0 -1
- package/dist/esm/editor/UndoRedoPro.js.map +0 -1
- package/dist/esm/editor/VRARMode.js.map +0 -1
- package/dist/esm/engine/NiceGameEngine.js.map +0 -1
- package/dist/esm/engine/SaveSystem.js.map +0 -1
- package/dist/esm/engine/SaveSystemV2.js +0 -523
- package/dist/esm/engine/SaveSystemV2.js.map +0 -1
- package/dist/esm/enterprise/Enterprise.js.map +0 -1
- package/dist/esm/export/BevyExporter.js.map +0 -1
- package/dist/esm/export/CocosExporter.js.map +0 -1
- package/dist/esm/export/Construct3Exporter.js.map +0 -1
- package/dist/esm/export/DefoldExporter.js.map +0 -1
- package/dist/esm/export/GDevelopExporter.js.map +0 -1
- package/dist/esm/export/GameMakerExporter.js.map +0 -1
- package/dist/esm/export/GodotExporter.js.map +0 -1
- package/dist/esm/export/MinecraftBedrockExporter.js.map +0 -1
- package/dist/esm/export/MonoGameExporter.js.map +0 -1
- package/dist/esm/export/Pico8Exporter.js.map +0 -1
- package/dist/esm/export/PlatformExporter.js.map +0 -1
- package/dist/esm/export/RPGMakerExporter.js.map +0 -1
- package/dist/esm/export/RobloxExporter.js.map +0 -1
- package/dist/esm/export/Solar2DExporter.js.map +0 -1
- package/dist/esm/export/ThreeJSExporter.js.map +0 -1
- package/dist/esm/export/Tic80Exporter.js.map +0 -1
- package/dist/esm/export/UnityExporter.js.map +0 -1
- package/dist/esm/export/UnrealExporter.js.map +0 -1
- package/dist/esm/export/WebExporter.js.map +0 -1
- package/dist/esm/export/index.js.map +0 -1
- package/dist/esm/godot-integration/GodotAssetLibrary.js.map +0 -1
- package/dist/esm/godot-integration/GodotImport.js.map +0 -1
- package/dist/esm/godot-integration/GodotLiveLink.js.map +0 -1
- package/dist/esm/godot-integration/components/GodotProjectBrowser.js.map +0 -1
- package/dist/esm/i18n/I18n.js.map +0 -1
- package/dist/esm/i18n/useTranslation.js.map +0 -1
- package/dist/esm/import/AsepriteImporter.js.map +0 -1
- package/dist/esm/import/DragonBonesImporter.js.map +0 -1
- package/dist/esm/import/GameMakerImporter.js.map +0 -1
- package/dist/esm/import/GodotSceneImporter.js.map +0 -1
- package/dist/esm/import/LDtkImporter.js.map +0 -1
- package/dist/esm/import/Live2DImporter.js.map +0 -1
- package/dist/esm/import/NdgFormat.js.map +0 -1
- package/dist/esm/import/OgmoImporter.js.map +0 -1
- package/dist/esm/import/RPGMakerImporter.js.map +0 -1
- package/dist/esm/import/SceneImporter.js.map +0 -1
- package/dist/esm/import/SpineImporter.js.map +0 -1
- package/dist/esm/import/SpriterImporter.js.map +0 -1
- package/dist/esm/import/TiledMapImporter.js.map +0 -1
- package/dist/esm/import/UnitySceneImporter.js.map +0 -1
- package/dist/esm/import/index.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/input/GamepadNavigation.js.map +0 -1
- package/dist/esm/input/InputManager.js.map +0 -1
- package/dist/esm/input/useGamepads.js.map +0 -1
- package/dist/esm/integration/IconSprite.js.map +0 -1
- package/dist/esm/inventory/InventorySystem.js.map +0 -1
- package/dist/esm/kids/KidMode.js.map +0 -1
- package/dist/esm/kids/KidTools.js.map +0 -1
- package/dist/esm/monetization/Monetization.js.map +0 -1
- package/dist/esm/multiplayer/LocalMultiplayer.js.map +0 -1
- package/dist/esm/multiplayer/MiniGameTypes.js.map +0 -1
- package/dist/esm/native-engine/AssetPipeline.js.map +0 -1
- package/dist/esm/native-engine/AudioEngine.js.map +0 -1
- package/dist/esm/native-engine/InputSystem.js.map +0 -1
- package/dist/esm/native-engine/NetworkingSystem.js.map +0 -1
- package/dist/esm/native-engine/PhysicsEngine.js.map +0 -1
- package/dist/esm/native-engine/RenderingEngine.js.map +0 -1
- package/dist/esm/native-engine/SceneGraph.js.map +0 -1
- package/dist/esm/network/MultiplayerTransport.js.map +0 -1
- package/dist/esm/network/Networking.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AbortController.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Errors.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpClient.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnection.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ILogger.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ITransport.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Loggers.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Subject.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Utils.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/index.js.map +0 -1
- package/dist/esm/node_modules/@microsoft/signalr/dist/esm/pkg-version.js.map +0 -1
- package/dist/esm/pathfinding/Pathfinding.js.map +0 -1
- package/dist/esm/performance/AssetStreaming.js.map +0 -1
- package/dist/esm/performance/BenchmarkSuite.js.map +0 -1
- package/dist/esm/performance/DeltaCompression.js.map +0 -1
- package/dist/esm/performance/DeterministicPhysics.js.map +0 -1
- package/dist/esm/performance/ECSOptimization.js.map +0 -1
- package/dist/esm/performance/GameSaveSystem.js.map +0 -1
- package/dist/esm/performance/HotReload.js.map +0 -1
- package/dist/esm/performance/InputRecording.js.map +0 -1
- package/dist/esm/performance/InterestManagement.js.map +0 -1
- package/dist/esm/performance/LocalizationRuntime.js.map +0 -1
- package/dist/esm/performance/MemoryManagement.js.map +0 -1
- package/dist/esm/performance/ModSupport.js.map +0 -1
- package/dist/esm/performance/MultiThreadedPhysics.js.map +0 -1
- package/dist/esm/performance/NetworkPrediction.js.map +0 -1
- package/dist/esm/performance/ObjectPooling.js.map +0 -1
- package/dist/esm/performance/Performance.js.map +0 -1
- package/dist/esm/performance/PerformanceAdvanced.js.map +0 -1
- package/dist/esm/performance/SaveSystem.js +0 -567
- package/dist/esm/performance/SaveSystem.js.map +0 -1
- package/dist/esm/performance/WebGPURenderer.js.map +0 -1
- package/dist/esm/physics/PhysicsAdvanced.js.map +0 -1
- package/dist/esm/physics/PhysicsEngine2D.js.map +0 -1
- package/dist/esm/plugins/PluginSDK.js.map +0 -1
- package/dist/esm/plugins/PluginTestKit.js.map +0 -1
- package/dist/esm/procedural/Procedural.js.map +0 -1
- package/dist/esm/procedural/WorldBuilding.js.map +0 -1
- package/dist/esm/quest/QuestSystem.js.map +0 -1
- package/dist/esm/release/MobileExport.js.map +0 -1
- package/dist/esm/release/Release.js.map +0 -1
- package/dist/esm/rendering/Camera2D.js.map +0 -1
- package/dist/esm/rendering/Renderer2D.js.map +0 -1
- package/dist/esm/rendering/WebGPURenderPipeline.js.map +0 -1
- package/dist/esm/runtime3d/Runtime3D.js.map +0 -1
- package/dist/esm/runtime3d/SceneEditor3D.js.map +0 -1
- package/dist/esm/scene/SceneManager.js.map +0 -1
- package/dist/esm/scripting/GraphToAST.js.map +0 -1
- package/dist/esm/scripting/LanguageExporter.js.map +0 -1
- package/dist/esm/scripting/NodeGraph.js.map +0 -1
- package/dist/esm/scripting/ScriptAST.js.map +0 -1
- package/dist/esm/scripting/VisualScripting2.js.map +0 -1
- package/dist/esm/scripting/exporters/CSharpExporter.js.map +0 -1
- package/dist/esm/scripting/exporters/GDScriptExporter.js.map +0 -1
- package/dist/esm/scripting/exporters/LuaExporter.js.map +0 -1
- package/dist/esm/scripting/exporters/PythonExporter.js.map +0 -1
- package/dist/esm/scripting/exporters/RustExporter.js.map +0 -1
- package/dist/esm/scripting/exporters/TypeScriptExporter.js.map +0 -1
- package/dist/esm/social/Social.js.map +0 -1
- package/dist/esm/systems/LightingSystem.js.map +0 -1
- package/dist/esm/systems/ParticleSystem2.js.map +0 -1
- package/dist/esm/systems/PhysicsDebugSystem.js.map +0 -1
- package/dist/esm/systems/TerrainSystem.js.map +0 -1
- package/dist/esm/templates/ActionTemplates.js.map +0 -1
- package/dist/esm/templates/FightingTemplate.js.map +0 -1
- package/dist/esm/templates/MetroidvaniaTemplate.js.map +0 -1
- package/dist/esm/templates/PartyTemplates.js.map +0 -1
- package/dist/esm/templates/PuzzleTemplates.js.map +0 -1
- package/dist/esm/templates/RPGTemplates.js.map +0 -1
- package/dist/esm/templates/SportsTemplates.js.map +0 -1
- package/dist/esm/templates/StrategyTemplates.js.map +0 -1
- package/dist/esm/templates/SurvivalTemplate.js.map +0 -1
- package/dist/esm/templates/WaveDefense.js.map +0 -1
- package/dist/esm/tilemap/Tilemap.js.map +0 -1
- package/dist/esm/tutorials/TutorialBranching.js.map +0 -1
- package/dist/esm/tutorials/TutorialEngine.js.map +0 -1
- package/dist/esm/tutorials/TutorialOverlay.js.map +0 -1
- package/dist/esm/tutorials/content/Tutorials_T05_T08.js.map +0 -1
- package/dist/esm/tutorials/content/Tutorials_T09_T11.js.map +0 -1
- package/dist/esm/tutorials/content/Tutorials_T12_T15.js.map +0 -1
- package/dist/esm/ui/GameUI.js.map +0 -1
- package/dist/esm/unity-integration/UnityAssetStore.js.map +0 -1
- package/dist/esm/unity-integration/UnityImport.js.map +0 -1
- package/dist/esm/unity-integration/UnityLiveLink.js.map +0 -1
- package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js.map +0 -1
- package/dist/esm/unity-integration/components/UnityProjectBrowser.js.map +0 -1
- package/dist/esm/unreal-integration/UnrealImport.js.map +0 -1
- package/dist/esm/unreal-integration/UnrealLiveLink.js.map +0 -1
- package/dist/esm/unreal-integration/UnrealMarketplace.js.map +0 -1
- package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js.map +0 -1
- package/dist/esm/xr/ARVR.js.map +0 -1
- package/dist/types/engine/SaveSystemV2.d.ts +0 -155
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# @nice2dev/game-engine — Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1.1.9 — themes reach the controls again, every control has a rendered demo, no breaking changes.
|
|
8
|
+
|
|
9
|
+
**Theming.** `NiceThemeProvider`, `applyTheme` and `NiceThemePreview` write the `--nice-*` tokens
|
|
10
|
+
again, so a theme recolours the controls and not only the app's own CSS — since 1.1.7 only
|
|
11
|
+
light/dark switched. The provider's scope wins over values set on `:root`, as it did before 1.1.7:
|
|
12
|
+
put a brand colour into the theme rather than on `<html>`. Alias tokens are computed in the theme
|
|
13
|
+
scope, not only on `:root`. About 1,600 places that used a text token as a background or border, or
|
|
14
|
+
a surface token as text colour, now use the token of the right role. `--nice-warning-light` and
|
|
15
|
+
`--nice-danger-light` are the light shade of the status colour, like `--nice-success-light`
|
|
16
|
+
(new: `--nice-color-warning-light`, `--nice-color-error-light`); backgrounds use `--nice-*-bg`.
|
|
17
|
+
|
|
18
|
+
**Styles that never shipped.** Six stylesheets in `@nice2dev/ui` were unreachable from its entry
|
|
19
|
+
point, so `NiceLiveDataGrid`, `NiceTaskInbox`, `NiceBPMNDesigner`, `NiceInstanceMonitor`,
|
|
20
|
+
`NiceIntegrationHub`, `NiceRulesEngine` and `NiceVideoEditor` rendered unstyled; eleven more
|
|
21
|
+
components had no stylesheet at all; `workflow.css` read its spacing scale as pixels; and
|
|
22
|
+
`NiceModuleGrid` was styled for a `<table>` it does not render.
|
|
23
|
+
|
|
24
|
+
**Language.** `useNiceTranslation()` returns `{ t, lang }` and dates are formatted in the interface
|
|
25
|
+
language rather than the browser's (`ui-presentations` adds `useNiceLang()`). `NiceInvoiceLineEditor`
|
|
26
|
+
takes its currency and units from the active language unless you pass them. `NiceAuditLog`,
|
|
27
|
+
`NiceRecordingPanel`, the four game-engine editors and `NiceTemplateEditor` are translated, the
|
|
28
|
+
game-engine dictionary is actually registered, and 136 ui-audio strings have English defaults
|
|
29
|
+
instead of rendering raw keys.
|
|
30
|
+
|
|
31
|
+
**Canvas and document colours.** Canvas never resolves `var()`: the QR and barcode generators drew a
|
|
32
|
+
black rectangle, the whiteboard lost its colours and light presets parsed to `NaN`. Data colours are
|
|
33
|
+
resolved first now. Colours stored in documents — slide templates, theme presets, brand kits,
|
|
34
|
+
exports — are literals, so a saved document looks the same in every theme.
|
|
35
|
+
|
|
36
|
+
**Fixes found by the new demos.** All 895 controls now have a rendered showcase demo, and roughly
|
|
37
|
+
every third new demo exposed a bug. `ui-platform`: the service worker re-registered on every
|
|
38
|
+
render, a screen permission prompt appeared on mount, reconnects and start-up tasks ran twice,
|
|
39
|
+
valid EAN-13 codes were rejected. `ui-ai`: `createProviderFromConfig` dropped the endpoint path —
|
|
40
|
+
OpenAI, Anthropic and Groq were called without `/v1` and Azure always threw — and the theme
|
|
41
|
+
generator failed on every request. `ui-communication`: the local participant appeared twice in a
|
|
42
|
+
conference and `activeConversationId` was ignored. `ui-buildings`: automation days were saved as
|
|
43
|
+
indices (both forms are read now), the row toggle changed the selected rule instead of the clicked
|
|
44
|
+
one, and floor-plan devices were drawn in the corner. `ui-mobile`: `NiceTouchTable` rendered invalid
|
|
45
|
+
table markup. `ui-diagrams`: arrowheads grew with the stroke width and transition clicks never fired.
|
|
46
|
+
`ui-3d`: opening a code editor before the 3D view broke the whole app. `ui-presentations`: the editor
|
|
47
|
+
clipped slides in columns narrower than 800 px.
|
|
48
|
+
|
|
49
|
+
**Additive API only.** `@nice2dev/ui-platform` now exports its hooks, provider aliases and Props / Ref
|
|
50
|
+
types. Nothing was renamed or removed.
|
|
51
|
+
|
|
52
|
+
## 1.1.8
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- 1.1.8 — old problems closed, no breaking changes.
|
|
57
|
+
|
|
58
|
+
**English-first UI.** Text that was hardcoded Polish now goes through `t()` with an English
|
|
59
|
+
default: the planning views, the whole of `@nice2dev/ui-printing`, smart home, backup, the
|
|
60
|
+
navigation and settings panels, `@nice2dev/ui-buildings` end to end, the photo editor and the
|
|
61
|
+
presentation Q&A panel. The dictionary gains 566 keys in en, pl, de, fr, es and uk, so an app
|
|
62
|
+
with `locale="pl"` reads as before. Three prop defaults changed with it:
|
|
63
|
+
`NiceInvoiceLineEditor` (`currencySymbol` `'zł'` → `'$'`, `units` → English) and
|
|
64
|
+
`NiceTimeoutFeedback`'s two messages.
|
|
65
|
+
|
|
66
|
+
**Icons.** No emoji, unicode glyphs or inline `<svg>` are used as icons any more — not in JSX,
|
|
67
|
+
not in `icon:` data fields, not on canvas. Ten icons in `icons-business` / `icons-education`
|
|
68
|
+
that drew their artwork as `<text>` use paths now, and the behaviour-tree palette names resolve
|
|
69
|
+
to real `NiceIcon` builtins (`shield` and `repeat` are new; 176 in total).
|
|
70
|
+
|
|
71
|
+
**Fixes.** The shadcn adapter reads the host's `--primary` / `--accent` again instead of
|
|
72
|
+
producing invalid `hsl(#hex)`; `ui-diagrams` ships the 21 translation keys its components were
|
|
73
|
+
already asking for; `--nice-font-size-2xl` is declared; `NiceScheduler` warns in development
|
|
74
|
+
when it ignores a `currentDate`, `view` or `events` change; `ui-buildings` typechecks clean and
|
|
75
|
+
`DeviceProtocol` accepts `'mqtt'`.
|
|
76
|
+
|
|
77
|
+
**Docs.** `doc.json` no longer lists CSS variables no component implements; eleven components
|
|
78
|
+
document the tokens their stylesheets really read.
|
|
79
|
+
|
|
3
80
|
## 1.1.7
|
|
4
81
|
|
|
5
82
|
### Patch Changes
|
|
@@ -125,16 +125,16 @@ function getEngineError(code, context) {
|
|
|
125
125
|
}
|
|
126
126
|
/** Format an engine error for console output */
|
|
127
127
|
function formatEngineError(err) {
|
|
128
|
-
const
|
|
129
|
-
const lines = [`${
|
|
128
|
+
const label = err.severity === 'error' ? 'Error' : err.severity === 'warning' ? 'Warning' : 'Info';
|
|
129
|
+
const lines = [`${label}: [Nice2Dev ${err.code}] ${err.message}`];
|
|
130
130
|
if (err.suggestion) {
|
|
131
|
-
lines.push(`
|
|
131
|
+
lines.push(` Tip: ${err.suggestion}`);
|
|
132
132
|
}
|
|
133
133
|
if (err.docsSection) {
|
|
134
|
-
lines.push(`
|
|
134
|
+
lines.push(` Docs: https://nice2dev.com/docs/game-engine/${err.docsSection}`);
|
|
135
135
|
}
|
|
136
136
|
if (err.context) {
|
|
137
|
-
lines.push(`
|
|
137
|
+
lines.push(` Context: ${JSON.stringify(err.context)}`);
|
|
138
138
|
}
|
|
139
139
|
return lines.join('\n');
|
|
140
140
|
}
|
|
@@ -704,7 +704,7 @@ const DialogueBox = ({ text, characterName, portrait, emotion = 'neutral', textE
|
|
|
704
704
|
opacity: isComplete ? 1 : 0.5,
|
|
705
705
|
fontSize: '12px',
|
|
706
706
|
},
|
|
707
|
-
}, isComplete ? '
|
|
707
|
+
}, isComplete ? 'Click to continue' : '...'),
|
|
708
708
|
]),
|
|
709
709
|
]);
|
|
710
710
|
};
|
|
@@ -540,7 +540,7 @@ class AssetBrowser {
|
|
|
540
540
|
id: 'favorites',
|
|
541
541
|
name: 'Favorites',
|
|
542
542
|
description: 'Your favorite assets',
|
|
543
|
-
icon: '
|
|
543
|
+
icon: 'star',
|
|
544
544
|
color: '#f9e2af',
|
|
545
545
|
assetIds: [],
|
|
546
546
|
createdAt: Date.now(),
|
|
@@ -551,7 +551,7 @@ class AssetBrowser {
|
|
|
551
551
|
id: 'recent',
|
|
552
552
|
name: 'Recent',
|
|
553
553
|
description: 'Recently used assets',
|
|
554
|
-
icon: '
|
|
554
|
+
icon: 'clock',
|
|
555
555
|
color: '#89b4fa',
|
|
556
556
|
assetIds: [],
|
|
557
557
|
createdAt: Date.now(),
|
|
@@ -562,7 +562,7 @@ class AssetBrowser {
|
|
|
562
562
|
id: 'unused',
|
|
563
563
|
name: 'Unused',
|
|
564
564
|
description: 'Assets not referenced by any scene',
|
|
565
|
-
icon: '
|
|
565
|
+
icon: 'box',
|
|
566
566
|
color: '#cdd6f4',
|
|
567
567
|
assetIds: [],
|
|
568
568
|
createdAt: Date.now(),
|
|
@@ -997,7 +997,7 @@ class AssetBrowser {
|
|
|
997
997
|
id: `collection_${Date.now()}`,
|
|
998
998
|
name,
|
|
999
999
|
description,
|
|
1000
|
-
icon: '
|
|
1000
|
+
icon: 'folder',
|
|
1001
1001
|
color: '#cdd6f4',
|
|
1002
1002
|
assetIds: [],
|
|
1003
1003
|
createdAt: Date.now(),
|
|
@@ -1146,30 +1146,31 @@ class AssetBrowser {
|
|
|
1146
1146
|
}
|
|
1147
1147
|
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
1148
1148
|
}
|
|
1149
|
+
/** NiceIcon name for an asset type. */
|
|
1149
1150
|
getAssetTypeIcon(type) {
|
|
1150
1151
|
const icons = {
|
|
1151
|
-
image: '
|
|
1152
|
-
sprite: '
|
|
1153
|
-
spritesheet: '
|
|
1154
|
-
tilemap: '
|
|
1155
|
-
audio: '
|
|
1156
|
-
music: '
|
|
1157
|
-
sfx: '
|
|
1158
|
-
model: '
|
|
1159
|
-
material: '
|
|
1160
|
-
shader: '
|
|
1161
|
-
script: '
|
|
1162
|
-
scene: '
|
|
1163
|
-
prefab: '
|
|
1164
|
-
animation: '
|
|
1165
|
-
font: '
|
|
1166
|
-
particle: '
|
|
1167
|
-
terrain: '
|
|
1168
|
-
video: '
|
|
1169
|
-
json: '
|
|
1170
|
-
other: '
|
|
1152
|
+
image: 'image',
|
|
1153
|
+
sprite: 'palette',
|
|
1154
|
+
spritesheet: 'grid',
|
|
1155
|
+
tilemap: 'map-pin',
|
|
1156
|
+
audio: 'volume',
|
|
1157
|
+
music: 'music',
|
|
1158
|
+
sfx: 'zap',
|
|
1159
|
+
model: 'box',
|
|
1160
|
+
material: 'palette',
|
|
1161
|
+
shader: 'wand',
|
|
1162
|
+
script: 'code',
|
|
1163
|
+
scene: 'video',
|
|
1164
|
+
prefab: 'box',
|
|
1165
|
+
animation: 'video',
|
|
1166
|
+
font: 'type',
|
|
1167
|
+
particle: 'star',
|
|
1168
|
+
terrain: 'mountain',
|
|
1169
|
+
video: 'video',
|
|
1170
|
+
json: 'file',
|
|
1171
|
+
other: 'file',
|
|
1171
1172
|
};
|
|
1172
|
-
return icons[type] ?? '
|
|
1173
|
+
return icons[type] ?? 'file';
|
|
1173
1174
|
}
|
|
1174
1175
|
}
|
|
1175
1176
|
// ============================================================
|
|
@@ -5,6 +5,7 @@ var ui = require('@nice2dev/ui');
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var EventBus = require('../core/EventBus.js');
|
|
7
7
|
var World = require('../ecs/World.js');
|
|
8
|
+
var useTranslation = require('../i18n/useTranslation.js');
|
|
8
9
|
var SceneManager = require('../scene/SceneManager.js');
|
|
9
10
|
|
|
10
11
|
class UndoStack {
|
|
@@ -165,6 +166,7 @@ const GAME_EDITOR_TOUR = [
|
|
|
165
166
|
},
|
|
166
167
|
];
|
|
167
168
|
const NiceGameEditor = ({ project, onSave, className, style, tutorial, }) => {
|
|
169
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
168
170
|
const [state, dispatch] = React.useReducer(editorReducer, DEFAULT_STATE);
|
|
169
171
|
const worldRef = React.useRef(new World.World());
|
|
170
172
|
const undoRef = React.useRef(new UndoStack());
|
|
@@ -337,7 +339,7 @@ const NiceGameEditor = ({ project, onSave, className, style, tutorial, }) => {
|
|
|
337
339
|
fontSize: 13,
|
|
338
340
|
position: 'relative',
|
|
339
341
|
...style,
|
|
340
|
-
}, children: [jsxRuntime.jsx("span", { style: { position: 'absolute', top: 6, right: 6, zIndex: 30 }, children: jsxRuntime.jsx(ui.NiceTutorialButton, { steps: ui.resolveTutorial(tutorial, GAME_EDITOR_TOUR) }) }), jsxRuntime.jsx(EditorToolbar, {}), jsxRuntime.jsxs("div", { style: { display: 'flex', flex: 1, overflow: 'hidden' }, children: [state.panels.find((p) => p.id === 'hierarchy')?.visible && (jsxRuntime.jsx(EditorPanelContainer, { title:
|
|
342
|
+
}, children: [jsxRuntime.jsx("span", { style: { position: 'absolute', top: 6, right: 6, zIndex: 30 }, children: jsxRuntime.jsx(ui.NiceTutorialButton, { steps: ui.resolveTutorial(tutorial, GAME_EDITOR_TOUR) }) }), jsxRuntime.jsx(EditorToolbar, {}), jsxRuntime.jsxs("div", { style: { display: 'flex', flex: 1, overflow: 'hidden' }, children: [state.panels.find((p) => p.id === 'hierarchy')?.visible && (jsxRuntime.jsx(EditorPanelContainer, { title: tr('editor.panels.hierarchy'), width: 250, position: "left", children: jsxRuntime.jsx(HierarchyPanel, {}) })), jsxRuntime.jsx("div", { style: { flex: 1, position: 'relative', overflow: 'hidden' }, children: jsxRuntime.jsx(EditorViewport, {}) }), state.panels.find((p) => p.id === 'inspector')?.visible && (jsxRuntime.jsx(EditorPanelContainer, { title: tr('editor.panels.inspector'), width: 300, position: "right", children: jsxRuntime.jsx(InspectorPanel, {}) }))] }), jsxRuntime.jsxs("div", { style: { display: 'flex', borderTop: '1px solid #45475a' }, children: [state.panels.find((p) => p.id === 'assets')?.visible && (jsxRuntime.jsx(EditorPanelContainer, { title: tr('editor.panels.assets'), height: 180, position: "bottom", children: jsxRuntime.jsx(AssetPanel, {}) })), state.panels.find((p) => p.id === 'console')?.visible && (jsxRuntime.jsx(EditorPanelContainer, { title: tr('editor.panels.console'), height: 180, position: "bottom", children: jsxRuntime.jsx(ConsolePanel, {}) }))] })] }) }));
|
|
341
343
|
};
|
|
342
344
|
/* ── Helpers ───────────────────────────────────────────────────── */
|
|
343
345
|
function getEntityBounds(entityId, world) {
|
|
@@ -412,29 +414,33 @@ function colorToHex(c) {
|
|
|
412
414
|
.padStart(2, '0');
|
|
413
415
|
return `#${r}${g}${b}`;
|
|
414
416
|
}
|
|
417
|
+
/** `label` is also the name given to a created entity, so it stays English (A3);
|
|
418
|
+
* `key` is what the button shows. */
|
|
415
419
|
const ENTITY_PRESETS = [
|
|
416
|
-
{ label: 'Empty', icon: '
|
|
417
|
-
{ label: 'Sprite', icon: '
|
|
418
|
-
{ label: 'Shape', icon: '
|
|
419
|
-
{ label: 'Text', icon: '
|
|
420
|
+
{ key: 'empty', label: 'Empty', icon: 'circle', components: ['Transform'] },
|
|
421
|
+
{ key: 'sprite', label: 'Sprite', icon: 'image', components: ['Transform', 'Sprite'] },
|
|
422
|
+
{ key: 'shape', label: 'Shape', icon: 'square', components: ['Transform', 'Shape'] },
|
|
423
|
+
{ key: 'text', label: 'Text', icon: 'type', components: ['Transform', 'Text'] },
|
|
420
424
|
{
|
|
425
|
+
key: 'physicsBody',
|
|
421
426
|
label: 'Physics Body',
|
|
422
|
-
icon: '
|
|
427
|
+
icon: 'zap',
|
|
423
428
|
components: ['Transform', 'Shape', 'Collider2D', 'RigidBody2D'],
|
|
424
429
|
},
|
|
425
|
-
{ label: 'Camera', icon: '
|
|
430
|
+
{ key: 'camera', label: 'Camera', icon: 'camera', components: ['Transform', 'CameraTarget'] },
|
|
426
431
|
];
|
|
427
432
|
/* ── Sub-components ───────────────────────────────────────────── */
|
|
428
433
|
const EditorToolbar = () => {
|
|
434
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
429
435
|
const { state, dispatch, createNewEntity, undoStack } = useEditor();
|
|
430
436
|
const [showAddMenu, setShowAddMenu] = React.useState(false);
|
|
431
437
|
const tools = ['select', 'move', 'rotate', 'scale', 'pan'];
|
|
432
438
|
const toolIcons = {
|
|
433
|
-
select: '
|
|
434
|
-
move: '
|
|
435
|
-
rotate: '
|
|
436
|
-
scale: '
|
|
437
|
-
pan: '
|
|
439
|
+
select: 'cursor',
|
|
440
|
+
move: 'move',
|
|
441
|
+
rotate: 'refresh',
|
|
442
|
+
scale: 'expand',
|
|
443
|
+
pan: 'grip',
|
|
438
444
|
};
|
|
439
445
|
const btnStyle = (active) => ({
|
|
440
446
|
background: active ? '#585b70' : 'transparent',
|
|
@@ -452,7 +458,7 @@ const EditorToolbar = () => {
|
|
|
452
458
|
padding: '4px 8px',
|
|
453
459
|
borderBottom: '1px solid #45475a',
|
|
454
460
|
backgroundColor: '#181825',
|
|
455
|
-
}, children: [tools.map((t) => (jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SET_TOOL', tool: t }), style: btnStyle(state.tool === t), title: `${t} (${t[0].toUpperCase()})`, children: toolIcons[t] }, t))), jsxRuntime.jsx("div", { style: { width: 1, height: 20, background: '#45475a', margin: '0 4px' } }), jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx("button", { onClick: () => setShowAddMenu(!showAddMenu), style: {
|
|
461
|
+
}, children: [tools.map((t) => (jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SET_TOOL', tool: t }), style: btnStyle(state.tool === t), title: `${tr(`editor.tools.${t}`)} (${t[0].toUpperCase()})`, children: jsxRuntime.jsx(ui.NiceIcon, { name: toolIcons[t], size: 14 }) }, t))), jsxRuntime.jsx("div", { style: { width: 1, height: 20, background: '#45475a', margin: '0 4px' } }), jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx("button", { onClick: () => setShowAddMenu(!showAddMenu), style: {
|
|
456
462
|
...btnStyle(false),
|
|
457
463
|
fontSize: 12,
|
|
458
464
|
padding: '4px 10px',
|
|
@@ -483,10 +489,10 @@ const EditorToolbar = () => {
|
|
|
483
489
|
cursor: 'pointer',
|
|
484
490
|
borderRadius: 2,
|
|
485
491
|
fontSize: 12,
|
|
486
|
-
}, children: [p.icon, " ", p.
|
|
492
|
+
}, children: [jsxRuntime.jsx(ui.NiceIcon, { name: p.icon, size: 12 }), " ", tr(`editor.entity.${p.key}`)] }, p.label))) }))] }), jsxRuntime.jsx("div", { style: { width: 1, height: 20, background: '#45475a', margin: '0 4px' } }), jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SET_MODE', mode: state.mode === 'play' ? 'edit' : 'play' }), style: btnStyle(state.mode === 'play'), title: tr('editor.view.playStop'), children: jsxRuntime.jsx(ui.NiceIcon, { name: state.mode === 'play' ? 'stop' : 'play', size: 14 }) }), jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SET_MODE', mode: state.mode === 'pause' ? 'play' : 'pause' }), style: btnStyle(state.mode === 'pause'), title: tr('editor.actions.pause'), disabled: state.mode === 'edit', children: jsxRuntime.jsx(ui.NiceIcon, { name: "pause", size: 14 }) }), jsxRuntime.jsx("div", { style: { width: 1, height: 20, background: '#45475a', margin: '0 4px' } }), jsxRuntime.jsx("button", { onClick: () => undoStack.undo(), style: btnStyle(false), title: `${tr('editor.actions.undo')} (Ctrl+Z)`, disabled: !undoStack.canUndo, children: jsxRuntime.jsx(ui.NiceIcon, { name: "undo", size: 14 }) }), jsxRuntime.jsx("button", { onClick: () => undoStack.redo(), style: btnStyle(false), title: `${tr('editor.actions.redo')} (Ctrl+Y)`, disabled: !undoStack.canRedo, children: jsxRuntime.jsx(ui.NiceIcon, { name: "redo", size: 14 }) }), jsxRuntime.jsx("div", { style: { width: 1, height: 20, background: '#45475a', margin: '0 4px' } }), jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SET_ZOOM', zoom: state.zoom * 0.8 }), style: btnStyle(false), title: tr('editor.view.zoomOut'), children: "\u2212" }), jsxRuntime.jsxs("span", { style: { fontSize: 11, minWidth: 40, textAlign: 'center' }, children: [(state.zoom * 100) | 0, "%"] }), jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SET_ZOOM', zoom: state.zoom * 1.25 }), style: btnStyle(false), title: tr('editor.view.zoomIn'), children: "+" }), jsxRuntime.jsx("button", { onClick: () => {
|
|
487
493
|
dispatch({ type: 'SET_ZOOM', zoom: 1 });
|
|
488
494
|
dispatch({ type: 'SET_PAN', offset: { x: 0, y: 0 } });
|
|
489
|
-
}, style: btnStyle(false), title:
|
|
495
|
+
}, style: btnStyle(false), title: tr('editor.view.resetView'), children: jsxRuntime.jsx(ui.NiceIcon, { name: "home", size: 14 }) }), jsxRuntime.jsx("div", { style: { width: 1, height: 20, background: '#45475a', margin: '0 4px' } }), jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'TOGGLE_GRID' }), style: btnStyle(state.showGrid), title: `${tr('editor.view.toggleGrid')} (Ctrl+G)`, children: jsxRuntime.jsx(ui.NiceIcon, { name: "grid", size: 14 }) }), jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'TOGGLE_SNAP' }), style: btnStyle(state.snapToGrid), title: tr('editor.view.toggleSnap'), children: jsxRuntime.jsx(ui.NiceIcon, { name: "target", size: 14 }) }), jsxRuntime.jsx("div", { style: { flex: 1 } }), jsxRuntime.jsxs("span", { style: { fontSize: 11, opacity: 0.6 }, children: [state.mode.toUpperCase(), " | ", state.tool, " | ", state.dirty ? 'Unsaved' : 'Saved'] })] }));
|
|
490
496
|
};
|
|
491
497
|
const EditorPanelContainer = ({ title, width, height, position, children }) => {
|
|
492
498
|
const isHorizontal = position === 'bottom';
|
|
@@ -511,28 +517,29 @@ const EditorPanelContainer = ({ title, width, height, position, children }) => {
|
|
|
511
517
|
}, children: title }), jsxRuntime.jsx("div", { style: { flex: 1, overflow: 'auto', padding: 4 }, children: children })] }));
|
|
512
518
|
};
|
|
513
519
|
const HierarchyPanel = () => {
|
|
520
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
514
521
|
const { world, state, dispatch, createNewEntity, refreshWorld, addLog } = useEditor();
|
|
515
522
|
const entities = world.allEntities().filter((e) => e.parent == null);
|
|
516
523
|
const getIcon = (id) => {
|
|
517
524
|
if (world.hasComponent(id, 'CameraTarget')) {
|
|
518
|
-
return '
|
|
525
|
+
return 'camera';
|
|
519
526
|
}
|
|
520
527
|
if (world.hasComponent(id, 'Sprite')) {
|
|
521
|
-
return '
|
|
528
|
+
return 'image';
|
|
522
529
|
}
|
|
523
530
|
if (world.hasComponent(id, 'Text')) {
|
|
524
|
-
return '
|
|
531
|
+
return 'type';
|
|
525
532
|
}
|
|
526
533
|
if (world.hasComponent(id, 'Shape')) {
|
|
527
|
-
return '
|
|
534
|
+
return 'square';
|
|
528
535
|
}
|
|
529
536
|
if (world.hasComponent(id, 'ParticleEmitter')) {
|
|
530
|
-
return '
|
|
537
|
+
return 'star';
|
|
531
538
|
}
|
|
532
539
|
if (world.hasComponent(id, 'AudioSource')) {
|
|
533
|
-
return '
|
|
540
|
+
return 'volume';
|
|
534
541
|
}
|
|
535
|
-
return '
|
|
542
|
+
return 'circle';
|
|
536
543
|
};
|
|
537
544
|
const renderEntity = (e, depth) => {
|
|
538
545
|
const isSelected = state.selectedEntities.includes(e.id);
|
|
@@ -547,7 +554,7 @@ const HierarchyPanel = () => {
|
|
|
547
554
|
alignItems: 'center',
|
|
548
555
|
gap: 4,
|
|
549
556
|
fontSize: 12,
|
|
550
|
-
}, children: [jsxRuntime.jsx("span", { style: {
|
|
557
|
+
}, children: [jsxRuntime.jsx("span", { style: { width: 14, display: 'inline-flex', justifyContent: 'center' }, children: jsxRuntime.jsx(ui.NiceIcon, { name: getIcon(e.id), size: 12 }) }), jsxRuntime.jsx("span", { style: { flex: 1 }, children: e.name }), jsxRuntime.jsxs("span", { style: { opacity: 0.3, fontSize: 10 }, children: ["#", e.id] })] }), children.map((c) => renderEntity(c, depth + 1))] }, e.id));
|
|
551
558
|
};
|
|
552
559
|
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { style: {
|
|
553
560
|
padding: '2px 6px',
|
|
@@ -562,7 +569,7 @@ const HierarchyPanel = () => {
|
|
|
562
569
|
color: '#a6adc8',
|
|
563
570
|
cursor: 'pointer',
|
|
564
571
|
fontSize: 10,
|
|
565
|
-
}, title:
|
|
572
|
+
}, title: tr('editor.assets.addEntity'), children: "+" }), jsxRuntime.jsx("button", { onClick: () => {
|
|
566
573
|
if (state.selectedEntities.length > 0) {
|
|
567
574
|
const id = state.selectedEntities[0];
|
|
568
575
|
const child = world.createEntity('Child');
|
|
@@ -579,7 +586,7 @@ const HierarchyPanel = () => {
|
|
|
579
586
|
color: '#a6adc8',
|
|
580
587
|
cursor: 'pointer',
|
|
581
588
|
fontSize: 10,
|
|
582
|
-
}, title:
|
|
589
|
+
}, title: tr('editor.assets.addChild'), disabled: state.selectedEntities.length === 0, children: jsxRuntime.jsx(ui.NiceIcon, { name: "plus", size: 12 }) }), jsxRuntime.jsx("span", { style: { flex: 1 } }), jsxRuntime.jsxs("span", { style: { color: '#6c7086' }, children: [world.entityCount, " entities"] })] }), entities.map((e) => renderEntity(e, 0))] }));
|
|
583
590
|
};
|
|
584
591
|
/* ── Inspector sub-editors ─────────────────────────────────────── */
|
|
585
592
|
const fieldStyle = {
|
|
@@ -617,6 +624,7 @@ const TransformEditor = ({ entityId }) => {
|
|
|
617
624
|
}) })] }));
|
|
618
625
|
};
|
|
619
626
|
const ShapeEditor = ({ entityId }) => {
|
|
627
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
620
628
|
const { world, refreshWorld, dispatch } = useEditor();
|
|
621
629
|
const s = world.getComponent(entityId, 'Shape');
|
|
622
630
|
if (!s) {
|
|
@@ -627,10 +635,10 @@ const ShapeEditor = ({ entityId }) => {
|
|
|
627
635
|
dispatch({ type: 'MARK_DIRTY' });
|
|
628
636
|
refreshWorld();
|
|
629
637
|
};
|
|
630
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children:
|
|
638
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children: tr('editor.fields.shape') }), jsxRuntime.jsxs("select", { value: s.shape, onChange: (e) => update(() => {
|
|
631
639
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- mutates discriminated-union variant; consumer narrows by `s.shape`
|
|
632
640
|
s.shape = e.target.value;
|
|
633
|
-
}), style: { ...fieldStyle, flex: 1 }, children: [jsxRuntime.jsx("option", { value: "rect", children:
|
|
641
|
+
}), style: { ...fieldStyle, flex: 1 }, children: [jsxRuntime.jsx("option", { value: "rect", children: tr('editor.shape.rect') }), jsxRuntime.jsx("option", { value: "circle", children: tr('editor.shape.circle') }), jsxRuntime.jsx("option", { value: "polygon", children: tr('editor.shape.polygon') }), jsxRuntime.jsx("option", { value: "line", children: tr('editor.shape.line') })] })] }), s.shape !== 'circle' && (jsxRuntime.jsx(NumField, { label: "Width", value: s.width, onChange: (v) => update(() => {
|
|
634
642
|
s.width = v;
|
|
635
643
|
}) })), s.shape !== 'circle' && (jsxRuntime.jsx(NumField, { label: "Height", value: s.height, onChange: (v) => update(() => {
|
|
636
644
|
s.height = v;
|
|
@@ -645,6 +653,7 @@ const ShapeEditor = ({ entityId }) => {
|
|
|
645
653
|
}) })] }));
|
|
646
654
|
};
|
|
647
655
|
const SpriteEditor = ({ entityId }) => {
|
|
656
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
648
657
|
const { world, refreshWorld, dispatch } = useEditor();
|
|
649
658
|
const s = world.getComponent(entityId, 'Sprite');
|
|
650
659
|
if (!s) {
|
|
@@ -665,11 +674,12 @@ const SpriteEditor = ({ entityId }) => {
|
|
|
665
674
|
s.opacity = Math.max(0, Math.min(1, v));
|
|
666
675
|
}) }), jsxRuntime.jsx(NumField, { label: "Layer", value: s.layer, step: 1, onChange: (v) => update(() => {
|
|
667
676
|
s.layer = v;
|
|
668
|
-
}) }), jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children:
|
|
677
|
+
}) }), jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children: tr('editor.fields.visible') }), jsxRuntime.jsx("input", { type: "checkbox", checked: s.visible, onChange: (e) => update(() => {
|
|
669
678
|
s.visible = e.target.checked;
|
|
670
679
|
}) })] })] }));
|
|
671
680
|
};
|
|
672
681
|
const TextEditor = ({ entityId }) => {
|
|
682
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
673
683
|
const { world, refreshWorld, dispatch } = useEditor();
|
|
674
684
|
const t = world.getComponent(entityId, 'Text');
|
|
675
685
|
if (!t) {
|
|
@@ -680,17 +690,18 @@ const TextEditor = ({ entityId }) => {
|
|
|
680
690
|
dispatch({ type: 'MARK_DIRTY' });
|
|
681
691
|
refreshWorld();
|
|
682
692
|
};
|
|
683
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: { marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, color: '#a6adc8' }, children:
|
|
693
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: { marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, color: '#a6adc8' }, children: tr('editor.fields.text') }), jsxRuntime.jsx("input", { type: "text", value: t.text, onChange: (e) => update(() => {
|
|
684
694
|
t.text = e.target.value;
|
|
685
695
|
}), style: { ...fieldStyle, width: '100%' } })] }), jsxRuntime.jsx(NumField, { label: "Font Size", value: t.fontSize, onChange: (v) => update(() => {
|
|
686
696
|
t.fontSize = v;
|
|
687
|
-
}) }), jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children:
|
|
697
|
+
}) }), jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children: tr('editor.fields.align') }), jsxRuntime.jsxs("select", { value: t.align, onChange: (e) => update(() => {
|
|
688
698
|
t.align = e.target.value;
|
|
689
|
-
}), style: { ...fieldStyle, flex: 1 }, children: [jsxRuntime.jsx("option", { value: "left", children:
|
|
699
|
+
}), style: { ...fieldStyle, flex: 1 }, children: [jsxRuntime.jsx("option", { value: "left", children: tr('editor.align.left') }), jsxRuntime.jsx("option", { value: "center", children: tr('editor.align.center') }), jsxRuntime.jsx("option", { value: "right", children: tr('editor.align.right') })] })] }), jsxRuntime.jsx(ColField, { label: "Color", color: t.color, onChange: (c) => update(() => {
|
|
690
700
|
Object.assign(t.color, c);
|
|
691
701
|
}) })] }));
|
|
692
702
|
};
|
|
693
703
|
const RigidBodyEditor = ({ entityId }) => {
|
|
704
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
694
705
|
const { world, refreshWorld, dispatch } = useEditor();
|
|
695
706
|
const rb = world.getComponent(entityId, 'RigidBody2D');
|
|
696
707
|
if (!rb) {
|
|
@@ -701,9 +712,9 @@ const RigidBodyEditor = ({ entityId }) => {
|
|
|
701
712
|
dispatch({ type: 'MARK_DIRTY' });
|
|
702
713
|
refreshWorld();
|
|
703
714
|
};
|
|
704
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children:
|
|
715
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }, children: [jsxRuntime.jsx("span", { style: { fontSize: 10, minWidth: 50, color: '#a6adc8' }, children: tr('editor.fields.body') }), jsxRuntime.jsxs("select", { value: rb.bodyType, onChange: (e) => update(() => {
|
|
705
716
|
rb.bodyType = e.target.value;
|
|
706
|
-
}), style: { ...fieldStyle, flex: 1 }, children: [jsxRuntime.jsx("option", { value: "dynamic", children:
|
|
717
|
+
}), style: { ...fieldStyle, flex: 1 }, children: [jsxRuntime.jsx("option", { value: "dynamic", children: tr('editor.body.dynamic') }), jsxRuntime.jsx("option", { value: "static", children: tr('editor.body.static') }), jsxRuntime.jsx("option", { value: "kinematic", children: tr('editor.body.kinematic') })] })] }), jsxRuntime.jsx(NumField, { label: "Mass", value: rb.mass, step: 0.1, onChange: (v) => update(() => {
|
|
707
718
|
rb.mass = v;
|
|
708
719
|
}) }), jsxRuntime.jsx(NumField, { label: "Drag", value: rb.drag, step: 0.01, onChange: (v) => update(() => {
|
|
709
720
|
rb.drag = v;
|
|
@@ -729,10 +740,11 @@ const ADDABLE_COMPONENTS = [
|
|
|
729
740
|
'CameraTarget',
|
|
730
741
|
];
|
|
731
742
|
const InspectorPanel = () => {
|
|
743
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
732
744
|
const { state, world, dispatch, refreshWorld, addLog } = useEditor();
|
|
733
745
|
const [showAddComp, setShowAddComp] = React.useState(false);
|
|
734
746
|
if (state.selectedEntities.length === 0) {
|
|
735
|
-
return jsxRuntime.jsx("div", { style: { opacity: 0.5, padding: 8 }, children:
|
|
747
|
+
return jsxRuntime.jsx("div", { style: { opacity: 0.5, padding: 8 }, children: tr('editor.messages.noSelection') });
|
|
736
748
|
}
|
|
737
749
|
const entityId = state.selectedEntities[0];
|
|
738
750
|
const entity = world.getEntity(entityId);
|
|
@@ -775,7 +787,7 @@ const InspectorPanel = () => {
|
|
|
775
787
|
color: '#f38ba8',
|
|
776
788
|
cursor: 'pointer',
|
|
777
789
|
fontSize: 10,
|
|
778
|
-
}, title:
|
|
790
|
+
}, title: tr('editor.assets.removeComponent', { type }), children: jsxRuntime.jsx(ui.NiceIcon, { name: "close", size: 10 }) }))] }), Editor ? (jsxRuntime.jsx(Editor, { entityId: entityId })) : (jsxRuntime.jsx("pre", { style: { fontSize: 10, opacity: 0.6, whiteSpace: 'pre-wrap', margin: 0 }, children: JSON.stringify(world.getComponent(entityId, type), null, 2) }))] }, type));
|
|
779
791
|
}), jsxRuntime.jsxs("div", { style: { marginTop: 8, position: 'relative' }, children: [jsxRuntime.jsx("button", { onClick: () => setShowAddComp(!showAddComp), style: {
|
|
780
792
|
width: '100%',
|
|
781
793
|
padding: '4px 8px',
|
|
@@ -820,6 +832,7 @@ const InspectorPanel = () => {
|
|
|
820
832
|
}, children: type }, type))) }))] })] }));
|
|
821
833
|
};
|
|
822
834
|
const AssetPanel = () => {
|
|
835
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
823
836
|
const [tab, setTab] = React.useState('all');
|
|
824
837
|
const tabBtnStyle = (active) => ({
|
|
825
838
|
padding: '2px 8px',
|
|
@@ -831,15 +844,15 @@ const AssetPanel = () => {
|
|
|
831
844
|
color: active ? '#cdd6f4' : '#6c7086',
|
|
832
845
|
});
|
|
833
846
|
const assets = [
|
|
834
|
-
{ name: 'player.png', type: 'sprites', icon: '
|
|
835
|
-
{ name: 'enemy.png', type: 'sprites', icon: '
|
|
836
|
-
{ name: 'tileset.png', type: 'sprites', icon: '
|
|
837
|
-
{ name: 'background.jpg', type: 'sprites', icon: '
|
|
838
|
-
{ name: 'jump.wav', type: 'audio', icon: '
|
|
839
|
-
{ name: 'music.mp3', type: 'audio', icon: '
|
|
840
|
-
{ name: 'coin.wav', type: 'audio', icon: '
|
|
841
|
-
{ name: 'playerController.ts', type: 'scripts', icon: '
|
|
842
|
-
{ name: 'enemyAI.ts', type: 'scripts', icon: '
|
|
847
|
+
{ name: 'player.png', type: 'sprites', icon: 'image' },
|
|
848
|
+
{ name: 'enemy.png', type: 'sprites', icon: 'image' },
|
|
849
|
+
{ name: 'tileset.png', type: 'sprites', icon: 'image' },
|
|
850
|
+
{ name: 'background.jpg', type: 'sprites', icon: 'image' },
|
|
851
|
+
{ name: 'jump.wav', type: 'audio', icon: 'volume' },
|
|
852
|
+
{ name: 'music.mp3', type: 'audio', icon: 'music' },
|
|
853
|
+
{ name: 'coin.wav', type: 'audio', icon: 'volume' },
|
|
854
|
+
{ name: 'playerController.ts', type: 'scripts', icon: 'code' },
|
|
855
|
+
{ name: 'enemyAI.ts', type: 'scripts', icon: 'code' },
|
|
843
856
|
];
|
|
844
857
|
const filtered = tab === 'all' ? assets : assets.filter((a) => a.type === tab);
|
|
845
858
|
return (jsxRuntime.jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%' }, children: [jsxRuntime.jsxs("div", { style: { display: 'flex', gap: 2, padding: '2px 4px', borderBottom: '1px solid #313244' }, children: [['all', 'sprites', 'audio', 'scripts'].map((t) => (jsxRuntime.jsx("button", { onClick: () => setTab(t), style: tabBtnStyle(tab === t), children: t.charAt(0).toUpperCase() + t.slice(1) }, t))), jsxRuntime.jsx("span", { style: { flex: 1 } }), jsxRuntime.jsx("button", { style: {
|
|
@@ -848,7 +861,7 @@ const AssetPanel = () => {
|
|
|
848
861
|
color: '#a6adc8',
|
|
849
862
|
cursor: 'pointer',
|
|
850
863
|
fontSize: 10,
|
|
851
|
-
}, title:
|
|
864
|
+
}, title: tr('editor.assets.import'), children: "+ Import" })] }), jsxRuntime.jsx("div", { style: {
|
|
852
865
|
flex: 1,
|
|
853
866
|
overflow: 'auto',
|
|
854
867
|
display: 'grid',
|
|
@@ -866,9 +879,10 @@ const AssetPanel = () => {
|
|
|
866
879
|
cursor: 'grab',
|
|
867
880
|
fontSize: 9,
|
|
868
881
|
textAlign: 'center',
|
|
869
|
-
}, children: [jsxRuntime.jsx(
|
|
882
|
+
}, children: [jsxRuntime.jsx(ui.NiceIcon, { name: a.icon, size: 20 }), jsxRuntime.jsx("span", { style: { wordBreak: 'break-all' }, children: a.name })] }, a.name))) })] }));
|
|
870
883
|
};
|
|
871
884
|
const ConsolePanel = () => {
|
|
885
|
+
const { t: tr } = useTranslation.useTranslation('engine');
|
|
872
886
|
const { consoleLogs } = useEditor();
|
|
873
887
|
const [filter, setFilter] = React.useState('all');
|
|
874
888
|
const scrollRef = React.useRef(null);
|
|
@@ -888,7 +902,7 @@ const ConsolePanel = () => {
|
|
|
888
902
|
background: filter === f ? '#313244' : 'transparent',
|
|
889
903
|
color: filter === f ? '#cdd6f4' : '#6c7086',
|
|
890
904
|
}, children: label }));
|
|
891
|
-
return (jsxRuntime.jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', fontFamily: 'monospace' }, children: [jsxRuntime.jsxs("div", { style: { display: 'flex', gap: 2, padding: '2px 4px', borderBottom: '1px solid #313244' }, children: [filterBtn('all', 'All'), " ", filterBtn('info', 'Info'), " ", filterBtn('warn', 'Warn'), ' ', filterBtn('error', 'Error'), jsxRuntime.jsx("span", { style: { flex: 1 } }), jsxRuntime.jsxs("span", { style: { fontSize: 9, color: '#6c7086' }, children: [filtered.length, " entries"] })] }), jsxRuntime.jsx("div", { ref: scrollRef, style: { flex: 1, overflow: 'auto', fontSize: 10 }, children: filtered.length === 0 ? (jsxRuntime.jsx("div", { style: { opacity: 0.4, padding: 8 }, children:
|
|
905
|
+
return (jsxRuntime.jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', fontFamily: 'monospace' }, children: [jsxRuntime.jsxs("div", { style: { display: 'flex', gap: 2, padding: '2px 4px', borderBottom: '1px solid #313244' }, children: [filterBtn('all', 'All'), " ", filterBtn('info', 'Info'), " ", filterBtn('warn', 'Warn'), ' ', filterBtn('error', 'Error'), jsxRuntime.jsx("span", { style: { flex: 1 } }), jsxRuntime.jsxs("span", { style: { fontSize: 9, color: '#6c7086' }, children: [filtered.length, " entries"] })] }), jsxRuntime.jsx("div", { ref: scrollRef, style: { flex: 1, overflow: 'auto', fontSize: 10 }, children: filtered.length === 0 ? (jsxRuntime.jsx("div", { style: { opacity: 0.4, padding: 8 }, children: tr('editor.messages.consoleReady') })) : (filtered.map((log) => (jsxRuntime.jsxs("div", { style: {
|
|
892
906
|
padding: '1px 4px',
|
|
893
907
|
borderBottom: '1px solid #181825',
|
|
894
908
|
display: 'flex',
|
|
@@ -1058,7 +1072,10 @@ const EditorViewport = () => {
|
|
|
1058
1072
|
ctx.fillStyle = '#f9e2af';
|
|
1059
1073
|
ctx.font = `${8 / state.zoom}px monospace`;
|
|
1060
1074
|
ctx.textAlign = 'center';
|
|
1061
|
-
|
|
1075
|
+
// Sparkle marker drawn as a cross (no glyph fonts on the canvas)
|
|
1076
|
+
const spark = 4 / state.zoom;
|
|
1077
|
+
ctx.fillRect(-spark / 4, -spark, spark / 2, spark * 2);
|
|
1078
|
+
ctx.fillRect(-spark, -spark / 4, spark * 2, spark / 2);
|
|
1062
1079
|
}
|
|
1063
1080
|
// Camera indicator
|
|
1064
1081
|
const cam = world.getComponent(entity.id, 'CameraTarget');
|
|
@@ -1070,7 +1087,7 @@ const EditorViewport = () => {
|
|
|
1070
1087
|
ctx.font = `${8 / state.zoom}px monospace`;
|
|
1071
1088
|
ctx.fillStyle = '#a6e3a1';
|
|
1072
1089
|
ctx.textAlign = 'center';
|
|
1073
|
-
ctx.fillText('
|
|
1090
|
+
ctx.fillText('Camera', 0, -hh - 4 / state.zoom);
|
|
1074
1091
|
}
|
|
1075
1092
|
// Selection highlight
|
|
1076
1093
|
if (isSelected) {
|