Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 9th, 2013, 06:06 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Code:
  if (currentTime === undefined) {
    currentTime = Date.now();
  }
with
Code:
  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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01:43 PM
Ch 12 - Animations 2 johnoeffinger BOOK: Beginning iOS 4 Application Development 0 January 27th, 2011 04: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



All times are GMT -4. The time now is 08:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.