diff --git a/js/Player.js b/js/Player.js index ee46a2c..451774b 100644 --- a/js/Player.js +++ b/js/Player.js @@ -979,47 +979,47 @@ export class Player { this._checkAreaTriggers(); // --- Interact Prompt Logic --- - if (!this.interactPrompt) { - this.interactPrompt = this._createInteractPrompt(); - this.camera.add(this.interactPrompt); - this.interactPrompt.position.set(0, -0.5, -2); - this.interactPrompt.visible = false; - } - - // Show prompt if hovering over item and not holding one - if (this.currentIntItem && !this.attachedItem) { - // Regenerate prompt if hovered item changed - if (this.lastPromptItem !== this.currentIntItem) { - // Remove old prompt mesh - this.camera.remove(this.interactPrompt); - - // Dispose all character meshes in the group - if (this.interactPrompt.userData.charMeshes) { - this.interactPrompt.userData.charMeshes.forEach(mesh => { - if (mesh.geometry) mesh.geometry.dispose(); - if (mesh.material) { - if (mesh.material.map) mesh.material.map.dispose(); - mesh.material.dispose(); - } - }); - } + // if (!this.interactPrompt) { + // this.interactPrompt = this._createInteractPrompt(); + // this.camera.add(this.interactPrompt); + // this.interactPrompt.position.set(0, -0.5, -2); + // this.interactPrompt.visible = false; + // } - // Create new prompt with new random colors - this.interactPrompt = this._createInteractPrompt(); - this.camera.add(this.interactPrompt); - this.interactPrompt.position.set(0, -0.5, -2); - } + // // Show prompt if hovering over item and not holding one + // if (this.currentIntItem && !this.attachedItem) { + // // Regenerate prompt if hovered item changed + // if (this.lastPromptItem !== this.currentIntItem) { + // // Remove old prompt mesh + // this.camera.remove(this.interactPrompt); + + // // Dispose all character meshes in the group + // if (this.interactPrompt.userData.charMeshes) { + // this.interactPrompt.userData.charMeshes.forEach(mesh => { + // if (mesh.geometry) mesh.geometry.dispose(); + // if (mesh.material) { + // if (mesh.material.map) mesh.material.map.dispose(); + // mesh.material.dispose(); + // } + // }); + // } - this.interactPrompt.visible = true; - this.interactPromptTime += delta; - const bob = Math.sin(this.interactPromptTime * 2) * 0.01; - this.interactPrompt.position.y = -0.5 + bob; - this.lastPromptItem = this.currentIntItem; - } else { - this.interactPrompt.visible = false; - this.interactPromptTime = 0; - this.lastPromptItem = null; - } + // // Create new prompt with new random colors + // this.interactPrompt = this._createInteractPrompt(); + // this.camera.add(this.interactPrompt); + // this.interactPrompt.position.set(0, -0.5, -2); + // } + + // this.interactPrompt.visible = true; + // this.interactPromptTime += delta; + // const bob = Math.sin(this.interactPromptTime * 2) * 0.01; + // this.interactPrompt.position.y = -0.5 + bob; + // this.lastPromptItem = this.currentIntItem; + // } else { + // this.interactPrompt.visible = false; + // this.interactPromptTime = 0; + // this.lastPromptItem = null; + // } // if (this.interactPrompt && this.interactPrompt.userData.charMeshes) { // const now = performance.now();