elm-webgl
elm-webgl copied to clipboard
Fix texture filtering
Loading textures was broken. I fixed it by removing loadTextureRaw
and actually using the TextureFilter
type, which was there, but wasn't used anywhere. Now it is. Also the thwomp.elm
example is fixed.
You can now run elm-reactor
in your working copy of elm-webgl
and have the thwomp.elm
example working.
Haven't looked closely, but the idea is that the texture function should have a sensible default rather than it always be required (beginner friendly don't have to think about filters). So I don't like the removal of that. What do you think?
Well, it was broken in the first place, it wasn't even working because you were calling the native function with 2 args, while it was only taking one. I don't have an opinion on the sensible default, I guess it's ok, and that's why there is loadTexture
function. For the rest, there is loadTextureWithFilter
, right? So I didn't really remove that sensible default.
This seems correct, internally more idiomatic, and externally preserves sensible defaults.
Any chance of having this merged?
Any word on merging this in? I've hit this error as well, and it'd be nice to use textures in my game.