As a new user, I noticed that there is no distanceSquared function.
It is commonly used in comparisons because the result is the same as distance but is quicker without the sqrt call.
Develop games in your browser. Powerful, performant & highly capable.
The overhead of the event engine likely makes the difference negligible.