Jump to content

Need help in clock fuction i have added the code in my web app but not working like watch


Shahzaib 3d Customizer
 Share

Recommended Posts

i have issue in 3d analog clock i have export 3d watch from blender everything done just need to work on clock function my  also fucntion is also done but its not working like clock please check the video and help me out  

and i have this code for  clock function all Object piviot point is center but clock function not working perfectly please Check and help me out please   

 

    scene.registerBeforeRender(function () {
 
         var date = new Date();
        var hour = date.getHours() % 12; 
        var minute = date.getMinutes() ; 
        var second = date.getSeconds() ; 
        hand_sec.rotation.y = (second/60.)*minute.*Math.PI/180.;
 hand_min.rotation.y = (minute/60.)*360.*Math.PI/180.;
 hand_hour.rotation.y = (hour/12.)*360.*Math.PI/180.;

    
            });   // this is code i have add  but not working 
 

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...