# .glb import ZIMjs javascript solution to see the texture , why so difficult?

**URL:** <https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352>\
**Category:** Discussion\
**Created:** [November 29, 2025, 9:38pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352 "2025-11-29T21:38:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karel\_Rosseel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/karel_rosseel/32/35297_2.png) [@Karel\_Rosseel](https://discourse.threejs.org/u/Karel_Rosseel)\
**Post date:** [November 29, 2025, 9:38pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/1 "2025-11-29T21:38:19Z")

</div>

I like threejs to import gltf into new GKTFloader(“url”)

more info into example [&nbsp;ZIM with three.js&nbsp;](https://zimjs.com/three)

but when using an .glb I can’t see the color texture appeari g.

so from this video [https://youtu.be/017kfUTcAPE?si=ah4ugh3BVhNzGfhb](https://youtu.be/017kfUTcAPE?si=ah4ugh3BVhNzGfhb)

and video

realPlayerMe character maker you can extract .glb

see video

but many people have problem with that [Issues with Model textures not displaying in Three.js – Material Conversion Problem?](https://discourse.threejs.org/t/issues-with-model-textures-not-displaying-in-three-js-material-conversion-problem/78733)

so solution seems to script and turn 180degree and flip the file to be able to see it in a html5 canvas

see the discussion at [Issues with Model textures not displaying in Three.js – Material Conversion Problem?](https://discourse.threejs.org/t/issues-with-model-textures-not-displaying-in-three-js-material-conversion-problem/78733)

thanks to make a .glb directly visible onto the html5 canvas

click/scan the qr-code to see fullscreen app [ZAPP: person3D fix+head turns up/down+left/right sliders + you move cam(ml5) | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/E_H3A5W)

or this with small body [ZAPP: threejs person with hat: now canlook to the moving the cursor (.glb) | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/E_QD7R3)

idea from [https://youtube.com/shorts/9GGaOP8ooOA?si=b\_feM-OePiNFsmAQ](https://youtube.com/shorts/9GGaOP8ooOA?si=b_feM-OePiNFsmAQ)

and [https://youtu.be/017kfUTcAPE?si=ah4ugh3BVhNzGfhb](https://youtu.be/017kfUTcAPE?si=ah4ugh3BVhNzGfhb)

check also discussion [Loading GLB models with texture. Can't see the texture in the scene! - #5 by shanky](https://discourse.threejs.org/t/loading-glb-models-with-texture-cant-see-the-texture-in-the-scene/47480/5)

---

<div class="post-metadata">

**Author:** ![Karel\_Rosseel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/karel_rosseel/32/35297_2.png) [@Karel\_Rosseel](https://discourse.threejs.org/u/Karel_Rosseel)\
**Post date:** [November 29, 2025, 10:17pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/2 "2025-11-29T22:17:11Z")

</div>

check also how bones can turn into the threejs editor [https://youtu.be/P7Lley9BjGA?si=LSXNWDzbhlgwXOdN](https://youtu.be/P7Lley9BjGA?si=LSXNWDzbhlgwXOdN)

from article [Animating Models Programmatically in Three.js - Wael Yasmina](https://waelyasmina.net/articles/animating-models-programmatically-in-three-js/)

so the idea of turning the head following the cursor at [How to Make a Model's Head Follow the Cursor in Three.js - Wael Yasmina](https://waelyasmina.net/articles/how-to-make-a-models-head-follow-the-cursor-in-three-js/)

with video I remade it in [ZIM Editor - JavaScript Canvas Online Code Editor and Viewer](http://ZIMjs.org/editor)

---

<div class="post-metadata">

**Author:** ![Karel\_Rosseel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/karel_rosseel/32/35297_2.png) [@Karel\_Rosseel](https://discourse.threejs.org/u/Karel_Rosseel)\
**Post date:** [November 29, 2025, 10:18pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/3 "2025-11-29T22:18:43Z")

</div>

many have problem with gltf without color texture [Loading GLB models with texture. Can't see the texture in the scene! - #5 by shanky](https://discourse.threejs.org/t/loading-glb-models-with-texture-cant-see-the-texture-in-the-scene/47480/5)

and this topic [In scene.gltf file "images" for textures won't load in the browser using GLFLoader](https://discourse.threejs.org/t/in-scene-gltf-file-images-for-textures-wont-load-in-the-browser-using-glfloader/30859)

and [Blender Exported .glb model not loading with texture](https://discourse.threejs.org/t/blender-exported-glb-model-not-loading-with-texture/17397)

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [November 29, 2025, 11:35pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/4 "2025-11-29T23:35:06Z")

</div>

Different file formats and engines have different conventions for UV coordinates. In glTF files, the UV coordinates are defined such that:

> …the texture coordinate value of `(0.0, 0.0)` points to the beginning of the first (upper-left) image pixel, while the texture coordinate value of `(1.0, 1.0)` points to the end of the last (lower-right) image pixel.

In three.js this would imply that your THREE.Texture should be configured with the `texture.flipY = false` setting, the default is `true`. Other 3D model formats may have other conventions, or none specified. GLTFLoader handles this automatically if the texture is referenced by the .gltf/.glb file, but when manually adding a texture to a mesh from a glTF file, you’ll need to set `.flipY=false` yourself. Whether ZIMjs has any additional requirements, I’m not sure.

An alternative to `texture.flipY` would be to flip the texture coordinates on the geometry after loading, instead. If you prefer that approach, see:

> <https://github.com/mrdoob/three.js/blob/2a11e57726cd93bf1a7ef03982849dc2c6680dbb/examples/webgpu_loader_texture_ktx2.html#L236-L250>

---

<div class="post-metadata">

**Author:** ![Karel\_Rosseel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/karel_rosseel/32/35297_2.png) [@Karel\_Rosseel](https://discourse.threejs.org/u/Karel_Rosseel)\
**Post date:** [November 30, 2025, 7:33pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/5 "2025-11-30T19:33:26Z")

</div>

thanks to answer, but can you try the fox from [https://app.mesh2motion.org/](https://app.mesh2motion.org/)

so when I import it whithout texture in [&nbsp;ZIM with three.js&nbsp;](https://zimjs.org/three) I see no texture you can see a white fox here [ZAPP: robotFOXGame:ML5 jump above boxes, catch 10 coins (wood+green) | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/E_HWW53)

so I fixed it into this now zim app [ZAPP: FOXgame: catch coins, jump over red boxes (key+touch+cam=ML5)nospeed | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/E_7NYQ3)

click the qr-code to open fullscreen

Note: I made it also with the threejs robot [https://threejs.org/examples/](https://threejs.org/examples/#webgl_animation_skinning_morph)#webgl\_animation\_skinning\_morph where there was no texture problem because it is colored?

[ZAPP: robot yellow game: jump above red boxes, catch the 10 coins (wood+green) | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/E_38T73)

the second app with the robot has also a sky [ZAPP: robotYellow fullGAME: MOVE=show 1\<fingers\>4 + 5 fingers=JUMP (ml5cam) | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/E_ZTSGQ)

what do you think why the textures are not imported of the fox.glb and others in ZIMjs?

(note: idea of the game came from **[https://youtu.be/gi5sFJbjR6o](https://youtu.be/gi5sFJbjR6o "Link delen") where you need to move before the cam)**

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [November 30, 2025, 7:51pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/6 "2025-11-30T19:51:58Z")

</div>

Lots of links there – sorry, that’s more than I’m going to click through! If you want to create one [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) with a model and a texture not working as expected, I could try looking at that. If the issue is _only_ happening in ZIM apps, it might be worth asking on the ZIM forums as well. I don’t have experience with ZIM myself.

---

<div class="post-metadata">

**Author:** ![Karel\_Rosseel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/karel_rosseel/32/35297_2.png) [@Karel\_Rosseel](https://discourse.threejs.org/u/Karel_Rosseel)\
**Post date:** [November 30, 2025, 8:07pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/7 "2025-11-30T20:07:04Z")

</div>

this is simple sample [ZAPP: Robot yellow VR/XR +HUD:walk/sit/wave.. expressions=eyebrow MENU on/off - Copy | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/full/E_34GH4) with the robot that works in ZIM to animate (in blue sky sphere [ZAPP: Robot yellow VR/XR +HUD:walk/sit/wave.. expressions=eyebrow TITLE on/off | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/full/E_MXPGB) )

---

<div class="post-metadata">

**Author:** ![Karel\_Rosseel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/karel_rosseel/32/35297_2.png) [@Karel\_Rosseel](https://discourse.threejs.org/u/Karel_Rosseel)\
**Post date:** [November 30, 2025, 9:05pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/8 "2025-11-30T21:05:50Z")

</div>

you can see how it is with the fox with no texture when doing it what I supposed threeJS could bring the textures inside [ZAPP: Robot FOX white VR/XR +HUD:run/sit/jump.. expressions=eyebrow (bg=blue) | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/full/E_CH29S)

so I changed the code so into this app the fox has texture [ZAPP: Robot FOX brown VR/XR +HUD:run/sit/jump.. expressions=eyebrow (bg=blue) - Copy | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/full/E_BCE42)

| |
| --- |
| |

 ![Screenshot 2025-11-30 22.06.33](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/1/0/1088a3d3b77f9bcbfca582c77e2150dda5e02e28.png)

| |
| --- |
| |

but it should be directly visible ofcourse

 ![Screenshot 2025-11-30 22.20.17](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/a/d/ad4c458cf130eaf4d3ac262d66decce9cd1e0d9e.jpeg)

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [December 2, 2025, 2:30am UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/9 "2025-12-02T02:30:34Z")

</div>

Setting a breakpoint in the GLTFLoader source of the ZIM app, we see this error in the console:

> THREE.GLTFLoader: Couldn’t load texture  
> TypeError: Failed to execute ‘createObjectURL’ on ‘URL’: Overload resolution failed.

Adding a breakpoint near the source of that error, execution fails on the following lines:

```javascript
// Load binary image data from bufferView, if provided.

sourceURI = parser.getDependency( 'bufferView', sourceDef.bufferView ).then( function ( bufferView ) {

	isObjectURL = true;
	const blob = new Blob( [bufferView], { type: sourceDef.mimeType } );
	sourceURI = URL.createObjectURL( blob ); // ‼️
	return sourceURI;

} );

```

It looks like the ZIM environment has replaced the global `Blob` class with something else. Typing `Blob` in the console and you’ll see that it prints a different constructor than the usual `[native code]` result you’d get on other websites. So, it looks like this is a bug with the ZIM environment and would need to be reported there.

One option to work around the issue might be to use `.gltf` files with external textures, rather than `.glb` files with embedded textures, but normally in three.js that would not be needed.

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [December 2, 2025, 6:14am UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/10 "2025-12-02T06:14:11Z")

</div>

Could try pinging: @danzen 🙂

---

<div class="post-metadata">

**Author:** ![Karel\_Rosseel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/karel_rosseel/32/35297_2.png) [@Karel\_Rosseel](https://discourse.threejs.org/u/Karel_Rosseel)\
**Post date:** [December 2, 2025, 9:13am UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/11 "2025-12-02T09:13:16Z")

</div>

it works perfectly with .gltf files, so that is why is wondering if it was a ThreeJS problem or ZIMjs problem, @danzen told it was a ThreeJS problem.. ok so thanks for your answers. I’ll check it out.

check example with external loaded textures [ZAPP: threejs person with hat: now canlook to the moving the cursor (.glb) | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/full/E_QD7R3)  
and threejs gltf import, not working to turn the head by the cursor at [ZAPP: threejs person: now can follow the head when moving the cursor (.gltf)NOTWORKS | ZIM JavaScript Canvas Framework](https://zimjs.com/zapp/full/E_DFHE5)

but it seems because there are multiple textures it gives the error in ZIM

---

<div class="post-metadata">

**Author:** ![danzen](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/danzen/32/39322_2.png) [@danzen](https://discourse.threejs.org/u/danzen)\
**Post date:** [December 2, 2025, 7:34pm UTC](https://discourse.threejs.org/t/glb-import-zimjs-javascript-solution-to-see-the-texture-why-so-difficult/88352/12 "2025-12-02T19:34:56Z")

</div>

Oh… if it is a Blob issue… add:

```javascript
Blob = document.Blob;

```

at the start of the ready event before bringing in the three.js model.

If you then need a ZIM Blob too use zim.Blob.

We had made and used a ZIM Blob for a few years before we realized that JS had a Blob too. So the solution above should work. You can also set zns=true in a JS script before importing ZIM to force the zim namespace and then if you want globals use zimplify(“Blob”); which will exclude Blob from globals.
