RequestAnimationFrame() function in Tizen

Example of the requestAnimationFrame() function in Tizen 2.3. Important to note is in Tizen 2.3 you need to use the webkit prefix!
<!DOCTYPE HTML>
<html>
  <head>
    <style>
      body {
        margin: 0px;
        padding: 0px;
      }
    </style>
  </head>
  <body>
 
    <script>

        window.webkitRequestAnimationFrame(animate);
        
        function animate() {
         
            console.log('EXECUTE YOUR ANIMATION CODE HERE');
        
            animate();
            
        }
        
   </script>

  </body>
</html>    

Responses

0 Replies