Shahzaib 3d Customizer Posted October 13, 2018 Share Posted October 13, 2018 I NEED HELP IN Clock time Function in babylon js 3d configurator th i want to make this model watch hands Movie like Real clock and real time any one can help me i have use this code for run that functions var hrHand = document.getElementById('hrHand'); var mnHand = document.getElementById('mnHand'); var mnHand = document.getElementById('secHand'); function initClock() { var date = new Date(); var hour = date.getHours() % 12; var minute = date.getMinutes() ; var second = date.getSeconds() ; var hrDeg = 0; var mnDeg = 0; var secDeg = second * 6; hrHand.transform = 'rotate(' + hrDeg + 'deg)'; mnHand.transform = 'rotate(' + mnDeg + 'deg)'; mnHand.transform = 'rotate(' + secDeg + 'deg)'; setTimeout(initClock, 1000); }; initClock(); and my object Id is this i try all js code of clock not working any one Please help me out any one can send me the demo of clock function ? Arte and NasimiAsl 2 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 14, 2018 Share Posted October 14, 2018 hi @Shahzaib 3d Customizer welcome to forum http://www.babylonjs-playground.com/#SVY749 Arte, Shahzaib 3d Customizer and ssaket 2 1 Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 Thank you soo much @NasimiAsl NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 Please check the screen shot Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 @NasimiAsl Please Check mate Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 14, 2018 Share Posted October 14, 2018 check your mesh is not null( i guess ) if(mesh && mesh.rotation){ // add code here } Shahzaib 3d Customizer 1 Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 let me check Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 Please check The code Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 7 minutes ago, NasimiAsl said: check your mesh is not null( i guess ) if(mesh && mesh.rotation){ // add code here } Please check screen shot Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 @NasimiAsl Have u see Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 14, 2018 Author Share Posted October 14, 2018 thanks Now its work mate NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 On 10/14/2018 at 6:47 PM, NasimiAsl said: check your mesh is not null( i guess ) if(mesh && mesh.rotation){ // add code here } Hi mate there I have Put Clock function in my app but after put its working like this i have tired also center piviot point but its suck can u help me please to get this work perfectly 0125.webm NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 @NasimiAsl There Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 18, 2018 Share Posted October 18, 2018 yes? http://www.babylonjs-playground.com/#HS2KUH%231 look this and if you can make your sample PG we can help faster Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 Clock function not working Properly Please can u help me to fix this i have add the code that u share with me after added the code the hands of clock going messed can u help me out to fix this i have make to center of those all pivot point but its not working like clock its working like something bad can u please see the video i have attached above Please .. @NasimiAsl Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 18, 2018 Share Posted October 18, 2018 let me check it i like the background Music at first Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 8 minutes ago, NasimiAsl said: let me check it i like the background Music at first hahah ok Please help me out music is nice Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 18, 2018 Share Posted October 18, 2018 http://www.babylonjs-playground.com/#SVY749#1 make parent for watch and do like this sample that most be fixed Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 16 minutes ago, NasimiAsl said: yes? http://www.babylonjs-playground.com/#HS2KUH%231 look this and if you can make your sample PG we can help faster let me try this function in my model wait please Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 After adding this code and Making the parent its nit woking bro 21 minutes ago, NasimiAsl said: http://www.babylonjs-playground.com/#SVY749#1 make parent for watch and do like this sample that most be fixed Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 @NasimiAsl Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 18, 2018 Share Posted October 18, 2018 you most make Playground with main object for us Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 can i share with u my main file via email if u dont mind ? Quote Link to comment Share on other sites More sharing options...
Shahzaib 3d Customizer Posted October 18, 2018 Author Share Posted October 18, 2018 @NasimiAsl Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 18, 2018 Share Posted October 18, 2018 make a html+ js in zip for me Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.