@nodetool-ai/protocol 0.7.0-rc.23 → 0.8.2
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 +56 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/ai-video-production.d.ts +276 -0
- package/dist/ai-video-production.d.ts.map +1 -0
- package/dist/ai-video-production.js +131 -0
- package/dist/ai-video-production.js.map +1 -0
- package/dist/api-schemas/agent-access.d.ts +134 -0
- package/dist/api-schemas/agent-access.d.ts.map +1 -0
- package/dist/api-schemas/agent-access.js +93 -0
- package/dist/api-schemas/agent-access.js.map +1 -0
- package/dist/api-schemas/api-error-code.d.ts +11 -1
- package/dist/api-schemas/api-error-code.d.ts.map +1 -1
- package/dist/api-schemas/api-error-code.js +10 -0
- package/dist/api-schemas/api-error-code.js.map +1 -1
- package/dist/api-schemas/app-runs.d.ts +1410 -0
- package/dist/api-schemas/app-runs.d.ts.map +1 -0
- package/dist/api-schemas/app-runs.js +105 -0
- package/dist/api-schemas/app-runs.js.map +1 -0
- package/dist/api-schemas/applications.d.ts +3216 -0
- package/dist/api-schemas/applications.d.ts.map +1 -0
- package/dist/api-schemas/applications.js +487 -0
- package/dist/api-schemas/applications.js.map +1 -0
- package/dist/api-schemas/assets.d.ts +239 -0
- package/dist/api-schemas/assets.d.ts.map +1 -1
- package/dist/api-schemas/assets.js +136 -5
- package/dist/api-schemas/assets.js.map +1 -1
- package/dist/api-schemas/bug-reports.d.ts +38 -0
- package/dist/api-schemas/bug-reports.d.ts.map +1 -0
- package/dist/api-schemas/bug-reports.js +34 -0
- package/dist/api-schemas/bug-reports.js.map +1 -0
- package/dist/api-schemas/code-gen.d.ts +176 -0
- package/dist/api-schemas/code-gen.d.ts.map +1 -0
- package/dist/api-schemas/code-gen.js +205 -0
- package/dist/api-schemas/code-gen.js.map +1 -0
- package/dist/api-schemas/collections.d.ts.map +1 -1
- package/dist/api-schemas/collections.js +3 -4
- package/dist/api-schemas/collections.js.map +1 -1
- package/dist/api-schemas/costs.d.ts +179 -0
- package/dist/api-schemas/costs.d.ts.map +1 -1
- package/dist/api-schemas/costs.js +100 -4
- package/dist/api-schemas/costs.js.map +1 -1
- package/dist/api-schemas/credits.d.ts +42 -0
- package/dist/api-schemas/credits.d.ts.map +1 -0
- package/dist/api-schemas/credits.js +43 -0
- package/dist/api-schemas/credits.js.map +1 -0
- package/dist/api-schemas/documents.d.ts +163 -0
- package/dist/api-schemas/documents.d.ts.map +1 -0
- package/dist/api-schemas/documents.js +75 -0
- package/dist/api-schemas/documents.js.map +1 -0
- package/dist/api-schemas/error-traces.d.ts +249 -0
- package/dist/api-schemas/error-traces.d.ts.map +1 -0
- package/dist/api-schemas/error-traces.js +112 -0
- package/dist/api-schemas/error-traces.js.map +1 -0
- package/dist/api-schemas/files.d.ts +13 -0
- package/dist/api-schemas/files.d.ts.map +1 -1
- package/dist/api-schemas/files.js +8 -0
- package/dist/api-schemas/files.js.map +1 -1
- package/dist/api-schemas/fonts.d.ts +17 -1
- package/dist/api-schemas/fonts.d.ts.map +1 -1
- package/dist/api-schemas/fonts.js +19 -3
- package/dist/api-schemas/fonts.js.map +1 -1
- package/dist/api-schemas/index.d.ts +27 -1
- package/dist/api-schemas/index.d.ts.map +1 -1
- package/dist/api-schemas/index.js +27 -1
- package/dist/api-schemas/index.js.map +1 -1
- package/dist/api-schemas/jobs.d.ts +44 -0
- package/dist/api-schemas/jobs.d.ts.map +1 -1
- package/dist/api-schemas/jobs.js +26 -2
- package/dist/api-schemas/jobs.js.map +1 -1
- package/dist/api-schemas/js-scripts.d.ts +367 -0
- package/dist/api-schemas/js-scripts.d.ts.map +1 -0
- package/dist/api-schemas/js-scripts.js +341 -0
- package/dist/api-schemas/js-scripts.js.map +1 -0
- package/dist/api-schemas/mcp-config.d.ts +4 -1
- package/dist/api-schemas/mcp-config.d.ts.map +1 -1
- package/dist/api-schemas/mcp-config.js +10 -3
- package/dist/api-schemas/mcp-config.js.map +1 -1
- package/dist/api-schemas/memories.d.ts +84 -0
- package/dist/api-schemas/memories.d.ts.map +1 -0
- package/dist/api-schemas/memories.js +54 -0
- package/dist/api-schemas/memories.js.map +1 -0
- package/dist/api-schemas/messages.d.ts +1 -0
- package/dist/api-schemas/messages.d.ts.map +1 -1
- package/dist/api-schemas/messages.js +4 -4
- package/dist/api-schemas/messages.js.map +1 -1
- package/dist/api-schemas/models.d.ts +164 -0
- package/dist/api-schemas/models.d.ts.map +1 -1
- package/dist/api-schemas/models.js +53 -6
- package/dist/api-schemas/models.js.map +1 -1
- package/dist/api-schemas/nodes.d.ts +97 -0
- package/dist/api-schemas/nodes.d.ts.map +1 -1
- package/dist/api-schemas/nodes.js +89 -0
- package/dist/api-schemas/nodes.js.map +1 -1
- package/dist/api-schemas/projects.d.ts +427 -0
- package/dist/api-schemas/projects.d.ts.map +1 -0
- package/dist/api-schemas/projects.js +224 -0
- package/dist/api-schemas/projects.js.map +1 -0
- package/dist/api-schemas/recipes.d.ts +172 -0
- package/dist/api-schemas/recipes.d.ts.map +1 -0
- package/dist/api-schemas/recipes.js +144 -0
- package/dist/api-schemas/recipes.js.map +1 -0
- package/dist/api-schemas/resources.d.ts +112 -0
- package/dist/api-schemas/resources.d.ts.map +1 -0
- package/dist/api-schemas/resources.js +44 -0
- package/dist/api-schemas/resources.js.map +1 -0
- package/dist/api-schemas/runs.d.ts +6 -0
- package/dist/api-schemas/runs.d.ts.map +1 -0
- package/dist/api-schemas/runs.js +4 -0
- package/dist/api-schemas/runs.js.map +1 -0
- package/dist/api-schemas/scripts.d.ts +1571 -0
- package/dist/api-schemas/scripts.d.ts.map +1 -0
- package/dist/api-schemas/scripts.js +153 -0
- package/dist/api-schemas/scripts.js.map +1 -0
- package/dist/api-schemas/sdk-execution-v1.d.ts +468 -0
- package/dist/api-schemas/sdk-execution-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-execution-v1.js +115 -0
- package/dist/api-schemas/sdk-execution-v1.js.map +1 -0
- package/dist/api-schemas/sdk-lifecycle-v1.d.ts +217 -0
- package/dist/api-schemas/sdk-lifecycle-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-lifecycle-v1.js +117 -0
- package/dist/api-schemas/sdk-lifecycle-v1.js.map +1 -0
- package/dist/api-schemas/sdk-models-v1.d.ts +181 -0
- package/dist/api-schemas/sdk-models-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-models-v1.js +108 -0
- package/dist/api-schemas/sdk-models-v1.js.map +1 -0
- package/dist/api-schemas/sdk-v1-http-operations.d.ts +941 -0
- package/dist/api-schemas/sdk-v1-http-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-http-operations.js +465 -0
- package/dist/api-schemas/sdk-v1-http-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1-operations.d.ts +151 -0
- package/dist/api-schemas/sdk-v1-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-operations.js +97 -0
- package/dist/api-schemas/sdk-v1-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.d.ts +97 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.js +96 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1.d.ts +15 -0
- package/dist/api-schemas/sdk-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1.js +22 -0
- package/dist/api-schemas/sdk-v1.js.map +1 -0
- package/dist/api-schemas/segmentation.d.ts +75 -0
- package/dist/api-schemas/segmentation.d.ts.map +1 -0
- package/dist/api-schemas/segmentation.js +54 -0
- package/dist/api-schemas/segmentation.js.map +1 -0
- package/dist/api-schemas/settings.d.ts +162 -0
- package/dist/api-schemas/settings.d.ts.map +1 -1
- package/dist/api-schemas/settings.js +71 -0
- package/dist/api-schemas/settings.js.map +1 -1
- package/dist/api-schemas/sketch.d.ts +858 -0
- package/dist/api-schemas/sketch.d.ts.map +1 -0
- package/dist/api-schemas/sketch.js +546 -0
- package/dist/api-schemas/sketch.js.map +1 -0
- package/dist/api-schemas/skills.d.ts +27 -14
- package/dist/api-schemas/skills.d.ts.map +1 -1
- package/dist/api-schemas/skills.js +64 -11
- package/dist/api-schemas/skills.js.map +1 -1
- package/dist/api-schemas/storage.d.ts +8 -0
- package/dist/api-schemas/storage.d.ts.map +1 -1
- package/dist/api-schemas/storage.js +7 -0
- package/dist/api-schemas/storage.js.map +1 -1
- package/dist/api-schemas/storyboards.d.ts +8595 -0
- package/dist/api-schemas/storyboards.d.ts.map +1 -0
- package/dist/api-schemas/storyboards.js +524 -0
- package/dist/api-schemas/storyboards.js.map +1 -0
- package/dist/api-schemas/threads.d.ts +12 -4
- package/dist/api-schemas/threads.d.ts.map +1 -1
- package/dist/api-schemas/threads.js +12 -4
- package/dist/api-schemas/threads.js.map +1 -1
- package/dist/api-schemas/timeline-tool-contracts.d.ts +1687 -0
- package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -0
- package/dist/api-schemas/timeline-tool-contracts.js +725 -0
- package/dist/api-schemas/timeline-tool-contracts.js.map +1 -0
- package/dist/api-schemas/timeline-tool-params.d.ts +1270 -0
- package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -0
- package/dist/api-schemas/timeline-tool-params.js +1529 -0
- package/dist/api-schemas/timeline-tool-params.js.map +1 -0
- package/dist/api-schemas/timeline.d.ts +13740 -0
- package/dist/api-schemas/timeline.d.ts.map +1 -0
- package/dist/api-schemas/timeline.js +1928 -0
- package/dist/api-schemas/timeline.js.map +1 -0
- package/dist/api-schemas/ui-tool-contract.d.ts +35 -0
- package/dist/api-schemas/ui-tool-contract.d.ts.map +1 -0
- package/dist/api-schemas/ui-tool-contract.js +31 -0
- package/dist/api-schemas/ui-tool-contract.js.map +1 -0
- package/dist/api-schemas/workflows.d.ts +904 -18
- package/dist/api-schemas/workflows.d.ts.map +1 -1
- package/dist/api-schemas/workflows.js +507 -6
- package/dist/api-schemas/workflows.js.map +1 -1
- package/dist/api-schemas/workspace.d.ts +45 -0
- package/dist/api-schemas/workspace.d.ts.map +1 -1
- package/dist/api-schemas/workspace.js +47 -1
- package/dist/api-schemas/workspace.js.map +1 -1
- package/dist/api-types.d.ts +651 -27
- package/dist/api-types.d.ts.map +1 -1
- package/dist/api-types.js +252 -1
- package/dist/api-types.js.map +1 -1
- package/dist/app-deployment.d.ts +37 -0
- package/dist/app-deployment.d.ts.map +1 -0
- package/dist/app-deployment.js +42 -0
- package/dist/app-deployment.js.map +1 -0
- package/dist/asset-file-name.d.ts +15 -0
- package/dist/asset-file-name.d.ts.map +1 -0
- package/dist/asset-file-name.js +61 -0
- package/dist/asset-file-name.js.map +1 -0
- package/dist/asset-generation.d.ts +58 -0
- package/dist/asset-generation.d.ts.map +1 -0
- package/dist/asset-generation.js +147 -0
- package/dist/asset-generation.js.map +1 -0
- package/dist/blend-modes.d.ts +20 -0
- package/dist/blend-modes.d.ts.map +1 -0
- package/dist/blend-modes.js +33 -0
- package/dist/blend-modes.js.map +1 -0
- package/dist/bridge-frames.d.ts +654 -0
- package/dist/bridge-frames.d.ts.map +1 -0
- package/dist/bridge-frames.js +448 -0
- package/dist/bridge-frames.js.map +1 -0
- package/dist/bridge-frames.schema.json +862 -0
- package/dist/bridge-protocol.d.ts +57 -20
- package/dist/bridge-protocol.d.ts.map +1 -1
- package/dist/bridge-protocol.js +57 -20
- package/dist/bridge-protocol.js.map +1 -1
- package/dist/browser-run-traces.d.ts +102 -0
- package/dist/browser-run-traces.d.ts.map +1 -0
- package/dist/browser-run-traces.js +30 -0
- package/dist/browser-run-traces.js.map +1 -0
- package/dist/builtin-packs.d.ts +45 -0
- package/dist/builtin-packs.d.ts.map +1 -0
- package/dist/builtin-packs.js +121 -0
- package/dist/builtin-packs.js.map +1 -0
- package/dist/caption-word.d.ts +15 -0
- package/dist/caption-word.d.ts.map +1 -0
- package/dist/caption-word.js +10 -0
- package/dist/caption-word.js.map +1 -0
- package/dist/cloud-profile.d.ts +187 -0
- package/dist/cloud-profile.d.ts.map +1 -0
- package/dist/cloud-profile.js +286 -0
- package/dist/cloud-profile.js.map +1 -0
- package/dist/creative.d.ts +580 -0
- package/dist/creative.d.ts.map +1 -0
- package/dist/creative.js +274 -0
- package/dist/creative.js.map +1 -0
- package/dist/custom-providers.d.ts +70 -0
- package/dist/custom-providers.d.ts.map +1 -0
- package/dist/custom-providers.js +125 -0
- package/dist/custom-providers.js.map +1 -0
- package/dist/document-ops.d.ts +15 -0
- package/dist/document-ops.d.ts.map +1 -0
- package/dist/document-ops.js +2 -0
- package/dist/document-ops.js.map +1 -0
- package/dist/game-assets.d.ts +344 -0
- package/dist/game-assets.d.ts.map +1 -0
- package/dist/game-assets.js +297 -0
- package/dist/game-assets.js.map +1 -0
- package/dist/game-authoring.d.ts +113 -0
- package/dist/game-authoring.d.ts.map +1 -0
- package/dist/game-authoring.js +37 -0
- package/dist/game-authoring.js.map +1 -0
- package/dist/game-design.d.ts +90 -0
- package/dist/game-design.d.ts.map +1 -0
- package/dist/game-design.js +417 -0
- package/dist/game-design.js.map +1 -0
- package/dist/game-flow-prompt.d.ts +68 -0
- package/dist/game-flow-prompt.d.ts.map +1 -0
- package/dist/game-flow-prompt.js +121 -0
- package/dist/game-flow-prompt.js.map +1 -0
- package/dist/game-graph.d.ts +96 -0
- package/dist/game-graph.d.ts.map +1 -0
- package/dist/game-graph.js +481 -0
- package/dist/game-graph.js.map +1 -0
- package/dist/game-migration.d.ts +4 -0
- package/dist/game-migration.d.ts.map +1 -0
- package/dist/game-migration.js +6 -0
- package/dist/game-migration.js.map +1 -0
- package/dist/game-slot-prompt.d.ts +90 -0
- package/dist/game-slot-prompt.d.ts.map +1 -0
- package/dist/game-slot-prompt.js +237 -0
- package/dist/game-slot-prompt.js.map +1 -0
- package/dist/game-step.d.ts +10 -0
- package/dist/game-step.d.ts.map +1 -0
- package/dist/game-step.js +2 -0
- package/dist/game-step.js.map +1 -0
- package/dist/game.d.ts +2 -0
- package/dist/game.d.ts.map +1 -0
- package/dist/game.js +2 -0
- package/dist/game.js.map +1 -0
- package/dist/game2d/components/animator.d.ts +22 -0
- package/dist/game2d/components/animator.d.ts.map +1 -0
- package/dist/game2d/components/animator.js +6 -0
- package/dist/game2d/components/animator.js.map +1 -0
- package/dist/game2d/components/assets.d.ts +132 -0
- package/dist/game2d/components/assets.d.ts.map +1 -0
- package/dist/game2d/components/assets.js +52 -0
- package/dist/game2d/components/assets.js.map +1 -0
- package/dist/game2d/components/audioSource.d.ts +7 -0
- package/dist/game2d/components/audioSource.d.ts.map +1 -0
- package/dist/game2d/components/audioSource.js +4 -0
- package/dist/game2d/components/audioSource.js.map +1 -0
- package/dist/game2d/components/background.d.ts +38 -0
- package/dist/game2d/components/background.d.ts.map +1 -0
- package/dist/game2d/components/background.js +10 -0
- package/dist/game2d/components/background.js.map +1 -0
- package/dist/game2d/components/behaviors.d.ts +50 -0
- package/dist/game2d/components/behaviors.d.ts.map +1 -0
- package/dist/game2d/components/behaviors.js +15 -0
- package/dist/game2d/components/behaviors.js.map +1 -0
- package/dist/game2d/components/body2d.d.ts +13 -0
- package/dist/game2d/components/body2d.d.ts.map +1 -0
- package/dist/game2d/components/body2d.js +4 -0
- package/dist/game2d/components/body2d.js.map +1 -0
- package/dist/game2d/components/camera2d.d.ts +7 -0
- package/dist/game2d/components/camera2d.d.ts.map +1 -0
- package/dist/game2d/components/camera2d.js +4 -0
- package/dist/game2d/components/camera2d.js.map +1 -0
- package/dist/game2d/components/collider2d.d.ts +10 -0
- package/dist/game2d/components/collider2d.d.ts.map +1 -0
- package/dist/game2d/components/collider2d.js +5 -0
- package/dist/game2d/components/collider2d.js.map +1 -0
- package/dist/game2d/components/common.d.ts +16 -0
- package/dist/game2d/components/common.d.ts.map +1 -0
- package/dist/game2d/components/common.js +13 -0
- package/dist/game2d/components/common.js.map +1 -0
- package/dist/game2d/components/entity-components.d.ts +181 -0
- package/dist/game2d/components/entity-components.d.ts.map +1 -0
- package/dist/game2d/components/entity-components.js +21 -0
- package/dist/game2d/components/entity-components.js.map +1 -0
- package/dist/game2d/components/light2d.d.ts +12 -0
- package/dist/game2d/components/light2d.d.ts.map +1 -0
- package/dist/game2d/components/light2d.js +5 -0
- package/dist/game2d/components/light2d.js.map +1 -0
- package/dist/game2d/components/lighting.d.ts +17 -0
- package/dist/game2d/components/lighting.d.ts.map +1 -0
- package/dist/game2d/components/lighting.js +6 -0
- package/dist/game2d/components/lighting.js.map +1 -0
- package/dist/game2d/components/music.d.ts +8 -0
- package/dist/game2d/components/music.d.ts.map +1 -0
- package/dist/game2d/components/music.js +4 -0
- package/dist/game2d/components/music.js.map +1 -0
- package/dist/game2d/components/sprite.d.ts +26 -0
- package/dist/game2d/components/sprite.d.ts.map +1 -0
- package/dist/game2d/components/sprite.js +6 -0
- package/dist/game2d/components/sprite.js.map +1 -0
- package/dist/game2d/components/tilemap.d.ts +23 -0
- package/dist/game2d/components/tilemap.d.ts.map +1 -0
- package/dist/game2d/components/tilemap.js +6 -0
- package/dist/game2d/components/tilemap.js.map +1 -0
- package/dist/game2d/components/transform.d.ts +10 -0
- package/dist/game2d/components/transform.d.ts.map +1 -0
- package/dist/game2d/components/transform.js +10 -0
- package/dist/game2d/components/transform.js.map +1 -0
- package/dist/game2d/components/visual-animation.d.ts +148 -0
- package/dist/game2d/components/visual-animation.d.ts.map +1 -0
- package/dist/game2d/components/visual-animation.js +10 -0
- package/dist/game2d/components/visual-animation.js.map +1 -0
- package/dist/game2d/index.d.ts +1426 -0
- package/dist/game2d/index.d.ts.map +1 -0
- package/dist/game2d/index.js +135 -0
- package/dist/game2d/index.js.map +1 -0
- package/dist/game3d/components/animator.d.ts +9 -0
- package/dist/game3d/components/animator.d.ts.map +1 -0
- package/dist/game3d/components/animator.js +7 -0
- package/dist/game3d/components/animator.js.map +1 -0
- package/dist/game3d/components/assets.d.ts +261 -0
- package/dist/game3d/components/assets.d.ts.map +1 -0
- package/dist/game3d/components/assets.js +21 -0
- package/dist/game3d/components/assets.js.map +1 -0
- package/dist/game3d/components/behaviors.d.ts +66 -0
- package/dist/game3d/components/behaviors.d.ts.map +1 -0
- package/dist/game3d/components/behaviors.js +9 -0
- package/dist/game3d/components/behaviors.js.map +1 -0
- package/dist/game3d/components/body.d.ts +53 -0
- package/dist/game3d/components/body.d.ts.map +1 -0
- package/dist/game3d/components/body.js +15 -0
- package/dist/game3d/components/body.js.map +1 -0
- package/dist/game3d/components/camera.d.ts +49 -0
- package/dist/game3d/components/camera.d.ts.map +1 -0
- package/dist/game3d/components/camera.js +20 -0
- package/dist/game3d/components/camera.js.map +1 -0
- package/dist/game3d/components/character.d.ts +16 -0
- package/dist/game3d/components/character.d.ts.map +1 -0
- package/dist/game3d/components/character.js +10 -0
- package/dist/game3d/components/character.js.map +1 -0
- package/dist/game3d/components/collider-geometry.d.ts +7 -0
- package/dist/game3d/components/collider-geometry.d.ts.map +1 -0
- package/dist/game3d/components/collider-geometry.js +13 -0
- package/dist/game3d/components/collider-geometry.js.map +1 -0
- package/dist/game3d/components/collider.d.ts +79 -0
- package/dist/game3d/components/collider.d.ts.map +1 -0
- package/dist/game3d/components/collider.js +16 -0
- package/dist/game3d/components/collider.js.map +1 -0
- package/dist/game3d/components/common.d.ts +8 -0
- package/dist/game3d/components/common.d.ts.map +1 -0
- package/dist/game3d/components/common.js +8 -0
- package/dist/game3d/components/common.js.map +1 -0
- package/dist/game3d/components/environment.d.ts +20 -0
- package/dist/game3d/components/environment.d.ts.map +1 -0
- package/dist/game3d/components/environment.js +8 -0
- package/dist/game3d/components/environment.js.map +1 -0
- package/dist/game3d/components/interaction-actor.d.ts +6 -0
- package/dist/game3d/components/interaction-actor.d.ts.map +1 -0
- package/dist/game3d/components/interaction-actor.js +3 -0
- package/dist/game3d/components/interaction-actor.js.map +1 -0
- package/dist/game3d/components/light.d.ts +23 -0
- package/dist/game3d/components/light.d.ts.map +1 -0
- package/dist/game3d/components/light.js +9 -0
- package/dist/game3d/components/light.js.map +1 -0
- package/dist/game3d/components/material.d.ts +15 -0
- package/dist/game3d/components/material.d.ts.map +1 -0
- package/dist/game3d/components/material.js +9 -0
- package/dist/game3d/components/material.js.map +1 -0
- package/dist/game3d/components/model.d.ts +22 -0
- package/dist/game3d/components/model.d.ts.map +1 -0
- package/dist/game3d/components/model.js +8 -0
- package/dist/game3d/components/model.js.map +1 -0
- package/dist/game3d/components/primitive.d.ts +31 -0
- package/dist/game3d/components/primitive.d.ts.map +1 -0
- package/dist/game3d/components/primitive.js +10 -0
- package/dist/game3d/components/primitive.js.map +1 -0
- package/dist/game3d/components/transform.d.ts +24 -0
- package/dist/game3d/components/transform.d.ts.map +1 -0
- package/dist/game3d/components/transform.js +10 -0
- package/dist/game3d/components/transform.js.map +1 -0
- package/dist/game3d/index.d.ts +4045 -0
- package/dist/game3d/index.d.ts.map +1 -0
- package/dist/game3d/index.js +159 -0
- package/dist/game3d/index.js.map +1 -0
- package/dist/game3d.d.ts +2 -0
- package/dist/game3d.d.ts.map +1 -0
- package/dist/game3d.js +2 -0
- package/dist/game3d.js.map +1 -0
- package/dist/graph.d.ts +192 -5
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +515 -0
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +59 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -2
- package/dist/index.js.map +1 -1
- package/dist/loop.d.ts +38 -0
- package/dist/loop.d.ts.map +1 -0
- package/dist/loop.js +69 -0
- package/dist/loop.js.map +1 -0
- package/dist/mcp-server-config.d.ts +113 -0
- package/dist/mcp-server-config.d.ts.map +1 -0
- package/dist/mcp-server-config.js +147 -0
- package/dist/mcp-server-config.js.map +1 -0
- package/dist/messages.d.ts +1577 -243
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +718 -22
- package/dist/messages.js.map +1 -1
- package/dist/missing-runtime-package.d.ts +23 -0
- package/dist/missing-runtime-package.d.ts.map +1 -0
- package/dist/missing-runtime-package.js +34 -0
- package/dist/missing-runtime-package.js.map +1 -0
- package/dist/model-selection.d.ts +20 -0
- package/dist/model-selection.d.ts.map +1 -0
- package/dist/model-selection.js +27 -0
- package/dist/model-selection.js.map +1 -0
- package/dist/nodetool-models.d.ts +71 -0
- package/dist/nodetool-models.d.ts.map +1 -0
- package/dist/nodetool-models.js +138 -0
- package/dist/nodetool-models.js.map +1 -0
- package/dist/package-assets.d.ts +39 -0
- package/dist/package-assets.d.ts.map +1 -0
- package/dist/package-assets.js +63 -0
- package/dist/package-assets.js.map +1 -0
- package/dist/platform.d.ts +66 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +68 -0
- package/dist/platform.js.map +1 -0
- package/dist/predicates.d.ts +43 -0
- package/dist/predicates.d.ts.map +1 -0
- package/dist/predicates.js +65 -0
- package/dist/predicates.js.map +1 -0
- package/dist/processing-messages.schema.json +2545 -0
- package/dist/production-authoring.d.ts +931 -0
- package/dist/production-authoring.d.ts.map +1 -0
- package/dist/production-authoring.js +931 -0
- package/dist/production-authoring.js.map +1 -0
- package/dist/python-packs.d.ts +25 -0
- package/dist/python-packs.d.ts.map +1 -0
- package/dist/python-packs.js +51 -0
- package/dist/python-packs.js.map +1 -0
- package/dist/render-record.d.ts +228 -0
- package/dist/render-record.d.ts.map +1 -0
- package/dist/render-record.js +212 -0
- package/dist/render-record.js.map +1 -0
- package/dist/resource-id.d.ts +22 -0
- package/dist/resource-id.d.ts.map +1 -0
- package/dist/resource-id.js +32 -0
- package/dist/resource-id.js.map +1 -0
- package/dist/resource-uri.d.ts +15 -0
- package/dist/resource-uri.d.ts.map +1 -0
- package/dist/resource-uri.js +91 -0
- package/dist/resource-uri.js.map +1 -0
- package/dist/run-readers.d.ts +760 -0
- package/dist/run-readers.d.ts.map +1 -0
- package/dist/run-readers.js +153 -0
- package/dist/run-readers.js.map +1 -0
- package/dist/run-trace.d.ts +206 -0
- package/dist/run-trace.d.ts.map +1 -0
- package/dist/run-trace.js +177 -0
- package/dist/run-trace.js.map +1 -0
- package/dist/sandbox-capability.d.ts +86 -0
- package/dist/sandbox-capability.d.ts.map +1 -0
- package/dist/sandbox-capability.js +106 -0
- package/dist/sandbox-capability.js.map +1 -0
- package/dist/sandbox-host.d.ts +98 -0
- package/dist/sandbox-host.d.ts.map +1 -0
- package/dist/sandbox-host.js +311 -0
- package/dist/sandbox-host.js.map +1 -0
- package/dist/sandbox-package.d.ts +674 -0
- package/dist/sandbox-package.d.ts.map +1 -0
- package/dist/sandbox-package.js +622 -0
- package/dist/sandbox-package.js.map +1 -0
- package/dist/sandbox-wasm.d.ts +84 -0
- package/dist/sandbox-wasm.d.ts.map +1 -0
- package/dist/sandbox-wasm.js +139 -0
- package/dist/sandbox-wasm.js.map +1 -0
- package/dist/screenplay-authoring.d.ts +69 -0
- package/dist/screenplay-authoring.d.ts.map +1 -0
- package/dist/screenplay-authoring.js +352 -0
- package/dist/screenplay-authoring.js.map +1 -0
- package/dist/script-authoring.d.ts +161 -0
- package/dist/script-authoring.d.ts.map +1 -0
- package/dist/script-authoring.js +503 -0
- package/dist/script-authoring.js.map +1 -0
- package/dist/script-fill.d.ts +39 -0
- package/dist/script-fill.d.ts.map +1 -0
- package/dist/script-fill.js +67 -0
- package/dist/script-fill.js.map +1 -0
- package/dist/script-link.d.ts +110 -0
- package/dist/script-link.d.ts.map +1 -0
- package/dist/script-link.js +252 -0
- package/dist/script-link.js.map +1 -0
- package/dist/script-pace.d.ts +4 -0
- package/dist/script-pace.d.ts.map +1 -0
- package/dist/script-pace.js +11 -0
- package/dist/script-pace.js.map +1 -0
- package/dist/sha256.d.ts +11 -0
- package/dist/sha256.d.ts.map +1 -0
- package/dist/sha256.js +110 -0
- package/dist/sha256.js.map +1 -0
- package/dist/shot-prompt.d.ts +78 -0
- package/dist/shot-prompt.d.ts.map +1 -0
- package/dist/shot-prompt.js +120 -0
- package/dist/shot-prompt.js.map +1 -0
- package/dist/skill-document.d.ts +36 -0
- package/dist/skill-document.d.ts.map +1 -0
- package/dist/skill-document.js +140 -0
- package/dist/skill-document.js.map +1 -0
- package/dist/storyboard-render-spec.d.ts +4 -0
- package/dist/storyboard-render-spec.d.ts.map +1 -0
- package/dist/storyboard-render-spec.js +4 -0
- package/dist/storyboard-render-spec.js.map +1 -0
- package/dist/style-presets.d.ts +73 -0
- package/dist/style-presets.d.ts.map +1 -0
- package/dist/style-presets.js +147 -0
- package/dist/style-presets.js.map +1 -0
- package/dist/supervisor.d.ts +227 -0
- package/dist/supervisor.d.ts.map +1 -0
- package/dist/supervisor.js +116 -0
- package/dist/supervisor.js.map +1 -0
- package/dist/token-providers.d.ts +31 -0
- package/dist/token-providers.d.ts.map +1 -0
- package/dist/token-providers.js +52 -0
- package/dist/token-providers.js.map +1 -0
- package/dist/toolSchemas.d.ts +18 -14
- package/dist/toolSchemas.d.ts.map +1 -1
- package/dist/toolSchemas.js +30 -31
- package/dist/toolSchemas.js.map +1 -1
- package/dist/triggers.d.ts +41 -0
- package/dist/triggers.d.ts.map +1 -0
- package/dist/triggers.js +50 -0
- package/dist/triggers.js.map +1 -0
- package/dist/trpc-policy.d.ts +3 -0
- package/dist/trpc-policy.d.ts.map +1 -0
- package/dist/trpc-policy.js +3 -0
- package/dist/trpc-policy.js.map +1 -0
- package/dist/type-metadata.d.ts +5 -0
- package/dist/type-metadata.d.ts.map +1 -1
- package/dist/type-metadata.js +17 -8
- package/dist/type-metadata.js.map +1 -1
- package/dist/typecheck.d.ts.map +1 -1
- package/dist/typecheck.js +5 -4
- package/dist/typecheck.js.map +1 -1
- package/dist/wasm-binary.d.ts +61 -0
- package/dist/wasm-binary.d.ts.map +1 -0
- package/dist/wasm-binary.js +215 -0
- package/dist/wasm-binary.js.map +1 -0
- package/dist/workflow-document-revision.d.ts +4 -0
- package/dist/workflow-document-revision.d.ts.map +1 -0
- package/dist/workflow-document-revision.js +111 -0
- package/dist/workflow-document-revision.js.map +1 -0
- package/dist/workflow-plan.d.ts +274 -0
- package/dist/workflow-plan.d.ts.map +1 -0
- package/dist/workflow-plan.js +667 -0
- package/dist/workflow-plan.js.map +1 -0
- package/dist/wrap-primitives.d.ts +0 -11
- package/dist/wrap-primitives.d.ts.map +1 -1
- package/dist/wrap-primitives.js +3 -9
- package/dist/wrap-primitives.js.map +1 -1
- package/dist/ws-commands.d.ts +770 -0
- package/dist/ws-commands.d.ts.map +1 -0
- package/dist/ws-commands.js +624 -0
- package/dist/ws-commands.js.map +1 -0
- package/dist/zod-schema.d.ts +20 -0
- package/dist/zod-schema.d.ts.map +1 -0
- package/dist/zod-schema.js +298 -0
- package/dist/zod-schema.js.map +1 -0
- package/package.json +96 -7
- package/schema/sdk-v1.asyncapi.implemented.json +65 -0
- package/schema/sdk-v1.asyncapi.json +65 -0
- package/schema/sdk-v1.discovery.schema.json +1218 -0
- package/schema/sdk-v1.execution.schema.json +2792 -0
- package/schema/sdk-v1.lifecycle.schema.json +1031 -0
- package/schema/sdk-v1.manifest.json +71 -0
- package/schema/sdk-v1.openapi.implemented.json +730 -0
- package/schema/sdk-v1.openapi.json +730 -0
- package/schema/sdk-v1.operations.json +732 -0
- package/dist/agent-protocol.d.ts +0 -217
- package/dist/agent-protocol.d.ts.map +0 -1
- package/dist/agent-protocol.js +0 -85
- package/dist/agent-protocol.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nodetool-ai/protocol — One game asset slot, turned into a generation job.
|
|
3
|
+
*
|
|
4
|
+
* A {@link GameSlotSpec} says what a template needs; a generator needs a
|
|
5
|
+
* prompt and a canvas; the `nodetool.game.*` checker that accepts the result
|
|
6
|
+
* needs numbers. {@link slotPrompt} is the one mapping between them, pure, so
|
|
7
|
+
* the `nodetool.game.SlotPrompt` node and the editor
|
|
8
|
+
* all size a sheet and word a prompt the same way.
|
|
9
|
+
*
|
|
10
|
+
* Three rules the tests pin:
|
|
11
|
+
*
|
|
12
|
+
* - **The canvas follows the slot, not the model.** A spritesheet is as wide as
|
|
13
|
+
* its longest animation and as tall as its animation count; a tileset is the
|
|
14
|
+
* near-square grid that holds `count` cells; an image is its declared size.
|
|
15
|
+
* Audio has no canvas, so `width` and `height` are 0.
|
|
16
|
+
* - **`checker` is the matching checker's prop bag**, key for key, so a graph
|
|
17
|
+
* can `Switch` on `slot.kind` and hand the bag straight to
|
|
18
|
+
* `SpriteSheet` / `Tileset` / `SeamlessImage` / `SoundEffect` / `MusicLoop`
|
|
19
|
+
* with no hand-copied numbers.
|
|
20
|
+
* - **Every entity handed to a slot applies to it.** A template's own slot
|
|
21
|
+
* prompt is generic ("the player character"), so the name matching a
|
|
22
|
+
* storyboard shot uses would drop the character the sheet is *for*. The
|
|
23
|
+
* graph author decides the cast per slot instead, and the injection itself is
|
|
24
|
+
* {@link injectEntities}, unchanged — same block, same order, same reference
|
|
25
|
+
* images as a shot render.
|
|
26
|
+
*/
|
|
27
|
+
import { type Entity } from "./creative.js";
|
|
28
|
+
import { type GameSlotKind, type GameSlotSpec } from "./game-assets.js";
|
|
29
|
+
export interface SlotPromptResult {
|
|
30
|
+
/** The generation prompt, with the entity block already appended. */
|
|
31
|
+
prompt: string;
|
|
32
|
+
/** Canvas width in pixels; 0 for a slot with no canvas (sfx, music). */
|
|
33
|
+
width: number;
|
|
34
|
+
/** Canvas height in pixels; 0 for a slot with no canvas (sfx, music). */
|
|
35
|
+
height: number;
|
|
36
|
+
/** The prop bag the `nodetool.game.*` checker for this kind takes. */
|
|
37
|
+
checker: Record<string, unknown>;
|
|
38
|
+
/** Primary style image for an image-to-image generator. */
|
|
39
|
+
referenceImages: NonNullable<Entity["reference_images"]>;
|
|
40
|
+
referenceAssetId: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The slot a `game_slot` input carries, or null when nothing is wired.
|
|
44
|
+
*
|
|
45
|
+
* A checker takes its numbers from the slot when one is connected, so an unset
|
|
46
|
+
* input has to be told apart from a malformed one: unset falls back to the
|
|
47
|
+
* hand-typed props, malformed throws. Silently falling back on a bad slot is
|
|
48
|
+
* the failure this exists to prevent — the node would then stamp a fill from
|
|
49
|
+
* numbers nobody checked.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readSlotProp(value: unknown, expected?: GameSlotKind): GameSlotSpec | null;
|
|
52
|
+
/** Columns and rows of the squarest grid that holds `count` cells. */
|
|
53
|
+
export declare function nearSquareGrid(count: number): {
|
|
54
|
+
columns: number;
|
|
55
|
+
rows: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The entities that season a slot: the style first, then the cast, each id
|
|
59
|
+
* once.
|
|
60
|
+
*
|
|
61
|
+
* Unlike `entitiesForShot` nothing is matched by name. A slot's text comes from
|
|
62
|
+
* the template and names roles, not cast — `enemy.walker` says "a small ground
|
|
63
|
+
* enemy", never "Pip" — so name matching would season the sheet with the style
|
|
64
|
+
* and silently leave the character out. What a slot gets is what the caller
|
|
65
|
+
* wired to it.
|
|
66
|
+
*/
|
|
67
|
+
export declare function slotCast(style: Entity | null, cast: readonly Entity[]): Entity[];
|
|
68
|
+
/**
|
|
69
|
+
* The prop bag for the `nodetool.game.*` node that accepts this kind of fill.
|
|
70
|
+
*
|
|
71
|
+
* Every key here is a declared `@prop` on that node —
|
|
72
|
+
* `packages/game-nodes/tests/checker-props.test.ts` reads the node metadata and
|
|
73
|
+
* fails when the two drift. Props the slot says nothing about (`loop`,
|
|
74
|
+
* `threshold`, `trim`, `crossfade_ms`) are left off so the node's own default
|
|
75
|
+
* applies.
|
|
76
|
+
*
|
|
77
|
+
* The checkers read this themselves: a connected `slot` input overrides the
|
|
78
|
+
* hand-typed numbers with exactly these keys, so a stale `cell_width` left over
|
|
79
|
+
* from an earlier wiring cannot reach the fill.
|
|
80
|
+
*/
|
|
81
|
+
export declare function slotCheckerProps(slot: GameSlotSpec): Record<string, unknown>;
|
|
82
|
+
/**
|
|
83
|
+
* Everything needed to fill one slot: the seasoned prompt, the canvas, and the
|
|
84
|
+
* checker's prop bag.
|
|
85
|
+
*
|
|
86
|
+
* Swapping `style` is what makes a re-skin one edit: it applies to every slot,
|
|
87
|
+
* so the pack stays consistent by construction (see {@link slotCast}).
|
|
88
|
+
*/
|
|
89
|
+
export declare function slotPrompt(slot: GameSlotSpec, style: Entity | null, cast?: readonly Entity[]): SlotPromptResult;
|
|
90
|
+
//# sourceMappingURL=game-slot-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-slot-prompt.d.ts","sourceRoot":"","sources":["../src/game-slot-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAgB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEtF,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,2DAA2D;IAC3D,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACzD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAaD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,OAAO,EACd,QAAQ,CAAC,EAAE,YAAY,GACtB,YAAY,GAAG,IAAI,CAiBrB;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAGA;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,MAAM,EAAE,CASV;AA6ED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2B5E;AAsBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,GAAE,SAAS,MAAM,EAAO,GAC3B,gBAAgB,CAclB"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nodetool-ai/protocol — One game asset slot, turned into a generation job.
|
|
3
|
+
*
|
|
4
|
+
* A {@link GameSlotSpec} says what a template needs; a generator needs a
|
|
5
|
+
* prompt and a canvas; the `nodetool.game.*` checker that accepts the result
|
|
6
|
+
* needs numbers. {@link slotPrompt} is the one mapping between them, pure, so
|
|
7
|
+
* the `nodetool.game.SlotPrompt` node and the editor
|
|
8
|
+
* all size a sheet and word a prompt the same way.
|
|
9
|
+
*
|
|
10
|
+
* Three rules the tests pin:
|
|
11
|
+
*
|
|
12
|
+
* - **The canvas follows the slot, not the model.** A spritesheet is as wide as
|
|
13
|
+
* its longest animation and as tall as its animation count; a tileset is the
|
|
14
|
+
* near-square grid that holds `count` cells; an image is its declared size.
|
|
15
|
+
* Audio has no canvas, so `width` and `height` are 0.
|
|
16
|
+
* - **`checker` is the matching checker's prop bag**, key for key, so a graph
|
|
17
|
+
* can `Switch` on `slot.kind` and hand the bag straight to
|
|
18
|
+
* `SpriteSheet` / `Tileset` / `SeamlessImage` / `SoundEffect` / `MusicLoop`
|
|
19
|
+
* with no hand-copied numbers.
|
|
20
|
+
* - **Every entity handed to a slot applies to it.** A template's own slot
|
|
21
|
+
* prompt is generic ("the player character"), so the name matching a
|
|
22
|
+
* storyboard shot uses would drop the character the sheet is *for*. The
|
|
23
|
+
* graph author decides the cast per slot instead, and the injection itself is
|
|
24
|
+
* {@link injectEntities}, unchanged — same block, same order, same reference
|
|
25
|
+
* images as a shot render.
|
|
26
|
+
*/
|
|
27
|
+
import { z } from "zod";
|
|
28
|
+
import { injectEntities } from "./creative.js";
|
|
29
|
+
import { gameSlotSpec } from "./game-assets.js";
|
|
30
|
+
/**
|
|
31
|
+
* What an unwired `game_slot` prop looks like: its `null` default, an absent
|
|
32
|
+
* value, or the empty object a serialized graph can carry in its place.
|
|
33
|
+
*/
|
|
34
|
+
const unwiredSlot = z.union([
|
|
35
|
+
z.null(),
|
|
36
|
+
z.undefined(),
|
|
37
|
+
z.literal(""),
|
|
38
|
+
z.strictObject({})
|
|
39
|
+
]);
|
|
40
|
+
/**
|
|
41
|
+
* The slot a `game_slot` input carries, or null when nothing is wired.
|
|
42
|
+
*
|
|
43
|
+
* A checker takes its numbers from the slot when one is connected, so an unset
|
|
44
|
+
* input has to be told apart from a malformed one: unset falls back to the
|
|
45
|
+
* hand-typed props, malformed throws. Silently falling back on a bad slot is
|
|
46
|
+
* the failure this exists to prevent — the node would then stamp a fill from
|
|
47
|
+
* numbers nobody checked.
|
|
48
|
+
*/
|
|
49
|
+
export function readSlotProp(value, expected) {
|
|
50
|
+
if (unwiredSlot.safeParse(value).success) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const parsed = gameSlotSpec.safeParse(value);
|
|
54
|
+
if (!parsed.success) {
|
|
55
|
+
const issues = parsed.error.issues
|
|
56
|
+
.map((i) => `${i.path.join(".") || "<root>"}: ${i.message}`)
|
|
57
|
+
.join("; ");
|
|
58
|
+
throw new Error(`slot is not a game slot spec. ${issues}`);
|
|
59
|
+
}
|
|
60
|
+
if (expected && parsed.data.kind !== expected) {
|
|
61
|
+
throw new Error(`slot ${parsed.data.id} is a ${parsed.data.kind} slot, not a ${expected} slot.`);
|
|
62
|
+
}
|
|
63
|
+
return parsed.data;
|
|
64
|
+
}
|
|
65
|
+
/** Columns and rows of the squarest grid that holds `count` cells. */
|
|
66
|
+
export function nearSquareGrid(count) {
|
|
67
|
+
const columns = Math.max(1, Math.ceil(Math.sqrt(count)));
|
|
68
|
+
return { columns, rows: Math.max(1, Math.ceil(count / columns)) };
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The entities that season a slot: the style first, then the cast, each id
|
|
72
|
+
* once.
|
|
73
|
+
*
|
|
74
|
+
* Unlike `entitiesForShot` nothing is matched by name. A slot's text comes from
|
|
75
|
+
* the template and names roles, not cast — `enemy.walker` says "a small ground
|
|
76
|
+
* enemy", never "Pip" — so name matching would season the sheet with the style
|
|
77
|
+
* and silently leave the character out. What a slot gets is what the caller
|
|
78
|
+
* wired to it.
|
|
79
|
+
*/
|
|
80
|
+
export function slotCast(style, cast) {
|
|
81
|
+
const applied = [];
|
|
82
|
+
const seen = new Set();
|
|
83
|
+
for (const entity of [style, ...cast]) {
|
|
84
|
+
if (!entity || seen.has(entity.id))
|
|
85
|
+
continue;
|
|
86
|
+
seen.add(entity.id);
|
|
87
|
+
applied.push(entity);
|
|
88
|
+
}
|
|
89
|
+
return applied;
|
|
90
|
+
}
|
|
91
|
+
/** `0-3: idle. 4-11: run.` — where the checker will look for each animation. */
|
|
92
|
+
function frameRanges(animations) {
|
|
93
|
+
const parts = [];
|
|
94
|
+
let cursor = 0;
|
|
95
|
+
for (const [name, frames] of Object.entries(animations)) {
|
|
96
|
+
const last = cursor + frames - 1;
|
|
97
|
+
parts.push(frames === 1
|
|
98
|
+
? `frame ${cursor} is ${name}`
|
|
99
|
+
: `frames ${cursor}-${last} are ${name}`);
|
|
100
|
+
cursor += frames;
|
|
101
|
+
}
|
|
102
|
+
return parts.join(", ");
|
|
103
|
+
}
|
|
104
|
+
const PIXEL_RULES = "No anti-aliasing, no drop shadow, no grid lines, no labels or text.";
|
|
105
|
+
/** What the slot asks for, before any entity is injected. */
|
|
106
|
+
function baseText(slot) {
|
|
107
|
+
const subject = (slot.prompt ?? "").trim() || `the ${slot.id} asset`;
|
|
108
|
+
switch (slot.kind) {
|
|
109
|
+
case "spritesheet": {
|
|
110
|
+
const columns = Math.max(...Object.values(slot.animations));
|
|
111
|
+
const rows = Object.keys(slot.animations).length;
|
|
112
|
+
return [
|
|
113
|
+
subject,
|
|
114
|
+
`Sprite sheet: ${columns * slot.cell[0]}x${rows * slot.cell[1]} pixels, a ` +
|
|
115
|
+
`${columns}x${rows} grid of ${slot.cell[0]}x${slot.cell[1]} frames, filled ` +
|
|
116
|
+
`row-major from the top left with no gaps — ${frameRanges(slot.animations)}. ` +
|
|
117
|
+
`Leave every remaining cell empty. Transparent background. ${PIXEL_RULES}`
|
|
118
|
+
].join("\n\n");
|
|
119
|
+
}
|
|
120
|
+
case "tileset": {
|
|
121
|
+
const { columns, rows } = nearSquareGrid(slot.count);
|
|
122
|
+
return [
|
|
123
|
+
subject,
|
|
124
|
+
`Tile sheet: ${columns * slot.cell[0]}x${rows * slot.cell[1]} pixels, a ` +
|
|
125
|
+
`${columns}x${rows} grid of ${slot.cell[0]}x${slot.cell[1]} tiles, ` +
|
|
126
|
+
`${slot.count} distinct tiles row-major from the top left. Each tile fills ` +
|
|
127
|
+
`its cell edge to edge and joins its neighbours without a seam. ${PIXEL_RULES}`
|
|
128
|
+
].join("\n\n");
|
|
129
|
+
}
|
|
130
|
+
case "image": {
|
|
131
|
+
const tiles = [
|
|
132
|
+
slot.seamless_x ? "left and right edges match" : "",
|
|
133
|
+
slot.seamless_y ? "top and bottom edges match" : ""
|
|
134
|
+
].filter((part) => part !== "");
|
|
135
|
+
const seamless = tiles.length > 0
|
|
136
|
+
? ` Tiles seamlessly: the ${tiles.join(", and the ")}.`
|
|
137
|
+
: "";
|
|
138
|
+
return [
|
|
139
|
+
subject,
|
|
140
|
+
`Image: ${slot.size[0]}x${slot.size[1]} pixels.${seamless} ${PIXEL_RULES}`
|
|
141
|
+
].join("\n\n");
|
|
142
|
+
}
|
|
143
|
+
case "sfx":
|
|
144
|
+
return [
|
|
145
|
+
subject,
|
|
146
|
+
`Sound effect: ${slot.seconds} seconds, starting on the first sample with ` +
|
|
147
|
+
`no lead-in silence and ending before the target length.`
|
|
148
|
+
].join("\n\n");
|
|
149
|
+
case "music":
|
|
150
|
+
return [
|
|
151
|
+
subject,
|
|
152
|
+
slot.loop
|
|
153
|
+
? `Music: ${slot.seconds} seconds, looping with no audible seam where the ` +
|
|
154
|
+
`end meets the start.`
|
|
155
|
+
: `Music: ${slot.seconds} seconds.`
|
|
156
|
+
].join("\n\n");
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The prop bag for the `nodetool.game.*` node that accepts this kind of fill.
|
|
161
|
+
*
|
|
162
|
+
* Every key here is a declared `@prop` on that node —
|
|
163
|
+
* `packages/game-nodes/tests/checker-props.test.ts` reads the node metadata and
|
|
164
|
+
* fails when the two drift. Props the slot says nothing about (`loop`,
|
|
165
|
+
* `threshold`, `trim`, `crossfade_ms`) are left off so the node's own default
|
|
166
|
+
* applies.
|
|
167
|
+
*
|
|
168
|
+
* The checkers read this themselves: a connected `slot` input overrides the
|
|
169
|
+
* hand-typed numbers with exactly these keys, so a stale `cell_width` left over
|
|
170
|
+
* from an earlier wiring cannot reach the fill.
|
|
171
|
+
*/
|
|
172
|
+
export function slotCheckerProps(slot) {
|
|
173
|
+
switch (slot.kind) {
|
|
174
|
+
case "spritesheet":
|
|
175
|
+
return {
|
|
176
|
+
slot_id: slot.id,
|
|
177
|
+
cell_width: slot.cell[0],
|
|
178
|
+
cell_height: slot.cell[1],
|
|
179
|
+
animations: { ...slot.animations },
|
|
180
|
+
fps: slot.fps
|
|
181
|
+
};
|
|
182
|
+
case "tileset":
|
|
183
|
+
return {
|
|
184
|
+
slot_id: slot.id,
|
|
185
|
+
cell_width: slot.cell[0],
|
|
186
|
+
cell_height: slot.cell[1],
|
|
187
|
+
count: slot.count
|
|
188
|
+
};
|
|
189
|
+
case "image":
|
|
190
|
+
return {
|
|
191
|
+
slot_id: slot.id,
|
|
192
|
+
check_x: slot.seamless_x,
|
|
193
|
+
check_y: slot.seamless_y
|
|
194
|
+
};
|
|
195
|
+
case "sfx":
|
|
196
|
+
case "music":
|
|
197
|
+
return { slot_id: slot.id, seconds: slot.seconds };
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/** Canvas the generator should produce; audio slots have none. */
|
|
201
|
+
function canvas(slot) {
|
|
202
|
+
switch (slot.kind) {
|
|
203
|
+
case "spritesheet":
|
|
204
|
+
return {
|
|
205
|
+
width: Math.max(...Object.values(slot.animations)) * slot.cell[0],
|
|
206
|
+
height: Object.keys(slot.animations).length * slot.cell[1]
|
|
207
|
+
};
|
|
208
|
+
case "tileset": {
|
|
209
|
+
const { columns, rows } = nearSquareGrid(slot.count);
|
|
210
|
+
return { width: columns * slot.cell[0], height: rows * slot.cell[1] };
|
|
211
|
+
}
|
|
212
|
+
case "image":
|
|
213
|
+
return { width: slot.size[0], height: slot.size[1] };
|
|
214
|
+
case "sfx":
|
|
215
|
+
case "music":
|
|
216
|
+
return { width: 0, height: 0 };
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Everything needed to fill one slot: the seasoned prompt, the canvas, and the
|
|
221
|
+
* checker's prop bag.
|
|
222
|
+
*
|
|
223
|
+
* Swapping `style` is what makes a re-skin one edit: it applies to every slot,
|
|
224
|
+
* so the pack stays consistent by construction (see {@link slotCast}).
|
|
225
|
+
*/
|
|
226
|
+
export function slotPrompt(slot, style, cast = []) {
|
|
227
|
+
const applied = slotCast(style, cast);
|
|
228
|
+
const injected = injectEntities(baseText(slot), applied, applied.map((entity) => entity.id));
|
|
229
|
+
return {
|
|
230
|
+
prompt: injected.prompt,
|
|
231
|
+
...canvas(slot),
|
|
232
|
+
checker: slotCheckerProps(slot),
|
|
233
|
+
referenceImages: style?.reference_images?.slice(0, 1) ?? [],
|
|
234
|
+
referenceAssetId: style?.reference_images?.[0]?.asset_id ?? ""
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=game-slot-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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AAC,CACnC,CAAC;IACF,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,GAAG,MAAM,CAAC,IAAI,CAAC;QACf,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC;QAC/B,eAAe,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE;QAC3D,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,EAAE;KAC/D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface GameSystemTiming {
|
|
2
|
+
readonly system: string;
|
|
3
|
+
readonly durationMs: number;
|
|
4
|
+
}
|
|
5
|
+
/** Diagnostic wall-clock measurements, excluded from deterministic snapshots. */
|
|
6
|
+
export interface GameStepTimings {
|
|
7
|
+
readonly systems: readonly GameSystemTiming[];
|
|
8
|
+
readonly totalMs: number;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=game-step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-step.d.ts","sourceRoot":"","sources":["../src/game-step.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-step.js","sourceRoot":"","sources":["../src/game-step.ts"],"names":[],"mappings":""}
|
package/dist/game.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game.d.ts","sourceRoot":"","sources":["../src/game.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
package/dist/game.js
ADDED
package/dist/game.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game.js","sourceRoot":"","sources":["../src/game.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const gameAnimatorComponent: z.ZodOptional<z.ZodObject<{
|
|
3
|
+
frames: z.ZodArray<z.ZodObject<{
|
|
4
|
+
x: z.ZodNumber;
|
|
5
|
+
y: z.ZodNumber;
|
|
6
|
+
width: z.ZodNumber;
|
|
7
|
+
height: z.ZodNumber;
|
|
8
|
+
}, z.core.$strict>>;
|
|
9
|
+
ticksPerFrame: z.ZodNumber;
|
|
10
|
+
loop: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
clips: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
12
|
+
frames: z.ZodArray<z.ZodObject<{
|
|
13
|
+
x: z.ZodNumber;
|
|
14
|
+
y: z.ZodNumber;
|
|
15
|
+
width: z.ZodNumber;
|
|
16
|
+
height: z.ZodNumber;
|
|
17
|
+
}, z.core.$strict>>;
|
|
18
|
+
ticksPerFrame: z.ZodNumber;
|
|
19
|
+
loop: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
}, z.core.$strict>>>;
|
|
21
|
+
}, z.core.$strict>>;
|
|
22
|
+
//# sourceMappingURL=animator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animator.d.ts","sourceRoot":"","sources":["../../../src/game2d/components/animator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;mBAC4C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { frame } from "./common.js";
|
|
3
|
+
const animationClip = z.strictObject({ frames: z.array(frame).min(1), ticksPerFrame: z.number().int().positive(), loop: z.boolean().default(true) });
|
|
4
|
+
export const gameAnimatorComponent = z.strictObject({ frames: z.array(frame).min(1), ticksPerFrame: z.number().int().positive(), loop: z.boolean().default(true),
|
|
5
|
+
clips: z.record(z.string().min(1), animationClip).optional() }).optional();
|
|
6
|
+
//# sourceMappingURL=animator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animator.js","sourceRoot":"","sources":["../../../src/game2d/components/animator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,aAAa,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAErJ,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC5J,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const gameSheetPreparation: z.ZodObject<{
|
|
3
|
+
cols: z.ZodNumber;
|
|
4
|
+
rows: z.ZodNumber;
|
|
5
|
+
baseline: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
export declare const gameTilesetPreparation: z.ZodObject<{
|
|
8
|
+
tileWidth: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
tileHeight: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
edges: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
highlight: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
shadow: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const gameLutPreparation: z.ZodObject<{
|
|
15
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
brightness: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
contrast: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
saturation: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
lift: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
20
|
+
gain: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
21
|
+
gamma: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
export declare const gameImagePreparation: z.ZodObject<{
|
|
24
|
+
trimAlpha: z.ZodBoolean;
|
|
25
|
+
targetWidth: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
targetHeight: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
cropPolicy: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
contain: "contain";
|
|
29
|
+
cover: "cover";
|
|
30
|
+
stretch: "stretch";
|
|
31
|
+
}>>;
|
|
32
|
+
mirrorX: z.ZodBoolean;
|
|
33
|
+
mirrorY: z.ZodBoolean;
|
|
34
|
+
sheet: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
cols: z.ZodNumber;
|
|
36
|
+
rows: z.ZodNumber;
|
|
37
|
+
baseline: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
}, z.core.$strict>>;
|
|
39
|
+
tileset: z.ZodOptional<z.ZodObject<{
|
|
40
|
+
tileWidth: z.ZodDefault<z.ZodNumber>;
|
|
41
|
+
tileHeight: z.ZodDefault<z.ZodNumber>;
|
|
42
|
+
edges: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
highlight: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
shadow: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
lut: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
brightness: z.ZodDefault<z.ZodNumber>;
|
|
49
|
+
contrast: z.ZodDefault<z.ZodNumber>;
|
|
50
|
+
saturation: z.ZodDefault<z.ZodNumber>;
|
|
51
|
+
lift: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
52
|
+
gain: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
53
|
+
gamma: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
export declare const gameAssetBinding: z.ZodObject<{
|
|
57
|
+
assetId: z.ZodString;
|
|
58
|
+
digest: z.ZodString;
|
|
59
|
+
mediaKind: z.ZodDefault<z.ZodEnum<{
|
|
60
|
+
audio: "audio";
|
|
61
|
+
font: "font";
|
|
62
|
+
image: "image";
|
|
63
|
+
}>>;
|
|
64
|
+
fontFormat: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
otf: "otf";
|
|
66
|
+
ttf: "ttf";
|
|
67
|
+
}>>;
|
|
68
|
+
width: z.ZodNumber;
|
|
69
|
+
height: z.ZodNumber;
|
|
70
|
+
frame: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
x: z.ZodNumber;
|
|
72
|
+
y: z.ZodNumber;
|
|
73
|
+
width: z.ZodNumber;
|
|
74
|
+
height: z.ZodNumber;
|
|
75
|
+
}, z.core.$strict>>;
|
|
76
|
+
pivot: z.ZodDefault<z.ZodObject<{
|
|
77
|
+
x: z.ZodNumber;
|
|
78
|
+
y: z.ZodNumber;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
sampling: z.ZodDefault<z.ZodEnum<{
|
|
81
|
+
linear: "linear";
|
|
82
|
+
nearest: "nearest";
|
|
83
|
+
}>>;
|
|
84
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
preparation: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
trimAlpha: z.ZodBoolean;
|
|
87
|
+
targetWidth: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
targetHeight: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
cropPolicy: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
contain: "contain";
|
|
91
|
+
cover: "cover";
|
|
92
|
+
stretch: "stretch";
|
|
93
|
+
}>>;
|
|
94
|
+
mirrorX: z.ZodBoolean;
|
|
95
|
+
mirrorY: z.ZodBoolean;
|
|
96
|
+
sheet: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
cols: z.ZodNumber;
|
|
98
|
+
rows: z.ZodNumber;
|
|
99
|
+
baseline: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
tileset: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
tileWidth: z.ZodDefault<z.ZodNumber>;
|
|
103
|
+
tileHeight: z.ZodDefault<z.ZodNumber>;
|
|
104
|
+
edges: z.ZodDefault<z.ZodNumber>;
|
|
105
|
+
highlight: z.ZodDefault<z.ZodNumber>;
|
|
106
|
+
shadow: z.ZodDefault<z.ZodNumber>;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
lut: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
110
|
+
brightness: z.ZodDefault<z.ZodNumber>;
|
|
111
|
+
contrast: z.ZodDefault<z.ZodNumber>;
|
|
112
|
+
saturation: z.ZodDefault<z.ZodNumber>;
|
|
113
|
+
lift: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
114
|
+
gain: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
115
|
+
gamma: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
116
|
+
}, z.core.$strict>>;
|
|
117
|
+
}, z.core.$strict>>;
|
|
118
|
+
originalDimensions: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
width: z.ZodNumber;
|
|
120
|
+
height: z.ZodNumber;
|
|
121
|
+
}, z.core.$strict>>;
|
|
122
|
+
trim: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
sourceWidth: z.ZodNumber;
|
|
124
|
+
sourceHeight: z.ZodNumber;
|
|
125
|
+
x: z.ZodNumber;
|
|
126
|
+
y: z.ZodNumber;
|
|
127
|
+
}, z.core.$strict>>;
|
|
128
|
+
referenceAssetId: z.ZodOptional<z.ZodString>;
|
|
129
|
+
provenance: z.ZodOptional<z.ZodString>;
|
|
130
|
+
}, z.core.$strict>;
|
|
131
|
+
export type GameAssetBinding = z.infer<typeof gameAssetBinding>;
|
|
132
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../src/game2d/components/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;kBAI/B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;kBAOkB,CAAC;AAEtD,eAAO,MAAM,kBAAkB;;;;;;;;kBAQ7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAU/B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgB3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { finite, frame } from "./common.js";
|
|
3
|
+
export const gameSheetPreparation = z.strictObject({
|
|
4
|
+
cols: z.number().int().min(1).max(64),
|
|
5
|
+
rows: z.number().int().min(1).max(64),
|
|
6
|
+
baseline: z.number().int().min(0).max(4095).optional()
|
|
7
|
+
});
|
|
8
|
+
export const gameTilesetPreparation = z.strictObject({
|
|
9
|
+
tileWidth: z.number().int().min(1).max(1024).default(32),
|
|
10
|
+
tileHeight: z.number().int().min(1).max(1024).default(32),
|
|
11
|
+
edges: z.number().int().min(1).max(64).default(2),
|
|
12
|
+
highlight: finite.min(1).max(2).default(1.16),
|
|
13
|
+
shadow: finite.min(0).max(1).default(0.72)
|
|
14
|
+
}).refine((settings) => settings.edges * 2 <= Math.min(settings.tileWidth, settings.tileHeight), "edge width must leave room for the tile interior");
|
|
15
|
+
export const gameLutPreparation = z.strictObject({
|
|
16
|
+
size: z.number().int().min(2).max(32).default(16),
|
|
17
|
+
brightness: finite.min(-1).max(1).default(0),
|
|
18
|
+
contrast: finite.min(0).max(2).default(1),
|
|
19
|
+
saturation: finite.min(0).max(2).default(1),
|
|
20
|
+
lift: z.tuple([finite.min(-1).max(1), finite.min(-1).max(1), finite.min(-1).max(1)]).default([0, 0, 0]),
|
|
21
|
+
gain: z.tuple([finite.min(0).max(2), finite.min(0).max(2), finite.min(0).max(2)]).default([1, 1, 1]),
|
|
22
|
+
gamma: z.tuple([finite.min(0.1).max(4), finite.min(0.1).max(4), finite.min(0.1).max(4)]).default([1, 1, 1])
|
|
23
|
+
});
|
|
24
|
+
export const gameImagePreparation = z.strictObject({
|
|
25
|
+
trimAlpha: z.boolean(),
|
|
26
|
+
targetWidth: z.number().int().positive().optional(),
|
|
27
|
+
targetHeight: z.number().int().positive().optional(),
|
|
28
|
+
cropPolicy: z.enum(["cover", "contain", "stretch"]).optional(),
|
|
29
|
+
mirrorX: z.boolean(),
|
|
30
|
+
mirrorY: z.boolean(),
|
|
31
|
+
sheet: gameSheetPreparation.optional(),
|
|
32
|
+
tileset: gameTilesetPreparation.optional(),
|
|
33
|
+
lut: gameLutPreparation.optional()
|
|
34
|
+
});
|
|
35
|
+
export const gameAssetBinding = z.strictObject({
|
|
36
|
+
assetId: z.string().min(1),
|
|
37
|
+
digest: z.string().min(1),
|
|
38
|
+
mediaKind: z.enum(["image", "audio", "font"]).default("image"),
|
|
39
|
+
fontFormat: z.enum(["ttf", "otf"]).optional(),
|
|
40
|
+
width: z.number().int().positive(),
|
|
41
|
+
height: z.number().int().positive(),
|
|
42
|
+
frame: frame.optional(),
|
|
43
|
+
pivot: z.strictObject({ x: finite.min(0).max(1), y: finite.min(0).max(1) }).default({ x: 0.5, y: 0.5 }),
|
|
44
|
+
sampling: z.enum(["nearest", "linear"]).default("nearest"),
|
|
45
|
+
required: z.boolean().optional(),
|
|
46
|
+
preparation: gameImagePreparation.optional(),
|
|
47
|
+
originalDimensions: z.strictObject({ width: z.number().int().positive(), height: z.number().int().positive() }).optional(),
|
|
48
|
+
trim: z.strictObject({ sourceWidth: z.number().int().positive(), sourceHeight: z.number().int().positive(), x: z.number().int().nonnegative(), y: z.number().int().nonnegative() }).optional(),
|
|
49
|
+
referenceAssetId: z.string().optional(),
|
|
50
|
+
provenance: z.string().optional()
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../../src/game2d/components/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,YAAY,CAAC;IACnD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACxD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACzD,KAAK,EAAE,CAAC,CAAC,M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AAwB;;;;mBAAiI,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { finite } from "./common.js";
|
|
3
|
+
export const gameAudioSourceComponent = z.strictObject({ assetId: z.string().min(1), onEvent: z.string().min(1), volume: finite.min(0).max(1).default(1) }).optional();
|
|
4
|
+
//# sourceMappingURL=audioSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audioSource.js","sourceRoot":"","sources":["../../../src/game2d/components/audioSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC"}
|