Fork me on GitHub

API Documentation

Creates a heightmap for a region of the world based on an image. Originally created as a quick and easy collision detection. At least until we have a better physics implementation.
Defined in: glge_input.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
GLGE.HeightMap(imageURL, imageWidth, imageHeight, x1, x2, y1, y2, z1, z2)
Method Summary
Method Attributes Method Name and Description
 
Function to get he height as specified x, y world coords
Class Detail
GLGE.HeightMap(imageURL, imageWidth, imageHeight, x1, x2, y1, y2, z1, z2)
Parameters:
{string} imageURL
The url of the image to generate the hightmap for
{number} imageWidth
The width of the image
{number} imageHeight
The height of the image
{number} x1
The lower X bound of the height map in world coords
{number} x2
The upper X bound of the height map in world coords
{number} y1
The lower Y bound of the height map in world coords
{number} y2
The upper Y bound of the height map in world coords
{number} z1
The lower Z bound of the height map in world coords
{number} z2
The upper Z bound of the height map in world coords
Deprecated:
not intended as a permanent addition
Method Detail
{number} getHeightAt(x, y)
Function to get he height as specified x, y world coords
Parameters:
{number} x
the x world coord
{number} y
the y world coord
Returns:
{number} the height of the level in world units

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 12 2012 14:20:23 GMT+0000 (GMT)