Skip to content

Commit

Permalink
fix: remove uc browser game mode support
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed Jul 4, 2023
1 parent c8c9075 commit 58401a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/core/Stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 0 additions & 18 deletions src/renderer/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ {
*/
failIfMajorPerformanceCaveat: false,

/**
* 游戏模式, UC浏览器专用
* @default false
* @type {Boolean}
*/
gameMode: false,

/**
* 是否使用framebuffer
* @type {Boolean}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}
},
/**
* 清除背景
Expand Down

0 comments on commit 58401a5

Please sign in to comment.