I encountered an issue while using GLTF2LOADER where it was unable to load a model larger than 20MB, causing Chrome to crash. However, the same model loaded perfectly in Mozilla without any problems when using GLTFLOADER.js. I'm puzzled by this discrepancy and trying to figure out why it's happening, especially considering there are significant differences between GLTF2LOADER and GLTFloader.js. As someone new to this field, it's been quite a learning experience.
renderer = new THREE.WebGLRenderer({
precision: 'mediump'
});
renderer.setClearColor(0xD8D8D8);
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
var loader = new THREE.GLTF2Loader();
loader.load(url, function(model) {
var object = model.scene;
model.animations;
object.scale.set(20, 20, 20);
scene.add(object);
orbitControls = new THREE.OrbitControls(camera, renderer.domElement);
});