<script type="module">
import { GLTFLoader } from 'GLTFLoader';
import * as THREE from 'three';
const scene = new THREE.Scene();
const loader = new GLTFLoader();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0,0,500);
camera.lookAt(scene.position);
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
//loader.load('model/shiba/shiba.glb', function (gltf) { // 2 Mb model visible
loader.load('model/hull/Outfitting.glb', function (gltf) { // 102 Mb model not loading, no error
scene.add(gltf.scene);
animate();
}, undefined, function (error) {
console.error('An error happened', error);
});
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
}
</script>
Hello, I have a question about gltfLoader. Is there any special process I need to follow when loading a large glb file? Smaller glb files load fine, but a 102MB glb file is not loading.
However, when I upload the 102MB glb file to this site: https://gltf-viewer.donmccurdy.com/, it works perfectly fine. Could you let me know if there’s something I might be missing? Thank you very much.