Explorar o código

Merge pull request #3551 from cotejp/patch-2

[Documentation] Clarified engine constructor parameters
David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
78e1f93d0f
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  1. 5 4
      src/Engine/babylon.engine.ts

+ 5 - 4
src/Engine/babylon.engine.ts

@@ -818,11 +818,12 @@
 
         /**
          * @constructor
-         * @param {HTMLCanvasElement | WebGLRenderingContext} canvasOrContext - the canvas or the webgl context to be used for rendering
-         * @param {boolean} [antialias] - enable antialias
-         * @param options - further options to be sent to the getContext function
+         * @param {HTMLCanvasElement | WebGLRenderingContext} canvasOrContext - the canvas or WebGL context to use for rendering
+         * @param {boolean} [antialias] - enable antialiasing (default: false)
+         * @param {EngineOptions} [options] - further options to be sent to the getContext() function
+         * @param {boolean} [adaptToDeviceRatio] - whether to adapt to the device's viewport characteristics (default: false)
          */
-        constructor(canvasOrContext: Nullable<HTMLCanvasElement | WebGLRenderingContext>, antialias?: boolean, options?: EngineOptions, adaptToDeviceRatio = false) {
+        constructor(canvasOrContext: Nullable<HTMLCanvasElement | WebGLRenderingContext>, antialias?: boolean, options?: EngineOptions, adaptToDeviceRatio:boolean = false) {
             let canvas: Nullable<HTMLCanvasElement> = null;
             Engine.Instances.push(this);