You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to be originating from the b2Timer class and its usage of performance.now() when @box2d/core is executed from nodejs. A simple fix would be to synchronously require the performance module when running in node>=8.5.
I'm using box2d server-side as part of my authoritative game server architecture. Clients run box2d locally in their browser and send their inputs to the nodejs server. The server is also running box2d in a worker thread, which computes the results of received inputs, then sends the updated world state back to each client.
This seems to be originating from the
b2Timer
class and its usage ofperformance.now()
when@box2d/core
is executed from nodejs. A simple fix would be to synchronously require the performance module when running innode>=8.5
.However, this leads to
Module "perf_hooks" not found
error when bundling with webpack, unless{externals: {perf_hooks: 'empty'}}
is set in the config.The text was updated successfully, but these errors were encountered: