Commit Graph

3046 Commits

Author SHA1 Message Date
luzhuang
f2d788bd00 fix(animation): keep replaced state machines wired 2026-06-17 19:47:43 +08:00
luzhuang
a92f56bb3e fix(animation): keep event cursor synced when events are muted 2026-06-17 17:29:44 +08:00
luzhuang
08ec9a1eb4 fix(animation): invalidate cache on state removal 2026-06-17 11:42:25 +08:00
luzhuang
ae7ae016b1 test(animation): cover destination crossfade no-op 2026-06-17 11:31:08 +08:00
luzhuang
063c352d4a refactor(animation): simplify animator internals 2026-06-17 11:20:38 +08:00
luzhuang
39bf09df35 perf(animation): narrow crossfade no-op guard 2026-06-16 20:09:43 +08:00
luzhuang
9483380c6a perf(animation): tighten play hot paths 2026-06-16 19:58:12 +08:00
luzhuang
7d90f3cec0 test(animation): avoid temp layer state in current-state test 2026-06-16 19:53:57 +08:00
luzhuang
c37fe79ee3 perf(animation): reduce play data getter access 2026-06-16 19:49:13 +08:00
luzhuang
2138aa91ee test(animation): make animator state tests deterministic 2026-06-16 19:38:02 +08:00
luzhuang
18ec4b11d3 test(animation): tighten animator hang smoke assertion 2026-06-16 19:32:29 +08:00
luzhuang
9f603f9885 chore(animation): remove redundant crossfade guards 2026-06-16 19:10:01 +08:00
luzhuang
3c1d0bfea9 test(animation): cover active-state crossFade no-op 2026-06-16 18:27:54 +08:00
luzhuang
c5cd8cc308 chore(animation): keep notes out of pr 2026-06-16 15:40:12 +08:00
luzhuang
bb323cac20 test: cover animator state lookup rebuild edges 2026-06-16 14:54:49 +08:00
luzhuang
1c25d4c052 fix(animation): simplify reset and cover loop events 2026-06-15 19:59:18 +08:00
luzhuang
b5fdd4502e docs(animation): update animator verification note 2026-06-15 19:47:09 +08:00
luzhuang
c975875dee fix(animation): stabilize animator coverage path 2026-06-15 19:42:53 +08:00
luzhuang
aa541bdbea fix(animation): restore animator state instance boundary 2026-06-15 19:31:03 +08:00
luzhuang
abb5c3afd2 fix(animation): split shaderlab animation fixes 2026-06-11 15:41:16 +08:00
hhhhkrx
de75496876 fix(particle): stop CustomDataModule from false-rejecting names by prefix (#3019)
fix(particle): stop CustomDataModule from false-rejecting names by prefix
2026-06-03 15:16:04 +08:00
luzhuang
97d8d610c7 chore: release v2.0.0-alpha.34 v2.0.0-alpha.34 2026-06-02 22:43:24 +08:00
hhhhkrx
dbc693ec8a feat(particle): support custom particle shaders with custom data (#3004)
* feat(particle): support custom particle shaders with custom data
2026-06-02 17:51:29 +08:00
ChenMo
1472913872 feat(core): GPU instancing auto-batching (#2957)
* feat(core): add GPU instancing auto-batching with UBO-based per-instance data
2026-05-28 23:40:18 +08:00
hhhhkrx
0d29d9a25b fix(particle): only accumulate rotation-over-lifetime onto Z axis (#3013)
* fix(particle): only accumulate rotation-over-lifetime onto Z axis
2026-05-27 11:03:19 +08:00
hhhhkrx
956b5c2960 feat(particle): implement rateOverDistance emission (#3011)
* feat(particle): implement rateOverDistance emission
2026-05-24 20:01:47 +08:00
ChenMo
17e88c8966 feat(loader): recognize .aac and .flac extensions for audioClip loader (#3009)
add "aac" and "flac" to AudioLoader's resourceLoader extension list so
2026-05-19 19:07:56 +08:00
ChenMo
cc78efd981 feat(loader): recognize .m4a extension for audioClip loader (#3008)
feat(loader): recognize .m4a extension for audioClip loader
2026-05-19 15:57:18 +08:00
zhuxudong
2563fc5911 fix(shader-compiler, loader): silence verbose-mode noise + drop ShaderLoader dead code (#3007)
fix: silence verbose-mode noise + drop ShaderLoader dead code
2026-05-18 19:29:51 +08:00
luzhuang
f728209255 fix(animation, loader): 从 #2983 抽离动画与 GLTF 加载器修复 (#2999)
* fix(animation): add per-instance speed to AnimatorStatePlayData
2026-05-18 16:54:15 +08:00
cptbtptpbcptdtptp
9246f5ea97 chore: release v2.0.0-alpha.33 v2.0.0-alpha.33 2026-05-14 16:27:48 +08:00
zhuxudong
8a24469dad fix(shader-compiler): silence spurious form-param warnings + createGSError release-mode regression (#3005)
* fix(shader-compiler): silence spurious form-param "undeclared" warnings
2026-05-14 14:48:15 +08:00
zhuxudong
66ea595d0a fix(shader-compiler): preserve args for builtin-alias and user-fn-alias macro calls (#3001)
* fix(shader-compiler): enforce shift for known LALR conflicts
2026-05-14 11:51:07 +08:00
zhuxudong
bba09be10e fix(shader-compiler): track every identifier in #define value (#2996)
* fix(shader-compiler): scan every identifier in `#define` value
2026-05-13 19:42:24 +08:00
luzhuang
373f559835 fix(physics-physx): skip initial overlap in raycast/sweep + reuse query callbacks (#2998)
* fix(physics-physx): skip initial overlap in raycast/sweep + reuse query callbacks
2026-05-13 19:40:59 +08:00
zhuxudong
5fe4e64c74 fix(shader-compiler): move bundler output out of dist/ (#3000)
fix(shader-compiler): move bundler output out of dist
2026-05-13 16:57:31 +08:00
luzhuang
25ba6eb1cd chore: release v2.0.0-alpha.32 v2.0.0-alpha.32 2026-05-12 19:59:16 +08:00
luzhuang
56bfd1b3c4 refactor(loader): rename v2 scene.entities to scene.rootEntities (#2997)
* refactor(loader): rename v2 scene.entities to scene.roots
2026-05-12 19:55:36 +08:00
cptbtptpbcptdtptp
71efdd81e3 chore: release v2.0.0-alpha.31 v2.0.0-alpha.31 2026-05-12 17:45:50 +08:00
luzhuang
6732c76a1b feat(loader): support $class refs and numeric SpecularMode in v2 scene (#2994)
* feat(loader): support class refs in v2 values
2026-05-12 16:47:58 +08:00
zhuxudong
1bc2b102ad refactor(shader): migrate GLSL shaders to ShaderLab and clean up shader infrastructure(#2961)
* refactor(core): migrate shaders from core/shaderlib to shader package and clean up old files
2026-05-11 17:55:17 +08:00
AZhan
e19b764e1c fix(text): propagate WorldPosition dirty in _onRootCanvasModify when ReferenceResolutionPerUnit changes (#2981)
* fix(text): mark WorldPosition dirty after slot reallocation in _updateLocalData

Both Text (UI) and TextRenderer share a `bounds` getter that runs
`_updateLocalData` then checks `WorldPosition` dirty. `_updateLocalData`
internally `_freeTextChunks` + `_buildChunk → allocateSubChunk`, which
under PrimitiveChunk's first-fit + free-list-merge allocator can return
a slot previously owned by another renderer. `_buildChunk` writes UV
and color but never pos (pos is `_updatePosition`'s job), so the new
slot retains the previous owner's pos floats as residue.

Before this fix, when a path sets only `LocalPositionBounds` dirty
(e.g. `Text._onRootCanvasModify(ReferenceResolutionPerUnit)` in UI
Text), the bounds getter would:
  1. see LocalPositionBounds → run _updateLocalData (slot may swap)
  2. see WorldPosition not dirty → skip _updatePosition
  3. _setDirtyFlagFalse(Font) clear all dirty bits at once
The next _render also sees clean dirty bits and uploads the residue
pos to GPU — the renderer ends up rendering at someone else's old
world position. In practice this manifested as text glyphs jumping
to the wrong spot or appearing missing after UI tab switches that
free + reallocate chunk slots in the same frame.

Fix: force WorldPosition dirty at the end of _updateLocalData so the
contract "after this call, pos must be rewritten" is unconditionally
honored regardless of which caller invoked it.

Tests cover three layers:
  - dirty-flag invariant: _updateLocalData must leave WorldPosition
    dirty on exit
  - corrupted-slot: bounds getter with only LocalPositionBounds dirty
    rewrites pos even when the slot memory is poisoned
  - full slot-reuse repro: destroy a sibling renderer occupying a
    lower offset, then trigger bounds getter on the survivor — its
    pos must remain correct after the slot moves

Without the fix, all three regression tests fail with the survivor
rendering at the destroyed sibling's old position.

* chore: drop Chinese commentary from text dirty-flag fix

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(ui): destroy engine after regression describe block

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(text): move dirty propagation to input side

Previous fix added _setDirtyFlagTrue(WorldPosition) at the end of
_updateLocalData in both TextRenderer and UI Text. That treats the
output side as the place to declare invalidation, which conflates
two concerns: dirty flags should declare staleness from input
semantics, and update methods should be pure compute units that
don't propagate flags themselves.

Root cause is on the input side: _onRootCanvasModify(ReferenceResolutionPerUnit)
declared LocalPositionBounds dirty but not WorldPosition, even though
ReferenceResolutionPerUnit affects both local layout and the world
positions derived from it. Fix the declaration where the input
semantic event lives.

TextRenderer needs no change — it has no entry point that dirties
LocalPositionBounds without also dirtying WorldPosition (all setters
use DirtyFlag.Position which includes both).

Tests rewritten from white-box (poking private _dirtyFlag, hardcoded
enum values) to public-API integration tests that drive the bug
through uiCanvas.referenceResolutionPerUnit and assert observable
vertex position changes. The new tests fail without the fix
(maxDelta = 0, positions don't update) and pass with it.

* fix(text): include WorldVolume in dirty flag for ReferenceResolutionPerUnit change

Use DirtyFlag.Position (= LocalPositionBounds | WorldPosition | WorldVolume)
instead of the manual two-flag combination. ReferenceResolutionPerUnit
also affects world bounding volume; without the WorldVolume bit,
_updateBounds is skipped in the bounds getter and stale BoundingBox
leaks into frustum culling and raycasting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: chenmo.gl <chenmo.gl@antgroup.com>
2026-05-07 17:23:26 +08:00
ChenMo
a6f05043d1 feat(shader-lab): make #define values first-class AST nodes (#2974)
* feat(shader-lab): make #define values first-class AST nodes
2026-04-28 17:12:18 +08:00
zhuxudong
e37c928eee fix(shader-lab): resolve generic return type for texture/builtin functions (#2966)
* fix(shader-lab): resolve GVec4 generic return type for texture() builtin functions
2026-04-21 20:10:42 +08:00
chenmo.gl
ebd57aef47 chore: release v2.0.0-alpha.30 v2.0.0-alpha.30 2026-04-21 11:22:09 +08:00
hhhhkrx
4c6ddfa15c feat(particle): add cycles and repeatInterval to Burst (#2972)
* feat(particle): add cycles and repeatInterval to Burst
2026-04-21 11:20:38 +08:00
luzhuang
284cce8e16 feat(loader): v2 scene/prefab format parsing (#2959)
* refactor(loader): native v2 scene/prefab format parsing
2026-04-20 20:14:21 +08:00
chenmo.gl
f9064e7fc5 chore: release v2.0.0-alpha.29 v2.0.0-alpha.29 2026-04-17 22:52:07 +08:00
zhuxudong
3f24a7d7ad fix(shader-lab): add missing semicolon in GLES100 fragment return conversion (#2968)
fix(shader-lab): add missing semicolon in GLES100 fragment return conversion
2026-04-17 15:09:49 +08:00
zhuxudong
35bc258071 fix(shader): add missing camera_VPMat declaration in Transform.glsl (#2969)
fix(shader): add missing camera_VPMat declaration in Transform.glsl
2026-04-17 15:05:05 +08:00