Podracer / kuda

Automatically exported from code.google.com/p/kuda
GNU General Public License v2.0
0 stars 0 forks source link

Tweak tranform.js to eliminate translate race condition with function arguments when using Chrome 11 on OS X #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
transform.js translate function will error with "Uncaught TypeError: Cannot 
read property '0' of undefined" in Chrome 11 on OS X. This happens when using 
setTimout or requestAnimationFrame vs setInterval. This does not happen in 
Firefox 4 or Windows.

The offending line is an assignment:
var v0 = v[0];
Refactoring the assignment of v using a ternary operator eliminates the issue. 
Once the change is made we can make requestAnimationFrame the default.

Original issue reported on code.google.com by jpywt...@gmail.com on 11 May 2011 at 1:00

GoogleCodeExporter commented 8 years ago
Performed the change and now requestAnimationFrame support is happy on OS X in 
Chrome 11.

Original comment by jpywt...@gmail.com on 11 May 2011 at 1:08

GoogleCodeExporter commented 8 years ago
Marking verified to denote this issue was part of 1.3.1 release.

Original comment by erik.kit...@gmail.com on 13 May 2011 at 5:34