I briefly considered writing some kind of framework for Canvas that would emulate the Flex DisplayObject and related container classes together with some useful behaviors.
I gave up when I realized how big a task this would be and that the result would probably be slow and almost surely superseded in some future release of Canvas.
It depends what side of it you're trying to do, just getting a tree structure of Sprite-like things working is actually quite easy - canvas' drawing transform stack is ideal for resolving the nested transforms for each shape. The trickier part is re-rendering the smallest region of canvas possible when you do change part of the display list.
Maybe I should post a link to my stuff when I get around to working on it some more!
It was the event handling side of things that I realized were going to be a fair bit of effort - all standard graphics stuff, but not things that I was particularly interested in writing at this moment in time.
Having said that, if you do have something along these lines I would love to hear about it.
Comments
I briefly considered writing some kind of framework for Canvas that would emulate the Flex DisplayObject and related container classes together with some useful behaviors.
I gave up when I realized how big a task this would be and that the result would probably be slow and almost surely superseded in some future release of Canvas.
It depends what side of it you're trying to do, just getting a tree structure of Sprite-like things working is actually quite easy - canvas' drawing transform stack is ideal for resolving the nested transforms for each shape. The trickier part is re-rendering the smallest region of canvas possible when you do change part of the display list.
Maybe I should post a link to my stuff when I get around to working on it some more!
It was the event handling side of things that I realized were going to be a fair bit of effort - all standard graphics stuff, but not things that I was particularly interested in writing at this moment in time.
Having said that, if you do have something along these lines I would love to hear about it.