Rendering: Difference between revisions
Appearance
No edit summary |
Dat Hack3r (talk | contribs) m Added page to Documentation category. |
||
| (One intermediate revision by one other user not shown) | |||
| Line 31: | Line 31: | ||
The client's `w` namespace has several functions pertaining to rendering. It's important to know when it's appropriate to use certain functions. | The client's `w` namespace has several functions pertaining to rendering. It's important to know when it's appropriate to use certain functions. | ||
=== w.redraw() | === w.redraw() === | ||
Forces all loaded tiles to have its text content re-rendered. This can be called frequently with no performance issues. | Forces all loaded tiles to have its text content re-rendered. This can be called frequently with no performance issues. | ||
=== w.reloadRenderer() | === w.reloadRenderer() === | ||
Fully clears the renderer cache. | Fully clears the renderer cache. | ||
=== w.setRedraw() | === w.setRedraw() === | ||
Alias for w.redraw() | Alias for w.redraw() | ||
=== w.setTileRedraw(tileX, tileY, highPriority, fastQueue) | === w.setTileRedraw(tileX, tileY, highPriority, fastQueue) === | ||
Forces a specific tile to have its text content re-renderered. | Forces a specific tile to have its text content re-renderered. | ||
| Line 47: | Line 47: | ||
The fastQueue parameter forces the renderer queue to process all tiles with this option immediately. This is useful for hiding the row-by-row rendering effect. | The fastQueue parameter forces the renderer queue to process all tiles with this option immediately. This is useful for hiding the row-by-row rendering effect. | ||
=== w.setTileRender(tileX, tileY) | === w.setTileRender(tileX, tileY) === | ||
Schedule a tile to be blitted onto the screen. | Schedule a tile to be blitted onto the screen. | ||
In transparent mode, only the background content and protections are re-rendered. | In transparent mode, only the background content and protections are re-rendered. | ||
=== w.setTransparency(transparent) | === w.setTransparency(transparent) === | ||
Change the renderer's 'alpha' mode. Please see the Transparency section above for more details. | Change the renderer's 'alpha' mode. Please see the Transparency section above for more details. | ||
=== w.render(redraw) | === w.render(redraw) === | ||
Blits all tiles onto the screen. Must be called when the world position changes. | Blits all tiles onto the screen. Must be called when the world position changes. | ||
If the redraw parameter is set to true, then it's equivalent to calling w.redraw(). | If the redraw parameter is set to true, then it's equivalent to calling w.redraw(). | ||
[[Category:Documentation]] | |||