While dealing with heavy models, I am experimenting with displaying the loading percentage dynamically when loading JSON data. I conducted a basic test using the loadAjaxJSON method...
The loading process shows the percentage completion, but it never reaches the callback function.
I'm unsure if this issue is caused by a missing declaration, incorrect context parameters, or something else entirely. Unfortunately, I couldn't find any relevant documentation on this matter.
var loader = new THREE.JSONLoader( true );
loader.loadAjaxJSON(
document, // < context ??
'try.js',
function ( geometry, materials ) { CreateScene( geometry, materials ); },
false, // < texturePath
function( progress, result ) { console.log((progress.loaded / progress.total * 100).toFixed());}
)
Console :
7 13 20 .. 100
TypeError: a.parse is not a function [three.min.js (ligne 204)]