new FogRenderable(myTexture, fogTranslusivness, unexploredTranslusivness) → {FogRenderable}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
myTexture |
Image | Image to use as overlay for all unknown areas. |
fogTranslusivness |
Number | Value between 0 and 255 for how translusive Fog state is rendered. |
unexploredTranslusivness |
Number | Value between 0 and 255 for how translusive Unknown/Unexplored state is rendered. |
Returns:
- Type
- FogRenderable
Methods
applyTexture()
- Source:
Sets the changes made in setAsFoggy and updatePixelArray into a single texture.
draw(aCamera)
- Source:
Draws the overlay for all unknown and foggy areas.
Parameters:
Name | Type | Description |
---|---|---|
aCamera |
Camera | Camera for overlay to be drawn. |
getFogTranslusiveness() → {Number}
- Source:
Get the current value of Fog visability.
Returns:
- Curent value of Fog visability
- Type
- Number
getUnexploresTranslusiveness() → {Number}
- Source:
Get the current value of Unknown/Unexplored visability.
Returns:
- Curent value of Unknown visability
- Type
- Number
setAsFoggy()
- Source:
Sets all of the the Seen areas to Foggy.
setFogTranslusiveness(fogTranslusivness)
- Source:
Changes how dark the Fog state is rendered. A nubmer of 0 has the fog completely transparent. 255 sets the fog to completely opaque.
Parameters:
Name | Type | Description |
---|---|---|
fogTranslusivness |
Number | Number between 0 and 255. |
setUnexploresTranslusiveness(unexploredTranslusivness)
- Source:
Changes how dark the Unknown/Unexplored state is rendered. A nubmer of 0 has the unknown completely transparent. 255 sets the unknown to completely opaque.
Parameters:
Name | Type | Description |
---|---|---|
unexploredTranslusivness |
Number | Number between 0 and 255. |
updatePixelArray(x, y, r)
- Source:
Updates the Pixel Array of the texture to show the current Known area inside a Field of View regardless of previous state.
Parameters:
Name | Type | Description |
---|---|---|
x |
type | X position of Viewer object in World Coordinates. |
y |
type | Y position of Viewer object in World Coordinates. |
r |
type | Radius of Field of View in World Coordinates. |