Detector Class
Item Index
Methods
- autoDetectRecommendedRenderer static
- autoDetectRenderer static
Methods
autoDetectRecommendedRenderer
-
width=800
-
height=600
-
[options]
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
Floatthe width of the renderers view
-
height=600
Floatthe height of the renderers view
-
[options]
RenderingOptions optionalThe optional renderer parameters
-
[view]
HTMLCanvasElement optionalthe canvas to use as a view, optional
-
[transparent=false]
Bool optionalIf the render view is transparent, default false
-
[antialias=false]
Bool optionalsets antialias (only applicable in chrome at the moment)
-
[preserveDrawingBuffer=false]
Bool optionalenables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context
-
[resolution=1]
Float optionalthe resolution of the renderer retina would be 2
-
Returns:
CanvasRenderer|WebGLRenderer
autoDetectRenderer
-
width=800
-
height=600
-
[options]
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
Floatthe width of the renderers view
-
height=600
Floatthe height of the renderers view
-
[options]
RenderingOptions optionalThe optional renderer parameters
-
[view]
HTMLCanvasElement optionalthe canvas to use as a view, optional
-
[transparent=false]
Bool optionalIf the render view is transparent, default false
-
[antialias=false]
Bool optionalsets antialias (only applicable in chrome at the moment)
-
[preserveDrawingBuffer=false]
Bool optionalenables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context
-
[resolution=1]
Float optionalthe resolution of the renderer retina would be 2
-
Returns:
CanvasRenderer|WebGLRenderer