@kurot/core 2.3.1 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +51 -2
  2. package/README.md +28 -4
  3. package/dist/kurot/player/bitmap-fill.d.ts +10 -0
  4. package/dist/kurot/player/bitmap-fill.d.ts.map +1 -0
  5. package/dist/kurot/player/bitmap-fill.js +41 -0
  6. package/dist/kurot/player/bitmap-fill.js.map +1 -0
  7. package/dist/kurot/player/canvas/CanvasRenderer.d.ts +1 -0
  8. package/dist/kurot/player/canvas/CanvasRenderer.d.ts.map +1 -1
  9. package/dist/kurot/player/canvas/CanvasRenderer.js +35 -5
  10. package/dist/kurot/player/canvas/CanvasRenderer.js.map +1 -1
  11. package/dist/kurot/player/canvas/DisplayList.d.ts.map +1 -1
  12. package/dist/kurot/player/canvas/DisplayList.js +2 -1
  13. package/dist/kurot/player/canvas/DisplayList.js.map +1 -1
  14. package/dist/kurot/player/pipes/BitmapPipe.d.ts.map +1 -1
  15. package/dist/kurot/player/pipes/BitmapPipe.js +8 -1
  16. package/dist/kurot/player/pipes/BitmapPipe.js.map +1 -1
  17. package/dist/kurot/player/pipes/MaskPipe.d.ts.map +1 -1
  18. package/dist/kurot/player/pipes/MaskPipe.js +3 -2
  19. package/dist/kurot/player/pipes/MaskPipe.js.map +1 -1
  20. package/dist/kurot/player/pipes/TextPipe.d.ts.map +1 -1
  21. package/dist/kurot/player/pipes/TextPipe.js +9 -5
  22. package/dist/kurot/player/pipes/TextPipe.js.map +1 -1
  23. package/dist/kurot/player/pipes/filter-bounds.d.ts.map +1 -1
  24. package/dist/kurot/player/pipes/filter-bounds.js +2 -18
  25. package/dist/kurot/player/pipes/filter-bounds.js.map +1 -1
  26. package/dist/kurot/player/render-bounds.d.ts +8 -0
  27. package/dist/kurot/player/render-bounds.d.ts.map +1 -0
  28. package/dist/kurot/player/render-bounds.js +35 -0
  29. package/dist/kurot/player/render-bounds.js.map +1 -0
  30. package/dist/kurot/player/webgl/WebGLRenderer.d.ts.map +1 -1
  31. package/dist/kurot/player/webgl/WebGLRenderer.js +2 -1
  32. package/dist/kurot/player/webgl/WebGLRenderer.js.map +1 -1
  33. package/dist/kurot/text/TextRenderBounds.d.ts +7 -0
  34. package/dist/kurot/text/TextRenderBounds.d.ts.map +1 -0
  35. package/dist/kurot/text/TextRenderBounds.js +21 -0
  36. package/dist/kurot/text/TextRenderBounds.js.map +1 -0
  37. package/docs/ai-context.md +16 -2
  38. package/docs/bitmap-fill.md +42 -0
  39. package/docs/text-layout.md +44 -13
  40. package/package.json +1 -1
@@ -58,6 +58,33 @@ Assigning `text`, including the same string represented by a previous `textFlow`
58
58
  returns the field to plain-text styling. `measureText` does not load fonts or
59
59
  cache a separate measurement; UI components may cache results until invalidated.
60
60
 
61
+ ## Text outlines (Core 2.3.2)
62
+
63
+ Dynamic TextFields have a render-only margin for their effective stroke widths,
64
+ including run-level overrides. Canvas clipping, WebGL text rasterization,
65
+ display-list caches, filter captures and object-mask buffers retain this ink.
66
+ The margin covers stroke antialiasing and glyph overhang; it is not part of
67
+ `width`, `height`, `textWidth`, `textHeight`, `measureText()` or hit-test bounds.
68
+ Wrapping and horizontal/vertical alignment use the original layout dimensions.
69
+
70
+ Explicit dimensions still constrain layout and select visible lines. Partially
71
+ visible lines clip against the expanded ink area; fully hidden lines are not
72
+ painted, including lines immediately before or after a scrolled viewport.
73
+ Input fields keep their exact viewport for text, selection and caret drawing.
74
+ External `scrollRect` and masks retain their authored boundaries and can clip
75
+ outlines intentionally. Zero-size fields remain empty.
76
+
77
+ `test/TextStroke.test.ts` covers render margins, run overrides, measurements,
78
+ scrolling, input viewports, zero dimensions and resolution-limited GPU caches.
79
+ The minified browser suite in
80
+ `examples/visual-regression/tests/text-stroke.spec.ts` compares actual text pixels
81
+ with an unclipped Canvas reference in Canvas 2D, WebGL 1 and WebGL 2 at 1x/2x
82
+ resolution. Canvas CPU filter and object-mask captures retain their existing
83
+ 1x rasterization; their pixel comparison runs at 1x. This fix is published in
84
+ Core 2.3.2 and is not included in Core 2.3.1. No layout/API migration or dependent
85
+ SDK bump is required. Update
86
+ the installed Core and rebuild the application to adopt the correction.
87
+
61
88
  ## Font readiness
62
89
 
63
90
  Load fonts before constructing or measuring text where possible. After a font
@@ -106,7 +133,11 @@ runtime APIs. Both WebGL text rasterization and Canvas rendering share this
106
133
  layout. Core 2.1.0 also adds explicit single-line and font-invalidation
