@kurot/core 1.0.28 → 2.0.0

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 ADDED
@@ -0,0 +1,1025 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@kurot/core` are documented here.
4
+
5
+ ---
6
+
7
+ ## [2.0.0] — 2026-10-03
8
+
9
+ ### Breaking Changes
10
+
11
+ - `ResourceConfigEntry.subkeys` now requires a map from frame names to metadata
12
+ objects. Old comma-separated strings are rejected; refresh each sheet in the
13
+ Editor before using its resource manifest with this version.
14
+
15
+ ### Added
16
+
17
+ - Resource entries and sheet frames can carry `scale9grid` metadata for UI
18
+ compilation. Core indexes the frame names but does not automatically apply
19
+ the grid to arbitrary `Bitmap` instances.
20
+
21
+ ### Fixed
22
+
23
+ - Validate all subkey maps before registering resources or rewriting URLs.
24
+ Exact resource names take precedence over frame aliases.
25
+
26
+ ### Tests
27
+
28
+ - Added object-subkey registration, invalid-manifest atomicity, and name
29
+ precedence regressions.
30
+
31
+ ## [1.0.28] — 2026-09-26
32
+
33
+ ### Fixed
34
+
35
+ - WebGL partial transform updates keep a scrolled viewport's clipping rectangle
36
+ fixed while its contents move. This prevents content outside the viewport
37
+ from briefly appearing after a transform update.
38
+ - Canvas rendering now applies `scale9Grid` to bitmaps, including those inside
39
+ `cacheAsBitmap` subtrees rasterized for WebGL. Nine-slice borders retain their
40
+ size when the center is stretched.
41
+
42
+ ### Tests
43
+
44
+ - Added a regression for a scrolled clip under an updated ancestor transform.
45
+ - Added a Canvas nine-slice regression using an atlas image stretched from
46
+ 80×50 to 130×50 with `scale9Grid="38,0,3,50"`.
47
+
48
+ ## [1.0.27] — 2026-09-23
49
+
50
+ ### Fixed
51
+
52
+ - WebGL vector graphics are rasterized at the display scale when zoomed, so
53
+ thin strokes remain sharp instead of enlarging a low-resolution cached
54
+ texture. Cached rasterization is reused at the same scale and limited to
55
+ eight times the logical size, the device texture limit, and a bounded
56
+ supersampling pixel budget.
57
+ - Graphics bounds now account for half the stroke width on each side. An
58
+ inset stroke on a rectangle therefore remains within its declared outer
59
+ dimensions for both odd and even line widths.
60
+
61
+ ## [1.0.26] — 2026-09-23
62
+
63
+ ### Fixed
64
+
65
+ - WebGL context creation and capability checks now share a 2D renderer
66
+ configuration: no depth buffer and a required stencil buffer. When a
67
+ `scrollRect` is nested inside another clip, its stencil mask can limit drawing on the
68
+ main canvas. This restores the correct fill length of `ProgressBar` in the
69
+ Editor's preview mode.
70
+
71
+ ### Tests
72
+
73
+ - The player initialization test checks that both WebGL 2 and WebGL 1 request
74
+ stencil support.
75
+ - Added WebGL 1/2 pixel regressions for a 65% fill nested inside a document
76
+ clip; the complete visual suite passes (66 tests).
77
+ - Verified the Editor preview canvas has 8 stencil bits and displays a
78
+ 65 / 100 progress bar with partial fill and visible text.
79
+ - Core unit suite passes (67 files, 702 tests), and implementation and
80
+ declaration builds pass.
81
+
82
+ ## [1.0.25] — 2026-09-23
83
+
84
+ ### Fixed
85
+
86
+ - Nested WebGL rectangular masks now retain the matching push rectangle for
87
+ their pop geometry. Inner `scrollRect` clips therefore no longer consume the
88
+ following draw command or leave later siblings incorrectly masked.
89
+ - Scroll-rectangle pop geometry now restores the push transform before it is
90
+ emitted, keeping mask removal aligned when clipped children use different
91
+ transforms.
92
+
93
+ ### Tests
94
+
95
+ - Added regressions covering paired stencil rectangle tracking after
96
+ multi-texture batches.
97
+ - Core unit suite passes: 67 test files and 702 tests.
98
+ - TypeScript implementation and declaration builds pass.
99
+
100
+ ## [1.0.24] — 2026-09-23
101
+
102
+ ### Fixed
103
+
104
+ - WebGL stencil masks now flush an active multi-texture batch before writing
105
+ mask geometry, so mask vertices use the expected single-texture vertex
106
+ format instead of being interpreted with the preceding batch layout.
107
+ - Mask push and pop commands no longer enqueue an additional rectangle draw
108
+ command for geometry already consumed by the stencil operation.
109
+
110
+ ### Tests
111
+
112
+ - Added regressions covering mask push and pop after multi-texture batches.
113
+ - Core unit suite passes: 67 test files and 702 tests.
114
+ - TypeScript implementation and declaration builds pass.
115
+
116
+ ## [1.0.23] — 2026-09-19
117
+
118
+ ### Fixed
119
+
120
+ - Canvas traversal now clears consumed cache-dirty flags on ordinary display
121
+ objects. Repeated descendant changes can therefore propagate through nested
122
+ containers and refresh a cached ancestor instead of leaving stale pixels.
123
+ - The fix applies to Canvas rendering and WebGL `cacheAsBitmap`, whose cached
124
+ subtree is rasterized through the Canvas renderer before texture upload.
125
+
126
+ ### Tests
127
+
128
+ - Added regressions for repeated descendant updates, propagation through
129
+ ordinary containers, nested caches, and unchanged-frame cache reuse.
130
+ - Core unit suite passes: 66 test files and 700 tests.
131
+ - TypeScript implementation and declaration builds pass.
132
+
133
+ ## [1.0.22] — 2026-09-18
134
+
135
+ ### Fixed
136
+
137
+ - Trimmed atlas Bitmap content and offsets now scale within the original
138
+ untrimmed canvas size, instead of stretching the cropped image to fill it.
139
+ This fixes oversized UI icons in both WebGL and Canvas, including tinted
140
+ Canvas drawing.
141
+ - WebGL nine-slice drawing now subtracts trimmed transparent margins before
142
+ calculating the stretched area and preserves fixed borders. Texture scale
143
+ factors are applied when converting between source pixels and logical sizes.
144
+
145
+ ### Tests
146
+
147
+ - Added 10 regressions covering trimmed and untrimmed Bitmaps, independent
148
+ axis scaling, rotated texture metadata, zero sizes, nine-slice drawing,
149
+ small-size fallback, and Canvas tint paths.
150
+ - Core unit suite passes: 65 test files and 698 tests.
151
+ - TypeScript implementation and declaration builds pass.
152
+
153
+ ## [1.0.21] — 2026-09-07
154
+
155
+ This release completes the WebGL custom-filter path and adds ordered multi-pass
156
+ effects, bloom, and an interactive Filter Lab. Existing ShaderLib and ShaderLib2
157
+ sources remain unchanged.
158
+
159
+ ### Added
160
+
161
+ - Added explicit WebGL 1/2 program variants for `CustomFilter`, reflected numeric
162
+ uniform validation and upload, automatic input/output sizing uniforms, and
163
+ invalidation when effect parameters change.
164
+ - Added auxiliary `BitmapData` samplers with independent sampling settings,
165
+ coordinate transforms, content updates, and context-restoration support.
166
+ - Added `MultiPassFilter` with earlier-pass/original-image inputs, per-pass
167
+ resolution scales, and bounded intermediate render-target reuse.
168
+ - Added `BloomFilter` with brightness threshold, intensity, blur quality, and
169
+ lower-resolution extraction/blur passes. Bloom is an LDR effect.
170
+ - Added filter resolution controls and downsampling for large blur radii.
171
+ - Added Filter Lab with side-by-side previews, WebGL backend selection,
172
+ adjustable effects, fixed-workload measurements, and JSON export.
173
+ - Added a filter authoring guide covering shader contracts, coordinates,
174
+ resource ownership, and multi-pass composition.
175
+
176
+ ### Fixed
177
+
178
+ - Fixed arbitrary Mesh indices being lost when switching from a multi-texture
179
+ Bitmap batch to Mesh drawing.
180
+ - Large Mesh inputs now split into bounded batches with remapped indices,
181
+ preserving triangle order and UVs instead of overflowing fixed GPU buffers.
182
+ - Canvas Mesh sampling now handles rotated atlas regions, including tinted
183
+ non-square regions. Both backends use local vertex positions directly,
184
+ without adding atlas trim offsets to Mesh geometry.
185
+ - Filters now execute in array order instead of applying blur first and only
186
+ retaining the first subsequent non-blur effect.
187
+ - Fixed framebuffer orientation, repeated alpha application, and intermediate
188
+ blending in filter chains.
189
+ - Fixed Glow knockout behavior and zero-radius Blur selecting a glow program.
190
+ Blur quality now controls the number of blur pass pairs.
191
+ - Fixed nested filter/clip state, same-object mask/filter composition, and
192
+ filtered parents clipping descendant filter padding without changing layout
193
+ bounds.
194
+ - Shader compilation/link failures now report actionable errors, clean up
195
+ failed resources, and allow following frames to render normally.
196
+ - Custom programs are cached by context and source; auxiliary textures and
197
+ pooled filter targets are reset on context restoration and released during
198
+ player destruction.
199
+
200
+ ### Usage notes
201
+
202
+ - `CustomFilter`, `MultiPassFilter`, and `BloomFilter` require WebGL. The Canvas
203
+ fallback and Canvas-backed `RenderTexture`/texture caches do not capture
204
+ these GPU effects.
205
+ - Blur radii must be finite and non-negative; Blur quality must be an integer
206
+ from 1 to 16. Glow quality still does not change its fixed sampling kernel.
207
+ - Filter Lab timings measure synchronous `render + gl.finish`, not FPS or
208
+ isolated GPU execution time. Its baseline disables filters on current code;
209
+ it is not a comparison against the previous release.
210
+
211
+ ### Tests
212
+
213
+ - Core unit suite: 64 test files, 688 tests passing.
214
+ - Browser regression suite: 46 tests passing, including existing Canvas/WebGL
215
+ golden scenes and WebGL 1/2 filter, resource-reuse, and restoration coverage.
216
+ - Added 16 Mesh browser regressions and two mesh splitting unit tests for
217
+ mixed batches, capacity limits, dynamic geometry, and atlas consistency.
218
+ - Two additional Filter Lab browser tests pass, covering both WebGL backends,
219
+ parameter controls, workload measurements, and JSON downloads.
220
+ - TypeScript implementation/declaration builds, new example type checks, and
221
+ the benchmark production build pass.
222
+
223
+ ## [1.0.20] — 2026-09-04
224
+
225
+ This release restores Egret-compatible wrapping and automatic height
226
+ measurement for width-constrained dynamic text.
227
+
228
+ ### Fixed
229
+
230
+ - Width-constrained dynamic `TextField` content now wraps even when
231
+ `multiline` is `false`, allowing EUI `Label` instances to measure their
232
+ natural multiline height.
233
+ - `multiline` now controls wrapping only for input text: single-line input
234
+ remains unwrapped, while multiline input continues to wrap.
235
+
236
+ ### Tests
237
+
238
+ - Added regression coverage for dynamic text wrapping, automatic text height,
239
+ single-line input, and multiline input.
240
+ - Full Core test suite passes: 61 test files and 670 tests.
241
+ - TypeScript implementation and declaration builds pass.
242
+
243
+ ## [1.0.19] — 2026-09-04
244
+
245
+ This release modernizes editable text rendering while preserving the native
246
+ browser input, selection, and IME behavior required across desktop and mobile.
247
+ Input text now remains in Kurot's canonical render path instead of switching
248
+ between Canvas/WebGL text and a visibly overlaid DOM editor.
249
+
250
+ ### Added
251
+
252
+ - Added synchronized selection and caret state for editable `TextField`
253
+ instances, including click-to-position behavior and a blinking rendered
254
+ caret.
255
+ - Added IME composition-range rendering so in-progress text remains visible
256
+ and underlined until composition completes.
257
+ - Added automatic horizontal scrolling for focused single-line input.
258
+ - Added native pixel-scroll synchronization for multiline input. The hidden
259
+ `textarea` retains browser-standard keyboard, deletion, touch, and trackpad
260
+ scrolling while Kurot renders the visible text, selection, and caret.
261
+ - Added password and multiline input cases to the interactive text test page.
262
+
263
+ ### Changed
264
+
265
+ - Focused input fields remain in the normal text render pipeline, keeping
266
+ backgrounds, borders, typography, and high-density positioning stable while
267
+ editing.
268
+ - Input focus now begins after a completed tap, preventing pointer movement
269
+ from prematurely opening or closing the native editor.
270
+ - Character restrictions are applied after IME composition completes instead
271
+ of discarding in-progress composition text.
272
+ - Multiline taps now resolve both horizontal and vertical text position,
273
+ including the current pixel scroll offset.
274
+ - Public `scrollV` remains line-based and is synchronized with the internal
275
+ multiline pixel offset.
276
+
277
+ ### Fixed
278
+
279
+ - Fixed input text changing size or moving toward the upper-left after losing
280
+ focus.
281
+ - Fixed multiline input scrolling too early, failing to follow the caret, or
282
+ exposing only one line while deleting and navigating existing text.
283
+ - Fixed stale multiline scroll offsets after content becomes shorter.
284
+ - Fixed trailing line breaks failing to produce their final empty line.
285
+ - Fixed transformed touch coordinates using a plain object where the matrix
286
+ API requires a `Point`, which could prevent input fields from receiving a
287
+ completed tap.
288
+
289
+ ### Tests
290
+
291
+ - Added regression coverage for DOM editor geometry, hidden-editor behavior,
292
+ focus timing, selection, caret, IME composition, horizontal overflow,
293
+ multiline pixel scrolling, scroll clamping, and touch hit mapping.
294
+ - Added interactive password and multiline cases to the text test page for
295
+ browser and device validation.
296
+ - Full Core unit suite: 61 test files, 669 tests passing.
297
+ - TypeScript implementation and declaration builds passing.
298
+
299
+ ---
300
+
301
+ ## [1.0.18] — 2026-09-03
302
+
303
+ This release completes high-density rendering support across the main WebGL
304
+ target and its offscreen rendering paths. Text, cached display objects, masks,
305
+ and filters now preserve their logical size while rendering at the configured
306
+ pixel density.
307
+
308
+ ### Added
309
+
310
+ - Added a mutable `ScreenAdapter.resolution` property for changing render
311
+ density at runtime without recreating the player.
312
+ - Added DPR 2 visual-regression coverage for stage sizing, text rendering,
313
+ cached content, masks, and filters.
314
+
315
+ ### Changed
316
+
317
+ - `cacheAsTexture()` now inherits the active renderer resolution by default,
318
+ while an explicit cache resolution continues to override it.
319
+ - Cached display objects regenerate their backing surfaces when the inherited
320
+ renderer resolution changes.
321
+ - WebGL mask and filter buffers now allocate at the active resolution, clamped
322
+ to the GPU maximum texture size.
323
+ - Blur, glow, and drop-shadow sampling parameters now scale with their
324
+ offscreen render resolution.
325
+ - Canvas-backed cache rendering now propagates its resolution through nested
326
+ text and graphics rendering.
327
+
328
+ ### Fixed
329
+
330
+ - Preserve the stage-to-render-target root transform when WebGL instructions
331
+ are patched in place. This prevents dirty objects, including input text after
332
+ blur, from shrinking and moving toward the upper-left on high-DPI displays.
333
+ - Preserve the logical dimensions and placement of filtered and masked content
334
+ while using high-density offscreen buffers.
335
+
336
+ ### Tests
337
+
338
+ - Full Core unit suite: 61 test files, 656 tests passing.
339
+ - TypeScript implementation and declaration builds passing.
340
+
341
+ ---
342
+
343
+ ## [1.0.17] — 2026-09-02
344
+
345
+ ### Fixed
346
+
347
+ - Re-upload invalidated `HTMLCanvasElement`-backed `BitmapData` when its
348
+ `contentVersion` changes, matching the existing dynamic-video upload path.
349
+ - Preserve the existing `WebGLTexture` while refreshing canvas pixels, avoiding
350
+ stale cached and procedurally rendered content without unnecessary GPU
351
+ texture allocation.
352
+
353
+ ### Tests
354
+
355
+ - Added a WebGL regression test covering canvas invalidation, texture reuse,
356
+ and version-aware pixel upload.
357
+
358
+ ## [1.0.16] — 2026-09-01
359
+
360
+ This release adds source-aware alpha handling to the WebGL texture upload
361
+ pipeline. Textures exported with premultiplied alpha can now be uploaded
362
+ without multiplying their edge colors a second time, while ordinary images,
363
+ canvas surfaces, and video textures retain their existing behavior.
364
+
365
+ ### Added
366
+
367
+ - **Premultiplied source metadata** — `BitmapData.premultipliedAlpha` records
368
+ whether the source pixels have already been multiplied by alpha. It defaults
369
+ to `false`, preserving the previous behavior for every existing resource.
370
+ - **Texture-upload regression coverage** — added focused WebGL tests for
371
+ straight-alpha creation, premultiplied-alpha creation, and dynamic texture
372
+ updates that switch between the two source modes.
373
+
374
+ ### Changed
375
+
376
+ - **Source-aware WebGL uploads** — `RenderContext.createTexture()` and
377
+ `updateTexture()` accept an optional source-alpha flag. WebGL now enables
378
+ `UNPACK_PREMULTIPLY_ALPHA_WEBGL` for straight-alpha sources and disables it
379
+ for sources that are already premultiplied.
380
+ - **Explicit unpack state per upload** — both texture creation and update paths
381
+ set the WebGL unpack state on every upload, preventing one resource's alpha
382
+ mode from leaking into the next upload.
383
+
384
+ ### Compatibility
385
+
386
+ - Existing `BitmapData`, ordinary image, canvas, text, graphics, cached-content,
387
+ and video uploads continue to use the original upload-time premultiplication.
388
+ - Runtime adapters such as Spine can opt in per atlas page when their resource
389
+ metadata declares that the source texture is already premultiplied.
390
+
391
+ ### Tests
392
+
393
+ - Full Core unit suite: 59 test files, 644 tests passing.
394
+ - TypeScript implementation and declaration builds passing.
395
+
396
+ ---
397
+
398
+ ## [1.0.15] — 2026-08-21
399
+
400
+ This release establishes reproducible renderer validation across Kurot,
401
+ PixiJS, and Egret while fixing the backend differences exposed by that work.
402
+ Canvas 2D, WebGL 1, and WebGL 2 now share deterministic visual coverage, and
403
+ the benchmark suite records correctness, performance, resource lifetime, and
404
+ device evidence without reducing the result to a single overall score.
405
+
406
+ ### Added
407
+
408
+ - **Cross-engine benchmark harness** — added seven deterministic workloads with
409
+ Kurot, PixiJS 8, and Egret 5.4.1 adapters. Automated Chromium runs cover
410
+ supported WebGL 1/2 combinations, repeat each standard case five times, and
411
+ export raw JSON plus median/range Markdown summaries.
412
+ - **Performance history and conservative gates** — benchmark protocol v2 records
413
+ commit, dirty-worktree state, exact browser version, named-machine identity,
414
+ frame/render time, draw calls, JS heap when available, logical texture count,
415
+ and Kurot's retained blur framebuffer pool. Approved same-machine baselines
416
+ can reject statistically meaningful regressions without comparing unrelated
417
+ hardware.
418
+ - **Deterministic visual regression suite** — added reviewed Canvas 2D, WebGL 1,
419
+ and WebGL 2 golden scenes for transforms, tint/alpha/blend, masks, filters,
420
+ graphics, text, cached content, mesh deformation, RenderTexture, and WebGL
421
+ context restoration.
422
+ - **Resource-lifetime soak runner** — added short, 30-minute, two-hour, and
423
+ overnight profiles for repeated scene construction, texture upload/disposal,
424
+ blur framebuffer-pool pressure, heap plateau checks, and context recovery.
425
+ - **Release device matrix** — added a responsive diagnostics page and JSON
426
+ evidence export for browser, display, touch, GPU renderer, WebGL limits,
427
+ completed manual checks, and known device exceptions.
428
+ - **Renderer diagnostics** — `Player` now exposes read-only blur framebuffer-pool
429
+ entry and byte counts without adding work to the normal render loop.
430
+
431
+ ### Fixed
432
+
433
+ - **Canvas 2D backend parity** — implemented multiplicative tint for Bitmap,
434
+ Graphics, and Mesh content; rendered Mesh geometry through textured triangles
435
+ instead of a flat rectangle; and calibrated CSS blur strength against the
436
+ WebGL blur pipeline.
437
+ - **WebGL cached-content positioning** — removed duplicate offset application
438
+ when compositing cached display lists, fixing double-translated
439
+ `cacheAsBitmap` output.
440
+ - **WebGL mask composition** — resets the composite buffer transform, alpha, and
441
+ tint before applying a rendered mask, aligning masked output with Canvas 2D.
442
+ - **Additive blending across multi-texture batches** — multi-texture commands now
443
+ form blend-state boundaries, and direct masked leaves save and restore their
444
+ blend mode correctly.
445
+ - **Mixed vertex-layout batching** — flushes pending geometry before switching
446
+ into the multi-texture vertex layout, preventing incompatible vertex formats
447
+ from sharing one upload.
448
+ - **WebGL context restoration** — recreates vertex/index buffers, invalidates
449
+ pooled render targets, and refreshes cached Graphics/Text GPU textures after
450
+ a restored context.
451
+ - **Mobile visual validation** — the golden scene now uses the engine's
452
+ `StageScaleMode.SHOW_ALL`, so the complete 640×480 scene remains visible on
453
+ constrained portrait and landscape viewports without changing its logical
454
+ content.
455
+
456
+ ### Changed
457
+
458
+ - **Benchmark code is dev-only** — moved the benchmark runtime out of `src/`
459
+ and colocated it with adapters, vendor baselines, Playwright configs, and
460
+ tests under `examples/benchmark/`; it remains outside the published API.
461
+ - **Version identity synchronization** — updated package/agent documentation,
462
+ benchmark reports, and `Capabilities.engineVersion` to `1.0.15`.
463
+
464
+ ### Tests
465
+
466
+ - Full Core unit suite: 58 test files, 641 tests passing.
467
+ - Visual regression: 5 passing cases covering Canvas 2D, WebGL 1/2, and WebGL
468
+ 1/2 context restoration.
469
+ - Cross-engine smoke: 5 supported Kurot/PixiJS/Egret backend combinations
470
+ passing.
471
+ - Resource soak and device-matrix export smoke tests passing.
472
+
473
+ ---
474
+
475
+ ## [1.0.14] — 2026-08-13
476
+
477
+ This release turns `Video` into a directly renderable display object and modernizes video-frame texture updates. Applications can now add a `Video` straight to the display list without manually bridging it through `BitmapData`, `Texture`, and `Bitmap`; WebGL uploads occur only when the browser produces a new decoded frame.
478
+
479
+ ### Added
480
+
481
+ - **Directly renderable `Video`** — `Video` now extends `Bitmap` and internally owns the `BitmapData`/`Texture` bridge for its `HTMLVideoElement`. It can be positioned, sized, and added to any `DisplayObjectContainer` like other display objects.
482
+ - **Decoded-frame scheduling** — video textures are invalidated through `HTMLVideoElement.requestVideoFrameCallback()`, matching texture uploads to decoded video frames instead of the engine's display refresh rate. `requestAnimationFrame()` is used when the video-frame callback API is unavailable.
483
+ - **Media playback properties** — added public `muted`, `loop`, and `playsInline` accessors backed by the native video element. Setting `muted` also sets `defaultMuted`, enabling standards-compliant muted autoplay.
484
+
485
+ ### Changed
486
+
487
+ - **Versioned dynamic textures** — `BitmapData.invalidate()` now advances its single `contentVersion`, while each `WebGLRenderContext` privately tracks the uploaded version for each resource in a `WeakMap`. Backend synchronization state no longer leaks into `BitmapData`, and an existing video texture is updated only when the resource content changes.
488
+ - **Stable GPU texture identity** — video playback reuses the same `WebGLTexture` handle and updates its pixels in place. It no longer uploads the same frame again merely because the display object is drawn in another engine frame.
489
+ - **Poster/video switching** — poster textures remain available before playback, while starting playback explicitly restores the decoded video texture even if poster loading completed later.
490
+ - **Playback rejection handling** — a rejected native `HTMLVideoElement.play()` promise now dispatches `IOErrorEvent` instead of becoming an unhandled promise rejection.
491
+
492
+ ### Tests
493
+
494
+ - Expanded `test/Video.test.ts` with direct-renderability, media-property forwarding, decoded-frame invalidation, and video-texture restoration coverage.
495
+ - Expanded `test/BitmapData.test.ts` with content-version invalidation coverage.
496
+ - Full Core suite: 56 test files, 639 tests passing.
497
+
498
+ ---
499
+
500
+ ## [1.0.13] — 2026-08-13
501
+
502
+ This release prepares the render pipeline for future backend swapping (e.g. WebGPU) **without changing any rendered output**. The execution layer is decoupled from concrete WebGL types behind two backend-neutral interfaces, so the leaf render pipes no longer import anything under `webgl/`. Behavior is identical to 1.0.12; the changes are purely structural.
503
+
504
+ ### Changed
505
+
506
+ - **Flattened render-pipe layout** — moved `InstructionSet` and all render pipes (`Bitmap`/`Filter`/`Graphics`/`Mask`/`Mesh`/`Particle`/`Text`) out of `player/webgl/` into `player/` and `player/pipes/`, so GPU-neutral code no longer lives under the WebGL-specific tree. Import paths updated across the renderer, pipes, and tests.
507
+ - **`RenderContext` interface** — extracted the contract between pipes and a GPU backend into `player/RenderContext.ts`. `WebGLRenderContext` now `implements RenderContext`; its method bodies are untouched. Texture/offscreen handles are exposed as opaque aliases `TextureHandle` and `OffscreenBufferHandle` (both `= unknown`) rather than leaking `WebGLTexture`/`WebGLRenderBuffer`.
508
+ - **Backend-managed texture GC** — `GraphicsPipe`/`TextPipe` no longer hold a raw GL reference to delete textures later. Texture lifecycle is delegated to the context via `registerTextureForGC`/`unregisterTextureGC`/`deleteTexture`, so pipes never need to know which backend created a texture.
509
+ - **`RenderBuffer` interface** — extracted `player/RenderBuffer.ts` as the second coupling point (the buffer state leaf pipes read/write). `WebGLRenderBuffer implements RenderBuffer`; leaf-pipe `execute()` signatures now take `RenderBuffer` instead of `WebGLRenderBuffer`. The interface narrows only what pipes actually use (`context`/`globalAlpha`/`globalMatrix`/`offsetX`/`offsetY`/`saveTransform`/`restoreTransform`); WebGL-specific members stay on the concrete class.
510
+
511
+ ### Removed (breaking)
512
+
513
+ - **`RenderBuffer` class renamed to `CanvasBuffer`** — the public Canvas 2D offscreen-buffer class (`player/canvas/RenderBuffer.ts`) was renamed `CanvasBuffer` to free the `RenderBuffer` name for the new backend-neutral interface. Re-exported from `@kurot/core`; downstream `@kurot/*` packages had no references, but external `import { RenderBuffer } from '@kurot/core'` will need updating.
514
+ - **`DisplayList.renderBuffer` → `DisplayList.canvasBuffer`** — the public field (type `CanvasBuffer`) was renamed to match its type. Likewise `renderBuffer` fields on `GraphicsPipe`/`TextPipe` cache entries.
515
+
516
+ ### Docs
517
+
518
+ - Consolidated per-package Egret comparisons into a single `docs/egret-migration.md`.
519
+ - Refreshed `ai-context.md` (core/ui/game): removed stale staleness notes, fixed the `destroyRenderable` typo, corrected directory/line/test counts.
520
+ - Refined `pixi-alignment.md` roadmap: clarified dynamic texture-slot sizing, Shader Bits composition, KTX2 status, and WebGPU timing guidance.
521
+
522
+ ---
523
+
524
+ ## [1.0.12] — 2026-08-12
525
+
526
+ This release simplifies renderer initialization before the engine enters feature development. `Player` now attempts WebGL directly on the application canvas instead of creating a second temporary WebGL context solely for capability detection.
527
+
528
+ ### Changed
529
+
530
+ - **Direct WebGL initialization** — `Player` now requests `webgl2`, then `webgl`, on the supplied application canvas. If both fail, initialization falls through to the existing Canvas 2D renderer.
531
+ - **No probe canvas allocation** — removed `Player`'s call to `checkWebGLSupport()`, avoiding a redundant temporary canvas and WebGL context that could consume resources or produce a false fallback on constrained devices. The exported utility remains available for compatibility.
532
+ - **README refresh** — documents the WebGL/Canvas backend boundary, internal Canvas rasterization duties, current 1.0.12 feature set, committed architecture/resource references, and the latest test pages.
533
+
534
+ ### Tests
535
+
536
+ - `test/CreatePlayer.test.ts` — expanded: verifies the supplied canvas receives the `webgl2` → `webgl` → `2d` initialization sequence and that no separate WebGL probe canvas is created.
537
+
538
+ ---
539
+
540
+ ## [1.0.11] — 2026-08-12
541
+
542
+ This release hardens pooled WebGL resource lifecycles after the 1.0.10 rendering-pipeline work. It prevents stale offscreen state from leaking between effects and keeps dynamically sized blur resources within a fixed GPU-memory bound.
543
+
544
+ ### Fixed
545
+
546
+ - **Complete `WebGLRenderBuffer` reuse reset** — pooled offscreen buffers now reset transform snapshots, tint, texture bindings, draw counts, offscreen coordinates, stencil data, and scissor state before reuse. Buffers are only reused by the WebGL context that created them.
547
+ - **RenderBuffer overflow disposal** — when the shared pool is full, pending commands are flushed before discarded buffers dispose their framebuffer and texture, instead of resizing them to a retained 1×1 allocation.
548
+ - **Bounded blur framebuffer pool** — temporary blur texture/framebuffer pairs are capped at 16 entries and approximately 64 MiB of RGBA texture memory across all dimensions. The oldest retained pair is explicitly deleted when either cap is reached, preventing unbounded GPU-memory growth when filtered content changes size.
549
+ - **Context-restore bookkeeping** — restoring a WebGL context now resets both blur pool entries and their retained-entry count.
550
+
551
+ ### Tests
552
+
553
+ - `test/WebGLRenderBuffer.test.ts` — new: full transient-state reset, context ownership, and pool-overflow disposal.
554
+ - `test/WebGLBlurFramebufferPool.test.ts` — new: count and memory bounds, GPU-resource eviction, byte accounting, and empty-bucket cleanup.
555
+
556
+ ---
557
+
558
+ ## [1.0.10] — 2026-08-12
559
+
560
+ This release closes the largest architectural gap left over from the Egret port: mask and filter offscreen rendering no longer bypasses the instruction pipeline. The dedicated `_directDraw` tree-walk that mirrored the main `_buildLeaf` switch has been removed, leaving a single shared leaf-dispatch path for both the main pass and offscreen effect buffers. Bundled with it are correctness fixes for offscreen transforms on rotated/scaled targets, multi-instruction renderables, tint inheritance, and several renderer leaks.
561
+
562
+ ### Changed
563
+
564
+ - **Unified mask rendering through the instruction pipeline** — mask/clip subtrees now build into a reusable scratch `InstructionSet` instead of being drawn via `_directDraw`. Nested effects, cached (`cacheAsBitmap`/`cacheAsTexture`) content, and RenderGroups are preserved inside mask subtrees, and RenderGroups are inlined in mask-local coordinate space. Mask composites are flushed before their pooled framebuffers are released. This removes the duplicated leaf-rendering switch and the divergence between main-pass and effect-pass rendering flagged in the 1.0.9 architecture review.
565
+ - **Shared WebGL leaf dispatch** — leaf instruction creation and pipe dispatch are now centralised, so the main build pass and mask rendering share the same path through `BitmapPipe` / `MeshPipe` / `GraphicsPipe` / `TextPipe` / `ParticlePipe`.
566
+ - **`InstructionSet`: multiple instructions per renderable** — the per-renderable index map previously stored a single instruction slot, which silently dropped transform refreshes for objects owning more than one transform-bearing instruction (e.g. an effect push together with its leaf). It now tracks an array of indices and refreshes all of them.
567
+ - **Precision dirtying for offscreen effects** — `$markTransformDirty` / `$markRenderDirty` are now separated on the offscreen path so cached content and effect buffers refresh only the state that actually changed.
568
+
569
+ ### Fixed
570
+
571
+ - **Offscreen effect transforms on rotated/scaled targets** — mask and filter offscreen buffers previously only accounted for translation, so compositing broke when the target object was rotated or scaled. An inverse world transform is now applied to convert world-space instructions into the buffer's local coordinate space, and mask compositing uses a dedicated framebuffer draw method for safe UV flipping.
572
+ - **Tint inheritance respects the closest non-default ancestor** — a child no longer picks up a distant ancestor's tint when an intermediate ancestor resets tint to the default.
573
+ - **RenderGroup rebuild during partial renderer updates** — a RenderGroup is now recalculated when a dirty renderable lands inside it during a partial (non-structural) update pass, instead of being skipped.
574
+ - **Renderer leaks and unbounded pools** — `InstructionSet` arrays are cleared and dirty renderables are deduplicated on rebuild; `FilterPipe` and `MaskPipe` now null out their cached state and cap their instruction pools to prevent unbounded growth across frames.
575
+
576
+ ### Tests
577
+
578
+ - `test/EffectTransform.test.ts` — new: offscreen transform correctness on rotated/scaled targets, and multi-instruction transform refresh.
579
+ - `test/InstructionSet.test.ts` — expanded: multi-instruction-per-renderable indexing, array clearing, dirty-renderable deduplication.
580
+ - `test/InstructionPool.test.ts` — new: filter/mask pipe pool cap and null-out behaviour.
581
+ - `test/RenderGroup.test.ts` — new: RenderGroup rebuild during partial updates, plus mask-subtree RenderGroup inlining.
582
+ - `test/WebGLRendererDirty.test.ts` — new: dirty-mark propagation and partial-update correctness.
583
+ - `test/WebGLRendererLeaf.test.ts` — new: shared leaf dispatch for main and mask rendering.
584
+ - `test/MaskPipe.test.ts` — expanded: complex (nested effects + cached content) mask visual and lifecycle regression.
585
+ - `test/WebGLVertexArrayObject.test.ts` — new: VAO sizing and cache-array behaviour used by the new framebuffer draw path.
586
+ - `test/DisplayObject.test.ts` — expanded: transform/alpha dirty marking used by the offscreen path.
587
+
588
+ ---
589
+
590
+ ## [1.0.9] — 2026-08-06
591
+
592
+ ### Added
593
+
594
+ - **`cacheAsTexture()` with resolution and scaleMode** — new PixiJS-style cache API (`options: { resolution, scaleMode }`) with Egret-compatible `cacheAsBitmap` as a boolean alias. `isCachedAsTexture` and `updateCacheTexture()` provide fine-grained control over the cached subtree.
595
+ - **Resolution-aware offscreen rendering** — `DisplayList` now supports `resolution` and `actualResolution`, scaled to fit within `maxTextureSize`. Both `CanvasRenderer` and `WebGLRenderer` apply the resolution scale when drawing cached bitmaps, and `scaleMode` controls `imageSmoothingEnabled` / GL filtering.
596
+
597
+ ### Changed
598
+
599
+ - **Precision dirtying: `$markTransformDirty`** — transform-affecting setters (`x`, `y`, `scaleX`, `scaleY`, `rotation`, `skew`, `alpha`, `visible`, `tint`, `anchorOffset`) now call `$markTransformDirty()` instead of `$markDirty()`, avoiding unnecessary texture regeneration on cached display objects that have only moved or recoloured. `$markDirty` now delegates to `$markTransformDirty` plus sets `$renderDirty`.
600
+ - **DisplayList pool capped at 8** — recycled DisplayList objects are now limited to a pool of 8 to prevent unbounded memory growth.
601
+ - **DisplayList `release()` releases WebGL textures** — cached bitmaps now properly free their GPU resources when returned to the pool.
602
+
603
+ ### Tests
604
+
605
+ - `test/DisplayObject.test.ts`: expanded with cache-texture resolution and scaleMode coverage.
606
+
607
+ ---
608
+
609
+ ## [1.0.8] — 2026-08-06
610
+
611
+ ### Fixed
612
+
613
+ - **TextField: normalize non-string values in `text` setter** — the setter now converts `null`, numbers, and objects to strings via `String(value)` before storing, matching Egret/DOM behaviour. Previously unexpected types could reach the line-layout engine and throw.
614
+ - **Resource: track canonical item name for `destroyAll`** — when loading a resource by subkey (e.g. `button_up_png` resolving to the `eui` sheet), the `loadedNames` set now records the parent item name so `destroyAll()` destroys the complete sheet instead of only the requested sub-resource.
615
+ - **ResourceConfig: trim subkeys and skip empty entries** — whitespace and empty fragments in comma-separated `subkeys` strings (`" , ,"`) no longer create spurious empty key entries.
616
+
617
+ ### Tests
618
+
619
+ - `test/TextField.test.ts`: 1 case (non-string value normalization).
620
+ - `test/Resource.test.ts`: 2 cases (subkey trimming, parent sheet tracking).
621
+
622
+ ---
623
+
624
+ ## [1.0.7] — 2026-08-06
625
+
626
+ ### Added
627
+
628
+ - **`destroy()` on KurotApp** — `createPlayer()` now returns a `destroy()` method that tears down the player, touch handler, screen adapter, and lifecycle listener in one call. `stop()` is now purely resumable (no longer disposes resources); disposal is deferred to `destroy()`. Calling `start()` after `destroy()` throws.
629
+ - **ResourceLoader: stable monotonic progress** — replaced the broken `activeCount` / `(total + loaded)` formula with `completedCount` / `totalCount`. Consumer callbacks (`onComplete`, `onError`, `onProgress`) are now wrapped in a `safeNotify` try/catch so exceptions in user code do not corrupt loader bookkeeping or stall the queue.
630
+
631
+ ### Fixed
632
+
633
+ - **TouchHandler: mouse drag tracking outside canvas** — moved `mousemove`/`mouseup` listeners from `canvas` to `window`, so drag interactions continue tracking after the pointer leaves the canvas bounds. `dispose()` now clears `_touchDownTarget` and resets `_useTouchesCount`.
634
+ - **SystemTicker: `setupLifecycle` returns a dispose function** — previously the `visibilitychange` listener was registered with no way to remove it. Now returns a cleanup function that calls `removeEventListener`.
635
+
636
+ ### Tests
637
+
638
+ - `test/CreatePlayer.test.ts` — new (1 case: destroy lifecycle + stop resumability).
639
+ - `test/ResourceLoader.test.ts` — 2 cases (monotonic progress, consumer callback exception resilience).
640
+ - `test/TouchHandler.test.ts` — new (1 case: mouse interaction ended outside canvas).
641
+
642
+ ---
643
+
644
+ ## [1.0.6] — 2026-08-06
645
+
646
+ ### Fixed
647
+
648
+ - **StageText: single-line height alignment** — replaced the padding-based vertical alignment with explicit `top` + `height` positioning. The previous approach used `padding` to distribute remaining space, which could push text outside the visible area when the field height exceeded the font size.
649
+
650
+ ---
651
+
652
+ ## [1.0.5] — 2026-08-06
653
+
654
+ ### Changed
655
+
656
+ - **StageText: rewritten DOM positioning via display-list matrix** — replaced the manual `localToGlobal()` + `canvas.getBoundingClientRect()` coordinate conversion and accumulated-rotation loop with a single `$getConcatenatedMatrix()` call, applied as a CSS `matrix()` transform on the wrapper div. This correctly handles translation, scale, rotation, and canvas scaling in one step without the per-frame `_gscaleX`/`_gscaleY` ratio bookkeeping. The input element now uses `box-sizing: border-box` with simplified padding calculations for single-line vertical alignment.
657
+
658
+ ---
659
+
660
+ ## [1.0.4] — 2026-08-05
661
+
662
+ ### Fixed
663
+
664
+ - **TextField: single-line mode no longer wraps at max-width** — `calculateLines` now checks `!this._multiline` before breaking a text segment across lines. Previously, even with `multiline = false`, text segments that exceeded the field's available width would be forcibly split, causing single-line TextFields (especially INPUT type) to overflow vertically. Single-line fields now keep all text on one line regardless of width.
665
+
666
+ ---
667
+
668
+ ## [1.0.3] — 2026-07-27
669
+
670
+ ### Fixed
671
+
672
+ - **TextField**: Overrode the `width` and `height` **getters**. The class previously only overrode the setters, which in JS/TS shadows the parent getter on `DisplayObject` — so reading `tf.width` / `tf.height` returned `undefined` instead of the explicit or measured value. Both the getter and setter are now overridden together, returning `$explicitWidth`/`$explicitHeight` when set, or the measured content bounds otherwise. This was the root cause of INPUT TextFields rendering at zero size and disappearing.
673
+ - **StageText**: Commented out the `_inputDiv.style.clip = rect(...)` line (and its `clearInputElement()` reset). The deprecated CSS `clip` property was firing TS lint warnings (`'clip' is deprecated`); the rect was equal to the element's own `width × height`, so it was a no-op (real clipping is done by `overflow: hidden` + explicit `width`/`height`). Removing it has zero runtime effect and silences the warning.
674
+
675
+ ### Changed
676
+
677
+ - **examples/text-test.html**: The `Input mode` test case no longer sets `tf.background` / `tf.border` on the TextField. Instead it draws the background as a sibling `Shape` (`graphics.drawRect`) at the same position and dimensions. This decouples the input background from the TextField's own texture, so it is unaffected by any future TextPipe INPUT-mode early-return (which would drop the whole texture, including a self-drawn background). Matches the skin-based pattern used by `@kurot/ui`'s `TextInput`.
678
+
679
+ ---
680
+
681
+ ## [1.0.2] — 2026-07-27
682
+
683
+ Type-safe event listeners via `EventMap`. `EventDispatcher` now accepts an optional `TMap` generic mapping event-type strings to their concrete `Event` subclasses, so listeners receive the correct subclass without manual `as` casts. Callers that don't declare a map keep working via the existing `(e: Event) => void` fallback overload — fully backward-compatible.
684
+
685
+ > Note: `1.0.1` was a version-number-only bump with no code changes; it is intentionally omitted from this changelog.
686
+
687
+ ### Added
688
+
689
+ - **EventDispatcher**: Optional `<TMap extends EventMap>` generic on the class, plus type-safe overloads for `addEventListener`, `removeEventListener`, and `once` keyed by `TMap[K]`. The implementation signature uses a type-erased `AnyListener` to bypass strict-mode parameter contravariance (TS2394). Existing callers see no change.
690
+ - **EventMap type**: Exported from `events/index.ts` (`Record<string, Event>`-compatible base for declaring event-type → subclass mappings).
691
+ - **Typed event maps** declared at each event source:
692
+ - `DisplayObjectEvents` on `DisplayObject` — covers `TouchEvent.TOUCH_BEGIN/MOVE/END/TAP`, `FocusEvent.FOCUS_IN/OUT`, `Event.ADDED/REMOVED_TO_STAGE`, `Event.ENTER_FRAME`, etc.
693
+ - `HttpRequestEvents` on `HttpRequest` — `HTTPStatusEvent.HTTP_STATUS`, `IOErrorEvent.IO_ERROR`, `ProgressEvent.PROGRESS`, `Event.COMPLETE`.
694
+ - `SoundEvents` on `Sound`.
695
+ - `ImageLoaderEvents` on `ImageLoader`.
696
+ - `TimerEvents` on `Timer` — `TimerEvent.TIMER`, `TimerEvent.TIMER_COMPLETE`.
697
+
698
+ ### Changed
699
+
700
+ - **InputController / TextField / HttpRequest**: Internal listener registrations and several test sites dropped their `e as TouchEvent` / `e as HTTPStatusEvent` / `e as ProgressEvent` casts now that the dispatcher hands back the correct subclass directly.
701
+
702
+ ### Tests
703
+
704
+ - Added `test/EventMap.test.ts` (178 lines) covering type-safe dispatch, the untyped fallback overload, `once()` with a typed map, and mistyped-event-name compile errors.
705
+ - Added `test/DisplayObject.test.ts` typed-listener coverage.
706
+ - Updated `test/EventDispatcher.test.ts`, `test/HttpRequest.test.ts`, `test/HTTPStatusEvent.test.ts`, `test/ProgressEvent.test.ts`, `test/TouchEvent.test.ts` to use the new typed signatures. Total test count: 565 → 583.
707
+
708
+ ---
709
+
710
+ ## [1.0.0] — 2026-07-26
711
+
712
+ First stable release. From this version forward the public API surface (exports from `src/index.ts`) is committed to backward-compatible evolution per semver.
713
+
714
+ ### Fixed
715
+
716
+ - **StageText**: Removed 6 development-time `console.log` debug statements (in `resetStageText`, the focus/blur listeners, `initElementPosition`, `executeShow`, and the deferred-focus path) that would spam the console of any production app using text inputs. These were not routed through `Logger` and could not be silenced.
717
+ - **WebGLRenderer**: Documented and preserved the per-frame root-buffer projection reset at the end of `render()`. The call `WebGLRenderBuffer.release(WebGLRenderBuffer.create(buffer.context, 0, 0))` looks like a no-op pool cycle but its real effect is the `pushBuffer` / `popBuffer` pair inside `WebGLRenderBuffer.resize()`, which queues an `activateBuffer` command; when `flush()` runs it, `_activateBuffer()` calls `onResize()` and restores the GL projection / viewport to the root canvas size. Without it, any in-frame activation of an offscreen buffer (filters / masks / cacheAsBitmap) leaves the projection set to the offscreen size and the next frame is vertically offset (observed as text and mesh content rendering halfway down the canvas instead of at its set position). The `_nestLevel` guard around it is also preserved with a `DO NOT remove` comment: although `render()` never recurses today, the guard ensures a future WebGL cacheAsBitmap / drawToTexture will only reset the projection on the outermost call. Both pieces were briefly deleted as "dead code" during the 1.0.0 cleanup and immediately reverted after the regression was caught.
718
+
719
+ ### Removed
720
+
721
+ - **HashObject / IHashObject / `.hashCode`**: Removed entirely. This was a 2014-era port of Java's `Object.hashCode()` identity-comparison pattern, introduced because ES5 had no `Map`/`WeakMap`. With modern JS, object identity comparison is done with `===` and object-keyed lookups with `WeakMap`/`WeakSet` — neither needs an int ID. The last engine-internal consumer (BitmapData's `Map<number, DisplayObject[]>`) was already migrated to a `WeakMap` in 0.6.3, and a full audit found zero remaining reads of `.hashCode` across `src/`, `test/`, and `examples/`. Removing it drops a per-instance field + global counter increment from every `Point`/`Matrix`/`Rectangle`/`Texture`/`BitmapData`/`SpriteSheet`/`Graphics`/`Event`/`EventDispatcher`/`Filter`. **Breaking for any user code that read `.hashCode`** — replace with `WeakMap`-keyed or `===`-based identity.
722
+
723
+ ### Changed
724
+
725
+ - **WebGL**: Removed the `experimental-webgl` context fallback in `WebGLRenderContext` and `checkWebGLSupport()`. The `experimental-webgl` name was the IE11 / early-Safari / old-Android-Chrome alias; every modern browser that supports WebGL returns the standard `'webgl'` context (Safari 8+ since 2014). Also dropped the redundant `window.WebGL2RenderingContext` / `window.WebGLRenderingContext` feature-detects — `getContext('webgl2')` / `getContext('webgl')` already return `null` when unsupported.
726
+ - **Sound**: Removed the `webkitAudioContext` fallback. Prefixed `AudioContext` was last used by Safari <14.1 (2021); standard `AudioContext` is universally supported now.
727
+ - **Video**: Replaced the `requestFullscreen` / `exitFullscreen` vendor-prefix dispatchers (`webkitRequestFullscreen`, `mozRequestFullScreen`, `webkitExitFullscreen`, `mozCancelFullScreen`) with native `requestFullscreen()` / `exitFullscreen()`. The unprefixed API has been standard in every browser since 2018.
728
+ - **Base64Util**: Replaced the hand-rolled base64 bit-twiddling with native `btoa` / `atob`. The custom implementation was an ES5-era workaround for old IE; `btoa`/`atob` are universally supported since 2014. The chunked `String.fromCharCode` loop preserves performance on large buffers.
729
+
730
+ ### Build
731
+
732
+ - **package.json**: Added a `prepublishOnly` hook (`npm run clean && npm run build`) so `npm publish` always ships a freshly built `dist/`. `dist/` is gitignored, so without this hook publishing from a fresh clone or CI would emit an empty package.
733
+
734
+ ### Docs
735
+
736
+ - **README**: Added a stable (1.0.0) badge and an explicit evergreen-browsers-only targeting note. Added a "Migrating from Egret" section listing every 1.0.0 breaking change (`.hashCode`/`HashObject` removal, `Resource.instance` removal, multi-Player listener API removal, `WebGLRenderContext` singleton removal, `$`-prefixed internal fields, vendor-prefix shim removal). Fixed the test count (569 → 565). Replaced the dead `docs/architecture.md` and `docs/resource.md` links (those files were gitignored, never committed, never published) with the in-package `CHANGELOG.md` and the public demo URL.
737
+ - **CORE_REVIEW.md → docs/core-review.md**: Moved out of the published tree (`docs/` is gitignored). This file is an internal review/backlog artifact and was never meant for public consumption.
738
+
739
+ ### Notes
740
+
741
+ - This release consolidates the stabilization work shipped across 0.6.0–0.6.3, plus a final pass removing 2014-era browser-compatibility shims now that the engine targets modern browsers (ES2022 / evergreen browsers only): the internal `$`-prefixed field renames (0.6.0), the removal of the `Resource.instance` singleton, the multi-Player listener registration API, and the `WebGLRenderContext` singleton (0.6.3), the removal of the Java-era `HashObject` / `.hashCode` identity layer (1.0.0), and the removal of dead vendor-prefix fallbacks (`experimental-webgl`, `webkitAudioContext`, `webkit/moz fullscreen`, hand-rolled base64). No further breaking changes are planned for the 1.x line.
742
+ - The 1.0.0 cleanup was iterated against the local `reference/pixijs/pixijs-8.17.1` source to confirm the direction matches what a modern TypeScript game engine actually ships (no `experimental-webgl` fallback, no `webkitAudioContext`, no `HashObject` identity layer).
743
+
744
+ ---
745
+
746
+ ## [0.6.3] — 2026-07-25
747
+
748
+ ### Changed
749
+
750
+ - **Breaking**: Removed the `Resource.instance` singleton getter (and `_instance` field). Callers should use the existing `export const resource` instance directly. The singleton held a process-wide instance that was awkward to reset between sessions/tests and hid the fact that `Resource` is constructed once at module load.
751
+ - **Breaking**: Removed the multi-Player listener registration API (`DisplayObject.addStructureChangeListener`, `DisplayObject.addRenderableDirtyListener`, `DisplayObjectContainer.addContainerStructureChangeListener`) and restored direct static-field assignment. The engine is single-Player by design — `Player` now assigns `DisplayObject.$onStructureChange` / `$onRenderableDirty` / `DisplayObjectContainer.$onContainerStructureChange` directly in its constructor and clears them in `destroy()`. The previous listener-chain registry existed only to support multiple Player instances on one page, a scenario that was never actually supported and added overhead to every dirty-marking path.
752
+ - **Breaking**: `WebGLRenderContext` is no longer a singleton. Removed `getInstance()` / `resetInstance()` and made the constructor `public`. `Player` now constructs `new WebGLRenderContext(canvas)` directly. On WebGL init failure, references are dropped so the half-constructed context can be GC'd (previously `resetInstance()` had to be called manually).
753
+
754
+ ### Fixed
755
+
756
+ - **BitmapData**: Fixed a memory leak in the static `_displayList` registry. It was keyed by `bitmapData.hashCode` (a `Map<number, DisplayObject[]>`), so entries for discarded `BitmapData` objects were never removed and kept strong references to both the `BitmapData` and its dependent `DisplayObject`s alive indefinitely. Switched to a `WeakMap<BitmapData, Set<DisplayObject>>` keyed by the `BitmapData` itself, so entries are reclaimed automatically when the `BitmapData` is GC'd. The per-node membership list also moved from `Array` to `Set` for O(1) add/remove.
757
+ - **Event**: `resetForPool()` now clears `this.data` before resetting the event type/bubbles/cancelable. Pooled events previously retained the payload from their last dispatch, leaking arbitrary user data (and strong references to render objects) back into the pool and into the next unrelated dispatch.
758
+ - **TextPipe**: Added `FinalizationRegistry`-based texture cleanup for `TextField` caches. Nothing in the engine calls `destroyRenderable()` during the normal TextField lifecycle (UI relayouts and virtualized lists just drop references), so cached WebGL textures previously leaked — the GC callback is now the actual reclamation path, mirroring `GraphicsPipe`'s existing pattern. `destroyRenderable()` also now immediately unregisters and deletes the texture for use as an optional explicit entry point.
759
+
760
+ ### Added
761
+
762
+ - **License**: Added an MIT `LICENSE` file at the package root with the copyright notice.
763
+
764
+ ### Tests
765
+
766
+ - Added a `TextPipe` test suite covering texture caching, cache invalidation, and the destroy/GC path.
767
+
768
+ ---
769
+
770
+ ## [0.6.2] — 2026-07-24
771
+
772
+ ### Fixed
773
+
774
+ - **WebGLRenderer**: Ancestor container transform/alpha/tint changes now refresh descendant leaf instructions. Previously, changing a plain container's transform had no effect on WebGL output until a full structural rebuild, since containers never own a leaf instruction of their own.
775
+ - **ResourceLoader**: Fixed `activeCount` queue-counting bugs that could hang `start()` indefinitely — the retry path double-decremented the active count, and items with no registered analyzer never decremented it at all. All completion paths (success, failure, synchronous throw, missing analyzer) now retire through a single `finishItem()` entry point.
776
+ - **ResourceLoader**: A synchronously-thrown (rather than rejected) analyzer `loadFile()` call no longer wedges the loader — it's now caught and routed through `finishItem()` like any other failure.
777
+ - **Resource**: Concurrent `loadGroup()` calls no longer overwrite each other's queue/callbacks on the shared `ResourceLoader` instance. Calls are now serialized through a persistent promise chain (`groupLoadQueue`), each still resolving/rejecting independently.
778
+ - **ByteArray**: `bytesAvailable`, `validate()`, and the internal `_validate()` bounds check now use the logical write position instead of physical buffer capacity, preventing reads of unwritten, zero-filled memory when `bufferExtSize` pre-allocates extra capacity ahead of writes.
779
+ - **EventDispatcher**: `once()` listeners could fire more than once when a nested/reentrant `dispatch()` on a different dispatcher drained the shared once-listener queue. The queue now tracks each listener's owning dispatcher and only pops entries belonging to the dispatcher currently draining.
780
+
781
+ ### Removed
782
+
783
+ - **ByteArray**: Removed the redundant `readAvailable` getter, which duplicated `bytesAvailable` once both were redefined against the logical write position.
784
+ - **Resource**: Removed the unused `isConfigLoaded` field (written by `loadConfig()` but never read anywhere).
785
+
786
+ ### Changed
787
+
788
+ - **Docs**: Added JSDoc coverage across `WebGLRenderer`'s build/execute pipeline (`render`, `_releaseInstructions`, `_buildLeaf`, `_buildFilter`, `_buildClip`, `_buildScrollRect`, `_makeCacheInstruction`, `_executeInstructions`, `_applyTransform`, `_executeDisplayListCache`, `_directDraw`) and consolidated scattered inline comments into method-level doc comments in `Resource.loadGroup`, `ResourceLoader.loadItem`, and `WebGLRenderer._updateDirtyRenderables` / `_buildInstructions`.
789
+
790
+ ### Tests
791
+
792
+ - Added coverage for `ResourceLoader` (concurrent requests, retry exhaustion, missing analyzers, promise rejection, thread-count limits).
793
+ - Added coverage for `Resource` concurrent group loads and failure scenarios.
794
+ - Added coverage for `ByteArray`'s logical-vs-physical read boundary with `bufferExtSize`.
795
+ - Added coverage for `EventDispatcher.once()` behavior across nested/reentrant dispatch.
796
+
797
+ ---
798
+
799
+ ## [0.6.1] — 2026-07-22
800
+
801
+ ### Added
802
+
803
+ - **HttpRequest**: `status` getter exposing the HTTP response status code. Dispatches `HTTPStatusEvent` before `COMPLETE`/`IO_ERROR`, and now treats 4xx/5xx responses and status `0` (CORS/blocked preflight) as `IO_ERROR` failures instead of silently completing, matching `fetch()` error semantics.
804
+ - **HttpRequest**: `setRequestHeader()` with a `_pendingHeaders` queue — headers set before `open()` are queued and applied during `send()`.
805
+ - **Sound**: Generation-based cancellation so a pending async load callback can't update state after `close()`.
806
+
807
+ ### Tests
808
+
809
+ - Added test coverage for `HttpRequest` (2xx/4xx/5xx responses, network failures, status exposure) and `ImageLoader`.
810
+
811
+ ---
812
+
813
+ ## [0.6.0] — 2026-05-07
814
+
815
+ ### Changed
816
+
817
+ - **Breaking**: Renamed internal fields across `DisplayObject`, `DisplayObjectContainer`, `Bitmap`, `Graphics`, `Mesh`, `Shape`, `Sprite`, `Stage`, `BitmapData`, `RenderTexture`, `TouchEvent`, `ColorMatrixFilter`, and related modules to use a `$` prefix, distinguishing internal/engine-owned state from public API surface.
818
+ - Moved stage event lists from `DisplayObjectContainer` to `DisplayObject`.
819
+ - `EventDispatcher` now invokes listeners with an explicit `this` context.
820
+
821
+ ---
822
+
823
+ ## [0.5.17] — 2026-05-06
824
+
825
+ ### Changed
826
+
827
+ - **Text rendering**: Switched to Egret-style `textBaseline='middle'` rendering (advancing `drawY` by half the line height before drawing) instead of manual baseline offset calculation, simplifying both rendering and hit-testing. Later switched to `textBaseline='alphabetic'` so positioning relies on stable `actualBoundingBox` metrics across OS font substitution (e.g. Arial → SF Pro on iOS).
828
+
829
+ ---
830
+
831
+ ## [0.5.16] — 2026-05-05
832
+
833
+ ### Added
834
+
835
+ - **Particle system**: Rendering support for both the canvas and WebGL renderers, including a new `ParticlePipe`.
836
+ - **Test coverage**: Added suites for `BlendMode`, `CustomFilter`, `Shape`, `Sprite`, `Stage`, spatial operations, `Bitmap`, `BitmapData`, `Mesh`, `Texture`, `TouchEvent`, `SpriteSheet`, `DebugLog`, `Filter`, `HTTPStatusEvent`, `ProgressEvent`, and `Sound`/`SoundChannel` (with an `Audio` mock and isolated module state via dynamic imports).
837
+
838
+ ### Fixed
839
+
840
+ - Particle offset calculation and missing per-particle alpha.
841
+ - `Bitmap` reference counting when its texture changes while already on stage.
842
+ - `BitmapText` layout not invalidating on width/height change (affects line-breaking); `TextField` not invalidating on size change.
843
+
844
+ ### Changed
845
+
846
+ - **Word wrapping**: Replaced regex-based tokenization with `Intl.Segmenter` for locale-aware word/grapheme segmentation, correctly handling Latin, CJK, Thai/Khmer, and mixed-script text.
847
+ - Pruned trivial property/constructor tests in favor of P1 edge-case coverage (boundary conditions, sorting).
848
+
849
+ ---
850
+
851
+ ## [0.5.9] — 2026-05-05
852
+
853
+ ### Added
854
+
855
+ - **WebGL2**: Uniform Buffer Object (`UBOManager`) support for frame-level projection uniforms, later reverted in favor of direct `gl.uniform*()` uploads after it caused stale projection state when switching render buffers (fixed once via `updateProjection()`, then removed entirely for simplicity — see 0.5.10).
856
+ - Dedicated `fullscreen_vert` shader for filter blur passes so each pass sets its own projection uniform independently.
857
+
858
+ ### Fixed
859
+
860
+ - `projectionVector` uniform not updating correctly for fullscreen quad draw calls.
861
+ - GLSL uniform block binding syntax causing compilation issues on some WebGL implementations; removed unused `uTextureSize` uniform (briefly re-added, then dropped again).
862
+
863
+ ---
864
+
865
+ ## [0.5.10] — 2026-05-05
866
+
867
+ ### Changed
868
+
869
+ - **WebGL2**: Removed `UBOManager` — reverted to direct `gl.uniform*()` uploads for `projectionVector` on both WebGL1 and WebGL2 paths. Multi-texture fragment shader simplified to constant (rather than dynamic) sampler indexing for GLSL ES 3.00 compatibility.
870
+
871
+ ---
872
+
873
+ ## [0.5.2] — 2026-05-04
874
+
875
+ ### Added
876
+
877
+ - **WebGL2 support**: Prefers a WebGL2 context at initialization with WebGL1 fallback for older devices, via a unified GL type alias. All GLSL shaders received an explicit `#version 100` directive for WebGL1.
878
+ - **Graphics**: `FinalizationRegistry`-based texture cleanup to prevent GPU memory leaks when `Graphics` objects are garbage-collected.
879
+ - **Text module expansion**: `HtmlTextParser.ts` (HTML text parsing), `InputController.ts` (selection/cursor/keyboard input handling), `TextMeasurer.ts` (font metrics), `WordWrap.ts` (line-breaking).
880
+
881
+ ### Fixed
882
+
883
+ - `MaskPipe` scissor rect calculation for scroll offsets — content scroll offsets were incorrectly included in the scissor rect instead of only screen offsets.
884
+ - Shape graphics commands were cleared on stage removal, preventing shapes from re-rendering when re-added to the display list.
885
+
886
+ ### Changed
887
+
888
+ - Reorganized the player module: canvas rendering into `player/canvas/`, WebGL pipes into `player/webgl/pipes/`, shaders into `player/webgl/shaders/`, each with a barrel `index.ts`.
889
+
890
+ ---
891
+
892
+ ## [0.3.11] — 2026-05-03 to 2026-05-04
893
+
894
+ ### Fixed
895
+
896
+ - **Text rendering**: Corrected vertical-centering math for middle-aligned text under `textBaseline='top'` (the em-square was being centered instead of the actual glyphs) — measures font metrics to compute a correction offset, then fixes a sign error in that correction.
897
+ - `Event.setDispatchContext()` now preserves the original dispatch target during bubble/capture phases, only assigning `_target` at the `AT_TARGET` phase or on initial assignment.
898
+ - Renderables with empty graphics commands at build time (e.g. UI components whose `Validator` fills commands a frame later) now trigger a full instruction rebuild once content becomes available, instead of never rendering.
899
+ - `MaskPipe` scissor rect calculation corrected to avoid double-applying offsets already baked into the matrix via scroll-rect handling.
900
+
901
+ ### Changed
902
+
903
+ - Added `willReadFrequently` hints to canvas 2D contexts used for pixel readback (`RenderTexture.getPixel32`, hit testing), avoiding repeated browser warnings.
904
+ - Removed debug logging that had been added for touch hit-testing (`CheckBox`/`RadioButton`/`Button`, `TouchHandler`).
905
+
906
+ ---
907
+
908
+ ## [0.3.3] — 2026-05-03
909
+
910
+ ### Fixed
911
+
912
+ - **FilterPipe / MaskPipe**: Correct GL state management to prevent stale blend state leaking between filter and mask passes.
913
+
914
+ ### Changed
915
+
916
+ - Replace explicit `undefined` assignments with optional property syntax across the codebase.
917
+ - Declare `children` field explicitly in `DisplayObjectContainer` and remove non-null assertions.
918
+
919
+ ---
920
+
921
+ ## [0.3.2] — 2026-05-02
922
+
923
+ ### Added
924
+
925
+ - **Resource manager**: Comprehensive resource management system with full documentation — supports asset loading, caching, and lifecycle management.
926
+ - **Capabilities system**: Runtime feature-detection API for querying WebGL extensions and platform capabilities.
927
+ - **TextPipe**: Complete text rendering pipeline integrated into the player.
928
+
929
+ ### Changed
930
+
931
+ - **Namespace migration**: Renamed all internal namespaces from `Heron` → `Kurot` to align with the new package identity.
932
+ - Fixed main entry point path in `package.json`.
933
+ - Added comprehensive migration status and API compatibility guide (`docs/migration.md`).
934
+
935
+ ---
936
+
937
+ ## [0.2.4] — 2026-04-11
938
+
939
+ ### Added
940
+
941
+ - **TextField rendering pipeline**: Full Canvas 2D and WebGL rendering path for `TextField`, including scroll offset, padding, clipping, and native `INPUT` mode support.
942
+ - Prevents double-text artifact when native input is focused.
943
+ - Fixes canvas buffer scaling and border handling in coordinate mapping.
944
+ - Refines `StageText` padding and clipping for better vertical alignment.
945
+ - **TextPipe**: `TextField` WebGL rendering (offscreen canvas rasterization → `WebGLTexture` upload). `WebGLRenderer` registers `TextPipe` and routes to it by `renderObjectType`.
946
+ - **`InstructionSet`**: Initial unit test coverage.
947
+ - **Benchmark scenes**: `rapid-churn` and `texture-swap` scenes added to the benchmark suite with Egret comparison.
948
+ - **Example pages**: Index page, mesh test, net test, video test, and sound test HTML examples.
949
+ - **Video rendering**: Dynamic scaling and per-frame WebGL texture updates.
950
+
951
+ ### Fixed
952
+
953
+ - Mesh rendering and tint color calculations corrected.
954
+ - Mesh animation angle calculation improved.
955
+ - Range input overflow in mesh test layout.
956
+ - Blend mode state restoration and WebGL context-loss handling.
957
+
958
+ ### Changed
959
+
960
+ - Example UI modernized with glassmorphism design and consistent layout.
961
+ - Scale mode updated from `exactFit` to `noScale` in examples.
962
+ - Benchmark build configuration and scripts added.
963
+
964
+ ---
965
+
966
+ ## [0.2.3] — 2026-04-11
967
+
968
+ ### Added
969
+
970
+ - **WebGL performance benchmarking suite**: Comprehensive multi-scene benchmark with detailed logging and dynamic-transform scene, covering 5 stress-test scenarios.
971
+ - **Bounds caching**: `DisplayObject` now caches computed bounds to avoid redundant recalculation.
972
+ - **Blend mode state management**: Explicit blend mode tracking in the render pipeline.
973
+ - **WebGL Context Lost recovery**: full recovery path for `webglcontextlost`/`webglcontextrestored`.
974
+
975
+ ### Fixed
976
+
977
+ - Drop shadow padding calculation in filter pipeline.
978
+ - Blend mode state not restored after filter/pipe passes (`FilterPipe` / `MaskPipe`), plus an instruction object pool for both pipes.
979
+ - Video frame rendering.
980
+
981
+ ### Changed
982
+
983
+ - Filter compositing and blur pipeline restructured for clarity.
984
+ - `WebGLRenderContext` reorganized with section comments and `readonly` fields.
985
+ - Imports consolidated to explicit module paths across player and display modules.
986
+
987
+ ---
988
+
989
+ ## [0.2.0] — 2026-04-09
990
+
991
+ ### Added
992
+
993
+ - **Multi-texture batching**: WebGL renderer now batches up to 8 textures per draw call, dramatically reducing GPU state changes.
994
+ - **Two-pass separable Gaussian blur**: Ping-pong FBO approach for high-quality, GPU-efficient blur filters.
995
+ - **GPU-accelerated CSS filters**: Canvas filter rendering path optimized with CSS filter fallback.
996
+ - **Mask rendering**: `DisplayObject` mask support with correct graphics state management.
997
+ - **Gradient rendering**: Refactored gradient pipeline in the filter system.
998
+ - **Render instruction pipeline**: Dirty-tracking system drives incremental display list updates.
999
+ - **Render object type tracking** and render groups for batching optimization.
1000
+ - **Graphics caching**: Canvas-to-WebGL rasterization cache for static `Graphics` objects.
1001
+ - **Pixel-perfect hit testing**: Accurate pointer event dispatch using rendered pixel data.
1002
+ - **Comprehensive unit tests**: `vitest` configuration and test suite covering core modules.
1003
+
1004
+ ### Changed
1005
+
1006
+ - `WebGLRenderContext` fully reorganized with section comments and `readonly` fields.
1007
+ - Event handler naming standardized across player and WebGL modules.
1008
+
1009
+ ---
1010
+
1011
+ ## [0.1.0] — 2026-04-09 _(initial release)_
1012
+
1013
+ ### Added
1014
+
1015
+ - **Core display hierarchy**: `DisplayObject`, `DisplayObjectContainer`, `Stage`, `Sprite`, `Bitmap`, `Mesh`, `Shape` with full Egret-compatible API.
1016
+ - **Event system**: Object-pooled event dispatch, specialized event types (`TouchEvent`, `TimerEvent`, `Event`), and `EventDispatcher`.
1017
+ - **WebGL rendering pipeline**: `DisplayList` caching, `SystemTicker`, `ScreenAdapter` integration.
1018
+ - **Text system**: `TextField` with HTML parsing, `BitmapFont` / `BitmapText` for texture-based text.
1019
+ - **Filter system**: Drop shadow, blur, color matrix, and glow filters.
1020
+ - **Media**: `Sound`, `SoundChannel`, `Video` with audio decode queue.
1021
+ - **Networking**: HTTP utilities (`URLLoader`, `URLRequest`).
1022
+ - **Geometry**: `Point`, `Rectangle`, `Matrix` with full Egret-compatible surface.
1023
+ - **Utilities**: `ByteArray`, `Timer`, `Base64Util`, `Logger`, `toColorString`.
1024
+ - **External interface**: Bridge for JS ↔ game communication.
1025
+ - Project initialized as `@kurot/core` (formerly `heron-core`), a modern TypeScript rewrite of the Egret game engine targeting WebGL multi-texture batching and a strict instruction-driven render pipeline.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A modern rewrite of the Egret game engine. Maintains Egret-compatible display object and event APIs while upgrading the rendering architecture, type safety, and tooling.
4
4
 
5
- > **Stable (1.0.28).** Targets ES2022 and evergreen browsers (Chrome / Edge / Firefox / Safari). No IE / old-Android / pre-2022 Safari support shims.
5
+ > **Prepared release: 2.0.0.** Targets ES2022 and evergreen browsers (Chrome / Edge / Firefox / Safari). No IE / old-Android / pre-2022 Safari support shims.
6
6
 
7
7
  ## Features
8
8
 
@@ -256,3 +256,14 @@ does not replace the manual checks on physical devices.
256
256
  ## License
257
257
 
258
258
  MIT
259
+
260
+ ## Resource manifest migration in 2.0.0
261
+
262
+ Sheet `subkeys` now maps each frame name to a metadata object instead of using
263
+ a comma-separated string. Old manifests fail validation before any resource
264
+ is registered. Refresh every old sheet explicitly in Kurot Editor before using
265
+ the new Core and CLI. Core indexes the frame aliases; `scale9grid` metadata is
266
+ applied to UI Images by the compiler or document resolver, not automatically
267
+ to arbitrary `Bitmap` objects. See the
268
+ [resource format](docs/resource.md) and
269
+ [nine-slice contract](../ui-document/docs/resource-nine-slice.md).
@@ -10,9 +10,14 @@ export interface ResourceConfigEntry {
10
10
  name: string;
11
11
  type: string;
12
12
  url: string;
13
- subkeys?: string;
13
+ subkeys?: Readonly<Record<string, ResourceSubkeyConfig>>;
14
+ scale9grid?: string;
14
15
  [key: string]: unknown;
15
16
  }
17
+ export interface ResourceSubkeyConfig {
18
+ readonly scale9grid?: string;
19
+ readonly [key: string]: unknown;
20
+ }
16
21
  export interface ResourceGroupEntry {
17
22
  name: string;
18
23
  keys: string;
@@ -65,6 +70,7 @@ export declare class ResourceConfig {
65
70
  * Get all group names.
66
71
  */
