type t
Type of sprites
type t
val create : texture:Texture.Texture2D.t -> ?subrect:OgamlMath.IntRect.t -> ?origin:OgamlMath.Vector2f.t -> ?position:OgamlMath.Vector2f.t -> ?scale:OgamlMath.Vector2f.t -> ?color:Color.t -> ?size:OgamlMath.Vector2f.t -> ?rotation:float -> unit -> t
val draw : (module RenderTarget.T with type t = 'a) -> ?parameters:DrawParameter.t -> target:'a -> sprite:t -> unit -> unit
parameters
defaults to DrawParameter.make ~depth_test:false ~blend_mode:DrawParameter.BlendMode.alpha
val set_position : t -> OgamlMath.Vector2f.t -> unit
val set_origin : t -> OgamlMath.Vector2f.t -> unit
val set_rotation : t -> float -> unit
val set_scale : t -> OgamlMath.Vector2f.t -> unit
val set_size : t -> OgamlMath.Vector2f.t -> unit
val set_color : t -> Color.t -> unit
val translate : t -> OgamlMath.Vector2f.t -> unit
val rotate : t -> float -> unit
val scale : t -> OgamlMath.Vector2f.t -> unit
val size : t -> OgamlMath.Vector2f.t
val position : t -> OgamlMath.Vector2f.t
val origin : t -> OgamlMath.Vector2f.t
val rotation : t -> float
val color : t -> Color.t
val get_scale : t -> OgamlMath.Vector2f.t
val to_source : t -> VertexArray.SimpleVertex.T.s VertexArray.VertexSource.t -> unit
val map_to_source : t -> (VertexArray.SimpleVertex.T.s VertexArray.Vertex.t -> 'b VertexArray.Vertex.t) -> 'b VertexArray.VertexSource.t -> unit
to_source
for more information.