Skip to content

Commit

Permalink
fix: v7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Sep 20, 2024
1 parent 3c75475 commit d32ddd0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/backend/src/rendering/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ export class Rendering extends PixiHandler {
private stats = new Stats();

public override reset() {
if (this._devtool.majorVersion !== '8') {
return;
}

// restore all overriden functions
const renderer = this._devtool.renderer;

Expand All @@ -91,6 +95,10 @@ export class Rendering extends PixiHandler {
}

public override init() {
if (this._devtool.majorVersion !== '8') {
return;
}

this._textureCache.clear();
this.stats.reset();

Expand Down Expand Up @@ -184,6 +192,10 @@ export class Rendering extends PixiHandler {
}

public override update() {
if (this._devtool.majorVersion !== '8') {
return;
}

this.stats.drawCalls = 0;
this.stats.update();
}
Expand Down

0 comments on commit d32ddd0

Please sign in to comment.