67
72
  getGroupNames(): string[];
73
+ private validateSubkeys;
68
74
  private addItemToKeyMap;
69
75
  private parseResourceItem;
70
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceConfig.d.ts","sourceRoot":"","sources":["../../../src/kurot/resource/ResourceConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,qBAAa,cAAc;IAC1B,OAAO,CAAC,MAAM,CAA0C;IACxD,OAAO,CAAC,QAAQ,CAA4C;IAE5D;;;;OAIG;IACI,WAAW,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,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,qBAAa,cAAc;IAC1B,OAAO,CAAC,MAAM,CAA0C;IACxD,OAAO,CAAC,QAAQ,CAA4C;IAE5D;;;;OAIG;IACI,WAAW,CAAC,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAkClE;;OAEG;IACI,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE;IAOnD;;;;;OAKG;IACI,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,UAAQ,GAAG,OAAO;IA+B3E;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAI/C;;OAEG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAKnC;;OAEG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAM7D;;OAEG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAInC;;OAEG;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAItC;;OAEG;IACI,aAAa,IAAI,MAAM,EAAE;IAMhC,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,iBAAiB;CAGzB"}
@@ -16,6 +16,9 @@ export class ResourceConfig {
16
16
  return;
17
17
  const resources = data.resources;
18
18
  if (resources) {
19
+ for (const item of resources) {
20
+ this.validateSubkeys(item);
21
+ }
19
22
  for (const item of resources) {
20
23
  let url = item.url;
21
24
  if (url && !url.includes('://')) {
@@ -124,18 +127,32 @@ export class ResourceConfig {
124
127
  return Array.from(this.groupDic.keys());
125
128
  }
126
129
  // ── Private helpers ──────────────────────────────────────────────────────
130
+ validateSubkeys(item) {
131
+ if (item.subkeys === undefined)
132
+ return;
133
+ if (!item.subkeys || typeof item.subkeys !== 'object' || Array.isArray(item.subkeys)) {
134
+ throw new Error('Resource subkeys must be an object. Refresh this sheet in Kurot Editor.');
135
+ }
136
+ for (const [key, config] of Object.entries(item.subkeys)) {
137
+ if (!key ||
138
+ key.trim() !== key ||
139
+ key.includes(',') ||
140
+ !config ||
141
+ typeof config !== 'object' ||
142
+ Array.isArray(config)) {
143
+ throw new Error('Invalid resource subkey configuration.');
144
+ }
145
+ }
146
+ }
127
147
  addItemToKeyMap(item) {
128
- if (!this.keyMap.has(item.name)) {
148
+ this.validateSubkeys(item);
149
+ const existing = this.keyMap.get(item.name);
150
+ if (!existing || existing.name !== item.name) {
129
151
  this.keyMap.set(item.name, item);
130
152
  }
131
- if (item.subkeys) {
132
- for (const rawKey of item.subkeys.split(',')) {
133
- const key = rawKey.trim();
134
- if (!key)
135
- continue;
136
- if (!this.keyMap.has(key)) {
137
- this.keyMap.set(key, item);
138
- }
153
+ for (const key of Object.keys(item.subkeys ?? {})) {
154
+ if (!this.keyMap.has(key)) {
155
+ this.keyMap.set(key, item);
139
156
  }
140
157
  }
141
158
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceConfig.js","sourceRoot":"","sources":["../../../src/kurot/resource/ResourceConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuBjD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAClB,MAAM,GAAG,IAAI,GAAG,EAA+B,CAAC;IAChD,QAAQ,GAAG,IAAI,GAAG,EAAiC,CAAC;IAE5D;;;;OAIG;IACI,WAAW,CAAC,IAAwB,EAAE,MAAc;QAC1D,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,SAAS,GAAG,IA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M,KAAK,QAAQ;gBAC1B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EACpB,CAAC;gBACF,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC3D,CAAC;QACF,CAAC;IACF,CAAC;IAEO,eAAe,CAAC,IAAyB;QAChD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YAC9C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAClC,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC5B,CAAC;QACF,CAAC;IACF,CAAC;IAEO,iBAAiB,CAAC,IAAyB;QAClD,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;CACD"}
@@ -2,7 +2,7 @@ export { Resource, resource } from './Resource.js';
2
2
  export type { ProgressCallback, ResourceEventListener } from './Resource.js';
3
3
  export { ResourceItem, ResourceType } from './ResourceItem.js';
4
4
  export { ResourceConfig } from './ResourceConfig.js';
5
- export type { ResourceConfigData, ResourceConfigEntry } from './ResourceConfig.js';
5
+ export type { ResourceConfigData, ResourceConfigEntry, ResourceSubkeyConfig } from './ResourceConfig.js';
6
6
  export { ResourceLoader } from './ResourceLoader.js';
7
7
  export { ResourceEventType } from './ResourceEvent.js';
8
8
  export type { ResourceEvent } from './ResourceEvent.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/kurot/resource/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/kurot/resource/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurot/core",
3
- "version": "1.0.28",
3
+ "version": "2.0.0",
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",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "files": [
18
18
  "dist/**/*",
19
+ "CHANGELOG.md",
19
20
  "LICENSE"
20
21
  ],
21
22
  "scripts": {