Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
If I select modelitem-1 , it shows only that model item alone. But I want to show rest of the model items opacity in 0.5.
Example: If I Select Modelitem-1 , It should show Modelitem-1 in Opacity 1 and Modelitem-2, Modelitem-3 Opacity as 0.5.
If I select Modelitem-2 , It should show the Modelitem-2 in Opacity 1 and ModelItem-1 and Modelitem-3 opacity as 0.5.
How can I do that?. Any suggestion.
Solved! Go to Solution.
Hello,
I would recommend to have a look to this thread :
https://community.ptc.com/t5/Vuforia-Studio/blinking-of-a-3d-image/m-p/657207
W can find a snippet of a blinking behavior with a 3D Image.
A similar behavior can be done with Opacity of a Model Item.
Best regards,
Samuel
Hello,
To achieve this, I have used these threads in PTC Community about Select Widget:
https://community.ptc.com/t5/Vuforia-Studio/How-to-use-List-in-ThingWorx-Studio/td-p/522911
To populate the Select Widget, I have used the technics as explained in previous threads.
Nothing to add.
In Home.js node, I have created this Javascript function :
$scope.changeOpacity = function ()
{
//console.warn($scope.app.view['Home'].wdg['select-1']);
//console.log($scope.getWidgetProp('select-1', 'value'));
switch ($scope.getWidgetProp('select-1', 'value'))
{
case '1':
$scope.setWidgetProp('modelItem-1', 'opacity', 1);
$scope.setWidgetProp('modelItem-2', 'opacity', 0.5);
break;
case '2':
$scope.setWidgetProp('modelItem-1', 'opacity', 0.5);
$scope.setWidgetProp('modelItem-2', 'opacity', 1);
break;
default:
console.log(`Sorry, we are out of ${item}.`);
}
}
In Select Widget node, in SELECT-DETAILS panel, in EVENTS section, in Value Changed event, JS button, call to this function is done : changeOpacity();
How is it working ?
Please find attached an example Project.
Best regards,
Samuel
Hello,
I would recommend to have a look to this thread :
https://community.ptc.com/t5/Vuforia-Studio/blinking-of-a-3d-image/m-p/657207
W can find a snippet of a blinking behavior with a 3D Image.
A similar behavior can be done with Opacity of a Model Item.
Best regards,
Samuel