Fork me on GitHub
#fulcro
<
2019-12-09
>
grounded_sage20:12:58

I’m curious as to what it would look like using Fulcro and Pixi JS. I’m not very familiar with Pixi JS but I did find an example of using it with re-frame here https://github.com/yogthos/boids/blob/pixi/src/boids/core.cljs It’s obvious to me that it would be quite easy to subscribe and dispatch in any part of the scene components/functions. Though I’m not sure how it would work with Fulcro. I guess mutations could be passed into Pixi JS area but queries would be a bit tricker/have to be done a little differently maybe? I’d like to try and demonstrate the value proposition of using cljs on a project I am on. It’s kind of super interactive, beyond the scope of what can be done with HTML (will require WebGL / Pixi JS) and it is also very data heavy. At present I’m 50/50 on which would be the best to go with.

grounded_sage20:12:22

Granted there is little happening in that example boids file with Reframe in Pixi. . Though this application will be rendering a lot of different data and have a lot of interactions.

tony.kay21:12:07

Fun…so, generally what you’d do in Fulcro to use something like this is roughly what the D3 example in the book shows: have React/Fulcro render down to the layer where you embed the Pixi, and then let it control that view

thosmos23:12:20

I have a component that uses some of its child component’s field values, and so it needs to know when the child changes its data. The parent sends a callback fn to the child, but what should this fn call in the parent to get it to re-render itself? I’m currently using a transaction, but maybe there’s a better way?