@craft_eco/craft-mcp 0.1.22 → 0.1.26
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/README.md +28 -7
- package/bin/craft-mcp.mjs +10 -2
- package/dist-server/game-workflow/bundle-files.mjs +43 -0
- package/dist-server/game-workflow/engines.mjs +13 -6
- package/dist-server/game-workflow/project-bundles.mjs +90 -0
- package/dist-server/game-workflow/project-context.mjs +91 -0
- package/dist-server/game-workflow/projects.mjs +16 -4
- package/dist-server/integrations/config.mjs +71 -0
- package/dist-server/integrations/files.mjs +54 -0
- package/dist-server/integrations/hosts.mjs +30 -0
- package/dist-server/integrations/install.mjs +86 -0
- package/dist-server/integrations/runtime.mjs +71 -0
- package/dist-server/mcp/server.mjs +13 -9
- package/dist-server/preview/preview-launcher.mjs +9 -2
- package/dist-server/preview/preview-start.mjs +2 -2
- package/package.json +10 -1
- package/resources/craft-create/SKILL.md +14 -0
- package/resources/craft-game-maker/SKILL.md +77 -71
- package/resources/craft-game-maker/js.md +10 -10
- package/resources/craft-game-maker/js3d.md +13 -13
- package/resources/game_visual_qa.mjs +1149 -1149
- package/resources/js/bundle.json +93 -0
- package/resources/js/context/AGENTS.md +15 -102
- package/resources/js/context/knowledge/AigcWiring.md +5 -196
- package/resources/js/context/knowledge/AssetUrl.md +5 -20
- package/resources/js/context/knowledge/Layout.md +7 -0
- package/resources/js/context/knowledge/Lifecycle.md +6 -27
- package/resources/js/context/skills/aigc-generate/SKILL.md +6 -141
- package/resources/js/context/skills/asset-search/SKILL.md +5 -62
- package/resources/js/context/skills/asset-search/references/resource-config.md +9 -0
- package/resources/js/context/skills/export-config/SKILL.md +7 -19
- package/resources/js/context/skills/export-config/scripts/export-config.mjs +3 -45
- package/resources/js/context/skills/index.json +30 -0
- package/resources/js/context/skills/visual-qa/SKILL.md +6 -28
- package/resources/js/project/README.md +4 -96
- package/resources/js/project/package.json +1 -2
- package/resources/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +1 -37
- package/resources/js/project/scripts/config-export.mjs +10 -34
- package/resources/js3d/bundle.json +104 -0
- package/resources/js3d/context/AGENTS.md +16 -85
- package/resources/js3d/context/knowledge/AigcWiring.md +9 -0
- package/resources/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +9 -67
- package/resources/js3d/context/knowledge/Layout.md +7 -0
- package/resources/js3d/context/knowledge/Runtime.md +5 -30
- package/resources/js3d/context/skills/aigc-integration/SKILL.md +6 -164
- package/resources/js3d/context/skills/asset-search/SKILL.md +5 -171
- package/resources/js3d/context/skills/asset-search/references/resource-config.md +6 -94
- package/resources/js3d/context/skills/asset-usage-audit/SKILL.md +6 -82
- package/resources/js3d/context/skills/export-config/SKILL.md +7 -11
- package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +3 -55
- package/resources/js3d/context/skills/index.json +42 -0
- package/resources/js3d/context/skills/performance-audit/SKILL.md +8 -153
- package/resources/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/js3d/project/README.md +4 -103
- package/resources/js3d/project/package.json +1 -2
- package/resources/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-scene-assets.mjs +3 -28
- package/resources/js3d/project/scripts/config-export.mjs +12 -34
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +8 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js +39 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +5 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +45 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +71 -6
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +2 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.js +7 -2
- package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +2 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +27 -16
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +14 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +119 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/static.js +20 -6
- package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.js +24 -2
- package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +21 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.js +66 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +1 -1
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -1
- package/vendor/agent-cli/dist/src/index.d.ts +4 -1
- package/vendor/agent-cli/dist/src/index.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/index.js +3 -0
- package/vendor/agent-cli/dist/src/index.js.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +31 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +19 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.d.ts +10 -0
- package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.js +16 -5
- package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.js +17 -1
- package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-observability.js +11 -0
- package/vendor/agent-cli/dist/src/session/process-observability.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-request.d.ts +3 -2
- package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-request.js +27 -9
- package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +2 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.js +9 -3
- package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts +42 -0
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-steer.js +205 -0
- package/vendor/agent-cli/dist/src/session/run-steer.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts +10 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +21 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +102 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/tools/context-program.js +3 -0
- package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -1
- package/resources/js/context/.role/AGENTS_DESIGN.md +0 -9
- package/resources/js/context/agents/aigc-asset.md +0 -168
- package/resources/js/context/knowledge/AigcEnabled.md +0 -49
- package/resources/js/context/knowledge/FrontendComponents.md +0 -17
- package/resources/js/context/knowledge/MobileAdaptation.md +0 -73
- package/resources/js/context/knowledge/MobileAdapted.md +0 -36
- package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
- package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -115
- package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -392
- package/resources/js/context/knowledge/PlatformServices.md +0 -190
- package/resources/js/context/knowledge/ProjectDisplayConfig.md +0 -35
- package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
- package/resources/js/context/knowledge/Ui.md +0 -11
- package/resources/js/context/knowledge/UiEditorCompat.md +0 -21
- package/resources/js/context/rules/MultiplayerCapability.md +0 -23
- package/resources/js/context/rules/MultiplayerRoomEntryUX.md +0 -63
- package/resources/js/context/rules/PlatformBoundaryModules.md +0 -44
- package/resources/js/context/rules/preview_ready.md +0 -8
- package/resources/js/context/skills/aigc-generate/knowledge/audio.md +0 -39
- package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +0 -26
- package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +0 -132
- package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +0 -53
- package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +0 -52
- package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +0 -191
- package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +0 -55
- package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +0 -62
- package/resources/js/context/skills/asset-search/scripts/config.json +0 -5
- package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +0 -125
- package/resources/js/context/skills/asset-search/scripts/search.mjs +0 -760
- package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -657
- package/resources/js/context/skills/asset-search/strategies/anim2d.md +0 -42
- package/resources/js/context/skills/asset-search/strategies/audio.md +0 -34
- package/resources/js/context/skills/asset-search/strategies/effect2d.md +0 -31
- package/resources/js/context/skills/asset-search/strategies/texture-prop.md +0 -22
- package/resources/js/context/skills/asset-search/strategies/ui-common.md +0 -40
- package/resources/js/context/skills/asset-search/strategies/ui-style.md +0 -28
- package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
- package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +0 -93
- package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +0 -7
- package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +0 -22
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +0 -208
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +0 -37
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +0 -31
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +0 -272
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.d.mts +0 -79
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.mjs +0 -29
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/release.json +0 -22
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/cli.mjs +0 -16
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.d.mts +0 -4
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.mjs +0 -50
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +0 -3
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.mjs +0 -72
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.d.mts +0 -24
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.mjs +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.d.mts +0 -10
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.mjs +0 -1
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +0 -37
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/cli.mjs +0 -20
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.d.mts +0 -19
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.mjs +0 -1
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/installed.json +0 -6
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.d.mts +0 -6
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.mjs +0 -77
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.d.mts +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.mjs +0 -34
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +0 -156
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +0 -249
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +0 -87
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +0 -185
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +0 -294
- package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +0 -20
- package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +0 -5
- package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +0 -159
- package/resources/js/context/skills/mobile-adaptation/SKILL.md +0 -277
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -50
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -862
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -135
- package/resources/js/context/skills/mobile-adaptation/references/input-config.md +0 -342
- package/resources/js/context/skills/mobile-adaptation/references/verification.md +0 -140
- package/resources/js/context/skills/mobile-adaptation/references/web-audio.md +0 -11
- package/resources/js/context/skills/mobile-compat-qa/SKILL.md +0 -53
- package/resources/js/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
- package/resources/js/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
- package/resources/js/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
- package/resources/js/context/skills/optimization-suggestions/SKILL.md +0 -89
- package/resources/js/context/skills/platform-services/SKILL.md +0 -101
- package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
- package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
- package/resources/js/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
- package/resources/js/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
- package/resources/js/context/skills/platform-services/assets/modules/log.ts +0 -35
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
- package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +0 -49
- package/resources/js/context/skills/platform-services/assets/modules/save.mjs +0 -1
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
- package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
- package/resources/js/context/skills/platform-services/references/api_reference.md +0 -18
- package/resources/js/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
- package/resources/js/context/skills/platform-services/scripts/install.mjs +0 -148
- package/resources/js/context/skills/resolution-adaptation/SKILL.md +0 -47
- package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
- package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -249
- package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +0 -98
- package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -200
- package/resources/js/context/skills/resolution-adaptation/references/audit.md +0 -31
- package/resources/js/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
- package/resources/js/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
- package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
- package/resources/js/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
- package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
- package/resources/js/context/skills/resolution-adaptation/references/world-resize.md +0 -55
- package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
- package/resources/js/context/skills/scene-editor-compat/SKILL.md +0 -94
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +0 -13
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +0 -6
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +0 -25
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +0 -18
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +0 -42
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +0 -144
- package/resources/js/context/skills/scene-editor-compat/docs/contract.md +0 -330
- package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +0 -64
- package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +0 -28
- package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +0 -47
- package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +0 -64
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +0 -38
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +0 -9
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +0 -59
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +0 -30
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +0 -66
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +0 -20
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +0 -26
- package/resources/js/context/skills/scene-editor-compat/references/contract.md +0 -73
- package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +0 -162
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +0 -853
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +0 -173
- package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -427
- package/resources/js/context/skills/scene-editor-compat/version.json +0 -1
- package/resources/js/context/skills/ui-editor-compat/SKILL.md +0 -48
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -74
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js/context/skills/ui-editor-compat/references/contract.md +0 -132
- package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
- package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
- package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
- package/resources/js/context/skills/version-update/SKILL.md +0 -192
- package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
- package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
- package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
- package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js/context/version/version.json +0 -1
- package/resources/js/project/SPEC/assist/.gitkeep +0 -0
- package/resources/js/project/SPEC/guide/.gitkeep +0 -0
- package/resources/js/project/SPEC/plan/.gitkeep +0 -0
- package/resources/js/project/SPEC/readme.md +0 -6
- package/resources/js/project/SPEC/res/.gitkeep +0 -0
- package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -29
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/release.json +0 -37
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
- package/resources/js/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js/project/vendor/core-manager-js/package.json +0 -33
- package/resources/js/project/vendor/core-manager-js/src/.versions.json +0 -42
- package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +0 -41
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +0 -93
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +0 -203
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +0 -106
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +0 -25
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +0 -21
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +0 -65
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +0 -340
- package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +0 -87
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +0 -92
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +0 -271
- package/resources/js/project/vendor/core-manager-js/src/index.ts +0 -31
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +0 -81
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +0 -43
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +0 -32
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +0 -141
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +0 -20
- package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +0 -183
- package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +0 -304
- package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +0 -351
- package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +0 -180
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +0 -13
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +0 -14
- package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +0 -68
- package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +0 -433
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +0 -118
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +0 -444
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +0 -485
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +0 -66
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +0 -149
- package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +0 -9
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +0 -29
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +0 -88
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +0 -122
- package/resources/js/project/vendor/core-manager-js/src/runtime.ts +0 -24
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +0 -318
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +0 -151
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +0 -235
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +0 -98
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +0 -94
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +0 -209
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +0 -106
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +0 -341
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +0 -68
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +0 -236
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +0 -22
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +0 -29
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +0 -197
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +0 -9
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +0 -555
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +0 -112
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +0 -178
- package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +0 -246
- package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +0 -139
- package/resources/js/project/vendor/core-manager-js/tsconfig.json +0 -15
- package/resources/js/project/vendor/run.sh +0 -4
- package/resources/js/project/version/craft_feature_version.json +0 -42
- package/resources/js/project/version/project_feature_version.json +0 -11
- package/resources/js3d/context/.role/AGENTS_DESIGN.md +0 -9
- package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +0 -75
- package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +0 -42
- package/resources/js3d/context/knowledge/FrontendComponents.md +0 -19
- package/resources/js3d/context/knowledge/MobileAdaptation.md +0 -73
- package/resources/js3d/context/knowledge/MobileAdapted.md +0 -36
- package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
- package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -117
- package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -430
- package/resources/js3d/context/knowledge/PlatformServices.md +0 -190
- package/resources/js3d/context/knowledge/ProjectDisplayConfig.md +0 -35
- package/resources/js3d/context/knowledge/SceneEditorCompat.md +0 -35
- package/resources/js3d/context/knowledge/StepByStep.md +0 -21
- package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
- package/resources/js3d/context/knowledge/UiEditorCompat.md +0 -21
- package/resources/js3d/context/rules/MultiplayerCapability.md +0 -27
- package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +0 -63
- package/resources/js3d/context/rules/PlatformBoundaryModules.md +0 -44
- package/resources/js3d/context/rules/preview_ready.md +0 -8
- package/resources/js3d/context/skills/aigc-integration/assets/sprite-sheet-player.mjs +0 -70
- package/resources/js3d/context/skills/aigc-integration/callback.md +0 -77
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +0 -23
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +0 -38
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/character2d-aigc-knowledge.md +0 -72
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +0 -33
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +0 -36
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +0 -37
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +0 -35
- package/resources/js3d/context/skills/asset-search/references/sprite-sheets.md +0 -58
- package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +0 -62
- package/resources/js3d/context/skills/asset-search/scripts/config.json +0 -235
- package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +0 -905
- package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +0 -79
- package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +0 -74
- package/resources/js3d/context/skills/asset-search/scripts/search.mjs +0 -637
- package/resources/js3d/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -667
- package/resources/js3d/context/skills/asset-search/strategies/anim2d.md +0 -42
- package/resources/js3d/context/skills/asset-search/strategies/effect2d.md +0 -31
- package/resources/js3d/context/skills/asset-usage-audit/references/case-tidewater-zoo.md +0 -89
- package/resources/js3d/context/skills/asset-usage-audit/references/optimization-playbook.md +0 -143
- package/resources/js3d/context/skills/asset-usage-audit/references/usage-model.md +0 -90
- package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
- package/resources/js3d/context/skills/game-art-style/SKILL.md +0 -60
- package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
- package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +0 -38
- package/resources/js3d/context/skills/game-art-style/references/construction.md +0 -111
- package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +0 -105
- package/resources/js3d/context/skills/game-art-style/references/sources.md +0 -25
- package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +0 -175
- package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +0 -168
- package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +0 -191
- package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +0 -165
- package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +0 -173
- package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +0 -185
- package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +0 -181
- package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +0 -189
- package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +0 -88
- package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +0 -301
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -104
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -933
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -257
- package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +0 -342
- package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +0 -140
- package/resources/js3d/context/skills/mobile-adaptation/references/web-audio.md +0 -11
- package/resources/js3d/context/skills/mobile-compat-qa/SKILL.md +0 -53
- package/resources/js3d/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-form-input.md +0 -10
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
- package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +0 -74
- package/resources/js3d/context/skills/performance-audit/references/case-notes.md +0 -93
- package/resources/js3d/context/skills/performance-audit/references/rules.md +0 -183
- package/resources/js3d/context/skills/platform-services/SKILL.md +0 -101
- package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
- package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
- package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +0 -35
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
- package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +0 -49
- package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +0 -1
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
- package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
- package/resources/js3d/context/skills/platform-services/references/api_reference.md +0 -18
- package/resources/js3d/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
- package/resources/js3d/context/skills/platform-services/scripts/install.mjs +0 -148
- package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +0 -46
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -239
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +0 -129
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -188
- package/resources/js3d/context/skills/resolution-adaptation/references/audit.md +0 -31
- package/resources/js3d/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
- package/resources/js3d/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
- package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
- package/resources/js3d/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
- package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
- package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
- package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +0 -599
- package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +0 -141
- package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +0 -92
- package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +0 -125
- package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +0 -113
- package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -1187
- package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +0 -53
- package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +0 -4
- package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +0 -94
- package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +0 -50
- package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +0 -105
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +0 -147
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +0 -79
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +0 -56
- package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +0 -51
- package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +0 -55
- package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +0 -78
- package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +0 -84
- package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +0 -120
- package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +0 -4
- package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +0 -238
- package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +0 -59
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -61
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +0 -110
- package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
- package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
- package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
- package/resources/js3d/context/skills/version-update/SKILL.md +0 -191
- package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
- package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
- package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
- package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js3d/context/version/version.json +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -30
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +0 -39
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -7
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +0 -26
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +0 -351
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
- package/resources/js3d/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js3d/project/vendor/core-manager-three/package.json +0 -12
- package/resources/js3d/project/vendor/core-manager-three/src/index.ts +0 -2
- package/resources/js3d/project/vendor/run.sh +0 -4
- package/resources/js3d/project/version/craft_feature_version.json +0 -42
- package/resources/js3d/project/version/project_feature_version.json +0 -11
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts +0 -7
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js +0 -145
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js.map +0 -1
- /package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
- /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
- /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +0 -0
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Optional DOM adapter for WidgetLayout source files. The five single-options factories
|
|
3
|
-
* match the editor's named mocks. No context, document or event loop is created on import.
|
|
4
|
-
*/
|
|
5
|
-
export const UI_LAYER = Object.freeze({ BACKGROUND: 0, HUD: 100, PANEL: 300, SCRIM: 600, MODAL: 650, TOAST: 900 });
|
|
6
|
-
|
|
7
|
-
// Metadata belongs to individual nodes; there is no global current UI context.
|
|
8
|
-
const nodes = new WeakMap();
|
|
9
|
-
const stages = new WeakMap();
|
|
10
|
-
|
|
11
|
-
// Low-priority layer lets existing owner CSS keep its appearance even when it loaded first.
|
|
12
|
-
const BASE_CSS = `
|
|
13
|
-
@layer lightgame-editor-base {
|
|
14
|
-
.ui-editor-context{--ui-primary:#437eae;--ui-primary-strong:#285a83;--ui-accent:#ebc778;--ui-danger:#bc5660;--ui-success:#59a88d;--ui-text:#eef5fb;--ui-text-dim:#aebdcc;--ui-text-dark:#132538;--ui-panel-bg:rgba(18,34,52,.92);--ui-panel-border:rgba(196,221,245,.24);--ui-scrim:rgba(0,0,0,.5);--ui-font-xl:64px;--ui-font-lg:44px;--ui-font-md:32px;--ui-font-sm:24px;--ui-gap-xs:8px;--ui-gap-sm:16px;--ui-gap-md:28px;--ui-gap-lg:48px;--ui-radius-sm:8px;--ui-radius-md:16px;--ui-radius-lg:28px;--ui-font-family:system-ui,sans-serif;--ui-page-margin:28px;color:var(--ui-text);font-family:var(--ui-font-family)}
|
|
15
|
-
:where(.ui-editor-context) .ui-node{box-sizing:border-box;pointer-events:none}
|
|
16
|
-
:where(.ui-editor-context) .ui-interactive{pointer-events:auto}
|
|
17
|
-
:where(.ui-editor-context) .ui-hidden{display:none!important}
|
|
18
|
-
:where(.ui-editor-context) .ui-row{display:flex;flex-direction:row;gap:var(--ui-gap-sm)}
|
|
19
|
-
:where(.ui-editor-context) .ui-col{display:flex;flex-direction:column;gap:var(--ui-gap-sm)}
|
|
20
|
-
:where(.ui-editor-context) .ui-center{align-items:center;justify-content:center}
|
|
21
|
-
:where(.ui-editor-context) .ui-between{justify-content:space-between}
|
|
22
|
-
:where(.ui-editor-context) .ui-grow{flex:1;min-width:0;min-height:0}
|
|
23
|
-
:where(.ui-editor-context) .ui-grid{display:grid;gap:var(--ui-gap-sm)}
|
|
24
|
-
:where(.ui-editor-context) .ui-clip{overflow:hidden}
|
|
25
|
-
:where(.ui-editor-context) .ui-scroll{overflow:auto;overscroll-behavior:contain}
|
|
26
|
-
:where(.ui-editor-context) .ui-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
27
|
-
:where(.ui-editor-context) .ui-panel{background:var(--ui-panel-bg);border:1px solid var(--ui-panel-border);border-radius:var(--ui-radius-md);padding:var(--ui-gap-md)}
|
|
28
|
-
:where(.ui-editor-context) .ui-page{position:absolute;inset:var(--ui-page-margin)}
|
|
29
|
-
:where(.ui-editor-context) .ui-modal{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
|
|
30
|
-
:where(.ui-editor-context) .ui-scrim{background:var(--ui-scrim)}
|
|
31
|
-
:where(.ui-editor-context) .ui-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-gap-xs);padding:var(--ui-gap-sm) var(--ui-gap-md);border:1px solid var(--ui-panel-border);border-radius:var(--ui-radius-sm);background:var(--ui-primary);color:var(--ui-text);font:inherit;cursor:pointer}
|
|
32
|
-
:where(.ui-editor-context) .ui-btn:active:not(:disabled){filter:brightness(.88)}
|
|
33
|
-
:where(.ui-editor-context) .ui-btn:disabled{opacity:.5;cursor:default}
|
|
34
|
-
:where(.ui-editor-context) .ui-btn:focus-visible{outline:3px solid var(--ui-accent);outline-offset:3px}
|
|
35
|
-
:where(.ui-editor-context) .ui-btn--accent{background:var(--ui-accent);color:var(--ui-text-dark)}
|
|
36
|
-
:where(.ui-editor-context) .ui-btn--danger{background:var(--ui-danger)}
|
|
37
|
-
:where(.ui-editor-context) .ui-btn--ghost{background:transparent}
|
|
38
|
-
:where(.ui-editor-context) .ui-btn-close{width:80px;height:80px;border-radius:50%;padding:0}
|
|
39
|
-
:where(.ui-editor-context) .ui-btn__icon{display:inline-block;width:1em;height:1em;flex:none;background-position:center;background-repeat:no-repeat;background-size:contain}
|
|
40
|
-
:where(.ui-editor-context) .ui-title{font-size:var(--ui-font-xl);font-weight:700}
|
|
41
|
-
:where(.ui-editor-context) .ui-subtitle{font-size:var(--ui-font-lg)}
|
|
42
|
-
:where(.ui-editor-context) .ui-small{font-size:var(--ui-font-sm)}
|
|
43
|
-
:where(.ui-editor-context) .ui-num{font-variant-numeric:tabular-nums}
|
|
44
|
-
:where(.ui-editor-context) .ui-bar{position:relative;overflow:hidden;background:var(--ui-panel-bg);border-radius:var(--ui-radius-sm)}
|
|
45
|
-
:where(.ui-editor-context) .ui-bar__fill{height:100%;width:100%;background:var(--ui-primary);transform-origin:left center}
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
function documentFor(options) {
|
|
50
|
-
const document = options.parent?.ownerDocument ?? globalThis.document;
|
|
51
|
-
if (!document?.createElement) throw new Error('DOM UI factories require a browser document or a parent with ownerDocument');
|
|
52
|
-
return document;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function validLayer(layer) {
|
|
56
|
-
if (!Number.isFinite(layer)) throw new TypeError('UI layer must be a finite number');
|
|
57
|
-
return layer;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function addClasses(element, value) {
|
|
61
|
-
for (const name of String(value ?? '').split(/\s+/)) if (name) element.classList.add(name);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** Only explicit rect changes positioning; flex/grid children remain in normal flow. */
|
|
65
|
-
export function setRect(element, { x, y, width, height }) {
|
|
66
|
-
if (![x, y, width, height].every(Number.isFinite) || width < 0 || height < 0) throw new RangeError('UI rect requires finite coordinates and nonnegative dimensions');
|
|
67
|
-
Object.assign(element.style, { position: 'absolute', left: `${x}px`, top: `${y}px`, width: `${width}px`, height: `${height}px` });
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function applyOptions(element, options) {
|
|
71
|
-
const layer = options.parent ? undefined : validLayer(options.layer ?? UI_LAYER.HUD);
|
|
72
|
-
element.classList.add('ui-node'); addClasses(element, options.className);
|
|
73
|
-
if (options.interactive) element.classList.add('ui-interactive');
|
|
74
|
-
if (options.hidden) element.classList.add('ui-hidden');
|
|
75
|
-
if (options.rect) setRect(element, options.rect);
|
|
76
|
-
nodes.set(element, { layer, cleanups: [], owner: null });
|
|
77
|
-
options.parent?.appendChild(element);
|
|
78
|
-
return element;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function listen(element, type, listener, options) {
|
|
82
|
-
element.addEventListener(type, listener, options);
|
|
83
|
-
nodes.get(element).cleanups.push(() => element.removeEventListener(type, listener, options));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function contextScale(element) {
|
|
87
|
-
for (let parent = element; parent; parent = parent.parentNode) {
|
|
88
|
-
const state = stages.get(parent);
|
|
89
|
-
if (state) return state.scale;
|
|
90
|
-
}
|
|
91
|
-
return 1;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/** Layer-only nodes remain detached until createUiContext(...).mount(refs). Parent takes priority. */
|
|
95
|
-
export function createPanel(options = {}) {
|
|
96
|
-
return applyOptions(documentFor(options).createElement('div'), options);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export function createText(options = {}) {
|
|
100
|
-
const element = documentFor(options).createElement('div');
|
|
101
|
-
if (options.text !== undefined) element.textContent = options.text;
|
|
102
|
-
return applyOptions(element, options);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function applyImage(element, url, fit, slice) {
|
|
106
|
-
if (!['contain', 'cover', 'stretch', 'nine-slice'].includes(fit)) throw new TypeError(`Unknown UI image fit '${fit}'`);
|
|
107
|
-
if (!url) return;
|
|
108
|
-
const source = `url(${JSON.stringify(String(url))})`;
|
|
109
|
-
if (fit === 'nine-slice' && slice) {
|
|
110
|
-
const edges = [slice.top, slice.right, slice.bottom, slice.left];
|
|
111
|
-
if (!edges.every(value => Number.isFinite(value) && value >= 0)) throw new RangeError('Nine-slice borders must be finite and nonnegative');
|
|
112
|
-
const border = edges.map(value => `${value}px`).join(' ');
|
|
113
|
-
Object.assign(element.style, { borderImageSource: source, borderImageSlice: `${edges.join(' ')} fill`, borderImageWidth: border, borderImageRepeat: 'stretch', borderStyle: 'solid', borderColor: 'transparent', borderWidth: border, boxSizing: 'border-box' });
|
|
114
|
-
} else {
|
|
115
|
-
Object.assign(element.style, { backgroundImage: source, backgroundRepeat: 'no-repeat', backgroundPosition: 'center', backgroundSize: fit === 'contain' || fit === 'cover' ? fit : '100% 100%' });
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/** Images are DIVs backed by CSS background-image/border-image, matching editor factories. */
|
|
120
|
-
export function createImage(options = {}) {
|
|
121
|
-
const element = documentFor(options).createElement('div');
|
|
122
|
-
applyImage(element, options.src, options.fit ?? 'contain', options.slice);
|
|
123
|
-
return applyOptions(element, options);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/** Native click stays available to Logic listeners; a capture guard suppresses dragged pointer clicks. */
|
|
127
|
-
export function createButton(options = {}) {
|
|
128
|
-
const document = documentFor(options), element = document.createElement('button');
|
|
129
|
-
element.type = 'button'; element.disabled = Boolean(options.disabled);
|
|
130
|
-
applyImage(element, options.background, options.backgroundFit ?? 'nine-slice', options.backgroundSlice);
|
|
131
|
-
if (options.icon) {
|
|
132
|
-
const icon = document.createElement('span'); icon.className = 'ui-btn__icon';
|
|
133
|
-
applyImage(icon, options.icon, 'contain'); element.appendChild(icon);
|
|
134
|
-
}
|
|
135
|
-
if (options.label !== undefined) {
|
|
136
|
-
const label = document.createElement('span'); label.className = 'ui-btn__label'; label.textContent = options.label; element.appendChild(label);
|
|
137
|
-
}
|
|
138
|
-
applyOptions(element, { ...options, interactive: true });
|
|
139
|
-
const pointers = new Map(); let suppressed = false;
|
|
140
|
-
const down = event => { suppressed = false; pointers.set(event.pointerId, { x: event.clientX, y: event.clientY, moved: false }); };
|
|
141
|
-
const move = event => {
|
|
142
|
-
const point = pointers.get(event.pointerId);
|
|
143
|
-
if (point && Math.hypot(event.clientX - point.x, event.clientY - point.y) > 20 * contextScale(element)) point.moved = true;
|
|
144
|
-
};
|
|
145
|
-
const up = event => { move(event); const point = pointers.get(event.pointerId); suppressed = Boolean(point?.moved); pointers.delete(event.pointerId); };
|
|
146
|
-
const cancel = event => { pointers.delete(event.pointerId); suppressed = true; };
|
|
147
|
-
const click = event => {
|
|
148
|
-
if (element.disabled || (event.detail !== 0 && suppressed)) { suppressed = false; event.preventDefault(); event.stopImmediatePropagation(); return; }
|
|
149
|
-
suppressed = false;
|
|
150
|
-
};
|
|
151
|
-
listen(element, 'pointerdown', down); listen(element, 'pointermove', move); listen(element, 'pointerup', up); listen(element, 'pointercancel', cancel);
|
|
152
|
-
listen(element, 'click', click, true);
|
|
153
|
-
if (options.onClick) listen(element, 'click', options.onClick);
|
|
154
|
-
nodes.get(element).cleanups.push(() => pointers.clear());
|
|
155
|
-
return element;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/** Separate SCRIM-layer root, initially hidden. Include it in Refs and show/hide it with the modal root. */
|
|
159
|
-
export function createScrim(options = {}) {
|
|
160
|
-
const element = createPanel({ ...options, layer: options.layer ?? UI_LAYER.SCRIM, className: `ui-scrim ${options.className ?? ''}`, interactive: true, hidden: options.hidden ?? true });
|
|
161
|
-
if (!options.rect) Object.assign(element.style, { position: 'absolute', left: '0', top: '0', width: '100%', height: '100%' });
|
|
162
|
-
if (options.onClick) listen(element, 'click', options.onClick);
|
|
163
|
-
return element;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/** Preserves the element's flex/grid display declaration. */
|
|
167
|
-
export function setVisible(element, visible) {
|
|
168
|
-
if (visible) element.classList.remove('ui-hidden'); else element.classList.add('ui-hidden');
|
|
169
|
-
}
|
|
170
|
-
export function isVisible(element) { return !element.classList.contains('ui-hidden'); }
|
|
171
|
-
|
|
172
|
-
/** Removes this subtree and its factory-owned listeners; Logic still owns its own listeners/timers. */
|
|
173
|
-
export function destroy(element) {
|
|
174
|
-
const clean = node => {
|
|
175
|
-
for (const child of [...(node.children ?? [])]) clean(child);
|
|
176
|
-
const state = nodes.get(node);
|
|
177
|
-
if (state) { for (const cleanup of state.cleanups) cleanup(); nodes.delete(node); }
|
|
178
|
-
};
|
|
179
|
-
clean(element); element.remove();
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function collectFactoryNodes(refs) {
|
|
183
|
-
const found = new Set(), visited = new Set();
|
|
184
|
-
const visit = value => {
|
|
185
|
-
if (!value || typeof value !== 'object' || visited.has(value)) return;
|
|
186
|
-
visited.add(value);
|
|
187
|
-
if (nodes.has(value)) { found.add(value); return; }
|
|
188
|
-
// Do not traverse arbitrary native DOM internals or application class instances.
|
|
189
|
-
if (value.nodeType !== undefined) return;
|
|
190
|
-
if (Array.isArray(value)) { value.forEach(visit); return; }
|
|
191
|
-
const prototype = Object.getPrototypeOf(value);
|
|
192
|
-
if (prototype === Object.prototype || prototype === null) Object.values(value).forEach(visit);
|
|
193
|
-
};
|
|
194
|
-
visit(refs); return found;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Explicitly owns a DOM stage. container must establish a CSS containing block
|
|
199
|
-
* (usually position: relative). Call resize yourself; this helper starts no observer or loop.
|
|
200
|
-
*/
|
|
201
|
-
export function createUiContext(container, { width, height, zIndex = 10 } = {}) {
|
|
202
|
-
if (![width, height].every(value => Number.isFinite(value) && value > 0)) throw new RangeError('UI design width and height must be finite and positive');
|
|
203
|
-
if (!container?.ownerDocument?.createElement) throw new TypeError('createUiContext requires a DOM container');
|
|
204
|
-
const document = container.ownerDocument, root = document.createElement('div'), stage = document.createElement('div'), style = document.createElement('style');
|
|
205
|
-
root.className = 'ui-editor-context';
|
|
206
|
-
Object.assign(root.style, { position: 'absolute', left: '0', top: '0', width: '100%', height: '100%', pointerEvents: 'none', overflow: 'hidden', zIndex: String(zIndex) });
|
|
207
|
-
Object.assign(stage.style, { position: 'absolute', left: '50%', top: '50%', width: `${width}px`, height: `${height}px`, transformOrigin: 'center center', pointerEvents: 'none', overflow: 'hidden' });
|
|
208
|
-
style.textContent = BASE_CSS; root.appendChild(style); root.appendChild(stage); container.appendChild(root);
|
|
209
|
-
const state = { scale: 1 }, layers = new Map(), mounts = new Set();
|
|
210
|
-
stages.set(stage, state);
|
|
211
|
-
let disposed = false;
|
|
212
|
-
const requireLive = () => { if (disposed) throw new Error('UI context is disposed'); };
|
|
213
|
-
function getLayer(layer) {
|
|
214
|
-
requireLive(); validLayer(layer);
|
|
215
|
-
let element = layers.get(layer);
|
|
216
|
-
if (!element) {
|
|
217
|
-
element = document.createElement('div'); element.className = 'ui-layer'; element.dataset.layer = String(layer);
|
|
218
|
-
Object.assign(element.style, { position: 'absolute', left: '0', top: '0', width: '100%', height: '100%', pointerEvents: 'none', zIndex: String(layer) });
|
|
219
|
-
stage.appendChild(element); layers.set(layer, element);
|
|
220
|
-
}
|
|
221
|
-
return element;
|
|
222
|
-
}
|
|
223
|
-
for (const layer of Object.values(UI_LAYER)) getLayer(layer);
|
|
224
|
-
function resize(cssWidth = container.clientWidth, cssHeight = container.clientHeight) {
|
|
225
|
-
requireLive();
|
|
226
|
-
if (![cssWidth, cssHeight].every(value => Number.isFinite(value) && value >= 0)) throw new RangeError('UI container dimensions must be finite and nonnegative');
|
|
227
|
-
state.scale = Math.min(cssWidth / width, cssHeight / height);
|
|
228
|
-
stage.style.transform = `translate(-50%, -50%) scale(${state.scale})`;
|
|
229
|
-
}
|
|
230
|
-
resize();
|
|
231
|
-
function mount(refs) {
|
|
232
|
-
requireLive();
|
|
233
|
-
const candidates = collectFactoryNodes(refs), roots = new Set();
|
|
234
|
-
if (!candidates.size) throw new TypeError('mount requires Layout Refs containing factory-created nodes');
|
|
235
|
-
for (const node of candidates) {
|
|
236
|
-
let ancestor = node;
|
|
237
|
-
while (ancestor.parentNode && nodes.has(ancestor.parentNode)) ancestor = ancestor.parentNode;
|
|
238
|
-
if (nodes.get(ancestor)?.owner || ancestor.parentNode) throw new Error('Layout root is already mounted or attached; create a fresh Layout or use its existing mount');
|
|
239
|
-
if (ancestor.ownerDocument !== document) throw new Error('Layout and UI context must use the same document');
|
|
240
|
-
roots.add(ancestor);
|
|
241
|
-
}
|
|
242
|
-
let released = false;
|
|
243
|
-
const handle = {
|
|
244
|
-
refs,
|
|
245
|
-
dispose() {
|
|
246
|
-
if (released) return; released = true;
|
|
247
|
-
for (const element of roots) destroy(element);
|
|
248
|
-
roots.clear(); mounts.delete(handle);
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
for (const element of roots) { const metadata = nodes.get(element); getLayer(metadata.layer ?? UI_LAYER.HUD).appendChild(element); metadata.owner = handle; }
|
|
252
|
-
mounts.add(handle); return handle;
|
|
253
|
-
}
|
|
254
|
-
return {
|
|
255
|
-
root, stage, getLayer, mount, resize,
|
|
256
|
-
get scale() { return state.scale; },
|
|
257
|
-
getDesignSize: () => ({ width, height }),
|
|
258
|
-
dispose() {
|
|
259
|
-
if (disposed) return;
|
|
260
|
-
for (const handle of [...mounts]) handle.dispose();
|
|
261
|
-
for (const layer of layers.values()) for (const element of [...layer.children]) destroy(element);
|
|
262
|
-
disposed = true; stages.delete(stage); layers.clear(); root.remove();
|
|
263
|
-
},
|
|
264
|
-
};
|
|
265
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# UI 编辑适配契约
|
|
2
|
-
|
|
3
|
-
本参考依据仓库历史 `5b0b1f99^` 的 `ui-editor-compat` 契约,以及本包的独立 DOM 运行时和检查器。检查器复现已知的解析与回写行为;它不是线上 UI 编辑器源码的副本。
|
|
4
|
-
|
|
5
|
-
## 文件与入口
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
src/ui/DomUiKit.ts # install 创建的真实转导出模块
|
|
9
|
-
src/ui/hud/
|
|
10
|
-
WidgetLayout_Hud.ts
|
|
11
|
-
WidgetLogic_Hud.ts
|
|
12
|
-
hud.css
|
|
13
|
-
runtime/ui-editor/1.0.0/
|
|
14
|
-
dom-ui.mjs
|
|
15
|
-
dom-ui.d.mts
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Layout 文件保留以下结构:
|
|
19
|
-
|
|
20
|
-
- `// SURFACE_MODE: fullscreen`、`overlay` 或 `modal`,按实际面板表现选择。
|
|
21
|
-
- 导入同目录 owner CSS,例如 `import './hud.css'`。
|
|
22
|
-
- 导出 `<Name>Refs` 接口,包含 `root` 及 Logic 使用的交互/数据节点。
|
|
23
|
-
- 唯一的 `export function create<Name>Layout()` 入口,返回 Refs。示例采用零参数入口,便于独立执行;不在模块顶层创建节点。
|
|
24
|
-
- 工厂保留直接导入的标识符,不改名、不包装成命名空间调用。每次调用只传一个对象字面量。
|
|
25
|
-
|
|
26
|
-
来自 `src/ui/hud/` 的 Layout 工厂导入必须是 `from '../DomUiKit'`(不加 `.ts`);更深目录按实际位置调整相对路径。`install` 创建 `src/ui/DomUiKit.ts`,内容为:
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
export * from '../../runtime/ui-editor/1.0.0/dom-ui.mjs';
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
当前发布版 UIEditor_0.0.1 在节点解析之前按 import 来源筛选 Layout,直接导入 `dom-ui.mjs` 会被跳过,导致文件存在且 mock 检查有节点却导入零界面。桥接模块既符合该筛选规则,也让 TypeScript/Vite 实际解析到同一个固定 runtime。检查器验证真实 import AST 指向此桥接模块、桥接转导出内容以及发布版可识别的语法;仅写假注释、加 `.ts` 后缀、指向同名但不同位置的文件均不通过。
|
|
33
|
-
|
|
34
|
-
Logic 不受 Layout 导入筛选约束,可以继续使用 `../../../runtime/ui-editor/1.0.0/dom-ui.mjs`。旧工程重新执行 `install` 补桥接,再调整 Layout 导入;安装保留并拒绝覆盖有冲突的已有文件。
|
|
35
|
-
|
|
36
|
-
## 五个节点工厂
|
|
37
|
-
|
|
38
|
-
| 工厂 | 返回值 | 专用选项 |
|
|
39
|
-
|---|---|---|
|
|
40
|
-
| `createPanel({ ... })` | `HTMLDivElement` | 通用选项 |
|
|
41
|
-
| `createText({ text: '分数', ... })` | `HTMLDivElement` | `text` |
|
|
42
|
-
| `createImage({ src: '', ... })` | `HTMLDivElement` | `src`、`fit`、`slice` |
|
|
43
|
-
| `createButton({ label: '暂停', ... })` | `HTMLButtonElement` | `label`、`background`、`backgroundFit`、`backgroundSlice`、`icon`、`disabled` |
|
|
44
|
-
| `createScrim({ ... })` | `HTMLDivElement` | 通用选项 |
|
|
45
|
-
|
|
46
|
-
通用选项为 `parent`、`layer`、`rect`、`className`、`interactive`、`hidden`。工厂返回原生 DOM,可以通过 Refs 使用 `textContent`、`disabled`、`addEventListener` 等浏览器 API;这些业务操作放在 Logic。
|
|
47
|
-
|
|
48
|
-
工厂运行时支持的所有参数及类型以安装目录的 `dom-ui.d.mts` 为准。即使某参数在运行时可用,也不代表其任意表达式能被编辑器回写。尤其不要在 Layout 的 `onClick` 参数中绑定业务。
|
|
49
|
-
|
|
50
|
-
图片节点是 `div`,使用 CSS 背景/九宫格方式显示图片,不是 `img`;不要向它写 `.src` 或依赖 `img` 选择器。动态资源更新放在 Logic,并使用与工厂渲染方式一致的 DOM/CSS 属性。文本也不是 `span`、`p`。转换前后应检查 owner CSS 中的标签选择器,必要时给节点增加类并更新 CSS。
|
|
51
|
-
|
|
52
|
-
## 可解析与可编辑
|
|
53
|
-
|
|
54
|
-
```ts
|
|
55
|
-
const title = createText({
|
|
56
|
-
parent: root,
|
|
57
|
-
text: '游戏状态',
|
|
58
|
-
className: 'hud-title',
|
|
59
|
-
});
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
`text`、`label`、`className` 必须直接写在工厂对象里,值为字符串字面量。变量、模板字符串、对象展开和参数转发可能在浏览器正常显示,却无法定位回写。因此同结构、不同静态文案的控件应显式展开工厂调用。
|
|
63
|
-
|
|
64
|
-
当前检查器还要求其他工厂选项使用内联字符串、数字、布尔值或字面量对象,图片 `src` 也必须是字符串字面量;`parent` 节点引用和 `layer: UI_LAYER.X` 是专门支持的例外。这是本包可验证的范围,不代表线上编辑器所有能力的上限。
|
|
65
|
-
|
|
66
|
-
Layout 仅建立静态结构:
|
|
67
|
-
|
|
68
|
-
- 子节点通过 `parent: 已创建的父节点` 建树;无 parent 的工厂节点是根。Refs 帮助 Logic 稳定取节点,不用 `querySelector` 反查编辑器可能改名的 class。
|
|
69
|
-
- 不使用 `document.createElement`、`append`、事件绑定、业务单例、异步加载或条件/循环创建静态树。检查器不应执行业务依赖来建立树。
|
|
70
|
-
- 随业务数据变化的列表、运行状态及更新放在 Logic。它们可以继续使用 DOM,但不会因此成为编辑器可视化编辑的静态节点。交付时说明范围,不能把应当可编辑的固定控件移到 Logic 以掩盖检查失败。
|
|
71
|
-
- 颜色、字号、间距等视觉样式放 owner CSS;保留原来样式和交互节点对应关系。因工厂改变元素标签而导致样式丢失,类型检查无法发现。
|
|
72
|
-
|
|
73
|
-
Layout 不要依赖旧 `CoreManager`、`UIManager`、`DomUiPanel` 或全局 `getLayer()`。已有项目若使用这些接口,应保留调用方需要的公开形状并在 Logic 中适配,不假设新运行时会提供旧管理器。
|
|
74
|
-
|
|
75
|
-
## 挂载、缩放与销毁
|
|
76
|
-
|
|
77
|
-
编辑器依赖工厂布局契约,不要求创建运行时 context。保留原 UI 的布局模型:原本按 CSS 像素定位的面板,可以在 Logic 中把工厂根节点直接挂到原宿主,不要强套设计尺寸的 contain 缩放。
|
|
78
|
-
|
|
79
|
-
直接挂载不会注入 context 的基础样式,因此沿用原有 `hidden` 属性和 owner CSS 显隐规则;`setVisible()` 仅切换 `.ui-hidden` 类,脱离 context 使用时需要配套 CSS。卸载时先清理 Logic 的事件、订阅等,再调用 `destroy(root)` 释放工厂监听并移除节点,不能只调用 `remove()`。
|
|
80
|
-
|
|
81
|
-
`createUiContext(container, { width, height })` 显式创建 UI 容器,`width/height` 是设计尺寸。`ui.mount(refs)` 收集 Refs 中无 parent 的工厂根节点并挂到对应层;子节点保持原有 parent。`UI_LAYER` 提供 `BACKGROUND/HUD/PANEL/SCRIM/MODAL/TOAST` 常量。
|
|
82
|
-
|
|
83
|
-
UI 按设计尺寸 contain 缩放并居中。宿主应是定位容器,通常 `position: relative`;业务通过现有布局机制或 `ResizeObserver` 在尺寸变化时调用 `ui.resize()`。运行时不拥有游戏循环,也不自动观察容器尺寸。
|
|
84
|
-
|
|
85
|
-
使用一个已存在的共享 context 时,只销毁自己的 mount handle;由创建共享 context 的上层负责 `ui.dispose()`。示例面板独占 context,因此会同时清理挂载、观察者和 context。Logic 的事件、订阅、计时器、输入和其他业务资源也须清理,HMR/场景切换不应留下重复 UI 或事件。
|
|
86
|
-
|
|
87
|
-
需要把 HUD 纳入已有截图链路时,保留 `connectPreview` 的原配置,并按项目 DOM 结构设置其 `uiRoot`。这是独立 UI 运行时与现有平台桥接的显式连接,不要为了适配编辑器改写 `runtime/lightgame/`。
|
|
88
|
-
|
|
89
|
-
## 验证和标记
|
|
90
|
-
|
|
91
|
-
| 检查层 | 操作 | 能证明什么 |
|
|
92
|
-
|---|---|---|
|
|
93
|
-
| 导入前置 | `ui-editor.mjs check --project <root>` | 桥接内容、工厂 import 路径与 UIEditor_0.0.1 的来源筛选兼容 |
|
|
94
|
-
| 已知契约 | `ui-editor.mjs check --project <root>` | 文件结构、静态工厂调用、mock 节点树、可编辑字面量的内存回写及再解析符合检查器实现 |
|
|
95
|
-
| 游戏工程 | 项目类型检查、构建 | 实际 TypeScript、导入和构建可通过 |
|
|
96
|
-
| 浏览器行为 | 启动游戏,比较画面、操作并销毁/重建 | 转换后的实际 DOM、CSS、事件和生命周期仍能工作 |
|
|
97
|
-
| 实际编辑器 | 导入、Inspector 修改、保存源码、重载游戏 | 当前线上编辑器能够处理并回写该面板 |
|
|
98
|
-
|
|
99
|
-
导入前置、已知契约、游戏工程和浏览器行为检查通过后才执行 `mark`。实际编辑器验证在平台可访问时执行;暂不可访问则单独列为待验项。不能把浏览器行为替换为 mock,也不能把实际编辑器验证替换为内存字符串改写。
|
|
100
|
-
|
|
101
|
-
浏览器至少覆盖本次变动的可观察行为:
|
|
102
|
-
|
|
103
|
-
1. 初始画面与转换前一致;检查标签变化后的字体、排版、图片和层级。
|
|
104
|
-
2. 数据更新实际落到 Refs 节点;按钮只触发一次;原先的输入穿透和遮挡行为不变。
|
|
105
|
-
3. 面板隐藏/显示、尺寸变化及必要的滚动正常。
|
|
106
|
-
4. 销毁后节点和监听器消失,重新创建无重复 UI/重复事件;已接平台截图的面板检查 HUD 仍可被截入。
|
|
107
|
-
|
|
108
|
-
实际编辑器验证时,选择一个静态标题或按钮文案,以及一项 owner CSS 样式进行修改。确认保存真正改变对应源码,重新打开编辑器仍能解析,重载游戏呈现新值且原交互继续工作。动态分数被 Logic 更新是正常行为,不用它判断静态文案回写是否成功。
|
|
109
|
-
|
|
110
|
-
`mark` 会再次检查代码,成功后合并 `SPEC/plan/dev-config.json` 的 `ui_editor_compat: true` 和 `ui_editor_adapter: { root: 'runtime/ui-editor/1.0.0' }`,保留其他配置字段,并把 `uieditor` 的版本写入 `version/project_feature_version.json`。版本取自 `version/craft_feature_version.json`,由开发者手动维护;该清单不合法或缺少 `uieditor` 时,`mark` 在写标记前报错,工程没有该清单时跳过版本回写。它不运行浏览器,也不验证远端编辑器;已有标记更不代表后续所有改动都仍兼容。适配后的 Layout 改动需按实际影响重新验证。
|