fix node issue

This commit is contained in:
biglyderv 2024-11-25 14:14:20 -05:00
parent 539f227dba
commit c8107534d2

View file

@ -1,6 +1,4 @@
if (!crypto) {
crypto = import('node:crypto');
}
const crypto = (typeof window === 'undefined') ? await import('node:crypto') : crypto;
function distF(ent, target) {
return ((ent.pos.x - target.pos.x) ** 2) + ((ent.pos.y - target.pos.y) ** 2)