Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

material

material: MeshBasicMaterial

mesh

mesh: Mesh

options

Methods

setText

  • setText(text: string): void

updateElement

Static generateFontProperty

Static getTextStyleSeparated

Static roundRect

  • roundRect(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius?: any | number, fill?: boolean, stroke?: boolean): void
  • Draws a rounded rectangle using the current state of the canvas. If you omit the last three params, it will draw a rectangle outline with a 5 pixel border radius

    Parameters

    • ctx: CanvasRenderingContext2D

      Context of the canvas

    • x: number

      The top left x coordinate

    • y: number

      The top left y coordinate

    • width: number

      The width of the rectangle

    • height: number

      The height of the rectangle

    • Default value radius: any | number = 5
    • Default value fill: boolean = false
    • Default value stroke: boolean = false

    Returns void

Static wrapText

  • wrapText(ctx: CanvasRenderingContext2D, text: string, x: number, y: number, maxWidth: number, lineHeight: number, wrapOnLines: boolean): void
  • Function to wrap text on lines

    Parameters

    • ctx: CanvasRenderingContext2D

      Context of the canvas

    • text: string

      Text to write

    • x: number

      Left coordinate of first letter

    • y: number

      Top coordinate of first letter

    • maxWidth: number

      Max width in px of each line

    • lineHeight: number

      Line height in px

    • wrapOnLines: boolean

      Text should be wrapped on lines

    Returns void

Legend

  • Namespace
  • Object literal
  • Variable
  • Function
  • Type alias
  • Type alias with type parameter
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Enumeration
  • Interface

Generated using TypeDoc