Skip to content

Commit

Permalink
feat: add proper support for official devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Jun 25, 2024
1 parent fdeaea4 commit 5f642a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export const ApplicationFunction = (props, forwardedRef) =>
{
if (attachToDevTools && applicationRef.current)
{
/** @type {*} */ (globalThis).__PIXI_APP__ = applicationRef.current;
const globalScope = /** @type {*} */ (globalThis);

globalScope.__PIXI_APP__ = applicationRef.current;
globalScope.__PIXI_DEVTOOLS__ = applicationRef.current;
}
}, [attachToDevTools]);

Expand Down

0 comments on commit 5f642a6

Please sign in to comment.