Shaku

Shaku JS

Back To Table of Content

Text Batch

TextSpriteBatch

Text sprite batch renderer. Responsible to drawing a batch of characters sprites.

Kind: global class

new TextSpriteBatch([batchSpritesCount])

Create the text sprites batch.

Param Type Description
[batchSpritesCount] Number Internal buffers size, in sprites count (sprite = 4 vertices). Bigger value = faster rendering but more RAM.

textSpriteBatch.msdfFont : Boolean

If true, will render as Msdf Fonts.

Kind: instance property of TextSpriteBatch

textSpriteBatch.outlineWeight : Number

If bigger than 0, will draw outline. Currently not supported with msdf fonts. Must be set before begin() is called.

Kind: instance property of TextSpriteBatch

textSpriteBatch.outlineColor : Color

Outline color, when outlineWeight is set. Must be set before begin() is called.

Kind: instance property of TextSpriteBatch

textSpriteBatch.defaultEffect

Kind: instance property of TextSpriteBatch

textSpriteBatch.drawText(textGroup, cullOutOfScreen)

Add text sprites group to batch.

Kind: instance method of TextSpriteBatch

Param Type Description
textGroup SpritesGroup Text sprite group to draw.
cullOutOfScreen Boolean If true, will cull out sprites that are not visible in screen.