Closed jonathanolson closed 7 years ago
Not sure at this point, and my memory of Capacitor Lab is fuzzy. I seem to recall that the Java version leaned heavily on CAG. So if there's still stuff to be ported from Java, it would probably make porting easier.
Might ask @jessegreenberg also, since he did the HMTL5 port.
If CAG were available it would have simplified the port a bit. The wires, dielectric boxes, and capacitor plates all used CAG in the Java. Instead of adding shapes with CAG, I drew shapes in the view in an order that produced the correct look. The wires use a different workaround with getStrokedShape
.
For the full Capacitor Lab, dielectrics and new wire segments should be able to use what has already been ported (WireShapeCreator and BoxShapeCreator). CAG could simplify what has already been ported, but shouldn't be necessary moving forward.
If multiple shapes and paths create performance issues for this sim, CAG might help.
I've reviewed all places in the sim where Shape occurs, so I believe I've hit all of these with CAG.
Closing.
Seems like it would be helpful:
This sim uses a lot of Shapes. @andrewadare and @pixelzoom, do you know what could be gained by using this instead?