node crypto sdgfjkl

This commit is contained in:
biglyderv 2024-09-29 04:06:33 -04:00
parent 7899b45bb5
commit 1811385b65
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954
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;