Browse Source

check

master
cailean 2 hours 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.hoverIndicator) {
this.pulseTime += delta * 5; // Adjust the multiplier to change pulse speed
const minOpacity = 0.1;
const maxOpacity = 0.8;
// Create a sine wave that oscillates between 0 and 1
const oscillation = (Math.sin(this.pulseTime) + 1) / 4;
// Apply the oscillation to the desired opacity range
this.hoverIndicator.material.opacity = minOpacity + oscillation * (maxOpacity - minOpacity);
}
// if (this.hoverIndicator) {
// this.pulseTime += delta * 5; // Adjust the multiplier to change pulse speed
// const minOpacity = 0.1;
// const maxOpacity = 0.8;
// // Create a sine wave that oscillates between 0 and 1
// const oscillation = (Math.sin(this.pulseTime) + 1) / 4;
// // Apply the oscillation to the desired opacity range
// this.hoverIndicator.material.opacity = minOpacity + oscillation * (maxOpacity - minOpacity);
// }
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 (previouslyHoveredItem !== this.currentIntItem) {
if (previouslyHoveredItem) {
//previouslyHoveredItem.hideOutline();
previouslyHoveredItem.hideOutline();
}
if (this.currentIntItem) {
//this.currentIntItem.showOutline();
this.currentIntItem.showOutline();
}
}
}

Loading…
Cancel
Save