Skip to content

Commit

Permalink
fix: v7 compatibility (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie authored Sep 20, 2024
1 parent 3c75475 commit 10e0cf5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
with:
name: upload
path: .upload/
include-hidden-files: true

# Automatically attach files to release
- name: Upload to Release
Expand Down
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 10e0cf5

Please sign in to comment.