Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TextService

Index

Methods

Static addGlyph

  • addGlyph(world: WorldBase, fontEntity: Entity, utf32CharacterValue: number, bearingX: number, bearingY: number, advance: number, width: number, height: number, characterRegion: Rect): void
  • Helper function that adds a glyph to a bitmap font.

    Parameters

    • world: WorldBase
    • fontEntity: Entity
    • utf32CharacterValue: number
    • bearingX: number
    • bearingY: number
    • advance: number
    • width: number
    • height: number
    • characterRegion: Rect

    Returns void

Static createBitmapFont

  • createBitmapFont(world: WorldBase, textureAtlasImg: Entity, size: number, ascent: number, descent: number): Entity
  • Helper function that creates a bitmap font entity and returns it.

    Parameters

    • world: WorldBase
    • textureAtlasImg: Entity
    • size: number
    • ascent: number
    • descent: number

    Returns Entity

    The bitmap font entity.

Static createNativeFont

  • Helper function that creates a native font entity and returns it.

    Parameters

    Returns Entity

    The native font entity.

Static createTextWithBitmapFont

  • Helper function that creates a text renderer entity and assigns a bitmap font to it.

    Parameters

    Returns Entity

    The text entity

Static createTextWithNativeFont

  • Helper function that creates a text renderer entity and assigns a native font to it.

    Parameters

    Returns Entity

    The text entity.

Generated using TypeDoc