Browse Source

check

master
cailean 1 hour ago
parent
commit
da033e14ca
  1. 18
      js/Item.js
  2. 4
      js/Player.js

18
js/Item.js

@ -459,15 +459,15 @@ export class Item {
if (this.loadState !== 'loaded') return; if (this.loadState !== 'loaded') return;
if (this.hoverIndicator) { // if (this.hoverIndicator) {
this.pulseTime += delta * 5; // Adjust the multiplier to change pulse speed // this.pulseTime += delta * 5; // Adjust the multiplier to change pulse speed
const minOpacity = 0.1; // const minOpacity = 0.1;
const maxOpacity = 0.8; // const maxOpacity = 0.8;
// Create a sine wave that oscillates between 0 and 1 // // Create a sine wave that oscillates between 0 and 1
const oscillation = (Math.sin(this.pulseTime) + 1) / 4; // const oscillation = (Math.sin(this.pulseTime) + 1) / 4;
// Apply the oscillation to the desired opacity range // // Apply the oscillation to the desired opacity range
this.hoverIndicator.material.opacity = minOpacity + oscillation * (maxOpacity - minOpacity); // this.hoverIndicator.material.opacity = minOpacity + oscillation * (maxOpacity - minOpacity);
} // }
this.lastPosition = this.object.position.clone(); this.lastPosition = this.object.position.clone();

4
js/Player.js

@ -873,10 +873,10 @@ export class Player {
// If the hovered item has changed, update outlines // If the hovered item has changed, update outlines
if (previouslyHoveredItem !== this.currentIntItem) { if (previouslyHoveredItem !== this.currentIntItem) {
if (previouslyHoveredItem) { if (previouslyHoveredItem) {
//previouslyHoveredItem.hideOutline(); previouslyHoveredItem.hideOutline();
} }
if (this.currentIntItem) { if (this.currentIntItem) {
//this.currentIntItem.showOutline(); this.currentIntItem.showOutline();
} }
} }
} }

Loading…
Cancel
Save