# How to load the raw data of GLB

**URL:** <https://discourse.threejs.org/t/how-to-load-the-raw-data-of-glb/40987>\
**Category:** Questions\
**Tags:** gltf-loader\
**Created:** [August 3, 2022, 1:55am UTC](https://discourse.threejs.org/t/how-to-load-the-raw-data-of-glb/40987 "2022-08-03T01:55:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenjiro](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kenjiro/32/28506_2.png) [@kenjiro](https://discourse.threejs.org/u/kenjiro)\
**Post date:** [August 3, 2022, 1:55am UTC](https://discourse.threejs.org/t/how-to-load-the-raw-data-of-glb/40987/1 "2022-08-03T01:55:25Z")

</div>

I want to add a byte array (Uint8Array) of GLB files to a scene.  
I have tried the code below, but it does not work, am I using GLTFLoader incorrectly?  
It appears that neither the onLoad nor onError callback functions are being called.

```javascript
                const loader = new GLTFLoader();
                loader.parse(bytes, "",
                    (gltf) => {
                        const model = gltf.scene;
                        scene.add(model);

                        var bbox = new THREE.Box3().setFromObject(scene);
                        var center = bbox.clone().min.add(bbox.max).divideScalar(2.0);
                        console.log(center);
                    },
                    (error) => {
                        console.log(error);
                    }
                );

```

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [August 3, 2022, 7:27am UTC](https://discourse.threejs.org/t/how-to-load-the-raw-data-of-glb/40987/2 "2022-08-03T07:27:37Z")

</div>

Instead of using `bytes`, try it with `bytes.buffer`.

---

<div class="post-metadata">

**Author:** ![kenjiro](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kenjiro/32/28506_2.png) [@kenjiro](https://discourse.threejs.org/u/kenjiro)\
**Post date:** [August 3, 2022, 7:49am UTC](https://discourse.threejs.org/t/how-to-load-the-raw-data-of-glb/40987/3 "2022-08-03T07:49:07Z")

</div>

Thank you. It resoleved.
