You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, no matter what I do, I can't wire events up to the components. interactive prop doesn't seem to do anything. click is an available prop, but doesn't at all.
importviteLogofrom'/vite.svg';import{Stage,Sprite,Graphics}from'@pixi/react';import{GraphicsasPixiGraphics}from'@pixi/graphics';import'./App.css';constdraw=(g: PixiGraphics)=>{g.clear();g.beginFill('red');g.drawRect(10,10,50,50);g.endFill();};functionApp(){return(<><Stagewidth={200}height={100}><Graphicsclick={()=>console.log('click prop')}// TypeScript likes this, but it does nothingonClick={()=>{// TypeScript doesn't like this.console.log('onClick prop');}}draw={draw}/><Spriteimage={viteLogo}x={70}y={10}interactive// TypeScript doesn't like this.onClick={()=>{// TypeScript doesn't like thisconsole.log('onClick logo');}}click={()=>{// TypeScript likes this, but it does nothingconsole.log('click logo');}}/></Stage></>);}exportdefaultApp;
It looks like the peer deps for @pixi/react are >=6 for everything. I suspect that it's pulling in newer versions of @pixi/* libraries that are simply incompatible with @pixi/react, but I'm not sure.
Additional Information
I'm really sad about this. lol. Without event handling, I have no real use for this otherwise awesome library. It also seems like there hasn't been any movement here in ~7 months, so hopefully it's just a lull in the action.
The text was updated successfully, but these errors were encountered:
Current Behavior
I can't seem to wire up an event to fire no matter what I do.
Expected Behavior
I should be able to get events for things like clicking Graphics, Containers, and Sprites.
Steps to Reproduce
I have a reproduction StackBlitz here
Basically, no matter what I do, I can't wire events up to the components.
interactive
prop doesn't seem to do anything.click
is an available prop, but doesn't at all.Environment
@pixi/react
version: e.g. 7.0.0pixi.js
version: e.g. 7.1.0React
version: e.g. 18.0.0ReactDOM
version: e.g. 18.0.0Possible Solution
It looks like the peer deps for
@pixi/react
are>=6
for everything. I suspect that it's pulling in newer versions of@pixi/*
libraries that are simply incompatible with@pixi/react
, but I'm not sure.Additional Information
I'm really sad about this. lol. Without event handling, I have no real use for this otherwise awesome library. It also seems like there hasn't been any movement here in ~7 months, so hopefully it's just a lull in the action.
The text was updated successfully, but these errors were encountered: