Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Debug

Includes static methods for debugging

Hierarchy

  • Debug

Index

Constructors

Methods

  • debugLine(key: string, drawing: Drawing, from: Vector, to: Vector, props: { color: string; width?: number }, frames?: number): void
  • Will render a line with green and red dots on start and end co-ordinates of line

    Parameters

    • key: string

      A unique name for this debug

    • drawing: Drawing

      Drawing, on which this debug will render

    • from: Vector

      Start Vector for this line

    • to: Vector

      End Vector point for this line

    • props: { color: string; width?: number }

      Styling properties for debug

      • color: string
      • Optional width?: number
    • Optional frames: number

      Specifies for how many frames this debug will persist (e.g passing 100 will allow this debug to be rendered for 100 consecutive frames without clearing it from canvas)

    Returns void

  • debugPoint(key: string, drawing: Drawing, point: Vector, props: { color: string; radius?: number }, frames?: number): void
  • Will render a filled circle denoting a single point on canvas

    Parameters

    • key: string

      A unique name for this debug

    • drawing: Drawing

      Drawing, on which this debug will render

    • point: Vector

      The point to render

    • props: { color: string; radius?: number }

      Styling properties for debug

      • color: string
      • Optional radius?: number
    • Optional frames: number

      Specifies for how many frames this debug will persist (e.g passing 100 will allow this debug to be rendered for 100 consecutive frames without clearing it from canvas)

    Returns void