Search code examples
gwtjava-3d

Tutorial on placing a 3D cube on a GWT Canvas


Could someone point me to a tutorial on putting a cube on a GWT Canvas? I only have one sample code with Context2d and Canvas and one sample with SimpleUniverse. The latter I don't know how to integrate into a GWT application. Can someone please help me?


Solution

  • For browsers that support WebGL (not Internet Explorer, not even IE 10) (http://caniuse.com/#feat=webgl), you can use gwt-g3d.

    For non-WebGL browsers, you could either perform a perspective projection yourself (it's actually not very hard if you have the coordinates of your cube, see https://stackoverflow.com/a/2484154/291741), or maybe there's already a GWT (or GWT compatible) library for non-WebGL 3D I don't know about yet.