Skip to content

Commit f38372d

Browse files
committed
3D cyberspace example tracker hover fix
1 parent 71ba8ca commit f38372d

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎build/alien.three.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105572,6 +105572,13 @@ class Tracker extends Interface {
105572105572
callback();
105573105573
}
105574105574
});
105575+
} else {
105576+
this.animatedIn = false;
105577+
this.isVisible = false;
105578+
105579+
if (callback) {
105580+
callback();
105581+
}
105575105582
}
105576105583

105577105584
if (this.info) {

‎examples/three/3d_cyberspace.html‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,14 @@
277277

278278
static onHover = ({ type, index, target }) => {
279279
console.log('onHover', type, index, target, Data.stars[index]);
280-
target.setData({ primary: Data.stars[index].name });
280+
281+
if (type === 'over') {
282+
target.setData({ primary: Data.stars[index].name });
283+
284+
if (!target.tracker.animatedIn) {
285+
target.tracker.animateIn();
286+
}
287+
}
281288
};
282289

283290
static onClick = ({ index, target }) => {

0 commit comments

Comments
 (0)