-
Notifications
You must be signed in to change notification settings - Fork 564
Description
Hi guys!
Firstly, thank you for the library — it's definitely something that is needed!
My immediate needs are for parsing and rendering SVG images as static images.
I know that this is possible using a MacawView (or SVGView), but this seems unnecessarily heavy for rendering images, if we are not actually using views (views are expensive).
How would you feel about enabling rendering without the view dependencies?
- we could start by decoupling the scene models from view concerns (basically the touch methods);
NodeRenderershould have itsAnimationCacheas optional (since it is only ever used optionally anyway), which would allow us to create renderers which do not depend on views;- we could abstract out some of the rendering logic from
MacawViewinto a protocol with default implementations, allowing us to makeMacawViewconform to the protocol so that we can use the same logic, while also being able to make a different, non-view class which can render without a view.
Incidentally, I think we ought to be able to use some dependency injection in the view / animation methods to get rid of the nodesMap and parentsMap singletons.
Let me know what you think. I would be happy to try to create some PRs for it, if you think this is a direction you might like to take. Otherwise I would probably try creating my own library, with this as a good starting point.