Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Could you use multiple 3D models (one for each .pvz) and write a function to make them visible/not visible based on the button clicks?
This should work for a basic use case.
regards,
Patrick
Hi,
Depending on what you want to do exactly, there are several ways.
There is a good example in the Help that uses a Select widget to choose from different models. You should be able to adapt this to your specific needs.
regards,
Patrick
Hello Patrick,
That was very helpful. But I want to load .pvz upon clicking a button.
Could you use multiple 3D models (one for each .pvz) and write a function to make them visible/not visible based on the button clicks?
This should work for a basic use case.
regards,
Patrick
you can use this script to load a .pvz on the model using the button click.
$scope.load=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/name.pvz';
};
$scope.load2=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/name2.pvz';
};
assign calls to the buttons .
Button1 - call load();
Button2- call load2();
Bye
Giuseppe