@rpgjs/physic 5.0.0-alpha.16 → 5.0.0-alpha.17

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.
@@ -41,6 +41,11 @@ export declare class CollisionResolver {
41
41
  /**
42
42
  * Separates two entities by moving them apart
43
43
  *
44
+ * This method applies position corrections to resolve penetration between
45
+ * colliding entities. After applying corrections, it notifies position change
46
+ * handlers to ensure proper synchronization with game logic (e.g., updating
47
+ * owner.x/y signals for network sync).
48
+ *
44
49
  * @param entityA - First entity
45
50
  * @param entityB - Second entity
46
51
  * @param normal - Separation normal (from A to B)
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/collision/resolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,2CAA2C;IAC3C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAA2B;IAEzC;;;;OAIG;gBACS,MAAM,GAAE,cAAmB;IAQvC;;;;;;OAMG;IACI,OAAO,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI;IAe9C;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IA8BxB;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IAyEzB;;;;OAIG;IACI,UAAU,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,IAAI;CAKrD"}
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/collision/resolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,2CAA2C;IAC3C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAA2B;IAEzC;;;;OAIG;gBACS,MAAM,GAAE,cAAmB;IAQvC;;;;;;OAMG;IACI,OAAO,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI;IAe9C;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,gBAAgB;IAiCxB;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IAyEzB;;;;OAIG;IACI,UAAU,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,IAAI;CAKrD"}
package/dist/index17.js CHANGED
@@ -29,6 +29,11 @@ class CollisionResolver {
29
29
  /**
30
30
  * Separates two entities by moving them apart
31
31
  *
32
+ * This method applies position corrections to resolve penetration between
33
+ * colliding entities. After applying corrections, it notifies position change
34
+ * handlers to ensure proper synchronization with game logic (e.g., updating
35
+ * owner.x/y signals for network sync).
36
+ *
32
37
  * @param entityA - First entity
33
38
  * @param entityB - Second entity
34
39
  * @param normal - Separation normal (from A to B)
@@ -47,9 +52,11 @@ class CollisionResolver {
47
52
  const correctionB = normal.mul(correction * (entityB.invMass / totalInvMass));
48
53
  if (!entityA.isStatic()) {
49
54
  entityA.position.addInPlace(correctionA);
55
+ entityA.notifyPositionChange();
50
56
  }
51
57
  if (!entityB.isStatic()) {
52
58
  entityB.position.addInPlace(correctionB);
59
+ entityB.notifyPositionChange();
53
60
  }
54
61
  }
55
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index17.js","sources":["../src/collision/resolver.ts"],"sourcesContent":["import { Vector2 } from '../core/math/Vector2';\nimport { Entity } from '../physics/Entity';\nimport { CollisionInfo } from './Collider';\n\n/**\n * Collision resolver configuration\n */\nexport interface ResolverConfig {\n /** Position correction factor (0-1, higher = more correction) */\n positionCorrectionFactor?: number;\n /** Minimum penetration depth to resolve */\n minPenetrationDepth?: number;\n /** Maximum position correction per step */\n maxPositionCorrection?: number;\n}\n\n/**\n * Collision resolver\n * \n * Resolves collisions by separating entities and applying impulses.\n * Uses impulse-based resolution for stable, deterministic physics.\n * \n * @example\n * ```typescript\n * const resolver = new CollisionResolver();\n * resolver.resolve(collision);\n * ```\n */\nexport class CollisionResolver {\n private config: Required<ResolverConfig>;\n\n /**\n * Creates a new collision resolver\n * \n * @param config - Resolver configuration\n */\n constructor(config: ResolverConfig = {}) {\n this.config = {\n positionCorrectionFactor: config.positionCorrectionFactor ?? 0.8,\n minPenetrationDepth: config.minPenetrationDepth ?? 0.0001,\n maxPositionCorrection: config.maxPositionCorrection ?? 5,\n };\n }\n\n /**\n * Resolves a collision\n * \n * Separates entities and applies collision response.\n * \n * @param collision - Collision information to resolve\n */\n public resolve(collision: CollisionInfo): void {\n const { entityA, entityB, normal, depth } = collision;\n\n // Skip if penetration is too small\n if (depth < this.config.minPenetrationDepth) {\n return;\n }\n\n // Position correction (separate entities)\n this.separateEntities(entityA, entityB, normal, depth);\n\n // Velocity resolution (collision response)\n this.resolveVelocities(entityA, entityB, normal);\n }\n\n /**\n * Separates two entities by moving them apart\n * \n * @param entityA - First entity\n * @param entityB - Second entity\n * @param normal - Separation normal (from A to B)\n * @param depth - Penetration depth\n */\n private separateEntities(\n entityA: Entity,\n entityB: Entity,\n normal: Vector2,\n depth: number\n ): void {\n const totalInvMass = entityA.invMass + entityB.invMass;\n if (totalInvMass === 0) {\n return; // Both static\n }\n\n // Calculate separation amount\n const correction = Math.min(\n depth * this.config.positionCorrectionFactor,\n this.config.maxPositionCorrection\n );\n\n // Distribute correction based on inverse mass\n const correctionA = normal.mul(-correction * (entityA.invMass / totalInvMass));\n const correctionB = normal.mul(correction * (entityB.invMass / totalInvMass));\n\n // Apply corrections\n if (!entityA.isStatic()) {\n entityA.position.addInPlace(correctionA);\n }\n if (!entityB.isStatic()) {\n entityB.position.addInPlace(correctionB);\n }\n }\n\n /**\n * Resolves velocities using impulse-based collision response\n * \n * @param entityA - First entity\n * @param entityB - Second entity\n * @param normal - Collision normal (from A to B)\n */\n private resolveVelocities(\n entityA: Entity,\n entityB: Entity,\n normal: Vector2\n ): void {\n // Relative velocity\n const relativeVelocity = entityB.velocity.sub(entityA.velocity);\n const velocityAlongNormal = relativeVelocity.dot(normal);\n\n // Don't resolve if velocities are separating\n if (velocityAlongNormal > 0) {\n return;\n }\n\n // Calculate restitution (bounciness)\n const restitution = Math.min(entityA.restitution, entityB.restitution);\n\n // Calculate impulse scalar\n const totalInvMass = entityA.invMass + entityB.invMass;\n if (totalInvMass === 0) {\n return; // Both static\n }\n\n // Impulse: j = -(1 + e) * v_rel · n / (1/mA + 1/mB)\n const impulseScalar = -(1 + restitution) * velocityAlongNormal / totalInvMass;\n const impulse = normal.mul(impulseScalar);\n\n // Apply impulse\n if (!entityA.isStatic()) {\n entityA.velocity.addInPlace(impulse.mul(-entityA.invMass));\n entityA.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because collision response\n // should not change the entity's intended direction (visual orientation).\n // Direction changes should only come from intentional movement (player input, AI).\n }\n if (!entityB.isStatic()) {\n entityB.velocity.addInPlace(impulse.mul(entityB.invMass));\n entityB.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because collision response\n // should not change the entity's intended direction (visual orientation).\n // Direction changes should only come from intentional movement (player input, AI).\n }\n\n // Friction (simplified, using velocity tangent to collision)\n const tangent = relativeVelocity.sub(normal.mul(velocityAlongNormal));\n const tangentLength = tangent.length();\n\n if (tangentLength > 1e-5) {\n const friction = Math.sqrt(entityA.friction * entityB.friction);\n const tangentNormalized = tangent.normalize();\n const frictionImpulse = tangentNormalized.mul(-tangentLength * friction / totalInvMass);\n\n // Clamp friction impulse to not exceed relative velocity\n const maxFriction = Math.abs(impulseScalar * friction);\n if (frictionImpulse.length() > maxFriction) {\n frictionImpulse.normalizeInPlace().mulInPlace(maxFriction);\n }\n\n if (!entityA.isStatic()) {\n entityA.velocity.addInPlace(frictionImpulse.mul(-entityA.invMass));\n entityA.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because friction adjustments\n // should not change the entity's intended direction (visual orientation).\n }\n if (!entityB.isStatic()) {\n entityB.velocity.addInPlace(frictionImpulse.mul(entityB.invMass));\n entityB.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because friction adjustments\n // should not change the entity's intended direction (visual orientation).\n }\n }\n }\n\n /**\n * Resolves multiple collisions\n * \n * @param collisions - Array of collisions to resolve\n */\n public resolveAll(collisions: CollisionInfo[]): void {\n for (const collision of collisions) {\n this.resolve(collision);\n }\n }\n}\n\n"],"names":[],"mappings":"AA4BO,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ7B,YAAY,SAAyB,IAAI;AACvC,SAAK,SAAS;AAAA,MACZ,0BAA0B,OAAO,4BAA4B;AAAA,MAC7D,qBAAqB,OAAO,uBAAuB;AAAA,MACnD,uBAAuB,OAAO,yBAAyB;AAAA,IAAA;AAAA,EAE3D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,QAAQ,WAAgC;AAC7C,UAAM,EAAE,SAAS,SAAS,QAAQ,UAAU;AAG5C,QAAI,QAAQ,KAAK,OAAO,qBAAqB;AAC3C;AAAA,IACF;AAGA,SAAK,iBAAiB,SAAS,SAAS,QAAQ,KAAK;AAGrD,SAAK,kBAAkB,SAAS,SAAS,MAAM;AAAA,EACjD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUQ,iBACN,SACA,SACA,QACA,OACM;AACN,UAAM,eAAe,QAAQ,UAAU,QAAQ;AAC/C,QAAI,iBAAiB,GAAG;AACtB;AAAA,IACF;AAGA,UAAM,aAAa,KAAK;AAAA,MACtB,QAAQ,KAAK,OAAO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AkB,kBAAkB,IAAI,CAAC,gBAAgB,WAAW,YAAY;AAGtF,YAAM,cAAc,KAAK,IAAI,gBAAgB,QAAQ;AACrD,UAAI,gBAAgB,OAAA,IAAW,aAAa;AAC1C,wBAAgB,iBAAA,EAAmB,WAAW,WAAW;AAAA,MAC3D;AAEA,UAAI,CAAC,QAAQ,YAAY;AACvB,gBAAQ,SAAS,WAAW,gBAAgB,IAAI,CAAC,QAAQ,OAAO,CAAC;AACjE,gBAAQ,qBAAA;AAAA,MAGV;AACA,UAAI,CAAC,QAAQ,YAAY;AACvB,gBAAQ,SAAS,WAAW,gBAAgB,IAAI,QAAQ,OAAO,CAAC;AAChE,gBAAQ,qBAAA;AAAA,MAGV;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,WAAW,YAAmC;AACnD,eAAW,aAAa,YAAY;AAClC,WAAK,QAAQ,SAAS;AAAA,IACxB;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"index17.js","sources":["../src/collision/resolver.ts"],"sourcesContent":["import { Vector2 } from '../core/math/Vector2';\nimport { Entity } from '../physics/Entity';\nimport { CollisionInfo } from './Collider';\n\n/**\n * Collision resolver configuration\n */\nexport interface ResolverConfig {\n /** Position correction factor (0-1, higher = more correction) */\n positionCorrectionFactor?: number;\n /** Minimum penetration depth to resolve */\n minPenetrationDepth?: number;\n /** Maximum position correction per step */\n maxPositionCorrection?: number;\n}\n\n/**\n * Collision resolver\n * \n * Resolves collisions by separating entities and applying impulses.\n * Uses impulse-based resolution for stable, deterministic physics.\n * \n * @example\n * ```typescript\n * const resolver = new CollisionResolver();\n * resolver.resolve(collision);\n * ```\n */\nexport class CollisionResolver {\n private config: Required<ResolverConfig>;\n\n /**\n * Creates a new collision resolver\n * \n * @param config - Resolver configuration\n */\n constructor(config: ResolverConfig = {}) {\n this.config = {\n positionCorrectionFactor: config.positionCorrectionFactor ?? 0.8,\n minPenetrationDepth: config.minPenetrationDepth ?? 0.0001,\n maxPositionCorrection: config.maxPositionCorrection ?? 5,\n };\n }\n\n /**\n * Resolves a collision\n * \n * Separates entities and applies collision response.\n * \n * @param collision - Collision information to resolve\n */\n public resolve(collision: CollisionInfo): void {\n const { entityA, entityB, normal, depth } = collision;\n\n // Skip if penetration is too small\n if (depth < this.config.minPenetrationDepth) {\n return;\n }\n\n // Position correction (separate entities)\n this.separateEntities(entityA, entityB, normal, depth);\n\n // Velocity resolution (collision response)\n this.resolveVelocities(entityA, entityB, normal);\n }\n\n /**\n * Separates two entities by moving them apart\n * \n * This method applies position corrections to resolve penetration between\n * colliding entities. After applying corrections, it notifies position change\n * handlers to ensure proper synchronization with game logic (e.g., updating\n * owner.x/y signals for network sync).\n * \n * @param entityA - First entity\n * @param entityB - Second entity\n * @param normal - Separation normal (from A to B)\n * @param depth - Penetration depth\n */\n private separateEntities(\n entityA: Entity,\n entityB: Entity,\n normal: Vector2,\n depth: number\n ): void {\n const totalInvMass = entityA.invMass + entityB.invMass;\n if (totalInvMass === 0) {\n return; // Both static\n }\n\n // Calculate separation amount\n const correction = Math.min(\n depth * this.config.positionCorrectionFactor,\n this.config.maxPositionCorrection\n );\n\n // Distribute correction based on inverse mass\n const correctionA = normal.mul(-correction * (entityA.invMass / totalInvMass));\n const correctionB = normal.mul(correction * (entityB.invMass / totalInvMass));\n\n // Apply corrections and notify position change handlers\n // This ensures that owner.x/y signals are updated after collision resolution\n if (!entityA.isStatic()) {\n entityA.position.addInPlace(correctionA);\n entityA.notifyPositionChange();\n }\n if (!entityB.isStatic()) {\n entityB.position.addInPlace(correctionB);\n entityB.notifyPositionChange();\n }\n }\n\n /**\n * Resolves velocities using impulse-based collision response\n * \n * @param entityA - First entity\n * @param entityB - Second entity\n * @param normal - Collision normal (from A to B)\n */\n private resolveVelocities(\n entityA: Entity,\n entityB: Entity,\n normal: Vector2\n ): void {\n // Relative velocity\n const relativeVelocity = entityB.velocity.sub(entityA.velocity);\n const velocityAlongNormal = relativeVelocity.dot(normal);\n\n // Don't resolve if velocities are separating\n if (velocityAlongNormal > 0) {\n return;\n }\n\n // Calculate restitution (bounciness)\n const restitution = Math.min(entityA.restitution, entityB.restitution);\n\n // Calculate impulse scalar\n const totalInvMass = entityA.invMass + entityB.invMass;\n if (totalInvMass === 0) {\n return; // Both static\n }\n\n // Impulse: j = -(1 + e) * v_rel · n / (1/mA + 1/mB)\n const impulseScalar = -(1 + restitution) * velocityAlongNormal / totalInvMass;\n const impulse = normal.mul(impulseScalar);\n\n // Apply impulse\n if (!entityA.isStatic()) {\n entityA.velocity.addInPlace(impulse.mul(-entityA.invMass));\n entityA.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because collision response\n // should not change the entity's intended direction (visual orientation).\n // Direction changes should only come from intentional movement (player input, AI).\n }\n if (!entityB.isStatic()) {\n entityB.velocity.addInPlace(impulse.mul(entityB.invMass));\n entityB.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because collision response\n // should not change the entity's intended direction (visual orientation).\n // Direction changes should only come from intentional movement (player input, AI).\n }\n\n // Friction (simplified, using velocity tangent to collision)\n const tangent = relativeVelocity.sub(normal.mul(velocityAlongNormal));\n const tangentLength = tangent.length();\n\n if (tangentLength > 1e-5) {\n const friction = Math.sqrt(entityA.friction * entityB.friction);\n const tangentNormalized = tangent.normalize();\n const frictionImpulse = tangentNormalized.mul(-tangentLength * friction / totalInvMass);\n\n // Clamp friction impulse to not exceed relative velocity\n const maxFriction = Math.abs(impulseScalar * friction);\n if (frictionImpulse.length() > maxFriction) {\n frictionImpulse.normalizeInPlace().mulInPlace(maxFriction);\n }\n\n if (!entityA.isStatic()) {\n entityA.velocity.addInPlace(frictionImpulse.mul(-entityA.invMass));\n entityA.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because friction adjustments\n // should not change the entity's intended direction (visual orientation).\n }\n if (!entityB.isStatic()) {\n entityB.velocity.addInPlace(frictionImpulse.mul(entityB.invMass));\n entityB.notifyMovementChange();\n // Note: We don't call notifyDirectionChange() here because friction adjustments\n // should not change the entity's intended direction (visual orientation).\n }\n }\n }\n\n /**\n * Resolves multiple collisions\n * \n * @param collisions - Array of collisions to resolve\n */\n public resolveAll(collisions: CollisionInfo[]): void {\n for (const collision of collisions) {\n this.resolve(collision);\n }\n }\n}\n\n"],"names":[],"mappings":"AA4BO,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ7B,YAAY,SAAyB,IAAI;AACvC,SAAK,SAAS;AAAA,MACZ,0BAA0B,OAAO,4BAA4B;AAAA,MAC7D,qBAAqB,OAAO,uBAAuB;AAAA,MACnD,uBAAuB,OAAO,yBAAyB;AAAA,IAAA;AAAA,EAE3D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,QAAQ,WAAgC;AAC7C,UAAM,EAAE,SAAS,SAAS,QAAQ,UAAU;AAG5C,QAAI,QAAQ,KAAK,OAAO,qBAAqB;AAC3C;AAAA,IACF;AAGA,SAAK,iBAAiB,SAAS,SAAS,QAAQ,KAAK;AAGrD,SAAK,kBAAkB,SAAS,SAAS,MAAM;AAAA,EACjD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeQ,iBACN,SACA,SACA,QACA,OACM;AACN,UAAM,eAAe,QAAQ,UAAU,QAAQ;AAC/C,QAAI,iBAAiB,GAAG;AACtB;AAAA,IACF;AAGA,UAAM,aAAa,KAAK;AAAA,MACtB,QAAQ,KAAK,OAAO;AAAA,MACpB,KAAK,OAAO;AAAA,IAAA;AAId,UAAM,cAAc,OAAO,IAAI,CAAC,cAAc,QAAQ,UAAU,aAAa;AAC7E,UAAM,cAAc,OAAO,IAAI,cAAc,QAAQ,UAAU,aAAa;AAI5E,QAAI,CAAC,QAAQ,YAAY;AACvB,cAAQ,SAAS,WAAW,WAAW;AACvC,cAAQ,qBAAA;AAAA,IACV;AACA,QAAI,CAAC,QAAQ,YAAY;AACvB,cAAQ,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