chrismdp / tinyking

Tiny King
GNU General Public License v3.0
8 stars 1 forks source link

Move PIXI into React component #8

Closed chrismdp closed 4 years ago

chrismdp commented 4 years ago
chrismdp commented 4 years ago

Having trouble with mouse events on this one - not sure if I've added the canvas correctly. This forum post might help - looks like I may need to read up further about React lifecycle, and unbundle my application component. I could also read the source for https://github.com/inlet/react-pixi.

chrismdp commented 4 years ago

I think I've got it - the code in https://github.com/michalochman/react-pixi-fiber/blob/0ae3aff272b68833bedab931fb84751511f54427/src/hooks.js#L66 should provide a good starting point.

Need also to check to see if I need to link up the viewport's interaction manager.