Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi,
I'm trying a new project for eye wear.
1) I have inserted the 3D panel and placed three 3D buttons on it. (Button A, Button B and Button C)
2) When I click button A, it should play the animation of the model and has to show the description (3D image) of the product. 3D panel should hide.
3) When I close description( 3D image), 3D panel has to display.
So same thing has to apply for all three 3D buttons. How to write a code for this.
Solved! Go to Solution.
Hi @RK_9880418 , You can use the below code:
$scope.buttonone = function(){
$scope.view.wdg['3DPanel-1']['visible'] = false;
$scope.view.wdg['3DImage-1']['visible'] = true; // description image
$scope.$root.$broadcast('app.view["Home"].wdg["model-1"].svc.play');
}
$scope.Imgone = function(){
$scope.view.wdg['3DPanel-1']['visible'] = true;
$scope.view.wdg['3DImage-1']['visible'] = false;
$scope.view.wdg['model-1']['visible'] = false;
}
$scope.buttontwo = function(){
$scope.view.wdg['3DPanel-1']['visible'] = false;
$scope.view.wdg['3DImage-2']['visible'] = true;
}
$scope.Imgtwo = function(){
$scope.view.wdg['3DPanel-1']['visible'] = true;
$scope.view.wdg['3DImage-2']['visible'] = false;
}
$scope.buttonthree = function(){
$scope.view.wdg['3DPanel-1']['visible'] = false;
$scope.view.wdg['3DImage-3']['visible'] = true;
}
$scope.Imgthree = function(){
$scope.view.wdg['3DPanel-1']['visible'] = true;
$scope.view.wdg['3DImage-3']['visible'] = false;
}
And call the respective functions on click event of respective widgets, as shown in sample below:
I hope this works for you
Best Regards,
Mohit