implement path tracing

This commit is contained in:
liamcottle 2025-03-17 23:17:03 +13:00
parent 85d82b13c1
commit 9e3171bd78
5 changed files with 131 additions and 0 deletions

View file

@ -6,6 +6,10 @@ class BufferUtils {
}).join('');
}
static hexToBytes(hex) {
return Uint8Array.from(hex.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));
}
static base64ToBytes(base64) {
return Uint8Array.from(atob(base64), (c) => {
return c.charCodeAt(0);