elm-webgl icon indicating copy to clipboard operation
elm-webgl copied to clipboard

Texture loading does not work, causes runtime error "fun(...) is not a function"

Open faithanalog opened this issue 9 years ago • 2 comments

loadTextureWithFilter is defined in WebGL.elm as

loadTextureWithFilter filter url = Native.WebGL.loadTextureRaw Linear url

However, Native.WebGL.loadTextureRaw only takes one argument, that being the URL. Since elm tries to apply the return value of Native.WebGL.loadTextureRaw, which isn't a function, to Linear, this results in a JS type error at runtime, displaying "fun(...) is not a function" on screen (in firefox anyhow).

Semi-relatedly, it appears that Native.WebGL.loadTexture is no longer used anywhere.

faithanalog avatar Oct 28 '15 22:10 faithanalog

Seems like this is a dupliacte of #36 actually

faithanalog avatar Oct 28 '15 22:10 faithanalog

Re-opening since it's not actually fixed yet, so seems like a good idea.

faithanalog avatar Oct 28 '15 22:10 faithanalog