cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Display 3D label by clicking on the previous label

AS_9764990
Garnet

Display 3D label by clicking on the previous label

Hi,

 

I have almost 20 steps which using 3D Label in 3D eyewear view. I want to show some labels which on clicking will show other labels.

 

For example, when I click on the Step 1 label, the Step 2 label will be displayed. Then, when I clicked on Step 2 label, the Step 3 label will be displayed. And it will repeat the same process until the last step which is step 20 label displayed. 

 

Do I need to use below code for all 20 steps? Means that, I have to copy and paste the same code with different function name?

 

$scope.showLabel=function() 
{
  
    $scope.view.wdg['3DLabel-2']['visible'] = true;
  
}

 

Is there any other simple solution that I can use instead of copying and pasting the same code?

 

Thank you in advance. 

1 REPLY 1

Re: Display 3D label by clicking on the previous label

Maybe you can try using Array.

const allLabels = ['', '3DLabel-1', '3DLabel-2', '3DLabel-3', '3DLabel-4', '3DLabel-5']
$scope.showLabel = function(num){
  $scope.view.wdg[allLabels[num]].visible = true;
}

showLabel(1)  > show '3DLabel-1' 

showLabel(2)  > show '3DLabel-2' 

Announcements
Join an
AR Working Group!

Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection