From 58401a54f596f8c60c595a50c25bb8dd823e8a2f Mon Sep 17 00:00:00 2001 From: 06wj <06wj@163.com> Date: Tue, 4 Jul 2023 15:51:55 +0800 Subject: [PATCH] fix: remove uc browser game mode support --- src/core/Stage.js | 1 - src/renderer/WebGLRenderer.js | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/src/core/Stage.js b/src/core/Stage.js index 962feb2..f5f2ceb 100644 --- a/src/core/Stage.js +++ b/src/core/Stage.js @@ -102,7 +102,6 @@ const Stage = Class.create(/** @lends Stage.prototype */ { * @param {boolean} [params.premultipliedAlpha=true] 是否需要 premultipliedAlpha。 * @param {boolean} [params.preserveDrawingBuffer=false] 是否需要 preserveDrawingBuffer。 * @param {boolean} [params.failIfMajorPerformanceCaveat=false] 是否需要 failIfMajorPerformanceCaveat。 - * @param {boolean} [params.gameMode=false] 是否开启游戏模式,UC 浏览器专用 * @param {any} [params.[value:string]] 其它属性 */ constructor(params) { diff --git a/src/renderer/WebGLRenderer.js b/src/renderer/WebGLRenderer.js index 532c2a6..4d13ee1 100644 --- a/src/renderer/WebGLRenderer.js +++ b/src/renderer/WebGLRenderer.js @@ -160,13 +160,6 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ { */ failIfMajorPerformanceCaveat: false, - /** - * 游戏模式, UC浏览器专用 - * @default false - * @type {Boolean} - */ - gameMode: false, - /** * 是否使用framebuffer * @type {Boolean} @@ -432,10 +425,6 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ { contextAttributes.preserveDrawingBuffer = true; } - if (this.gameMode === true) { - contextAttributes.gameMode = true; - } - if (this.preferWebGL2) { try { this.gl = this.domElement.getContext('webgl2', contextAttributes); @@ -834,13 +823,6 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ { }, (instancedMeshes) => { this.renderInstancedMeshes(instancedMeshes); }); - this._gameModeSumbit(); - }, - _gameModeSumbit() { - const gl = this.gl; - if (this.gameMode && gl && gl.submit) { - gl.submit(); - } }, /** * 清除背景