Closed johnfn closed 8 months ago
@johnfn
import '@pixi/events';
Inserting an import statement prevents errors from occurring in static analysis.
However, even if interactivity is enabled, click events, etc. are not enabled.
I'm having the same problem.
Current Behavior
If you try to use interactivity-related stuff in pixi-react, you'll get a typescript error. For instance, trying to set
interactive={true}
oreventMode="static"
doesn't work.Expected Behavior
It should work :)
Steps to Reproduce
Create a new project with pixi-react. DO NOT EVER IMPORT
pixi.js
.Environment
"dependencies": { "@pixi/react": "^7.1.1", "next": "14.0.3", "pixi.js": "^7.3.2", "react": "^18", "react-dom": "^18" },
Possible Solution
There is a straightforward but non-obvious workaround to this problem: add an import to
pixi.js
anywhere in your project.I think this is because pixi.js extends some shared mixin interfaces.
Additional Information
No response