GLView is a fast 2D canvas suitable for drawing and moving graphics around on the screen quickly, ideal for games.
You can create a GLView object using the CreateGLView method of the app object:
The options parameter should be set to "Fast2d".
Use the CreateImage method of the GLView object to create an image that can be used with the GLView:
Pass the name of a function to CreateImage, which will be called once the image is ready to use.
The DrawImage method can be used to draw GLView images:
Once all drawing has been done, the Render method must be called to render all the GLView graphics to the screen.
To create a rendering loop for a game, use the setInterval JavaScript function to call your drawing function at regular intervals.
The example below draws a continuously rotating image by calling the DrawFrame function 30 times each second, updating the angle each time:
GLView supports the use of Sprite Sheets. The DrawSprite method can be used to draw part of an image to the GLView.
See 'CreateGLView for more informations and a complete function list