Class GLGE.HeightMap
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.
Constructor Attributes | Constructor Name and Description |
---|---|
GLGE.HeightMap(imageURL, imageWidth, imageHeight, x1, x2, y1, y2, z1, z2)
|
Method Attributes | Method Name and Description |
---|---|
getHeightAt(x, y)
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