node crypto sdgfjkl
This commit is contained in:
parent
7899b45bb5
commit
1811385b65
3 changed files with 5 additions and 1 deletions
1
common/crypto.js
Normal file
1
common/crypto.js
Normal file
|
@ -0,0 +1 @@
|
|||
export default crypto;
|
|
@ -1,4 +1,4 @@
|
|||
let crypto = (typeof window === 'undefined') ? await import('node:crypto') : crypto;
|
||||
import crypto from "./crypto.js";
|
||||
|
||||
function distF(ent, target) {
|
||||
return ((ent.pos.x - target.pos.x) ** 2) + ((ent.pos.y - target.pos.y) ** 2)
|
||||
|
|
3
crypto.js
Normal file
3
crypto.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import crypto from "node:crypto";
|
||||
|
||||
export default crypto;
|
Loading…
Reference in a new issue