Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
codeavenger

Building Game - Entire browser freezes on third firing of requestanimation frame

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

This may have nothing to do with GSAP as I have both a jquery library and a pathfinding ai library, but I'm not getting any errors, and the coords spit out by my ai seem fine.  After the third click on the screen the entire window (chrome) has to be closed and reloaded.  Any ideas?  I really want to have my basic movement down so I can actually get to building my game :)

 

http://jsfiddle.net/ccarterc1984/BfpF2/

 

Link to comment
Share on other sites

How strange... I can only get it to happen when clicking right in the upper left corner - clicking further out hasn't seemed to break it as much (although some javascript errors are thrown).

 

This issue definitely seems to be coming out of the pathfinding though - if you pause javascript execution in the inspector you should see an endless loop happening in the _siftup function.

 

You could probably raise this with the creator to see if they have a solution for you.

  • Like 1
Link to comment
Share on other sites

Yep, it's not related to GSAP - if I remove all the GSAP code from your jsfiddle, it still hangs the browser. Like Jamie said, it certainly looks like a problem in the pathfinding logic. 

Link to comment
Share on other sites

Thanks for helping diagnose this. My inspector info window only shows two types of events happening and they are generic animation ones. Weird. Well cheers to you for finding the sift func.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×