Open zksteel opened 4 years ago
I have the same problem. I tried calling the hide() inside the onEnter event but doesn't work
panorama.addEventListener( 'enter', function(){ console.log("onEnter Event Triggered"); infospot2.hide(); // Not working });
When the hide() in binded to an onClick event, it works:
infospot1.addEventListener('click', function(){ console.log("Click on 1 hide 2"); infospot2.hide(); // Working });
But I need to hide that specific infospot on the start. Any help?
--- Update 1 ---
The infospot-animation-complete event is the dispatcher from infospotAnimation.onComplete()
and that infospotAnimation is a: this.infospotAnimation = new Tween.Tween( this ).to( {}, this.animationDuration / 2 );
and that animationDuration have the predefined value: this.animationDuration = 1000;
So... you can edit that and reduce the infospot-animation-complete event delay to 0. Is a ugly fix but it works in my case.
Description
I'am working on project where I need to show InfoSpots at specific time in my 360 video (PANOLENS.VideoPanorama). The default behaviour of InfoSpot is that it is visible from start which I don't want to. I found in documentation two methods : show() and hide() which should show and hide InfoSpot when i want to. But it seems that they don't work as I expected and I need your help.
Here is my current code:
So basicly I need to hide InfoSpot at page launch. Best I've get is hide() it when 'infospot-animation-complete' is called:
panorama_main_video.addEventListener('infospot-animation-complete', function (e) { infospot1.hide(); });
but it flash for a second (it is visible about 1 sec at start);I've tried also add infospot at time when i needed it, eg. after 15sec
but my custom InfoSpot image wasn't visible (even when I use new THREE.TextureLoader() at page launch).
Panolens version
Browser
OS