Open feiss opened 8 years ago
Got report that this drawing took time to load and browser raised unresponsive script error. Most likely a Macbook Air since it loads for me after a time.
https://aframe.io/a-painter/?url=https://ucarecdn.com/5d707ac8-b761-478c-b520-bca1a3d8b5de/
Yup! it takes a while. 300,000 vertices. It seems the author painted slowly so a lot of vertices were created. And I think it's by far the heaviest scene created in A-Painter to date. For comparison, my "You shall not pass" painting is about 80,000 vertices (the guy must have a really good computer..)
Now that @dmarcos created a component to load scenes into AFrame, this is even more important.
A great moment to optimize the scene is when the user saves it. When he does this, we can expect that he is happy with it, so no more undo will be needed before this point.
A good optimization would be packing all (or batches of) strokes of the same brush in just one stroke, dramatically decreasing the number of draw calls.