MemR/game/sort/GifLoader.gd

16 lines
251 B
GDScript3
Raw Normal View History

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
return true