From 8eebed1829c6e7ab874d4e4f2c03d52a8f647f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 27 Jan 2021 11:18:07 +0100 Subject: [PATCH] Removing pipeline related code This code is broken since Phaser 3.50 and we are facing weird issues with MacOS memory leaks and crashes. Removing this code will remove one potential suspect. --- front/src/Phaser/Items/ActionableItem.ts | 8 +++++--- front/src/index.ts | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/front/src/Phaser/Items/ActionableItem.ts b/front/src/Phaser/Items/ActionableItem.ts index e32bad1a..fe4de385 100644 --- a/front/src/Phaser/Items/ActionableItem.ts +++ b/front/src/Phaser/Items/ActionableItem.ts @@ -43,8 +43,9 @@ export class ActionableItem { } this.isSelectable = true; if (this.sprite.pipeline) { - this.sprite.setPipeline(OutlinePipeline.KEY); - this.sprite.pipeline.set2f('uTextureSize', this.sprite.texture.getSourceImage().width, this.sprite.texture.getSourceImage().height); + // Commented out to try to fix MacOS issue + /*this.sprite.setPipeline(OutlinePipeline.KEY); + this.sprite.pipeline.set2f('uTextureSize', this.sprite.texture.getSourceImage().width, this.sprite.texture.getSourceImage().height);*/ } } @@ -56,7 +57,8 @@ export class ActionableItem { return; } this.isSelectable = false; - this.sprite.resetPipeline(); + // Commented out to try to fix MacOS issue + //this.sprite.resetPipeline(); } /** diff --git a/front/src/index.ts b/front/src/index.ts index b9a00731..b98e640f 100644 --- a/front/src/index.ts +++ b/front/src/index.ts @@ -93,10 +93,11 @@ const config: GameConfig = { }, callbacks: { postBoot: game => { - const renderer = game.renderer; + // Commented out to try to fix MacOS bug + /*const renderer = game.renderer; if (renderer instanceof WebGLRenderer) { renderer.pipelines.add(OutlinePipeline.KEY, new OutlinePipeline(game)); - } + }*/ } } };