107
134
  regressions. No resource-manifest or CLI XML-format change is involved.
108
135
 
109
- ## Package dependencies
136
+ ## Core 2.2.1 adoption snapshot
137
+
138
+ This section records the dependency audit for 2.2.1, before the later native
139
+ RichLabel releases and Editor 0.22.0. For current peer requirements and 2.3.2
140
+ adoption, see the [independent release policy](../../../docs/dependency-policy.md).
110
141
 
111
142
  Published UI 3.2.0 requires Core `^2.2.0` for BitmapLabel. Older UI 3.1.0 and
112
143
  ui-runtime 0.8.2 declare Core `^2.1.0`; game 2.0.0 declares `^2.0.0`.
@@ -126,17 +157,17 @@ lockfiles and installed package versions. Older versions inside an accepted
126
157
  range are optional adoption for projects/development, not SDK release blockers.
127
158
  See the [independent release policy](../../../docs/dependency-policy.md).
128
159
 
129
- | Consumer | Current Core declaration | Locked or pinned Core | Adoption or migration |
130
- | --------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
131
- | UI development | `^2.2.0` | 2.2.0 | Optionally refresh the development lockfile. |
132
- | DragonBones development | `^2.2.0`; peer `^2.1.1` | 2.2.0 | Optionally refresh the development lockfile. The peer already accepts 2.2.1. |
133
- | Game / ui-runtime development | `^2.1.1` | 2.1.1 | Optionally refresh the development lockfiles. Their peers already accept 2.2.1. |
134
- | Engine examples / copied Reskin project | `^2.1.1` | 2.1.1 | Refresh application lockfiles when adopting the fix. |
135
- | Templates/tentax | `^2.2.1` | 2.2.1 | Adopted with UI 3.2.0 and Spine 4.0 adapter 0.2.1; strict development/release builds and all 170 application tests passed. |
136
- | Editor | `2.1.1` | 2.1.1 in bun.lock and the installation | Update the exact dependency, lockfile and installation; rebuild to deliver the fix. |
137
- | Reskin application | `^2.1.1` | 2.1.1 in bun.lock and the installation | Refresh the Bun lockfile and installation when adopting the fix; validate the Spine 4.0 adapter. |
138
- | milf-master template | `^2.1.1` | No lockfile or installed Core | New installs accept 2.2.1; use `^2.2.1` to require the corrected baseline. |
139
- | Separate Spine 4.0–4.3 adapters | Published 0.2.1 / 0.3.1 peers `^1.0.16 | | ^2.0.0`; development `^2.2.1` | Development 2.2.1; earlier 0.2.0 / 0.3.0 have Core 1.x peers | Refresh consumer installations/locks to adopt the published adapter patches. |
160
+ | Consumer | Audited Core declaration | Locked or pinned Core at audit | Adoption or migration |
161
+ | --------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
162
+ | UI development | `^2.2.0` | 2.2.0 | Optionally refresh the development lockfile. |
163
+ | DragonBones development | `^2.2.0`; peer `^2.1.1` | 2.2.0 | Optionally refresh the development lockfile. The peer already accepts 2.2.1. |
164
+ | Game / ui-runtime development | `^2.1.1` | 2.1.1 | Optionally refresh the development lockfiles. Their peers already accept 2.2.1. |
165
+ | Engine examples / copied Reskin project | `^2.1.1` | 2.1.1 | Refresh application lockfiles when adopting the fix. |
166
+ | Templates/tentax | `^2.2.1` | 2.2.1 | Adopted with UI 3.2.0 and Spine 4.0 adapter 0.2.1; strict development/release builds and all 170 application tests passed. |
167
+ | Editor | `2.1.1` | 2.1.1 in bun.lock and the installation | Update the exact dependency, lockfile and installation; rebuild to deliver the fix. |
168
+ | Reskin application | `^2.1.1` | 2.1.1 in bun.lock and the installation | Refresh the Bun lockfile and installation when adopting the fix; validate the Spine 4.0 adapter. |
169
+ | milf-master template | `^2.1.1` | No lockfile or installed Core | New installs accept 2.2.1; use `^2.2.1` to require the corrected baseline. |
170
+ | Separate Spine 4.0–4.3 adapters | Published 0.2.1 / 0.3.1 peers `^1.0.16 \|\| ^2.0.0`; development `^2.2.1` | Development 2.2.1; earlier 0.2.0 / 0.3.0 have Core 1.x peers | Refresh consumer installations/locks to adopt the published adapter patches. |
140
171
 
141
172
  UI, Game, ui-runtime and DragonBones need no new release solely to receive this
142
173
  Core patch: their published peers already accept 2.2.1. Development installs
@@ -152,7 +183,7 @@ rebuild. Templates/tentax has adopted published adapter 0.2.1 and Core 2.2.1,
152
183
  with UI/Game/Spine resolving the same Core instance. The Core patch itself does
153
184
  not update these consumers.
154
185
 
155
- CLI's empty/game templates use `latest`, which currently resolves to Core 2.2.1.
186
+ CLI's empty/game templates use `latest`, which resolved to Core 2.2.1 at this audit.
156
187
  CLI itself, bitmap-font, atlas and ui-document have no Core dependency to update.
157
188
  The Kurot-Dev website is static and does not install the engine runtime.
158
189
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurot/core",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "Modern rewrite of the Egret game engine — WebGL multi-texture batching, instruction-driven render pipeline, strict TypeScript, Egret-compatible API",
5
5
  "author": "Kelvin <kyia.x52@gmail.com>",
6
6
  "license": "MIT",