Skip to content

Commit

Permalink
wasm-bindgen renamed the ptr field
Browse files Browse the repository at this point in the history
  • Loading branch information
davidar committed May 19, 2024
1 parent 1749eeb commit 86a3f21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/atoms/wgputoyatoms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -47,4 +47,4 @@ export const wgputoyPreludeAtom = atom<string>('');

// type predicate
export const isSafeContext = (context: WgpuToyRenderer | false): context is WgpuToyRenderer =>
context !== false && context.ptr !== 0;
context !== false && context.__wbg_ptr !== 0;

0 comments on commit 86a3f21

Please sign in to comment.