Use the gif loader module instead of the addon.

This commit is contained in:
Relintai 2022-12-10 19:26:07 +01:00
parent 6c5db5de22
commit 2e8459268d

View File

@ -1,15 +1,9 @@
extends TextureRect
func load_gif(path : String) -> bool:
var reader = GifReader.new()
reader.filter = false
reader.mipmaps = false
var tex : AnimatedTexture = reader.read(path)
if tex == null:
return false
texture = tex
var loader : GIFLoader = GIFLoader.new()
loader.load_gif(path)
texture = loader.create_texture()
return true