Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I'm having a concern regarding scan widget in 3D eyewear.
Is it possible to have multiple scan widgets in one project?
Currently I'm using 2 scan widgets, the first scanning will display first popup, and the second scanning should display second popup. But now, during second scanning, after value has been acquired, the first and second popup display simultaneously.
Since 3D eyewear does not supporting popup, I'm using 3D label and 3D button for both popup.
Need you guys response at your earliest convenience.
Thanks
Hi RahSyi,
Maybe it is easier to use just one scan widget. You can transfere the scanned value to your js by putting this in the js field of "acquired value" in your scan widged:
openPopup(view.wdg["scan-1"].scannedValue);
Then, you can use something like this in your js code:
$scope.openPopup = function(scannedValue) {
switch (scannedValue) {
case 'popup-1':
$scope.view.wdg['popup-1'].visible=true;
$scope.view.wdg['popup-2'].visible=false;
$scope.view.wdg['popup-3'].visible=false;
$scope.view.wdg['popup-4'].visible=false;
break;
case "popup-2":
$scope.view.wdg['popup-1'].visible=false;
$scope.view.wdg['popup-2'].visible=true;
$scope.view.wdg['popup-3'].visible=false;
$scope.view.wdg['popup-4'].visible=false;
break;
case "popup-3":
$scope.view.wdg['popup-1'].visible=false;
$scope.view.wdg['popup-2'].visible=false;
$scope.view.wdg['popup-3'].visible=true;
$scope.view.wdg['popup-4'].visible=false;
break;
case "popup-4":
$scope.view.wdg['popup-1'].visible=false;
$scope.view.wdg['popup-2'].visible=false;
$scope.view.wdg['popup-3'].visible=false;
$scope.view.wdg['popup-4'].visible=true;
break;
}}
actually, I'm using 3DLabel and 3D buttons for popup since popup widget not available and supported in 3D eyewear.
Any other solution that I can try?
Thanks
No problem, just replace the regarding lines, e.g.:
instead of :
$scope.view.wdg['popup-1'].visible=true;
use:
$scope.view.wdg['label-1'].visible=true;
or use 3DPanels to group the widgeds to be displayed.
I've tried the solution that you gave. But it didn't work.
@sdidier : Looks like a bug to me
Symptom:
Acquiring a scan value will cause in several widget-visibilities being set to true, at least for: 3D-labels, 3D-pictures and 3D-buttons. Even having a command for setting visibility
Tested on:
Vuforia 9.0.3 3D-Eyewear-Project
Browser: Chrome 90.0.4430.93; Edge 89.0.774.57
Steps to recreate:
1 create a new 3d-eyewear project
2 place scan widget and 3D-Button and assign start scan to 3D-button
3 place 1 3D-button, 1 3D-picture and one 3D-label and set all three to invisible
4 start preview and type in any scan value
Hello all,
I am able to reproduce the issue in Vuforia Studio 9.0.3, in Preview and in Hololens also.
I added a Target Widget because it is mandatory to have an Experience who works fine in the device.
So, it seems a bug.
I have create a case to follow it and the most important the Jira Ticket VTS-437 to report that To R&D.
Also, this article has been created about this issue.
Thanks you very much for your help. 🙂
Best regards,
Samuel
Widgets:
scan-1, scan-2, scan-3
3DPressButton-1, 3DPressButton-2, 3DPressButton-3
3DLabel-1, 3DLabel-2, 3DLabel-3
['scan-x']['scannedValue'] is Bind to ['3DLabel-x']['text']
Same thing happens here, one scanned value acquired, all labels are shown.
$timeout could be a workaround
$scope.app.show1 = function(){
$timeout(function{
$scope.view.wdg['3DLabel-1'].visible = true;
$scope.view.wdg['3DLabel-2'].visible = false;
$scope.view.wdg['3DLabel-3'].visible = false;
}, 10)
}
got this error.