Wrox Programmer Forums
BOOK: Professional WebGL Programming: Developing 3D Graphics for the Web
This is the forum to discuss the Wrox book Professional WebGL Programming: Developing 3D Graphics for the Web by Andreas Anyuru; ISBN: 978-1-1199-6886-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional WebGL Programming: Developing 3D Graphics for the Web section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 9th, 2013, 07:06 AM
Registered User
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Animations not working in Chrome

I found that the animations starting from chapter 6 were not working in Chrome, the cube that was supposed to be animated never appeared, in fact it did but only for a single frame before it animated itself far off screen.

The reason is due to a change in the time value returned when requestAnimFrame is called. It is simple to fix by replacing
  if (currentTime === undefined) {
    currentTime = Date.now();
  if (currentTime === undefined) {
    currentTime = performance.now();
in the draw method. Animations will then work in Chrome and Firefox will continue to work as before.

More information can be found from html5rocks.com.

It appears that this is a change in the standard rather than an error in the authors source code.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Previewing in IE and Chrome WillieO BOOK: Beginning HTML, XHTML, CSS, and JavaScript 3 February 1st, 2011 02:43 PM
Ch 12 - Animations 2 johnoeffinger BOOK: Beginning iOS 4 Application Development 0 January 27th, 2011 05:44 PM
Classic ASP email not working in Chrome? sdagger Classic ASP Basics 7 October 15th, 2010 02:42 PM
Chapter 11 Animations Halabethan BOOK: Beginning iPad Application Development 1 September 15th, 2010 11:07 AM
Making Animations in Arabic Using Flash Mx asajids Flash (all versions) 1 June 4th, 2005 10:59 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.