Complete Box2D to Planck.js migration

- Replace Box2D.js with Planck.js physics engine
- Update all require paths from 'Lib/Vendor/Box2D' to 'Lib/Vendor/Planck'
- Convert Box2D contact listeners to Planck.js event system
- Fix all method name capitalization (Get* -> get*, Set* -> set*)
- Update collision detection system for Planck.js compatibility
- Server now starts successfully and basic physics working
- Character can land on platforms - core physics functional

Major milestone: Game now running on modern, maintained physics engine
This commit is contained in:
Karl Pannek 2025-07-16 15:01:59 +02:00
parent 875abd60d9
commit dc779def9c
43 changed files with 701 additions and 14524 deletions

View file

@ -68,7 +68,7 @@ function loadFixtureFromRUBE(body, fixtureJso) {
fd.shape.m_radius = fixtureJso.circle.radius;
if ( fixtureJso.circle.center )
fd.shape.m_p.SetV(fixtureJso.circle.center);
var fixture = body.CreateFixture(fd);
var fixture = body.createFixture(fd);
if ( fixtureJso.name )
fixture.name = fixtureJso.name;
}
@ -78,7 +78,7 @@ function loadFixtureFromRUBE(body, fixtureJso) {
for (v = 0; v < fixtureJso.polygon.vertices.x.length; v++)
verts.push( new b2Vec2( fixtureJso.polygon.vertices.x[v], fixtureJso.polygon.vertices.y[v] ) );
fd.shape.SetAsArray(verts, verts.length);
var fixture = body.CreateFixture(fd);
var fixture = body.createFixture(fd);
if ( fixture && fixtureJso.name )
fixture.name = fixtureJso.name;
}
@ -89,7 +89,7 @@ function loadFixtureFromRUBE(body, fixtureJso) {
var thisVertex = new b2Vec2( fixtureJso.chain.vertices.x[v], fixtureJso.chain.vertices.y[v] );
if ( v > 0 ) {
fd.shape.SetAsEdge( lastVertex, thisVertex );
var fixture = body.CreateFixture(fd);
var fixture = body.createFixture(fd);
if ( fixtureJso.name )
fixture.name = fixtureJso.name;
}