|
@@ -483,14 +483,14 @@ export class Engine extends ThinEngine {
|
|
constructor(canvasOrContext: Nullable<HTMLCanvasElement | WebGLRenderingContext>, antialias?: boolean, options?: EngineOptions, adaptToDeviceRatio: boolean = false) {
|
|
constructor(canvasOrContext: Nullable<HTMLCanvasElement | WebGLRenderingContext>, antialias?: boolean, options?: EngineOptions, adaptToDeviceRatio: boolean = false) {
|
|
super(canvasOrContext, antialias, options, adaptToDeviceRatio);
|
|
super(canvasOrContext, antialias, options, adaptToDeviceRatio);
|
|
|
|
|
|
|
|
+ Engine.Instances.push(this);
|
|
|
|
+
|
|
if (!canvasOrContext) {
|
|
if (!canvasOrContext) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
options = this._creationOptions;
|
|
options = this._creationOptions;
|
|
|
|
|
|
- Engine.Instances.push(this);
|
|
|
|
-
|
|
|
|
if ((<any>canvasOrContext).getContext) {
|
|
if ((<any>canvasOrContext).getContext) {
|
|
let canvas = <HTMLCanvasElement>canvasOrContext;
|
|
let canvas = <HTMLCanvasElement>canvasOrContext;
|
|
|
|
|