GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • melonJS
  • Plugins
  • Website
  • Wiki
  • GitHub
  • Discord

This view

  • Original page
  • New address

GeezerVison is showing melonjs.github.io — DebugPanelPlugin | melonJS

  • DebugPanelPlugin

Class DebugPanelPlugin

a simple debug panel plugin

usage :
• upon loading the debug panel, it will be automatically registered under me.plugins.debugPanel
• you can then press the default "s" key to show or hide the panel, or use me.plugins.debugPanel.show() and me.plugins.debugPanel.hide(), or add #debug as a parameter to your URL e.g. http://myURL/index.html#debug
• default key can be configured using the following parameters in the url : e.g. http://myURL/index.html#debugToggleKey=d
the debug panel provides the following information :
• amount of total objects currently active in the current stage
• amount of the world's direct children drawn this frame
• amount of body shape (for collision)
• amount of bounding box
• amount of sprites objects
• amount of objects currently inactive in the the object pool
• memory usage (Heap Memory information is only available under Chrome)
• frame update time (in ms, averaged over the last 30 frames)
• frame draw time (in ms, averaged over the last 30 frames)
• current fps rate vs target fps
additionally, using the checkbox in the panel it is also possible to display :
• the hitbox or bounding box for all objects
• current velocity vector
• quadtree spatial visualization

Hierarchy

  • BasePlugin
    • DebugPanelPlugin
  • Defined in packages/debug-plugin/src/index.js:67
Index

Documents

README

Constructors

constructor

Properties

_drawSamples _onAfterDraw _onAfterUpdate _onBeforeDraw _onKeyDown _onResize _timeSampleCount _timeSampleIndex _updateSamples app counters debugToggle drawHistory frameDrawStartTime frameDrawTime frameUpdateTime graphCanvas historyIndex memCanvas memHistory options panel panelWrap stats updateHistory version visible

Methods

destroy hide show toggle

Constructors

constructor

  • new DebugPanelPlugin(debugToggle?: number, app?: undefined): DebugPanelPlugin

    Parameters

    • OptionaldebugToggle: number = input.KEY.S

      a default key to toggle the debug panel visibility state

    • app: undefined = undefined

    Returns DebugPanelPlugin

    See

    input.KEY for default key options

    Overrides plugin.BasePlugin.constructor

    • Defined in packages/debug-plugin/src/index.js:72

Properties

_drawSamples

_drawSamples: Float32Array<ArrayBuffer>
  • Defined in packages/debug-plugin/src/index.js:135

_onAfterDraw

_onAfterDraw: (time: any) => void
  • Defined in packages/debug-plugin/src/index.js:166

_onAfterUpdate

_onAfterUpdate: () => void
  • Defined in packages/debug-plugin/src/index.js:143

_onBeforeDraw

_onBeforeDraw: (time: any) => void
  • Defined in packages/debug-plugin/src/index.js:162

_onKeyDown

_onKeyDown: (_action: any, keyCode: any) => void
  • Defined in packages/debug-plugin/src/index.js:186

_onResize

_onResize: () => void
  • Defined in packages/debug-plugin/src/index.js:140

_timeSampleCount

_timeSampleCount: number
  • Defined in packages/debug-plugin/src/index.js:137

_timeSampleIndex

_timeSampleIndex: number
  • Defined in packages/debug-plugin/src/index.js:136
  • Defined in packages/debug-plugin/src/index.js:172

_updateSamples

_updateSamples: Float32Array<ArrayBuffer>
  • Defined in packages/debug-plugin/src/index.js:134

app

app: Application

a reference to the app/game that registered this plugin

Inherited from plugin.BasePlugin.app

  • Defined in packages/melonjs/build/plugin/plugin.d.ts:22

counters

counters: Counters
  • Defined in packages/debug-plugin/src/index.js:97

debugToggle

debugToggle: number
  • Defined in packages/debug-plugin/src/index.js:95

drawHistory

drawHistory: Float32Array<ArrayBuffer>
  • Defined in packages/debug-plugin/src/index.js:118

frameDrawStartTime

frameDrawStartTime: number
  • Defined in packages/debug-plugin/src/index.js:130
  • Defined in packages/debug-plugin/src/index.js:163

frameDrawTime

frameDrawTime: number
  • Defined in packages/debug-plugin/src/index.js:132
  • Defined in packages/debug-plugin/src/index.js:167

frameUpdateTime

frameUpdateTime: number
  • Defined in packages/debug-plugin/src/index.js:131
  • Defined in packages/debug-plugin/src/index.js:159

graphCanvas

graphCanvas: HTMLCanvasElement | undefined
  • Defined in packages/debug-plugin/src/index.js:293

historyIndex

historyIndex: number
  • Defined in packages/debug-plugin/src/index.js:120
  • Defined in packages/debug-plugin/src/index.js:399

memCanvas

memCanvas: HTMLCanvasElement | undefined
  • Defined in packages/debug-plugin/src/index.js:311

memHistory

memHistory: Float32Array<ArrayBuffer>
  • Defined in packages/debug-plugin/src/index.js:119

options

options: {
    hitbox: string | boolean;
    quadtree: string | boolean;
    velocity: string | boolean;
}
  • Defined in packages/debug-plugin/src/index.js:110

panel

panel: HTMLDivElement | null
  • Defined in packages/debug-plugin/src/index.js:124
  • Defined in packages/debug-plugin/src/index.js:211

panelWrap

panelWrap: HTMLDivElement | null
  • Defined in packages/debug-plugin/src/index.js:125
  • Defined in packages/debug-plugin/src/index.js:208

stats

stats: {}
  • Defined in packages/debug-plugin/src/index.js:126

updateHistory

updateHistory: Float32Array<ArrayBuffer>
  • Defined in packages/debug-plugin/src/index.js:117

version

version: string

Inherited from plugin.BasePlugin.version

  • Defined in packages/debug-plugin/src/index.js:91

visible

visible: boolean
  • Defined in packages/debug-plugin/src/index.js:106
  • Defined in packages/debug-plugin/src/index.js:424
  • Defined in packages/debug-plugin/src/index.js:436

Methods

destroy

  • destroy(): void

    destroy the debug plugin

    Returns void

    • Defined in packages/debug-plugin/src/index.js:493

hide

  • hide(): void

    hide the debug panel

    Returns void

    • Defined in packages/debug-plugin/src/index.js:433

show

  • show(): void

    show the debug panel

    Returns void

    • Defined in packages/debug-plugin/src/index.js:421

toggle

  • toggle(): void

    toggle the debug panel visibility state

    Returns void

    • Defined in packages/debug-plugin/src/index.js:444

Settings

Member Visibility
  • Protected
  • Inherited
  • External
Theme

On This Page

Constructors
constructor
Properties
_drawSamples_onAfterDraw_onAfterUpdate_onBeforeDraw_onKeyDown_onResize_timeSampleCount_timeSampleIndex_updateSamplesappcountersdebugToggledrawHistoryframeDrawStartTimeframeDrawTimeframeUpdateTimegraphCanvashistoryIndexmemCanvasmemHistoryoptionspanelpanelWrapstatsupdateHistoryversionvisible
Methods
destroyhideshowtoggle
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.