code: function getModelMatrix (rb) {
    var ms = rb.getMotionState()
  
    if (ms) {
      ms.getWorldTransform(transformTemp)
      var p = transformTemp.getOrigin()
      var q = transformTemp.getRotation()
  
      return mat4.fromRotationTranslation(
        [], [q.x(), q.y(), q.z(), q.w()], [p.x(), p.y(), p.z()])
    }
  }
docs: extracts the model matrix from a rigid body.