feat(physics): support MeshColliderShape#3061
Conversation
cptbtptpbcptdtptp
commented
Jul 3, 2026
- feat(physics): support MeshColliderShape
* feat(physics): support MeshColliderShape
Main merge to dev/2.0
…ix transition bugs (#2885) * fix(animation): allow anyState transitions to interrupt crossFade
* fix: handle iOS Safari AudioContext "zombie" state in visibility change
* feat: update trail texture scaling to support separate X and Y scales
…gs (#2893) * fix(animation): allow anyState transitions to interrupt crossFade & fix transition bugs
* feat(physics-physx): enhance runtime mode handling with WebAssembly SIMD support
* fix: prevent crash when destroying entity in physics event callbacks
…oad (#2900) * types: wrap Text/JSON/Buffer as EngineObject for type-safe ResourceManager.load
* refactor(font): opt memory for texture of font atlas
* feat: add multi-scattering energy compensation to BSDF calculations
* refactor: support SAO in shaderlab
* feat: add unpkg and jsdelivr fields to galacean package.json
* fix(ui): add eventCamera support for WorldSpace UICanvas (#2793)
…2906) * fix: ColorWriteMask enum parsing in ShaderLab with bitwise OR support
chore: update PhysX WASM binaries and CDN URLs
feat: Add characterSpacing and change spacing units to em
feat: Add characterSpacing and change spacing units to em
Add npm authentication verification step before releasing packages.
* fix(entity): traverse components and children front-to-back in _getComponentsInChildren
* fix(core/ui): propagate reparent dirty to descendants in Transform and UITransform
* fix(2d): fix typo in SpriteAtlas.getSprites warning message
…ference (#3035) * fix(loader): prefer virtualPathResourceMap type over URL extension inference
fix(audio): harden playback lifecycle
Move engine-spine into the engine monorepo following the physics provider pattern: a version-agnostic facade plus a pluggable version backend. Public API matches the engine-spine 4.2 branch. - @galacean/engine-spine: user-facing SpineAnimationRenderer + loaders, owns the Galacean-side buffers/material, with zero spine-core runtime dependency. ISpineRuntime and ISpineRenderTarget are the seam; the backend self-registers on import, mirroring IPhysics with physics-physx / physics-lite. - @galacean/engine-spine-core-4.2: bundles @esotericsoftware/spine-core 4.2, the mesh generator and Spine42Runtime. - 2D/Spine ShaderLab shader, precompiled and registered in ShaderPool. - e2e: spineboy case. The 3.8 backend (@galacean/engine-spine-core-3.8) follows in a separate PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e2e: spineboy basic render, plus a tint-black two-color case using the real tank-pro asset sampled at the muzzle-smoke frame where tintBlack on/off differs ~7% (registered in config.ts with 0.05 tolerance). unit (tests/src/spine): pool reuse, runtime registry, vertex stride and blend ordinal contracts, loader url parsing, SpineMaterial blend factors, SpineAnimationRenderer tintBlack setter and material cache. fix: SpineAnimationRenderer._getMaterial read its cache via Map[key] (always undefined) instead of .get(key), so every sub-mesh allocated a fresh SpineMaterial every frame. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat: add dynamic collider force at position
* refactor(physics): remove physics-lite backend
…ease (#3015) * perf(pipeline): share internal RT across cameras via per-frame pool lease
#3048) * chore: modernize ESLint setup (flat config, ESLint 10, Prettier split)
…e bound args (#2987) * fix(core): invoke structured Signal listeners with runtime args before bound args
# Conflicts: # packages/shader/compiledShaders/index.ts
The packages/spine-core-3.8 directory was never committed, but a leftover lockfile importer entry for it remained, which pnpm install prunes.
The merge's pre-commit hook auto-fixed Object -> object in this file per the newly-merged ESLint config, which made the implementation signature's AssetPromise.all(promises) return type no longer assignable (T is unconstrained here since it must satisfy both the single-item and collection overloads).
Vendors the spine 3.8 runtime (no npm package exists for that line; @esotericsoftware/spine-core starts at 4.0.1) and wires it into the existing ISpineRuntime/SpineRuntimeRegistry architecture alongside spine-core-4.2, so `import "@galacean/engine-spine-core-3.8"` registers a working 3.8 backend. Adapts the 4.2-derived SpineGenerator/Spine38Runtime for real 3.8 API differences: no-arg updateWorldTransform (no Physics enum), Bone- instead of Slot-based RegionAttachment.computeWorldVertices, a synchronous TextureAtlas(text, textureLoader) constructor, and an extra unused parameter on SkeletonClipping.clipTriangles. Spine38Runtime intentionally doesn't `implements ISpineRuntime`, since the 4.2 npm package has drifted from 3.8's shape (added TextureAtlas.setTextures, dropped Skeleton/SkeletonData's updateCacheReset/findBoneIndex/findSlotIndex/findPathConstraintIndex) enough that TypeScript's structural check fails despite every member the interface actually calls lining up; it's registered via a single cast instead. Adds two examples (spine-keli-4.2.ts, spine-otakugirl-3.8.ts) that verify both backends end-to-end against real assets, including a genuine spine 3.8.99 binary skeleton exercising the SkeletonBinary parse path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ture property SpineResource._associationTextureInSkeletonData read `region.texture.texture`, but `region.texture` is already the SpineTexture instance - getting its backing Texture2D needs `.getImage()`, same as every other texture read site in SpineGenerator. Because TextureRegion.texture is typed `any` in the npm 4.2 package, the extra `.texture` compiled fine but always resolved to undefined at runtime, so textures were never associated as a super-resource of their SpineResource and lost that GC protection. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ltin-spine-runtime-value-mutation
|
Important Review skippedToo many files! This PR contains 770 files, which is 620 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (299)
📒 Files selected for processing (770)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3061 +/- ##
==========================================
+ Coverage 79.48% 80.89% +1.40%
==========================================
Files 870 977 +107
Lines 95035 112701 +17666
Branches 9489 11342 +1853
==========================================
+ Hits 75543 91169 +15626
- Misses 19333 21338 +2005
- Partials 159 194 +35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
GuoLei1990
left a comment
There was a problem hiding this comment.
总结
这个 PR 无法按现状审查或合并 —— 它选错了 base 分支。PR 标题是 feat(physics): support MeshColliderShape,分支名是 fix/builtin-spine-runtime-value-mutation,实际 base 指向 main,三者互不对应。因为 main 落后 dev/2.0 很多,PR 把两者之间 158 个已合并的 commit / 1069 个文件 / +63822 −20764 全卷了进来(GitHub 的 diff 视图因超过 300 文件已直接拒绝渲染)。HEAD 30991d2d4 本身是一个 chore: release v0.0.0-experimental-2.0-spine.1 发版 commit。
对照发现:把这个分支 tip 与 dev/2.0 比较,只 ahead 11 / behind 0(merge-base 721b42a8c)—— 说明真正的意图变更就是这 11 个 commit,其余全是 base 选错导致的历史噪声。而这 11 个 commit 的主体(builtin Spine)正是已在审的 #3057(base dev/2.0,feat/builtin-spine,仍 OPEN) 的内容,72d440f1f 等 commit 两个 PR 共有。
问题
-
[P0] PR base 选错,导致不可审、不可合 —— base 应为
dev/2.0而非main。当前配置下:- diff 达 1069 文件、300+ 超限,无法逐行审查;
- 若真的 merge 进
main,会把整段dev/2.0分叉一次性带入main,污染发布分支; codecov/patchCI 已 failing(build/e2e 绿,但 patch 覆盖率红)。
建议:把 base 改到
dev/2.0。改完后 PR 会自动收敛为 11 个真实 commit / ~130 文件,届时可正常审查。 -
[P1] 与 #3057 的关系需要理清(重复 / 应 stack) —— 本 PR 与 #3057 大量内容重叠(builtin Spine 主体)。真正新增于 #3057 之上的只有三块:
d59c6392d fix(loader): support runtime value mutations(ReflectionParser新增$args/$props/$calls运行时变异支持,+61/−5,带 3 个新测试)—— 这是分支名对应的真实改动;59c0cc245 feat(spine): add spine-core-3.8 runtime backend(新增packages/spine-core-3.8整包);72d440f1f fix(spine): read texture via getImage() ...。
建议:要么把本 PR rebase 到
dev/2.0并声明 stack 在 #3057 之上(只审这三块增量),要么把这三块合并进 #3057、关掉本 PR。否则两个 PR 会各自演进、相互漂移。
说明
因 base 选错,我没有对这 1069 个文件做逐行代码审查(其中绝大多数是 dev/2.0 已合并、已审过的历史,重复审查无意义)。我只抽查了真正新增的 ReflectionParser 运行时变异改动(d59c6392d)——$args 构造 + $props/$calls 就地变异、$type.$args 非数组时 reject、identity 保持(target.nested === original),结构合理且有反向覆盖测试,方向 OK。但这些应该在正确 base 之上、作为 #3057 的清晰增量来审。
先把 base 修正到 dev/2.0 再走正式审查流程。