ianmackenzie / elm-2d-drawing

Mozilla Public License 2.0
6 stars 0 forks source link

Render with WebGL instead of SVG? #3

Open ianmackenzie opened 6 years ago

ianmackenzie commented 6 years ago
ianmackenzie commented 6 years ago

Potential issue: having a Drawing2d.pack function that combined vertex buffers could change draw order, which in turn could lead to issues with what primitives are drawn on top of which others. Could this be solved by doing something like restricting user Z-values to Int values, and using Float values internally?

Alternate approaches:

ianmackenzie commented 6 years ago

Good initial approach:

ianmackenzie commented 5 years ago

Potential drawback: could lead to lower performance for complex scenes if meshes are not cached between view calls (especially since this may not be obvious for things like rendering curves which are implicitly converted to high-resolution polylines). May be nicer to stick to virtual DOM diffing by using SVG internally, especially since then it should be possible to support lazy.