Skip to main content
13-Aquamarine
September 27, 2023
Solved

Wayfinder settings /adjustments of waypoints

  • September 27, 2023
  • 2 replies
  • 2042 views

Hello dear PTC community,

My 3D model is not huge ( 35 inches long) and  I need to adjust the frequency of my waypoints ( for example to  0.5 inches between 2 waypoints).

Please advise how can I do it.

 Also please advise how I can rescale and adjust the transparency for Wayfinder widget in terms of parameters in CSS.

Thank you. 

 

Best answer by RolandRaytchev

Hi @IB_10645210 ,

let suppose that you have one wayfinder Widget e.g. wayfinder1- with 16 waypoint items . The follow JavaScript code will set the position to a grid  4 X 4 = 16

 

//------------------------------------------------------------
$scope.Test=function(){
var wdgs=$scope.app.view.Home.wdg; 
 for(wdg in wdgs)
 { 
 if(hasWdgProp(wdgs[wdg],'selectedWaypointIndex')) //only wayfinder widget has this property
 { let count=0;
 let arr_size= wdgs[wdg].waypointsData.length
 
 for (i=0; i<arr_size; i++) {
 //4 grids
 a1=i % 4
 a2= (i -a1) /4
 wdgs[wdg].waypointsData[i].position.x=-0.5+0.25*a1
 wdgs[wdg].waypointsData[i].position.y=0.1+0.25*a2
 wdgs[wdg].waypointsData[i].position.z=0
 $scope.$applyAsync();}
 }
 $scope.$applyAsync();
 }
};
//======================================================================

 

where z=0

x is starting with         0.5, 0.75,1.0,1.25

and y respectively       0.1, 0.35, 6 , 8.25

2 replies

21-Topaz I
September 28, 2023

Hi @IB_10645210 ,

let suppose that you have one wayfinder Widget e.g. wayfinder1- with 16 waypoint items . The follow JavaScript code will set the position to a grid  4 X 4 = 16

 

//------------------------------------------------------------
$scope.Test=function(){
var wdgs=$scope.app.view.Home.wdg; 
 for(wdg in wdgs)
 { 
 if(hasWdgProp(wdgs[wdg],'selectedWaypointIndex')) //only wayfinder widget has this property
 { let count=0;
 let arr_size= wdgs[wdg].waypointsData.length
 
 for (i=0; i<arr_size; i++) {
 //4 grids
 a1=i % 4
 a2= (i -a1) /4
 wdgs[wdg].waypointsData[i].position.x=-0.5+0.25*a1
 wdgs[wdg].waypointsData[i].position.y=0.1+0.25*a2
 wdgs[wdg].waypointsData[i].position.z=0
 $scope.$applyAsync();}
 }
 $scope.$applyAsync();
 }
};
//======================================================================

 

where z=0

x is starting with         0.5, 0.75,1.0,1.25

and y respectively       0.1, 0.35, 6 , 8.25

13-Aquamarine
October 2, 2023

@RolandRaytchev 

Thank you for your response.

Do you know how I can rescale and adjust the transparency for the Wayfinder widget in terms of parameters in CSS?

 

This guy>>>>>>>>>>IB_10645210_0-1696266509722.png

I noticed you have some code for different devices. So our user test showed that some Samsung Ulta S22,S23 have some UI issues that we didn't have on other devices. Please advise troubleshooting for such issue.

21-Topaz I
October 2, 2023

I attached the test project here ,I used to verify

13-Aquamarine
October 2, 2023

Thank you so much!!!!