Sprite.animateTwo main services create animations:
new Animation(array_of_subtextures, 10.0)Texture::to_animation uses the whole texture
dividing it in frames either on X or Y:
new Texture("path/in/assets.png").to_animation(30.0, 0, 12)core :: Object :: class_factory
Implementation used byget_class to create the specific class.
			gamnit :: Animation :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself and other are the same instance (i.e. same identity).
			core :: Object :: is_same_serialized
Isself the same as other in a serialization context?
			core :: Object :: is_same_type
Return true ifself and other have the same dynamic type.
			core :: Object :: output_class_name
Display class name on stdout (debug only).
# Animation for sprites, set with `Sprite.animate`
#
# Two main services create animations:
# * The constructors accepts an array of textures and the number of frames per
#   seconds: `new Animation(array_of_subtextures, 10.0)`
# * The method `Texture::to_animation` uses the whole texture
#   dividing it in frames either on X or Y:
#   `new Texture("path/in/assets.png").to_animation(30.0, 0, 12)`
class Animation
	# Frames composing this animation
	#
	# All frames must share the same `Texture::root`, be on a vertical or
	# horizontal line, be spaced equally and share the same dimensions.
	var frames: SequenceRead[Texture]
	# Frames per seconds, a higher value makes this animation faster
	#
	# The animation speed is also affected by `SpriteSet::time_mod`.
	var fps: Float
	# Are the `frames` valid for an animation? (see the requirements in `frames`)
	var valid: Bool is lazy do
		var r: nullable RootTexture = null
		for f in frames do
			if r == null then
				r = f.root
			else
				if r != f.root then return false
			end
		end
		# TODO check for line, constant distance, and same aspect ratio.
		return true
	end
end
					lib/gamnit/flat/flat_core.nit:321,1--357,3