code: function _applyImpulseFromCollisionWithStationaryObject(physicsCollidable, collision, velocity,
                                                          contactPointOffset, physicsParams) {
    const state = physicsCollidable.physicsJob.currentState;
    const contactNormal = collision.contactNormal;
  
    //
    // Calculate and apply the main collision impulse.
    //
  
    vec3.scale(tmpVec1, velocity, -(1 + physicsParams.coefficientOfRestitution));
    const numerator = vec3.dot(tmpVec1, contactNormal);
  
    vec3.cross(tmpVec1, contactPointOffset, contactNormal);
    vec3.transformMat3(tmpVec1, tmpVec1, state.inverseInertiaTensor);
    vec3.cross(tmpVec1, tmpVec1, contactPointOffset);
    const denominator = vec3.dot(tmpVec1, contactNormal) + state.inverseMass;
  
    const impulseMagnitude = numerator / denominator;
  
    _applyImpulse(state, impulseMagnitude, contactNormal, contactPointOffset);
  
    //
    // Calculate and apply a dynamic friction impulse.
    //
  
    const frictionImpulseMagnitude = impulseMagnitude * physicsParams.coefficientOfFriction;
  
    const tangent = tmpVec2;
    vec3.scale(tmpVec1, contactNormal, vec3.dot(velocity, contactNormal));
    vec3.subtract(tangent, velocity, tmpVec1);
    vec3.normalize(tangent, tangent);
  
    _applyImpulse(state, frictionImpulseMagnitude, tangent, contactPointOffset);
  }
docs: This is based on collision-response algorithms from Wikipedia
  (https://en.wikipedia.org/wiki/Collision_response#Impulse-based_reaction_model). This algorithm
  has been simplified by assuming the stationary body has infinite mass and zero velocity.
  
  @param {Collidable} physicsCollidable
  @param {Collision} collision
  @param {vec3} velocity
  @param {vec3} contactPointOffset
  @param {PhysicsConfig} physicsParams
  @private