Three.js: ReferenceError: 'ImageBitmap' is not defined

Created on 17 Apr 2019  路  4Comments  路  Source: mrdoob/three.js

Texture not shown in EDGE Browser and Safari (ios)
Browser
  • [ ] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [x] Internet Explorer (Edge)
OS
  • [ ] All of them
  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [x] iOS

In my Web Application users can upload a png-file. Then i want to set this image as Texture in my scene. It works fine on Chrome, FF and on Android. But Edge says ERROR ReferenceError: 'ImageBitmap' is not defined. And on ios Nothing happens.

const loader = new THREE.TextureLoader(); if ( image === undefined ) { console.log( 'Texture is not valid!' ); } loader.load(image, (texture) => { const material = new THREE.MeshPhongMaterial({ map: texture, });
By removing the material the Object will be shown without the texture and without errors.

Most helpful comment

I assume the OP does not use the latest version of three.js. Please try it with R103.

All 4 comments

Can you create jsfiddle that shows the issue?

I assume the OP does not use the latest version of three.js. Please try it with R103.

Closing for now.

This is definitely still a thing. I'll work on a jsfiddle later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bandit picture Bandit  路  3Comments

filharvey picture filharvey  路  3Comments

jack-jun picture jack-jun  路  3Comments

zsitro picture zsitro  路  3Comments

jlaquinte picture jlaquinte  路  3Comments