three.js: TypeError: Window.createImageBitmap: 2 is not a valid argument count for any overload.

Sometimes I get this error.

Steps to reproduce the behavior:

  1. Load a gltf model with r124, Idk
  2. Look into browser console
  3. See error

Code

let manager = new THREE.LoadingManager, loader = new GLTFLoader( manager );
...
loader.load( config.path, function( result ) {
// nothing special here

Live example

n/a

Expected behavior

The error never happens

Screenshots

gltfloader stack

gltfloader code

Platform:

  • Device: Desktop
  • OS: Windows 10
  • Browser: Firefox
  • Three.js version: r124

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

FWIW, I have submitted patches to FF to add options support for createImageBitmap. Pending review on latest revision at the moment.

It’s targeted for Firefox 93 due in early October unless it hits problems.

The createImageBitmap patches have now landed in Firefox nightly and the flipY and premulitplyAlpha options are supported. The resize and colorSpaceConversion options aren’t supported yet.

The gl.pixelStorei gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL and gl.UNPACK_FLIP_Y_WEBGL parameters are ignored as per latest spec.

I was using the latest version of GLTFLoader and, inexplicably, a three.js app that was working fine previously on firefox 87.0 hit a snag with this error. I had to force the loader to use THREE.TextureLoader to get everything working again.

a ha @Mugen87 that makes sense now. since FF fakes user agent and pretends to be an iPhone, this fails