/react_divfountain

DivFountain implemented with React

Primary LanguageHTML

react_divfountain

DivFountain implemented with React. DivFountain (see repository of that name) is an investigation into particle-physics simulation using JavaScript. I was curious to see how much performance fall-off there is implementing this in React since it's rather nice to have <Field/> and <Cell/> tags to neatly wrap the whole thing up. As I expected, this version is nowhere near as fast as the raw JavaScript one and, of course, it gets worse geometrically as you increase the size of the field. It may be that the overall architecture I've used (maintaining a pseudo subject-observer set up with pollable list of cell-states and maintaining an array of callbacks so that Cells can register interest) is not ideal and that there is a better way.