API Documentation for: 1.0.0
Show:

WebGLInspector Class

Defined in: WebGLInspector:38
Module: EaselJS

A utility and helper class designed to work with StageGL to help investigate and test performance or display problems. It contains logging functions to analyze behaviour and performance testing utilities.

Constructor

WebGLInspector

(
  • stage
)

Defined in WebGLInspector:38

Parameters:

  • stage StageGL

    The default stage to use when none is supplied.

Methods

_initializeWebGL

() protected

Defined in _initializeWebGL:80

dispProps

(
  • prepend
  • item
)
static

Defined in dispProps:218

Utility function for use with {{#crossLink "logDepth"))((/crossLink}}. Logs an item's position and registration. Useful to see if something is being forced off screen or has an integer position.

Parameters:

  • prepend String

    The string to show before the item, usually formatting for a tree view.

  • item DisplayObject

    The item we're currently logging about.

log

(
  • [stage=this._stage]
)

Defined in log:87

Perform all of the logging reports at once.

Parameters:

  • [stage=this._stage] StageGL optional

    The stage to log information for.

logContextInfo

(
  • gl
)

Defined in logContextInfo:157

Examine the context and provide information about its capabilities.

Parameters:

  • gl WebGLRenderingContext

    The WebGL context to inspect.

logDepth

(
  • [children=this._stage.children]
  • prepend
  • customLog
)

Defined in logDepth:131

Recursively walk the entire display tree, log the attached items, and display it in a tree view.

Parameters:

  • [children=this._stage.children] Array optional

    The children array to walk through.

  • prepend String

    What to prepend to this output from this point onwards.

  • customLog Function

    Which logging function to use, mainly for filtering or formatting output. Fallback hierarchy is customLog -> alternateOutput -> console.log.

logTextureFill

(
  • [stage=this._stage]
)

Defined in logTextureFill:177

Simulate renders and watch what happens for textures moving around between draw calls. A texture moving between slots means it was removed and then re-added to draw calls. Performance may be better if it was allowed to stay in place.

Parameters:

  • [stage=this._stage] StageGL optional

    The stage to log information for.

toggleGPUDraw

(
  • [stage=this._stage]
  • enabled
)

Defined in toggleGPUDraw:101

Replace the stage's Draw command with an empty draw command. This is useful for testing performance, and ignoring rendering.

Parameters:

  • [stage=this._stage] StageGL optional

    The stage to log information for.

  • enabled Boolean

    Force enabled. If left undefined, it will toggle.

Properties

_stage

StageGL protected

Defined in _stage:52

The internal reference to the default stage this Inspector is for.

alternateOutput

Console protected static

Defined in alternateOutput:66

Alternate output for debugging situations where "console" is not available, i.e. Mobile or remote debugging. Expects object with a "log" function that takes any number of params.

Default: null