tim-speed / openmap-gta

Old styled GTA game using open map data
13 stars 1 forks source link

Unresponsive Script when Building Scene #14

Closed Glavin001 closed 11 years ago

Glavin001 commented 11 years ago

Three.js is becoming seemingly unresponsive on start up because of the loading of the scene:

A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete. Script: https://raw.github.com/mrdoob/three.js/master/build/three.js:22263

Possible fixes would be splitting up the chronological and long scene-building task into many parallel tasks using Parallel.js, etc.

Glavin001 commented 11 years ago

May switch to threedlibrary: https://code.google.com/p/threedlibrary/

TDL is a low-level library for WebGL apps. It currently focuses on speed of rendering rather than ease of use.

See this demo: http://webglsamples.googlecode.com/hg/google-io/2011/lots-of-objects-google.html And many others: https://code.google.com/p/webglsamples/

Glavin001 commented 11 years ago

Using Three.js: http://alteredqualia.com/three/examples/webgl_city.html http://alteredqualia.com/three/examples/webgl_road.html If we can look hard at the webgl_city and webgl_read code I think we can definitely use Three.js and be fast enough.

Glavin001 commented 11 years ago

If only I read this earlier.. http://learningthreejs.com/blog/2011/10/05/performance-merging-geometry/ Great to know I am doing it right, though! :+1: