API Documentation for: NEXT
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

dispProps

(
  • prepend
  • item
)
static

Defined in dispProps:217

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=WebGLInspector.stage]
)

Defined in log:77

Perform all of the logging reports at once.

Parameters:

  • [stage=WebGLInspector.stage] StageGL optional

    The stage to log information for.

logContextInfo

(
  • gl
)

Defined in logContextInfo:158

Examine the context and provide information about its capabilities.

Parameters:

  • gl WebGLRenderingContext

    The WebGL context to inspect.

logDepth

(
  • [children=WebGLInspector.stage.children]
  • prepend
  • customLog
)

Defined in logDepth:136

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

Parameters:

  • [children=WebGLInspector.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=WebGLInspector.stage]
)

Defined in logTextureFill:178

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 on GPU, consider sprite sheeting it with something stable.

Parameters:

  • [stage=WebGLInspector.stage] StageGL optional

    The stage to log information for.

replaceRenderBatchCall

(
  • [stage=WebGLInspector.stage]
  • newFunc
)

Replace the stage's Draw command with a new draw command. This is useful for:

  • Testing performance, with no render cost. See WebGLInspector.drawEmpty
  • Troubleshooting and tracking loaded textures. See WebGLInspector.drawTexOnBuffer
  • Misc feature or troubleshooting injection

Parameters:

  • [stage=WebGLInspector.stage] StageGL optional

    The stage to log information for.

  • newFunc Function

    .

replaceRenderCoverCall

(
  • [stage=WebGLInspector.stage]
  • newFunc
)

Identical to replaceRenderBatchCall, but affects the Cover command.

Parameters:

  • [stage=WebGLInspector.stage] StageGL optional

    The stage to log information for.

  • newFunc Function

    .

Properties

alternateOutput

Console protected static

Defined in alternateOutput:50

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