Class Steppe.Compositor
Defined in: Compositor.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Steppe.Compositor(undefined)
|
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].
|
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).