feat(particle): 添加粒子与 Rapier2D 物理碰撞集成 (#295)

* feat(particle): 添加粒子与 Rapier2D 物理碰撞集成

- 新增 Physics2DCollisionModule 模块,支持粒子与场景碰撞体交互
- 支持圆形重叠检测和射线检测两种模式
- 支持 Kill/Bounce/Stop 三种碰撞行为
- 修复 module.update() 参数顺序 bug
- 物理模块自动通过 context 注入,用户只需添加模块即可

* chore: update pnpm-lock.yaml for particle physics dependency

Update lockfile to include @esengine/physics-rapier2d as optional peer dependency.
This commit is contained in:
YHH
2025-12-08 09:38:37 +08:00
committed by GitHub
parent d92c2a7b66
commit 52bbccd53c
10 changed files with 535 additions and 2 deletions

View File

@@ -27,3 +27,6 @@ export { Physics2DPlugin } from './PhysicsEditorPlugin';
// Runtime plugin (for game builds)
export { PhysicsPlugin } from './PhysicsRuntimeModule';
// Physics query interface (for particle system integration)
export type { IPhysics2DQuery, PhysicsSystemContext } from './PhysicsRuntimeModule';