Canvas sandbox: Difference between revisions

Jump to navigation Jump to search
Line 68: Line 68:


Compared to SVG/OpenVG (ShivaVG) based drawing, the main benefit is that we can create and display 3D objects, using correct orientation/projection in a 3D scene, including even custom texturing by using images from disk, or other Canvas textures.
Compared to SVG/OpenVG (ShivaVG) based drawing, the main benefit is that we can create and display 3D objects, using correct orientation/projection in a 3D scene, including even custom texturing by using images from disk, or other Canvas textures.
In addition, OSG provides support for a shapeDrawable based heightfield class that can be used for generating terrain meshes procedurally.


The code shown above, can simple be added to the constructor of the canvas element, but we will want to render it to a texture using a PositionAttitudeTransformMatric and map those to properties in the sub-tree of the canvas element.
The code shown above, can simple be added to the constructor of the canvas element, but we will want to render it to a texture using a PositionAttitudeTransformMatric and map those to properties in the sub-tree of the canvas element.

Navigation menu