Options
All
  • Public
  • Public/Protected
  • All
Menu

class representing a text

Hierarchy

Index

Constructors

constructor

Properties

_size

_size: number

fillColor

fillColor: Color

sentence

sentence: string

writeElement

writeElement: Element

x

x: number = 10

y

y: number = 10

Methods

add

  • add(): void

fill

  • fill(fillColor?: any): undefined | Color
  • sets fill-color of text

    Parameters

    • fillColor: any = ...

    Returns undefined | Color

moveTo

  • moveTo(newX: any, newY: any, startTime: any, endTime: any): void

play

  • play(animationType?: string, timeDuration?: number, delayDuration?: number): void
  • play text animation

    Parameters

    • animationType: string = 'write'

      type of animation to be played

    • timeDuration: number = 0

      duration of animation

    • delayDuration: number = 0

      delay

    Returns void

position

  • position(x?: number, y?: number): undefined | number[]
  • sets position of text

    Parameters

    • x: number = 10
    • y: number = 10

    Returns undefined | number[]

remove

  • remove(): void

resizeTo

  • resizeTo(newSize: any, startTime: any, endTime: any): void

size

  • size(_size?: number): undefined | number
  • sets font-size of text

    Parameters

    • _size: number = 28

    Returns undefined | number

style

  • style(property: any, value: any): void
  • Sets the given style (css) property (1st arg) of the element with the given value (2nd arg). If the single argument is given in css syntax ('text-align:center'), .style() sets the css appropriately.

    Parameters

    • property: any

      property to be set

    • value: any

      value

    Returns void

Generated using TypeDoc