You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Gen random dataconstN=300;constgData=[...Array(N).keys()].map(()=>({lat: (Math.random()-0.5)*180,lng: (Math.random()-0.5)*360,size: Math.random()/3,color: ['red','white','blue','green'][Math.round(Math.random()*3)]}));constglobe=Globe().globeImageUrl('//unpkg.com/three-globe/example/img/earth-night.jpg').pointsData(gData).labelsData(gData).labelText(()=>"Text").labelSize(2).pointAltitude('size').pointColor('color')(document.getElementById('viewport'));setTimeout(()=>{globe.pointsData(gData);// globe.labelsData(gData);},5000);
Expected behavior
Labels should not disappear.
Screenshots
N/A
Desktop (please complete the following information):
OS: N/A
Browser: N/A
Version: N/A
Smartphone (please complete the following information):
Device: N/A
OS: N/A
Browser: N/A
Version: N/A
Additional context
Calling .labelsData() right after .pointsData() seems to be bringing back labels and render them again after a second or two, but it's definitely a bug that points data interferes with labels data.
The text was updated successfully, but these errors were encountered:
The real issue is the sharing of data objects between layers. Each layer will associate some meta attributes to the data arrays passed onto it, and these are required for proper functioning. If you pass the exact same object reference to multiple layers it is very possible that they will conflict, and doing this is disadvised.
You can simply solve this by cloning the data structure, for instance:
Describe the bug
Calling
.pointsData()
on an already rendered globe causes it to lose its labels previously set via.labelsData()
.To Reproduce
Steps to reproduce the behavior:
1.
Expected behavior
Labels should not disappear.
Screenshots
N/A
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Calling
.labelsData()
right after.pointsData()
seems to be bringing back labels and render them again after a second or two, but it's definitely a bug that points data interferes with labels data.The text was updated successfully, but these errors were encountered: