- Current Implementation
- Each object on the stage renders its image on its own (invisible) canvas
- The objects are sorted in ascending order of Z-values
- The objects are rendered on the stage (visible canvas) by the C-Snap drawing system
From the C-Snap drawing system perspective, 2D and 3D objects are more or less the same -- They are both SpriteMorphs that have an associated canvas each, and thus 2D and 3D objects can coexist without a problem.
However, this implementation has a significant limitation: we cannot render multiple objects that are both in front of and behind of one another. Instead, all we can do is change the rendering order of canvases. This issue is depicted in the following diagram:
- Solution to the Issue
However, this solution is going to be a major change to the existing system and there will be a lot of technical challenges including the following:
- Integration to the existing system
- Overlapping between 2D and 3D objects
- Drag and drop of 3D objects
No comments:
Post a Comment