code: function bodyAsleep(self, body, dt, noGravity) {
      if (body._sleepFrameCount > 0) return false
      // without gravity bodies stay asleep until a force/impulse wakes them up
      if (noGravity) return true
      // otherwise check body is resting against something
      // i.e. sweep along by distance d = 1/2 g*t^2
      // and check there's still a collision
      var isResting = false
      var gmult = 0.5 * dt * dt * body.gravityMultiplier
      vec3.scale(sleepVec, self.gravity, gmult)
      sweep(self.testSolid, body.aabb, sleepVec, function () {
          isResting = true
          return true
      }, true)
      return isResting
  }
docs: /*
  SLEEP CHECK