node crypto sdgfjkl

This commit is contained in:
biglyderv 2024-11-25 14:14:20 -05:00
parent dc713281d8
commit ada9ea7338
3 changed files with 5 additions and 1 deletions

1
common/crypto.js Normal file
View file

@ -0,0 +1 @@
export default crypto;

View file

@ -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
View file

@ -0,0 +1,3 @@
import crypto from "node:crypto";
export default crypto;