GLTF Object loading but not showing up

I’m using three.js and have the scene and everything set up but when I try to load a 3d object (.gltf from here sketchfab 3d object). But the object seems to load fully and then doesn’t show up for some reason. The file is being imported correctly.

import laptop from './laptop/scene.gltf'

var objloader = new GLTFLoader();				
	objloader.load(laptop, function (gltf) {
		gltf.scene.scale.set(2, 2, 2);
		gltf.scene.position.set(220, 10, 400)

		scene.add(gltf.scene);
	});	 

This error is showing up in the console which doesn’t make sense because it should be placed correctly.

RangeError: attempting to construct out-of-bounds TypedArray on ArrayBuffer

If you tried to load this auto-converted gltf:

it seems to be corrupted and invalid (tested in gltf-viewer). Download the original .fbx model and convert it manually in Blender or similar software.

/cc

I could load the glTF export without issues in the three.js editor.

Yes I’m not sure why it is not loading in my project. I am using three.js version 121. Imported the GLTFLoader from one of the jsm examples… I couldn’t find any GLTFLoader outside of the examples though. I installed three into the project using npm

Try this one: laptop.glb (573.6 KB) :thinking:

GLB works. Thank you. I’m guessing React isn’t taking the textures and binary file included