From 86a3f21e3bf31c9a66e4000ba4e94b55178b11ae Mon Sep 17 00:00:00 2001 From: David A Roberts Date: Sun, 19 May 2024 09:18:47 +0000 Subject: [PATCH] wasm-bindgen renamed the ptr field --- lib/atoms/wgputoyatoms.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/atoms/wgputoyatoms.tsx b/lib/atoms/wgputoyatoms.tsx index d2a9fad0..c545152b 100644 --- a/lib/atoms/wgputoyatoms.tsx +++ b/lib/atoms/wgputoyatoms.tsx @@ -6,7 +6,7 @@ import { getDimensions } from '../../types/canvasdimensions'; // just to check if the object has already been freed (ptr=0) declare module 'lib/wgputoy' { interface WgpuToyRenderer { - ptr: number; + __wbg_ptr: number; } } @@ -47,4 +47,4 @@ export const wgputoyPreludeAtom = atom(''); // type predicate export const isSafeContext = (context: WgpuToyRenderer | false): context is WgpuToyRenderer => - context !== false && context.ptr !== 0; + context !== false && context.__wbg_ptr !== 0;