fix node issue
This commit is contained in:
parent
539f227dba
commit
c8107534d2
1 changed files with 1 additions and 3 deletions
|
@ -1,6 +1,4 @@
|
||||||
if (!crypto) {
|
const crypto = (typeof window === 'undefined') ? await import('node:crypto') : crypto;
|
||||||
crypto = import('node:crypto');
|
|
||||||
}
|
|
||||||
|
|
||||||
function distF(ent, target) {
|
function distF(ent, target) {
|
||||||
return ((ent.pos.x - target.pos.x) ** 2) + ((ent.pos.y - target.pos.y) ** 2)
|
return ((ent.pos.x - target.pos.x) ** 2) + ((ent.pos.y - target.pos.y) ** 2)
|
||||||
|
|
Loading…
Reference in a new issue