From fe3da59e22835170c5bb143f85e21d3a38258488 Mon Sep 17 00:00:00 2001 From: Squareys Date: Mon, 13 Mar 2023 22:50:23 +0100 Subject: [PATCH] cursor: Remove workaround for onDestroy not called on scene switch Signed-off-by: Squareys --- cursor.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/cursor.js b/cursor.js index 85ef1e0..8dce682 100644 --- a/cursor.js +++ b/cursor.js @@ -54,8 +54,6 @@ export class Cursor extends Component { this.collisionMask = 1 << this.collisionGroup; this.maxDistance = 100; - const sceneLoaded = this.onDestroy.bind(this); - this.engine.onSceneLoaded.push(sceneLoaded); this.onDestroyCallbacks = [ () => { const index = this.engine.onSceneLoaded.indexOf(sceneLoaded);