Class Index | File Index

Classes


Class Steppe.Compositor


Defined in: Compositor.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Steppe.Compositor(undefined)
Method Summary
Method Attributes Method Name and Description
<static>  
Steppe.Compositor.addTexture(height, textureImage)
Add a texture to the texture-array.
<static>  
Steppe.Compositor.composite(texturemapCanvas)
Create a composite texturemap from the heightmap and texture-array images.
<static>  
Steppe.Compositor.getHeightmap()
Get the heightmap as an array.
<static>  
Steppe.Compositor.getOutOfBoundsHeightmap()
Get the out-of-bounds heightmap as an array.
<static>  
Steppe.Compositor.putMask(mask, x, y, scaleFactor)
Put a mask (a 2.5D sprite's heightmap).
<static>  
Steppe.Compositor.setHeightmap(heightmapCanvas)
Set the heightmap to use for compositing [and out-of-bounds].
Class Detail
Steppe.Compositor(undefined)
Parameters:
undefined
Method Detail
<static> {Compositor} Steppe.Compositor.addTexture(height, textureImage)
Add a texture to the texture-array.
Parameters:
{number} height
The 'height' at which to apply the texture.
{Image} textureImage
The image to use as a texture.
Returns:
{Compositor} This (fluent interface).

<static> Steppe.Compositor.composite(texturemapCanvas)
Create a composite texturemap from the heightmap and texture-array images.
Parameters:
{HTMLCanvasElement} texturemapCanvas
The texturemap canvas to which the heightmap and texture-array images are composited.

<static> {array} Steppe.Compositor.getHeightmap()
Get the heightmap as an array.
Returns:
{array} The heightmap canvas converted to an array.

<static> {array} Steppe.Compositor.getOutOfBoundsHeightmap()
Get the out-of-bounds heightmap as an array.
Returns:
{array} The out-of-bounds heightmap canvas converted to an array.

<static> {Compositor} Steppe.Compositor.putMask(mask, x, y, scaleFactor)
Put a mask (a 2.5D sprite's heightmap).
Parameters:
{HTMLImageElement} mask
The 2.5D sprite's heightmap; should contain a greyscale image.
{number} x
The x-ordinate.
{number} y
The y-ordinate.
{number} scaleFactor
The scale factor to multiply each value in the mask by.
Returns:
{Compositor} This (fluent interface).

<static> {Compositor} Steppe.Compositor.setHeightmap(heightmapCanvas)
Set the heightmap to use for compositing [and out-of-bounds].
Parameters:
{HTMLCanvasElement} heightmapCanvas
The heightmap canvas; should contain a greyscale image.
Returns:
{Compositor} This (fluent interface).

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Dec 10 2011 22:36:40 GMT-0000 (GMT)