Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GlobalGrid

Contains methods to modify and check the global snap grid. Accessed through GameWorld.grid

Hierarchy

  • GlobalGrid

Index

Methods

getColor

getHeight

  • getHeight(): number
  • Return the height of each grid cell in cm

    Returns number

getHorizontalOffset

  • getHorizontalOffset(): number
  • Return the horizontal grid offset

    Returns number

getRotation

  • getRotation(): number
  • Return the rotation of the grid in degrees (between -90 and 90)

    Returns number

getSnapType

  • getSnapType(): number

getType

  • getType(): number

getVerticalOffset

  • getVerticalOffset(): number
  • Return the vertical grid offset

    Returns number

getVisibility

  • getVisibility(): number

getWidth

  • getWidth(): number
  • Return the width of each grid cell in cm

    Returns number

hasThickLines

  • hasThickLines(): boolean
  • Return whether thick lines are used to display the grid

    Returns boolean

setColor

  • setColor(color: Color | [r: number, g: number, b: number, a: number]): void
  • Set the color of the grid

    Parameters

    • color: Color | [r: number, g: number, b: number, a: number]

    Returns void

setHeight

  • setHeight(height: number): void
  • Set the height of each grid cell in cm

    Parameters

    • height: number

    Returns void

setHorizontalOffset

  • setHorizontalOffset(offset: number): void
  • Set an offset for the grid relative to the width of a cell (between 0 and 1)

    Parameters

    • offset: number

    Returns void

setRotation

  • setRotation(rotation: number): void
  • Set the rotation of the grid in degrees

    Parameters

    • rotation: number

    Returns void

setSnapType

  • setSnapType(type: number): void

setThickLines

  • setThickLines(thick: boolean): void
  • Set whether thick lines are used to display the grid

    Parameters

    • thick: boolean

    Returns void

setType

  • setType(type: number): void

setVerticalOffset

  • setVerticalOffset(offset: number): void
  • Set an offset for the grid relative to the height of a cell (between 0 and 1)

    Parameters

    • offset: number

    Returns void

setVisibility

  • setVisibility(visibility: number): void

setWidth

  • setWidth(width: number): void
  • Set the width of each grid cell in cm

    Parameters

    • width: number

    Returns void