-
[PipingModel] Home.js 설정PTC/Vuforia 2022. 5. 17. 16:01
// Create gauge1 as an app parameter and bind to gauge. This will create a random number in the range (20, 61) every 3 seconds var tick=0; $interval(function() { $scope.app.params.gauge1 = Math.floor(Math.random() * 41) + 123 } ,1000); var tick=0; $interval(function() { $scope.app.params.gauge2 = Math.floor(Math.random() * 3) + 156 } ,3000); var tick=0; $interval(function() { $scope.app.params.gauge3 = Math.floor(Math.random() * 2) + 162 } ,3000); // turns off all augmentations $scope.resetAugmentations = function(){ $scope.app.params.showPartIdentification = false; $scope.app.params.showGauges = false; $scope.app.params.showImages = false; } // creates a string with the current time $scope.displayTime = function(){ var str = ""; var currentTime = new Date() var hours = currentTime.getHours() var minutes = currentTime.getMinutes() var seconds = currentTime.getSeconds() if (minutes < 10) { minutes = "0" + minutes } if (seconds < 10) { seconds = "0" + seconds } str += hours + ":" + minutes + ":" + seconds + " "; if(hours > 11){ str += "PM" } else { str += "AM" } $scope.app.params.completionTime = str; $scope.apply(); }
home.js 에 작성해주면 되는데, 전체적인 기능이 들어감
'PTC > Vuforia' 카테고리의 다른 글
[GasTurbine]색상 변경하기 (0) 2022.06.28 $interval을 사용하여 오브젝트 scale 변환 (0) 2022.06.10 [PipingModel] 3D 모델추가 및 기능구현 (0) 2022.05.18 [PipingModel] Resources Upload, Setting (0) 2022.05.18 [PipingModel] app.scss 작성 (0) 2022.05.17