API Docs for: 2.2.1
Show:

Detector Class

Item Index

Methods

autoDetectRecommendedRenderer

(
  • width=800
  • height=600
  • [options]
)
static

This helper function will automatically detect which renderer you should be using. This function is very similar to the autoDetectRenderer function except that is will return a canvas renderer for android. Even thought both android chrome supports webGL the canvas implementation perform better at the time of writing. This function will likely change and update as webGL performance improves on these devices.

Parameters:

  • width=800 Float

    the width of the renderers view

  • height=600 Float

    the height of the renderers view

  • [options] RenderingOptions optional

    The optional renderer parameters

    • [view] HTMLCanvasElement optional

      the canvas to use as a view, optional

    • [transparent=false] Bool optional

      If the render view is transparent, default false

    • [antialias=false] Bool optional

      sets antialias (only applicable in chrome at the moment)

    • [preserveDrawingBuffer=false] Bool optional

      enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context

    • [resolution=1] Float optional

      the resolution of the renderer retina would be 2

Returns:

CanvasRenderer|WebGLRenderer

autoDetectRenderer

(
  • width=800
  • height=600
  • [options]
)
static

This helper function will automatically detect which renderer you should be using. WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by the browser then this function will return a canvas renderer

Parameters:

  • width=800 Float

    the width of the renderers view

  • height=600 Float

    the height of the renderers view

  • [options] RenderingOptions optional

    The optional renderer parameters

    • [view] HTMLCanvasElement optional

      the canvas to use as a view, optional

    • [transparent=false] Bool optional

      If the render view is transparent, default false

    • [antialias=false] Bool optional

      sets antialias (only applicable in chrome at the moment)

    • [preserveDrawingBuffer=false] Bool optional

      enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context

    • [resolution=1] Float optional

      the resolution of the renderer retina would be 2

Returns:

CanvasRenderer|WebGLRenderer