@kurot/cli 3.5.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -2
- package/README.md +54 -13
- package/dist/core/kui/skin-parts-declaration.d.ts.map +1 -1
- package/dist/core/kui/skin-parts-declaration.js +2 -1
- package/dist/core/kui/skin-parts-declaration.js.map +1 -1
- package/dist/core/plugins/compile-custom-namespaces.js +1 -1
- package/dist/core/plugins/compile-custom-namespaces.js.map +1 -1
- package/dist/core/plugins/compile-engine.js +3 -3
- package/dist/core/plugins/compile-engine.js.map +1 -1
- package/dist/core/plugins/copy-assets.d.ts +2 -0
- package/dist/core/plugins/copy-assets.d.ts.map +1 -1
- package/dist/core/plugins/copy-assets.js +3 -1
- package/dist/core/plugins/copy-assets.js.map +1 -1
- package/dist/utils/fs.d.ts +7 -1
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +10 -3
- package/dist/utils/fs.js.map +1 -1
- package/docs/ai-context.md +40 -9
- package/docs/architecture.md +7 -1
- package/docs/default-ui-skins.md +122 -0
- package/docs/game-template.md +47 -4
- package/docs/label-text-layout.md +3 -1
- package/docs/text-components.md +4 -1
- package/package.json +1 -1
- package/templates/empty/AGENTS.md +25 -0
- package/templates/empty/README.md +60 -0
- package/templates/game/AGENTS.md +30 -0
- package/templates/game/README.md +90 -0
- package/templates/game/resource/assets/ui/kui/kui.json +240 -0
- package/templates/game/resource/assets/ui/kui/kui.png +0 -0
- package/templates/game/resource/config/style.json +26 -4
- package/templates/game/resource/default.res.json +70 -3
- package/templates/game/resource/ui/skins/ButtonSkin.kui.xml +4 -4
- package/templates/game/resource/ui/skins/CheckBoxSkin.kui.xml +4 -4
- package/templates/game/resource/ui/skins/CloseButtonSkin.kui.xml +4 -0
- package/templates/game/resource/ui/skins/ComboBoxSkin.kui.xml +5 -5
- package/templates/game/resource/ui/skins/HScrollBarSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/HSliderSkin.kui.xml +3 -3
- package/templates/game/resource/ui/skins/ItemRendererSkin.kui.xml +3 -3
- package/templates/game/resource/ui/skins/PanelSkin.kui.xml +5 -6
- package/templates/game/resource/ui/skins/ProgressBarSkin.kui.xml +4 -4
- package/templates/game/resource/ui/skins/RadioButtonSkin.kui.xml +4 -4
- package/templates/game/resource/ui/skins/TextInputSkin.kui.xml +4 -4
- package/templates/game/resource/ui/skins/ToggleButtonSkin.kui.xml +3 -3
- package/templates/game/resource/ui/skins/ToggleSwitchSkin.kui.xml +3 -3
- package/templates/game/resource/ui/skins/VScrollBarSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/VSliderSkin.kui.xml +3 -3
- package/templates/game/src/Main.ts +1 -1
- package/templates/game/template/web/index.html +117 -34
- package/templates/game/template/web/logo.png +0 -0
- package/templates/game/resource/assets/ui/eui/eui.json +0 -24
- package/templates/game/resource/assets/ui/eui/eui.png +0 -0
- package/templates/game/resource/ui/skins/GroupSkin.kui.xml +0 -4
- package/templates/game/resource/ui/skins/ImageSkin.kui.xml +0 -4
- package/templates/game/resource/ui/skins/LabelSkin.kui.xml +0 -4
- package/templates/game/resource/ui/skins/ListSkin.kui.xml +0 -7
- package/templates/game/resource/ui/skins/TabBarSkin.kui.xml +0 -5
- package/templates/game/resource/ui/skins/ViewStackSkin.kui.xml +0 -4
package/docs/architecture.md
CHANGED
|
@@ -39,7 +39,7 @@ factory variables, property assignments, semantic layout children, and state
|
|
|
39
39
|
property overrides. Document contracts, reusable instances, data bindings, and
|
|
40
40
|
actions remain `UIDocument` concepts.
|
|
41
41
|
|
|
42
|
-
CLI 3.
|
|
42
|
+
CLI 3.6.0 consumes ui-document ^0.13.0, retaining Label text-fitting metadata. The
|
|
43
43
|
compiler emits `textFit`, `minFontSize`, base font sizes and state overrides;
|
|
44
44
|
native UI owns measurement and derives drawing sizes after layout validation.
|
|
45
45
|
See [Label compilation](label-text-layout.md). The application supplies UI
|
|
@@ -71,6 +71,12 @@ Development builds preserve application source module structure under
|
|
|
71
71
|
`manifest.json`. Static resources retain stable paths because application code
|
|
72
72
|
addresses them by key or URL.
|
|
73
73
|
|
|
74
|
+
Asset copying creates directories only when an accepted runtime file needs them.
|
|
75
|
+
KUI source files and source theme JSON are excluded when UI compilation is enabled,
|
|
76
|
+
so a skin-only `resource/ui` tree is absent from output. Mixed directories retain
|
|
77
|
+
their runtime images/JSON and generated theme output is preserved. Template
|
|
78
|
+
scaffolding keeps its separate empty-directory behavior.
|
|
79
|
+
|
|
74
80
|
## Development watchers
|
|
75
81
|
|
|
76
82
|
The dev server has separate rebuild paths for application source, KUI XML, and
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Default KUI skins
|
|
2
|
+
|
|
3
|
+
This game-template refresh is included in published CLI 3.6.0, verified on npm
|
|
4
|
+
on 2026-10-10. CLI 3.5.0 contains the older atlas. The 2× kit requires published
|
|
5
|
+
Core ^2.5.0; actual published CLI scaffolding resolves that dependency.
|
|
6
|
+
The template owns the XML, textures and project colors; `@kurot/ui`
|
|
7
|
+
does not ship a bitmap theme or load a stylesheet itself.
|
|
8
|
+
|
|
9
|
+
## Visual language
|
|
10
|
+
|
|
11
|
+
Rounded corners, bright blue actions, pale neutral surfaces and a small pressed
|
|
12
|
+
button offset echo the Kurot mascot. The default is a light game interface:
|
|
13
|
+
|
|
14
|
+
| Role | Value |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Action / selected outline | `#1487E8` |
|
|
17
|
+
| Action text / marks | `#071D30` |
|
|
18
|
+
| Canvas / panel | `#EDF3FC` / `#FFFFFF` |
|
|
19
|
+
| Input / neutral control | `#F1F5FC` |
|
|
20
|
+
| Text / secondary text | `#18273E` / `#64748B` |
|
|
21
|
+
| Disabled text | `#7C8799` |
|
|
22
|
+
| Button / input minimum height | 48 logical pixels |
|
|
23
|
+
| CheckBox / RadioButton / switch / slider minimum hit height | 44 logical pixels |
|
|
24
|
+
|
|
25
|
+
Buttons use 14-pixel corner radii and panels use 22. XML single-line labels
|
|
26
|
+
shrink within their allocated width, to a minimum of 14; editable text stays at
|
|
27
|
+
18. Fonts inherit the application's configured family. No browser CSS is used
|
|
28
|
+
to draw the components, and no runtime light/dark switching is introduced.
|
|
29
|
+
|
|
30
|
+
## Text and spacing
|
|
31
|
+
|
|
32
|
+
Single-line captions use `multiline="false" verticalAlign="middle"` with the
|
|
33
|
+
Core 2.5.0 ink-centering correction. Button label padding is 10 pixels
|
|
34
|
+
above/below; its down state uses 12/8 to retain a deliberate 2-pixel press offset.
|
|
35
|
+
The icon has the same neutral/down centers. Panel titles also opt into middle
|
|
36
|
+
alignment. Input text retains Core's stable font baseline while its placeholder
|
|
37
|
+
uses dynamic visual centering. No language-specific skin offsets are required.
|
|
38
|
+
See [Core text alignment](../../core/docs/text-layout.md#visual-centering-and-stable-baselines-core-250).
|
|
39
|
+
Published Core 2.4.0 does not contain that correction; the isolated preview uses
|
|
40
|
+
checkout Core for both text alignment and source density.
|
|
41
|
+
|
|
42
|
+
## Resources and XML
|
|
43
|
+
|
|
44
|
+
- `resource/assets/ui/kui/kui.json` and `kui.png`: Kurot-owned 512×512 atlas,
|
|
45
|
+
generated at 2× with sheet `resolution: 2`. XML dimensions stay logical.
|
|
46
|
+
- `resource/default.res.json`: preload group `kui` and object-valued frame
|
|
47
|
+
metadata. Qualified sources such as `kui.button_up` avoid bare-key collisions.
|
|
48
|
+
- `resource/ui/skins/*.kui.xml`: 15 native default component skins and
|
|
49
|
+
`CloseButtonSkin`, used explicitly by Panel's `closeButton`.
|
|
50
|
+
- `resource/config/style.json`: named colors used by Label/EditableText state
|
|
51
|
+
properties. Raster colors are baked into textures; changing text colors alone
|
|
52
|
+
does not recolor the atlas.
|
|
53
|
+
|
|
54
|
+
Buttons provide up/down/disabled surfaces. CheckBox, RadioButton, ToggleButton
|
|
55
|
+
and ToggleSwitch cover all six selected/pressed/disabled combinations.
|
|
56
|
+
ItemRenderer supplies selected states for List and TabBar; ComboBox supplies
|
|
57
|
+
normal/open/disabled states and TextInput handles both prompt states when
|
|
58
|
+
enabled or disabled. Sliders supply a disabled thumb. Panel retains its drag
|
|
59
|
+
area, title and close button.
|
|
60
|
+
|
|
61
|
+
Skin part names and the native component APIs stay unchanged. The CLI compiles
|
|
62
|
+
source changes with a paired nine-slice grid from resource metadata, including
|
|
63
|
+
state transitions. Frames retain their full physical dimensions and never rotate
|
|
64
|
+
or trim; extrusion stays outside the recorded frame. Core divides original frame
|
|
65
|
+
dimensions/trim offsets by density; grids remain logical. Stretchable surfaces keep
|
|
66
|
+
their corners while the interior expands. Icons and switch handles remain fixed
|
|
67
|
+
size. Horizontal and vertical slider tracks have grids that fit their 8-pixel
|
|
68
|
+
thickness.
|
|
69
|
+
|
|
70
|
+
Scroller keeps `autoVisibility="false" visible="false"` on both bars. It retains
|
|
71
|
+
automatic scrolling policies and touch/trackpad scrolling. To display bars in a
|
|
72
|
+
project, edit those parts explicitly.
|
|
73
|
+
|
|
74
|
+
ItemRenderer backgrounds fit the allocated row width without extra horizontal
|
|
75
|
+
padding. The checkout Core also fixes fractional WebGL scissor bounds so scaled
|
|
76
|
+
Lists retain their right outline. Published Core 2.4.0 lacks that correction;
|
|
77
|
+
shrinking the skin or changing its nine-slice grid is not required.
|
|
78
|
+
|
|
79
|
+
Group, List, TabBar, ViewStack and text/image nodes are composed directly in XML;
|
|
80
|
+
their old default-Skin placeholders were not conventional Theme mappings and
|
|
81
|
+
are removed. Use `itemRendererSkinName` to choose a List/TabBar row appearance,
|
|
82
|
+
and wrap the node with Group/Image/Scroller for its surface and viewport.
|
|
83
|
+
|
|
84
|
+
## Native preview and maintenance
|
|
85
|
+
|
|
86
|
+
`examples/game/resource/ui/DefaultUISkin.kui.xml` contains the native gallery.
|
|
87
|
+
`src/DefaultUI.ts` only connects data and events. The example installs its own
|
|
88
|
+
project font loader and document dependency; other projects are unchanged.
|
|
89
|
+
|
|
90
|
+
The example now locks registry Core 2.5.4, which supports sheet density. Its
|
|
91
|
+
installed CLI remains 3.3.1, so use checkout CLI 3.6.0 for the current gallery's
|
|
92
|
+
constructor-name preservation. From the repository root:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
pnpm --dir packages/cli build
|
|
96
|
+
cd examples/game
|
|
97
|
+
node ../../packages/cli/dist/index.js dev
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Open the server URL with `?ui=1`; the ordinary scene remains available without
|
|
101
|
+
that parameter. Try the inputs, switches, ComboBox, tabs, sliders, panel close
|
|
102
|
+
button and draggable List. The gallery uses the example's installed Core/UI
|
|
103
|
+
with compiled KUI XML, without modifying dependencies or locks. In that example
|
|
104
|
+
directory, the same CLI accepts `build` and `build --release` for one-shot builds.
|
|
105
|
+
The private asset tool's isolated source preview remains an optional maintenance
|
|
106
|
+
tool for testing checkout engine changes; it is not required by the installed Core.
|
|
107
|
+
|
|
108
|
+
CLI 3.6.0 preserves constructor names in development and release
|
|
109
|
+
engine/namespace bundles so Theme lookup also works for self-referencing
|
|
110
|
+
classes such as Scroller. Published CLI 3.5.0 lacks the development correction.
|
|
111
|
+
|
|
112
|
+
`tools/default-ui-assets` contains editable SVG geometry and the reproducible
|
|
113
|
+
PNG/atlas generator. It uses registry `@kurot/atlas@0.1.0` only as private
|
|
114
|
+
repository tooling. CLI and runtime SDKs gain no atlas dependency. See its
|
|
115
|
+
[maintenance instructions](../../../tools/default-ui-assets/README.md).
|
|
116
|
+
|
|
117
|
+
Core 2.5.0 and CLI 3.6.0 are published; Core was published first.
|
|
118
|
+
UI/Game/document/runtime need no incidental release; existing 1× consumers keep
|
|
119
|
+
their behavior. See [density units and adoption](../../core/docs/texture-density.md).
|
|
120
|
+
Existing projects keep their own skins, resource keys and startup code. New
|
|
121
|
+
scaffolds receive this kit after the supporting Core and CLI publications;
|
|
122
|
+
installing a new CLI does not rewrite an existing project's resources.
|
package/docs/game-template.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Project styles and languages in the game template
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Project-owned style/font/language initialization was introduced in CLI 3.2.1
|
|
4
|
+
and remains in published CLI 3.6.0. Existing projects keep their own startup
|
|
5
|
+
code and HTML; the empty template stays minimal.
|
|
6
|
+
|
|
7
|
+
## Project documentation in 3.6.1
|
|
8
|
+
|
|
9
|
+
CLI 3.6.1 includes a project README and short AGENTS entry in both templates.
|
|
10
|
+
This version is prepared locally and has not been published.
|
|
11
|
+
They identify the gameplay entry, commands, expected startup, generated files
|
|
12
|
+
and task-specific guides in installed SDK packages. Read the consumer project's
|
|
13
|
+
manifest, lock and installation for its actual versions. These additions are
|
|
14
|
+
not in the already published CLI 3.6.0 artifact and do not rewrite existing games.
|
|
15
|
+
For gameplay, the entries point to Core's game-authoring guide when installed,
|
|
16
|
+
or the Star Catcher reference in an engine checkout; older packages retain their
|
|
17
|
+
README/type-declaration fallback.
|
|
18
|
+
|
|
19
|
+
The [standard UI guide](../../ui/docs/ui-authoring.md), bundled in UI 3.6.2, adds
|
|
20
|
+
directory, TS/Skin pairing and lifecycle rules above the API reference, with a
|
|
21
|
+
complete HUD recipe. The game README points at its installed copy. UI 3.6.2 and
|
|
22
|
+
CLI 3.6.1 are separate packages: installing UI supplies the guides, while using
|
|
23
|
+
the new CLI for create supplies template entry docs. Existing projects keep
|
|
24
|
+
their own instructions and can add the links explicitly.
|
|
6
25
|
|
|
7
26
|
## Files
|
|
8
27
|
|
|
9
|
-
- resource/config/style.json declares the primary font role and
|
|
28
|
+
- resource/config/style.json declares the primary font role and skin text colors.
|
|
10
29
|
- resource/assets/fonts contains unmodified Chakra Petch regular (400) and bold (700)
|
|
11
30
|
files, with OFL.txt. Source: [Google Fonts](https://github.com/google/fonts/tree/main/ofl/chakrapetch).
|
|
12
31
|
- resource/config/locale.json enables English and selects en_US by default.
|
|
@@ -28,8 +47,32 @@ This ordering includes loading-screen Labels in the project font. The loading
|
|
|
28
47
|
screen's startup messages stay in English because translations are not loaded yet.
|
|
29
48
|
Templates do not implement live font/theme/language replacement.
|
|
30
49
|
|
|
50
|
+
## HTML brand splash
|
|
51
|
+
|
|
52
|
+
This splash is included in published CLI 3.6.0; npm CLI 3.5.0 lacks it.
|
|
53
|
+
|
|
54
|
+
The game template's `web/index.html` presents `web/logo.png` beneath a small
|
|
55
|
+
"Made with" caption. The mascot makes a gentle entrance, then repeats a playful
|
|
56
|
+
hop and sway every 3.2 seconds while the entry module loads. Sparkles and a soft
|
|
57
|
+
blue glow follow the loop. The splash has no loading text or progress indicator;
|
|
58
|
+
the application's Preloader owns resource progress. Animations stop when the
|
|
59
|
+
browser requests reduced motion. The logo size follows both viewport width and
|
|
60
|
+
height for small screens and landscape.
|
|
61
|
+
|
|
62
|
+
The HTML overlay fades out after the entry module evaluates, without a minimum
|
|
63
|
+
display time or a wait for the entrance animation to finish. It does not wait
|
|
64
|
+
for project font or resource loading. Customize the branding directly in the
|
|
65
|
+
project's HTML. This template update applies to newly scaffolded game projects;
|
|
66
|
+
existing project HTML is project-owned.
|
|
67
|
+
|
|
31
68
|
## Change fonts and colors
|
|
32
69
|
|
|
70
|
+
The CLI 3.6.0 [default KUI skins](default-ui-skins.md) use Kurot-owned textures
|
|
71
|
+
under resource/assets/ui/kui and a matching color palette. Registry CLI 3.5.0
|
|
72
|
+
does not include this skin refresh. Skin state text colors compile from the
|
|
73
|
+
project stylesheet; texture colors are baked into the PNG, without live palette
|
|
74
|
+
switching. Templates inherit project fonts and retain the existing licensed files.
|
|
75
|
+
|
|
33
76
|
Font keys such as primary produce stable aliases such as kurot-primary. Replace
|
|
34
77
|
files and update style.json resource-relative paths, retaining weight 400 and
|
|
35
78
|
unique weights. Default skins inherit the configured font; explicit Label fontFamily
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Label text compilation
|
|
2
2
|
|
|
3
|
-
CLI 3.
|
|
3
|
+
CLI 3.6.0 consumes ui-document ^0.13.0 and compiles KUI text-fitting properties
|
|
4
4
|
through the existing UIDocument → SkinIR → ESM factory pipeline. The semantic
|
|
5
5
|
document format remains version 2.
|
|
6
6
|
|
|
@@ -35,6 +35,8 @@ introduces build-time text measurement. See the
|
|
|
35
35
|
## Runtime boundary
|
|
36
36
|
|
|
37
37
|
- The application must install UI `^3.1.0` and Core `^2.1.0` for shrinking.
|
|
38
|
+
These are the feature's original API minimums. Installing current UI 3.4.0
|
|
39
|
+
requires Core `^2.4.0` for that package's centered-flip contract.
|
|
38
40
|
They remain application dependencies; CLI depends on the headless document
|
|
39
41
|
package rather than importing the engine into the build process.
|
|
40
42
|
- `textFit` is `none` by default or `shrink` for ordinary single-line Labels.
|
package/docs/text-components.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# BitmapLabel and RichLabel compilation
|
|
2
2
|
|
|
3
|
-
CLI 3.4.0
|
|
3
|
+
Native text compilation was introduced in CLI 3.4.0 with document 0.12.0.
|
|
4
|
+
Current CLI 3.6.0 requires published ui-document ^0.13.0 and retains these tags.
|
|
5
|
+
Applications rendering these tags
|
|
4
6
|
must install UI `^3.3.0` and Core `^2.3.0`; Core 2.3.1 fixes unstyled blank
|
|
5
7
|
rich-text line metrics. The CLI does not install or bundle its own Core/UI.
|
|
6
8
|
Document format version 2 and existing project configuration are unchanged.
|
|
9
|
+
Installing UI 3.4.0 requires Core ^2.4.0 for that package's centered-flip contract.
|
|
7
10
|
|
|
8
11
|
```xml
|
|
9
12
|
<Skin xmlns="https://kurot.dev/ui/1" class="TextSkin" states="disabled">
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Game project agent entry
|
|
2
|
+
|
|
3
|
+
Read [README.md](README.md) for commands, expected startup and project paths.
|
|
4
|
+
For a complete game flow, follow its game-authoring/Star Catcher route when available.
|
|
5
|
+
Use package.json, the lock and `pnpm list --depth 0` for the actual SDK baseline.
|
|
6
|
+
|
|
7
|
+
- Start gameplay changes in `src/Main.ts` or the modules it imports. This is a
|
|
8
|
+
Core-only consumer project; engine internals are outside its normal scope.
|
|
9
|
+
- Read installed Core's README first. For the API being changed, consult its
|
|
10
|
+
public `dist/index.d.ts`/re-exported types and the relevant installed guide.
|
|
11
|
+
When available, `docs/api/topics.md` routes to individual symbol/member pages.
|
|
12
|
+
The README links resources, audio and CLI usage; load other docs on demand.
|
|
13
|
+
When an older install lacks a guide, use its README/types before versioned
|
|
14
|
+
source. Engine-repository source paths may be absent from node_modules.
|
|
15
|
+
- Use TypeScript, ESM and the project's strict settings. Use named exports,
|
|
16
|
+
explicit exported-function return types and `undefined` for missing values.
|
|
17
|
+
Use the installed public API and preserve the project's dependency baseline.
|
|
18
|
+
- Keep one Player. Display/input coordinates are logical units. Retain listener
|
|
19
|
+
and tick callback identities so application cleanup can unregister them.
|
|
20
|
+
`app.stop()` stops this Player's rendering; manage gameplay activity separately.
|
|
21
|
+
- Edit source/config/resource inputs; output directories and `.kurot/` are
|
|
22
|
+
generated. Read the authored HTML path from kurot.config.ts.
|
|
23
|
+
- Before finishing, run `pnpm build` and check the browser console and intended
|
|
24
|
+
behavior. Run `pnpm release` when changing release behavior. Report executed
|
|
25
|
+
checks and any unverified behavior; build success alone is not gameplay proof.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Kurot empty project
|
|
2
|
+
|
|
3
|
+
A minimal Core-only application. The initial canvas is blank; the browser
|
|
4
|
+
console prints `Kurot game started`. Add your gameplay in `src/Main.ts`.
|
|
5
|
+
|
|
6
|
+
## Run and build
|
|
7
|
+
|
|
8
|
+
Use Node.js 20+ and pnpm from this project directory:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
pnpm install
|
|
12
|
+
pnpm dev
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Open the URL printed by the server (default `http://localhost:3000`). Refresh
|
|
16
|
+
the browser manually after a successful rebuild.
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
pnpm build
|
|
20
|
+
pnpm release
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Development output is `bin-debug/`; release output is
|
|
24
|
+
`bin-release/web/<timestamp>/`. Serve the generated directory over HTTP for
|
|
25
|
+
browser checks. `pnpm clean` removes both output trees.
|
|
26
|
+
|
|
27
|
+
The CLI transpiles with esbuild; a successful build does not establish complete
|
|
28
|
+
TypeScript type correctness or gameplay behavior. After changes, check the
|
|
29
|
+
browser console, resource requests and intended interactions.
|
|
30
|
+
|
|
31
|
+
## Project map
|
|
32
|
+
|
|
33
|
+
- `src/Main.ts`: creates the single Player and root Sprite; add game objects
|
|
34
|
+
and input/update logic here or in application modules it imports.
|
|
35
|
+
- `kurot.config.ts`: build entry, stage settings and output paths. Keep explicit
|
|
36
|
+
createPlayer options in Main consistent with the intended stage settings.
|
|
37
|
+
- `template/web/index.html`: authored HTML and canvas.
|
|
38
|
+
- `bin-debug/`, `bin-release/` and `.kurot/`: generated files; edit their inputs.
|
|
39
|
+
|
|
40
|
+
## Read only what the task needs
|
|
41
|
+
|
|
42
|
+
For gameplay, read Core's `docs/game-authoring.md` when the installed package
|
|
43
|
+
includes it. In an engine checkout, that guide links `examples/star-catcher`,
|
|
44
|
+
a complete game with `pnpm check`. The guide ships since Core 2.5.5; Star Catcher
|
|
45
|
+
is repository content. Older installations can use their README/types instead.
|
|
46
|
+
|
|
47
|
+
After installation, start with [Core usage](node_modules/@kurot/core/README.md).
|
|
48
|
+
Use [resources](node_modules/@kurot/core/docs/resource.md),
|
|
49
|
+
[audio](node_modules/@kurot/core/docs/audio-playback.md) or
|
|
50
|
+
[CLI commands](node_modules/@kurot/cli/README.md) when relevant. These links are
|
|
51
|
+
project-relative and become available after installation.
|
|
52
|
+
|
|
53
|
+
Read `package.json`, `pnpm-lock.yaml` and `pnpm list --depth 0` for the declared,
|
|
54
|
+
locked and installed versions. Public signatures are in each installed package's
|
|
55
|
+
`dist/index.d.ts` and re-exported declarations. For an older package lacking a
|
|
56
|
+
linked guide, use that installed version's README/types, then its exact version
|
|
57
|
+
source if needed. Repository `src/` paths are not guaranteed inside npm packages.
|
|
58
|
+
|
|
59
|
+
The project starts with Core only. Add further SDKs explicitly when gameplay
|
|
60
|
+
requires them; keep dependency adoption separate from ordinary feature work.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Game project agent entry
|
|
2
|
+
|
|
3
|
+
Read [README.md](README.md) for commands, project paths and installed-doc links.
|
|
4
|
+
For a complete game flow, follow its game-authoring/Star Catcher route when available.
|
|
5
|
+
Check package.json, the lock and `pnpm list --depth 0` for the actual SDK baseline.
|
|
6
|
+
|
|
7
|
+
- Start gameplay in `src/Main.ts` or its application modules. Consult startup
|
|
8
|
+
services only when changing fonts, resources, translations or lifecycle.
|
|
9
|
+
Preserve the startup order documented in README.
|
|
10
|
+
- For UI, follow README's installed UI authoring/ScoreHUD route (UI >= 3.6.2). Pair discovered component
|
|
11
|
+
TS and Skin XML at matching relative paths; keep helpers outside the scanned
|
|
12
|
+
components directory. Edit appearance in XML and game decisions in controllers.
|
|
13
|
+
- Read the relevant installed Core/Game/UI/CLI README and public declarations
|
|
14
|
+
before adding APIs. When installed, `docs/api/topics.md` routes to individual
|
|
15
|
+
symbol/member pages; read only those needed. Published Game 2.0.0 has no
|
|
16
|
+
docs/; use its README/types, then versioned source if needed. Source paths in
|
|
17
|
+
engine context maps may be absent from installed packages.
|
|
18
|
+
- Use TypeScript, ESM and strict settings, named exports, explicit exported
|
|
19
|
+
function return types and `undefined` for missing values. Use public APIs
|
|
20
|
+
from the installed versions; keep dependency adoption explicit.
|
|
21
|
+
- Keep one Player and use logical display/input coordinates. Manage cleanup
|
|
22
|
+
for gameplay ticks, listeners, timers, tweens and sound channels on restart
|
|
23
|
+
and exit. `app.stop()` stops rendering; it does not pause all gameplay work.
|
|
24
|
+
- Edit source, KUI XML, manifests and project configuration. Build outputs,
|
|
25
|
+
generated theme JSON and `.kurot/` declarations come from those inputs.
|
|
26
|
+
- Finish with `pnpm build`, `pnpm exec tsc --noEmit --skipLibCheck false`
|
|
27
|
+
(CLI >= 3.6.1) and browser checks for startup, resources and changed
|
|
28
|
+
interactions. Check restart/cleanup when affected and `pnpm release` for
|
|
29
|
+
release changes. Report checks actually run and remaining verification limits;
|
|
30
|
+
esbuild success alone is not type checking or proof of playability.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Kurot game project
|
|
2
|
+
|
|
3
|
+
This starter demonstrates resource loading, styled KUI controls, translations
|
|
4
|
+
and Tween animation. Extend `src/Main.ts` with your game's rules and interaction.
|
|
5
|
+
|
|
6
|
+
## Run and build
|
|
7
|
+
|
|
8
|
+
Use Node.js 20+ and pnpm from this project directory:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
pnpm install
|
|
12
|
+
pnpm dev
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Open the URL printed by the server (default `http://localhost:3000`). Expect the
|
|
16
|
+
loading screen followed by the translated starter interface and animated text.
|
|
17
|
+
Refresh the browser manually after a successful rebuild.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm build
|
|
21
|
+
pnpm exec tsc --noEmit --skipLibCheck false
|
|
22
|
+
pnpm release
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Development output is `bin-debug/`; release output is
|
|
26
|
+
`bin-release/web/<timestamp>/`. Serve the generated directory over HTTP for
|
|
27
|
+
browser checks. `pnpm clean` removes both output trees.
|
|
28
|
+
|
|
29
|
+
The full declaration check requires CLI >= 3.6.1 for generated host skinParts;
|
|
30
|
+
rebuild after adopting it. Use the project's installed TypeScript compiler.
|
|
31
|
+
The CLI transpiles with esbuild; a successful build does not establish complete
|
|
32
|
+
TypeScript type correctness or gameplay behavior. Check console errors, resource
|
|
33
|
+
requests and the intended interactions in the browser.
|
|
34
|
+
|
|
35
|
+
## Project map
|
|
36
|
+
|
|
37
|
+
- `src/Main.ts`: application startup and gameplay/UI composition. Preserve the
|
|
38
|
+
existing font → Player → resources/theme → translations → scene ordering.
|
|
39
|
+
- `src/StyleManager.ts`, `LocaleManager.ts`, `AssetAdapter.ts`, `Preloader.ts`
|
|
40
|
+
and `LifecycleHandler.ts`: startup services; consult them when changing their
|
|
41
|
+
responsibility rather than reading all of them for every gameplay task.
|
|
42
|
+
- `resource/default.res.json`: resource manifest; `resource/config/`: fonts,
|
|
43
|
+
colors and language settings; `resource/lang/`: translation text.
|
|
44
|
+
- `resource/ui/skins/`: editable default KUI skins. For reusable controls, pair
|
|
45
|
+
`src/components/<Name>.ts` with
|
|
46
|
+
`resource/ui/components/<Name>Skin.kui.xml`; export the matching class name.
|
|
47
|
+
- `kurot.config.ts`: build/stage/component settings; `template/web/index.html`:
|
|
48
|
+
authored HTML. Keep explicit createPlayer options consistent with stage intent.
|
|
49
|
+
- `bin-debug/`, `bin-release/`, `.kurot/` and generated theme JSON: build outputs.
|
|
50
|
+
Edit authored inputs; the CLI generates the Skin module and part declarations.
|
|
51
|
+
|
|
52
|
+
## Read only what the task needs
|
|
53
|
+
|
|
54
|
+
For UI creation, read [standard UI authoring](node_modules/@kurot/ui/docs/ui-authoring.md)
|
|
55
|
+
and the [complete ScoreHUD pair](node_modules/@kurot/ui/docs/recipes/score-hud.md).
|
|
56
|
+
They specify the project tree above, typed component/Skin pairing and caller-owned
|
|
57
|
+
cleanup, and ship since UI 3.6.2. If an older installation lacks them, use that
|
|
58
|
+
version's README/types or the engine checkout's `packages/ui/docs/` guides when
|
|
59
|
+
available; verify APIs against the installed version.
|
|
60
|
+
Keep any game-specific variations in this project's README/AGENTS rather than
|
|
61
|
+
re-reading engine source for ordinary UI tasks.
|
|
62
|
+
|
|
63
|
+
For gameplay, use Core's `docs/game-authoring.md` when available. In an engine
|
|
64
|
+
checkout, it links `examples/star-catcher`, a complete game with `pnpm check`.
|
|
65
|
+
The game guide ships since Core 2.5.5; Star Catcher is repository content.
|
|
66
|
+
Older installed packages retain the README/type-declaration fallback.
|
|
67
|
+
|
|
68
|
+
After installation, choose the relevant guide:
|
|
69
|
+
|
|
70
|
+
| Task | Installed documentation |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| Startup, display and input APIs | [Core README](node_modules/@kurot/core/README.md) |
|
|
73
|
+
| Resource loading | [Resource guide](node_modules/@kurot/core/docs/resource.md) |
|
|
74
|
+
| Tween/MovieClip | [Game README](node_modules/@kurot/game/README.md) |
|
|
75
|
+
| UI workflow, directories and cleanup | [UI authoring](node_modules/@kurot/ui/docs/ui-authoring.md) (UI >= 3.6.2) |
|
|
76
|
+
| Complete TS/Skin pair | [ScoreHUD](node_modules/@kurot/ui/docs/recipes/score-hud.md) (UI >= 3.6.2) |
|
|
77
|
+
| HUD, controls and skin lifecycle | [UI README](node_modules/@kurot/ui/README.md) |
|
|
78
|
+
| KUI/build commands | [CLI README](node_modules/@kurot/cli/README.md) |
|
|
79
|
+
| Fonts, colors and language startup | [Template guide](node_modules/@kurot/cli/docs/game-template.md) |
|
|
80
|
+
|
|
81
|
+
These links are project-relative and become available after installation.
|
|
82
|
+
Read package.json, pnpm-lock.yaml and `pnpm list --depth 0` for declared, locked
|
|
83
|
+
and installed versions. Use public `dist/index.d.ts` and re-exported declarations
|
|
84
|
+
to confirm APIs; older installations can lack newer guides. Published Game 2.0.0
|
|
85
|
+
has README/types but omits docs/. Use those before consulting versioned source.
|
|
86
|
+
|
|
87
|
+
The 2× default atlas needs Core >= 2.5.0 within 2.x; also satisfy the installed
|
|
88
|
+
UI's Core peer. ui-document supports this starter's stylesheet parsing.
|
|
89
|
+
CLI-compiled skins run through UI; add ui-runtime only for its materialization
|
|
90
|
+
features. Existing project dependencies remain project-owned.
|