Home
main
App
default
init
FramePacing
CursorMode
Config
InitCallback
Init
Assets
load_texture!
generate_color_texture!
generate_checked_texture!
update_texture!
Texture
load!
generate_color!
generate_checked!
view
width
height
size
rect
update!
set_filter!
set_wrap!
TextureView
width
height
size
rect
set_filter!
set_wrap!
TextureFilter
TextureWrap
GenerateColorTexture
GenerateCheckedTexture
Audio
load_sound!
load_music!
gen_sound!
gen_tone!
set_master_volume!
Sound
play!
stop!
pause!
resume!
is_playing!
set_volume!
set_pitch!
set_pan!
Music
play!
stop!
pause!
resume!
set_volume!
set_pitch!
set_pan!
set_looping!
is_playing!
seek!
length!
time_played!
Waveform
GenSound
Camera
default
new
centered
follow
Settings
Camera2D
target
offset
rotation
zoom
with_target
with_offset
with_rotation
with_zoom
clamp_zoom
world_to_screen
screen_to_world
viewport
Color
rgba
rgb
with_alpha
from_hex_rgb
from_hex_rgba
transparent
black
blue
dark_gray
gray
green
light_gray
orange
pink
purple
ray_white
red
white
yellow
is_eq
Draw
from_rgba
alpha_blend
additive_blend
multiplied_blend
add_colors_blend
subtract_colors_blend
premultiplied_alpha_blend
filled
stroke
outlined
filled_and_outlined
default_font
default_spacing
align_top_left
align_top_center
align_top_right
align_center
align_middle_left
align_middle_right
align_bottom_left
align_bottom_center
align_bottom_right
align_offset
origin_for
align_factor
center_in_rect
clear!
rectangle_gradient_v!
rectangle_gradient_h!
circle_gradient!
fps!
rectangle!
rounded_rectangle!
circle!
line!
triangle!
polygon!
convex_polygon!
measure_text!
load_font!
texture_draw
texture_at
texture_view_draw
texture_view_at
texture!
draw_texture!
projective_texture!
projective_texture_view!
load_render_texture!
render_texture
render_texture_source
load_shader!
load_shader_source!
with_render_texture!
with_shader!
with_blend_mode!
with_camera!
with_mode_2d!
with_scissor!
text!
debug_text!
text_at!
text_centered!
Frame
from_host
Vector2
Rect
Camera2D
Fill
Stroke
ShapeStyle
Rectangle
RoundedRectangle
RectangleGradientV
RectangleGradientH
Circle
CircleGradient
Line
Triangle
ConvexPolygon
Polygon
Fps
Font
HAlign
VAlign
TextAlign
TextSize
Text
DebugText
SimpleText
MeasureText
LoadFont
TextureDraw
ProjectiveQuadCorners
ProjectiveQuad
from_corners
project
ProjectiveTexture
ProjectiveTextureView
CameraMode
RenderTexture
load!
texture
source
RenderTextureSize
Shader
load!
from_source!
uniform_f32!
uniform_i32!
uniform_vec2!
uniform_vec3!
uniform_vec4!
uniform_color!
uniform_texture!
LoadShader
LoadShaderSource
F32Uniform
set!
I32Uniform
set!
Vec2Uniform
set!
Vec3Uniform
set!
Vec4Uniform
set!
ColorUniform
set!
TextureUniform
set!
set_texture!
Vec3
Vec4
BlendMode
ScopeError
Gamepad
from_index
lookup
available
button_down
button_up
button_pressed
button_released
axis
left_stick
right_stick
Snapshot
GamepadId
Button
Axis
ConnectedPad
id
button_down
button_up
button_pressed
button_released
axis
left_stick
right_stick
Host
key_down
key_up
key_pressed
key_released
gamepad
exit!
read_env!
read_file!
random_i32!
set_screen_size!
set_target_fps!
set_cursor_mode!
set_cursor!
CursorMode
Keys
from_code
key_code
key_down
key_up
key_pressed
key_released
KeyboardKey
Math
vec2
zero
rect
circle
clamp
clamp01
lerp
sqrt
add
sub
scale
dot
length_squared
length
distance_squared
distance
normalize
lerp_vec2
left
right
top
bottom
center
closest_point
contains
circle_contains
overlaps
circle_overlaps
circle_rect
contains_point
overlaps_circle
overlaps_rect
Vec2
is_eq
Rect
is_eq
Circle
is_eq
Mouse
position
delta
wheel_delta
button_down
button_up
button_pressed
button_released
State
button_down
button_up
button_pressed
button_released
position
delta
wheel_delta
Cursor
MouseButton
Physics
point
point_xy
origin
vector
vector_xy
zero
coords
components
xy
vector_xy_components
point_coeffs
vector_coeffs
plane_coeffs
line_coeffs
motor_coeffs
add
sub
add_vec
sub_vec
scale
dot
cross
length_squared
length
normalize
reflect
distance
plane
plane_from_point_normal
signed_distance
project_point_plane
line_from_points
motor_identity
translation
translation_vector
apply_motor_point
body
apply_acceleration
integrate_body
clamp_y
Point
Vector
Plane
Line
Motor
Body
Coords
PointCoeffs
VectorCoeffs
PlaneCoeffs
LineCoeffs
MotorCoeffs
Sprite
source
pos
origin
centered
rotation
scale_xy
scale
tint
to_texture_draw
draw!
from_texture
with_source
with_pos
with_origin
with_origin_center
with_rotation
with_scale_xy
with_scale
with_tint
sheet_frame
animation
step
animation_source
Animation
Text
default_font
default_spacing
from
load_font!
measure_builder!
prepare_builder!
align_top_left
align_top_center
align_top_right
align_center
align_middle_left
align_middle_right
align_bottom_left
align_bottom_center
align_bottom_right
align_offset
origin_for
draw_prepared!
Font
HAlign
VAlign
Align
Size
LoadFont
Placement
Builder
size
spacing
font
measure!
prepare!
Prepared
bounds
draw!
Tilemap
empty_raw_map
empty
load_tmx!
from_raw
raw_map
layer_role_for
object_role_for
objects
objects_named
objects_typed
objects_with_role
first_object
object_center
object_rect
object_circle
object_world_center
object_world_rect
object_world_circle
property_named
object_property
layer_property
property_str
property_f32
property_i64
property_bool
cell_at_world
cell_range_for_world_rect
world_rect_for_cell
gid_at
solid_cell
solid_at_world
circle_touches_solid
draw_layer!
draw_layer_in!
draw_layers!
draw_layers_in!
draw_all!
draw_all_in!
viewport_for_camera
draw_all_for_camera!
flip_for_gid
clean_gid
RawMap
RawLayer
RawObject
RawProperty
RawTileset
RawPoint
Cell
CellRange
Flip
ResolvedTileset
LayerRole
DrawRole
ObjectRole
Builder
Time
to_seconds
delta_seconds
App
.
default
:
Config
App
.
init
:
Config
,
InitCallback
(
model
,
errors
)
->
Init
(
model
,
errors
)
App
.
FramePacing
:
FramePacing
App
.
CursorMode
:
CursorMode
App
.
Config
:
Config
App
.
InitCallback
:
Host
=>
Try
(
model
, [
Exit
(
I64
), ..
errors
])
App
.
Init
: { config :
Config
, run! :
InitCallback
(
model
,
errors
) }
Assets
.
load_texture!
:
Str
=>
Try
(
Texture
, [
TextureLoadFailed
,
ResourceLimit
, ..])
Assets
.
generate_color_texture!
:
GenerateColorTexture
=>
Try
(
Texture
, [
TextureGenerationFailed
,
ResourceLimit
, ..])
Assets
.
generate_checked_texture!
:
GenerateCheckedTexture
=>
Try
(
Texture
, [
TextureGenerationFailed
,
ResourceLimit
, ..])
Assets
.
update_texture!
:
Texture
,
List
(
Color
)
=>
Try
({ }, [
PixelCountMismatch
, ..])
Assets
.
Texture
Assets.Texture
.
load!
:
Str
=>
Try
(
Texture
, [
TextureLoadFailed
,
ResourceLimit
, ..])
Assets.Texture
.
generate_color!
:
GenerateColorTexture
=>
Try
(
Texture
, [
TextureGenerationFailed
,
ResourceLimit
, ..])
Assets.Texture
.
generate_checked!
:
GenerateCheckedTexture
=>
Try
(
Texture
, [
TextureGenerationFailed
,
ResourceLimit
, ..])
Assets.Texture
.
view
:
Texture
->
TextureView
Assets.Texture
.
width
:
Texture
->
F32
Assets.Texture
.
height
:
Texture
->
F32
Assets.Texture
.
size
:
Texture
->
Vec2
Assets.Texture
.
rect
:
Texture
->
Rect
Assets.Texture
.
update!
:
Texture
,
List
(
Color
)
=>
Try
({ }, [
PixelCountMismatch
, ..])
Assets.Texture
.
set_filter!
:
Texture
,
TextureFilter
=>
{ }
Assets.Texture
.
set_wrap!
:
Texture
,
TextureWrap
=>
{ }
Assets
.
TextureView
Assets.TextureView
.
width
:
TextureView
->
F32
Assets.TextureView
.
height
:
TextureView
->
F32
Assets.TextureView
.
size
:
TextureView
->
Vec2
Assets.TextureView
.
rect
:
TextureView
->
Rect
Assets.TextureView
.
set_filter!
:
TextureView
,
TextureFilter
=>
{ }
Assets.TextureView
.
set_wrap!
:
TextureView
,
TextureWrap
=>
{ }
Assets
.
TextureFilter
:= [
Point
,
Bilinear
,
Trilinear
,
Anisotropic4x
,
Anisotropic8x
,
Anisotropic16x
]
Assets
.
TextureWrap
:= [
Repeat
,
Clamp
,
MirrorRepeat
,
MirrorClamp
]
Assets
.
GenerateColorTexture
: { width :
I32
, height :
I32
, color :
Color
}
Assets
.
GenerateCheckedTexture
: { width :
I32
, height :
I32
, checks_x :
I32
, checks_y :
I32
, color_a :
Color
, color_b :
Color
}
Audio
.
load_sound!
:
Str
=>
Try
(
Sound
, [
SoundLoadFailed
,
ResourceLimit
, ..])
Audio
.
load_music!
:
Str
=>
Try
(
Music
, [
MusicLoadFailed
,
ResourceLimit
, ..])
Audio
.
gen_sound!
:
GenSound
=>
Try
(
Sound
, [
SoundGenerationFailed
,
ResourceLimit
, ..])
Audio
.
gen_tone!
: { freq :
F32
, ms :
I32
}
=>
Try
(
Sound
, [
SoundGenerationFailed
,
ResourceLimit
, ..])
Audio
.
set_master_volume!
:
F32
=>
{ }
Audio
.
Sound
Audio.Sound
.
play!
:
Sound
=>
{ }
Audio.Sound
.
stop!
:
Sound
=>
{ }
Audio.Sound
.
pause!
:
Sound
=>
{ }
Audio.Sound
.
resume!
:
Sound
=>
{ }
Audio.Sound
.
is_playing!
:
Sound
=>
Bool
Audio.Sound
.
set_volume!
:
Sound
,
F32
=>
{ }
Audio.Sound
.
set_pitch!
:
Sound
,
F32
=>
{ }
Audio.Sound
.
set_pan!
:
Sound
,
F32
=>
{ }
Audio
.
Music
Audio.Music
.
play!
:
Music
=>
{ }
Audio.Music
.
stop!
:
Music
=>
{ }
Audio.Music
.
pause!
:
Music
=>
{ }
Audio.Music
.
resume!
:
Music
=>
{ }
Audio.Music
.
set_volume!
:
Music
,
F32
=>
{ }
Audio.Music
.
set_pitch!
:
Music
,
F32
=>
{ }
Audio.Music
.
set_pan!
:
Music
,
F32
=>
{ }
Audio.Music
.
set_looping!
:
Music
,
Bool
=>
{ }
Audio.Music
.
is_playing!
:
Music
=>
Bool
Audio.Music
.
seek!
:
Music
,
F32
=>
{ }
Audio.Music
.
length!
:
Music
=>
F32
Audio.Music
.
time_played!
:
Music
=>
F32
Audio
.
Waveform
:= [
Sine
,
Square
,
Triangle
,
Saw
,
Noise
]
Audio
.
GenSound
: { waveform :
Waveform
, freq_start :
F32
, freq_end :
F32
, ms :
I32
, attack_ms :
I32
, decay_ms :
I32
, sustain :
F32
, release_ms :
I32
, volume :
F32
}
Camera
.
default
:
Camera2D
Camera
.
new
:
Settings
->
Try
(
Camera2D
, [
ZeroZoom
,
NonFiniteZoom
,
NonFiniteTarget
,
NonFiniteOffset
,
NonFiniteRotation
, ..])
Camera
.
centered
:
Vec2
,
Vec2
->
Try
(
Camera2D
, [
NonFiniteTarget
,
NonFiniteOffset
, ..])
Camera
.
follow
:
Vec2
, { screen :
Vec2
, zoom :
F32
}
->
Try
(
Camera2D
, [
ZeroZoom
,
NonFiniteZoom
,
NonFiniteTarget
,
NonFiniteOffset
, ..])
Camera
.
Settings
: { target :
Vec2
, offset :
Vec2
, rotation :
F32
, zoom :
F32
}
Camera
.
Camera2D
Camera.Camera2D
.
target
:
Camera2D
->
Vec2
Camera.Camera2D
.
offset
:
Camera2D
->
Vec2
Camera.Camera2D
.
rotation
:
Camera2D
->
F32
Camera.Camera2D
.
zoom
:
Camera2D
->
F32
Camera.Camera2D
.
with_target
:
Camera2D
,
Vec2
->
Try
(
Camera2D
, [
NonFiniteTarget
, ..])
Camera.Camera2D
.
with_offset
:
Camera2D
,
Vec2
->
Try
(
Camera2D
, [
NonFiniteOffset
, ..])
Camera.Camera2D
.
with_rotation
:
Camera2D
,
F32
->
Try
(
Camera2D
, [
NonFiniteRotation
, ..])
Camera.Camera2D
.
with_zoom
:
Camera2D
,
F32
->
Try
(
Camera2D
, [
ZeroZoom
,
NonFiniteZoom
, ..])
Camera.Camera2D
.
clamp_zoom
:
Camera2D
, { min :
F32
, max :
F32
}
->
Try
(
Camera2D
, [
ZeroZoom
,
NonFiniteZoom
, ..])
Camera.Camera2D
.
world_to_screen
:
Camera2D
,
Vec2
->
Vec2
Camera.Camera2D
.
screen_to_world
:
Camera2D
,
Vec2
->
Vec2
Camera.Camera2D
.
viewport
:
Camera2D
,
Vec2
->
Rect
Color
.
rgba
:
U8
,
U8
,
U8
,
U8
->
Color
Color
.
rgb
:
U8
,
U8
,
U8
->
Color
Color
.
with_alpha
:
Color
,
U8
->
Color
Color
.
from_hex_rgb
:
U32
->
Color
Color
.
from_hex_rgba
:
U32
->
Color
Color
.
transparent
:
Color
Color
.
black
:
Color
Color
.
blue
:
Color
Color
.
dark_gray
:
Color
Color
.
gray
:
Color
Color
.
green
:
Color
Color
.
light_gray
:
Color
Color
.
orange
:
Color
Color
.
pink
:
Color
Color
.
purple
:
Color
Color
.
ray_white
:
Color
Color
.
red
:
Color
Color
.
white
:
Color
Color
.
yellow
:
Color
Color
.
is_eq
: _
Draw
.
from_rgba
: { r :
U8
, g :
U8
, b :
U8
, a :
U8
}
->
Color
Draw
.
alpha_blend
:
BlendMode
Draw
.
additive_blend
:
BlendMode
Draw
.
multiplied_blend
:
BlendMode
Draw
.
add_colors_blend
:
BlendMode
Draw
.
subtract_colors_blend
:
BlendMode
Draw
.
premultiplied_alpha_blend
:
BlendMode
Draw
.
filled
:
Color
->
ShapeStyle
Draw
.
stroke
:
Color
,
F32
->
Stroke
Draw
.
outlined
:
Color
,
F32
->
ShapeStyle
Draw
.
filled_and_outlined
:
Color
,
Color
,
F32
->
ShapeStyle
Draw
.
default_font
:
Font
Draw
.
default_spacing
:
F32
Draw
.
align_top_left
:
TextAlign
Draw
.
align_top_center
:
TextAlign
Draw
.
align_top_right
:
TextAlign
Draw
.
align_center
:
TextAlign
Draw
.
align_middle_left
:
TextAlign
Draw
.
align_middle_right
:
TextAlign
Draw
.
align_bottom_left
:
TextAlign
Draw
.
align_bottom_center
:
TextAlign
Draw
.
align_bottom_right
:
TextAlign
Draw
.
align_offset
:
TextSize
,
TextAlign
->
Vector2
Draw
.
origin_for
:
Vector2
,
TextSize
,
TextAlign
->
Vector2
Draw
.
align_factor
:
TextAlign
->
Vector2
Draw
.
center_in_rect
:
Rectangle
,
TextSize
->
Vector2
Draw
.
clear!
:
Frame
,
Color
=>
{ }
Draw
.
rectangle_gradient_v!
:
Frame
,
RectangleGradientV
=>
{ }
Draw
.
rectangle_gradient_h!
:
Frame
,
RectangleGradientH
=>
{ }
Draw
.
circle_gradient!
:
Frame
,
CircleGradient
=>
{ }
Draw
.
fps!
:
Frame
,
Fps
=>
{ }
Draw
.
rectangle!
:
Frame
,
Rectangle
=>
{ }
Draw
.
rounded_rectangle!
:
Frame
,
RoundedRectangle
=>
{ }
Draw
.
circle!
:
Frame
,
Circle
=>
{ }
Draw
.
line!
:
Frame
,
Line
=>
{ }
Draw
.
triangle!
:
Frame
,
Triangle
=>
{ }
Draw
.
polygon!
:
Frame
,
Polygon
=>
{ }
Draw
.
convex_polygon!
:
Frame
,
ConvexPolygon
=>
{ }
Draw
.
measure_text!
:
MeasureText
=>
TextSize
Draw
.
load_font!
:
LoadFont
=>
Try
(
Font
, [
FontLoadFailed
,
ResourceLimit
, ..])
Draw
.
texture_draw
:
Texture
->
TextureDraw
Draw
.
texture_at
:
Texture
,
Vec2
->
TextureDraw
Draw
.
texture_view_draw
:
TextureView
->
TextureDraw
Draw
.
texture_view_at
:
TextureView
,
Vec2
->
TextureDraw
Draw
.
texture!
:
Frame
,
TextureDraw
=>
{ }
Draw
.
draw_texture!
:
Frame
,
TextureDraw
=>
{ }
Draw
.
projective_texture!
:
Frame
,
ProjectiveTexture
=>
{ }
Draw
.
projective_texture_view!
:
Frame
,
ProjectiveTextureView
=>
{ }
Draw
.
load_render_texture!
:
RenderTextureSize
=>
Try
(
RenderTexture
, [
RenderTextureLoadFailed
,
ResourceLimit
, ..])
Draw
.
render_texture
:
RenderTexture
->
TextureView
Draw
.
render_texture_source
:
RenderTexture
->
Rect
Draw
.
load_shader!
:
LoadShader
=>
Try
(
Shader
, [
ShaderLoadFailed
,
ResourceLimit
, ..])
Draw
.
load_shader_source!
:
LoadShaderSource
=>
Try
(
Shader
, [
ShaderLoadFailed
,
ResourceLimit
, ..])
Draw
.
with_render_texture!
:
Frame
,
RenderTexture
, (
Frame
=>
Try
(
result
, [
ScopeLimit
,
ScopeUnavailable
, ..
errors
]))
=>
Try
(
result
, [
ScopeLimit
,
ScopeUnavailable
, ..
errors
])
Draw
.
with_shader!
:
Frame
,
Shader
, (
Frame
=>
Try
(
result
, [
ScopeLimit
,
ScopeUnavailable
, ..
errors
]))
=>
Try
(
result
, [
ScopeLimit
,
ScopeUnavailable
, ..
errors
])
Draw
.
with_blend_mode!
:
Frame
,
BlendMode
, (
Frame
=>
Try
(
result
, [
ScopeLimit
, ..
errors
]))
=>
Try
(
result
, [
ScopeLimit
, ..
errors
])
Draw
.
with_camera!
:
Frame
,
CameraMode
, (
Frame
=>
Try
(
result
, [
ScopeLimit
, ..
errors
]))
=>
Try
(
result
, [
ScopeLimit
, ..
errors
])
Draw
.
with_mode_2d!
:
Frame
,
CameraMode
, (
Frame
=>
Try
(
result
, [
ScopeLimit
, ..
errors
]))
=>
Try
(
result
, [
ScopeLimit
, ..
errors
])
Draw
.
with_scissor!
:
Frame
,
Rect
, (
Frame
=>
Try
(
result
, [
ScopeLimit
, ..
errors
]))
=>
Try
(
result
, [
ScopeLimit
, ..
errors
])
Draw
.
text!
:
Frame
,
Text
=>
{ }
Draw
.
debug_text!
:
Frame
,
DebugText
=>
{ }
Draw
.
text_at!
:
Frame
,
SimpleText
=>
{ }
Draw
.
text_centered!
:
Frame
,
SimpleText
=>
{ }
Draw
.
Frame
Draw.Frame
.
from_host
:
Frame
->
Frame
Draw
.
Vector2
:
Vec2
Draw
.
Rect
:
Rect
Draw
.
Camera2D
:
Camera2D
Draw
.
Fill
: [
NoFill
,
Fill
(
Color
)]
Draw
.
Stroke
: [
NoStroke
,
Stroke
({ color :
Color
, thickness :
F32
})]
Draw
.
ShapeStyle
: { fill :
Fill
, stroke :
Stroke
}
Draw
.
Rectangle
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, style :
ShapeStyle
}
Draw
.
RoundedRectangle
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, radius :
F32
, segments :
I32
, style :
ShapeStyle
}
Draw
.
RectangleGradientV
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, color_top :
Color
, color_bottom :
Color
}
Draw
.
RectangleGradientH
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, color_left :
Color
, color_right :
Color
}
Draw
.
Circle
: { center :
Vector2
, radius :
F32
, style :
ShapeStyle
}
Draw
.
CircleGradient
: { center :
Vector2
, radius :
F32
, color_inner :
Color
, color_outer :
Color
}
Draw
.
Line
: { start :
Vector2
, end :
Vector2
, stroke :
Stroke
}
Draw
.
Triangle
: { a :
Vector2
, b :
Vector2
, c :
Vector2
, style :
ShapeStyle
}
Draw
.
ConvexPolygon
: { points :
List
(
Vector2
), style :
ShapeStyle
}
Draw
.
Polygon
:
ConvexPolygon
Draw
.
Fps
: { pos :
Vector2
, size :
F32
, color :
Color
}
Draw
.
Font
:
Font
Draw
.
HAlign
: [
Left
,
Center
,
Right
]
Draw
.
VAlign
: [
Top
,
Middle
,
Bottom
]
Draw
.
TextAlign
: { horizontal :
HAlign
, vertical :
VAlign
}
Draw
.
TextSize
: { width :
F32
, height :
F32
}
Draw
.
Text
: { pos :
Vector2
, text :
Str
, size :
F32
, spacing :
F32
, color :
Color
, font :
Font
, align :
TextAlign
}
Draw
.
DebugText
: { pos :
Vector2
, text :
Str
, size :
F32
, color :
Color
}
Draw
.
SimpleText
: { pos :
Vector2
, text :
Str
, size :
F32
, color :
Color
}
Draw
.
MeasureText
: { text :
Str
, size :
F32
, spacing :
F32
, font :
Font
}
Draw
.
LoadFont
: { path :
Str
, size :
I32
}
Draw
.
TextureDraw
:
TextureDrawConfig
Draw
.
ProjectiveQuadCorners
: { top_left :
Vec2
, bottom_left :
Vec2
, bottom_right :
Vec2
, top_right :
Vec2
}
Draw
.
ProjectiveQuad
Draw.ProjectiveQuad
.
from_corners
:
ProjectiveQuadCorners
->
Try
(
ProjectiveQuad
, [
NonFiniteQuad
,
DegenerateQuad
,
NonConvexQuad
,
ProjectiveHorizon
, ..])
Draw.ProjectiveQuad
.
project
:
ProjectiveQuad
,
Vec2
->
Vec2
Draw
.
ProjectiveTexture
: { texture :
Texture
, source :
Rect
, quad :
ProjectiveQuad
, tint :
Color
}
Draw
.
ProjectiveTextureView
: { texture :
TextureView
, source :
Rect
, quad :
ProjectiveQuad
, tint :
Color
}
Draw
.
CameraMode
:
Camera2D
Draw
.
RenderTexture
Draw.RenderTexture
.
load!
:
RenderTextureSize
=>
Try
(
RenderTexture
, [
RenderTextureLoadFailed
,
ResourceLimit
, ..])
Draw.RenderTexture
.
texture
:
RenderTexture
->
TextureView
Draw.RenderTexture
.
source
:
RenderTexture
->
Rect
Draw
.
RenderTextureSize
: { width :
I32
, height :
I32
}
Draw
.
Shader
Draw.Shader
.
load!
:
LoadShader
=>
Try
(
Shader
, [
ShaderLoadFailed
,
ResourceLimit
, ..])
Draw.Shader
.
from_source!
:
LoadShaderSource
=>
Try
(
Shader
, [
ShaderLoadFailed
,
ResourceLimit
, ..])
Draw.Shader
.
uniform_f32!
:
Shader
,
Str
=>
Try
(
F32Uniform
, [
UniformNotFound
, ..])
Draw.Shader
.
uniform_i32!
:
Shader
,
Str
=>
Try
(
I32Uniform
, [
UniformNotFound
, ..])
Draw.Shader
.
uniform_vec2!
:
Shader
,
Str
=>
Try
(
Vec2Uniform
, [
UniformNotFound
, ..])
Draw.Shader
.
uniform_vec3!
:
Shader
,
Str
=>
Try
(
Vec3Uniform
, [
UniformNotFound
, ..])
Draw.Shader
.
uniform_vec4!
:
Shader
,
Str
=>
Try
(
Vec4Uniform
, [
UniformNotFound
, ..])
Draw.Shader
.
uniform_color!
:
Shader
,
Str
=>
Try
(
ColorUniform
, [
UniformNotFound
, ..])
Draw.Shader
.
uniform_texture!
:
Shader
,
Str
=>
Try
(
TextureUniform
, [
UniformNotFound
, ..])
Draw
.
LoadShader
: { vertex_path :
Str
, fragment_path :
Str
}
Draw
.
LoadShaderSource
: { vertex_source :
Str
, fragment_source :
Str
}
Draw
.
F32Uniform
Draw.F32Uniform
.
set!
:
F32Uniform
,
F32
=>
{ }
Draw
.
I32Uniform
Draw.I32Uniform
.
set!
:
I32Uniform
,
I32
=>
{ }
Draw
.
Vec2Uniform
Draw.Vec2Uniform
.
set!
:
Vec2Uniform
,
Vector2
=>
{ }
Draw
.
Vec3Uniform
Draw.Vec3Uniform
.
set!
:
Vec3Uniform
,
Vec3
=>
{ }
Draw
.
Vec4Uniform
Draw.Vec4Uniform
.
set!
:
Vec4Uniform
,
Vec4
=>
{ }
Draw
.
ColorUniform
Draw.ColorUniform
.
set!
:
ColorUniform
,
Color
=>
{ }
Draw
.
TextureUniform
Draw.TextureUniform
.
set!
:
TextureUniform
,
TextureView
=>
{ }
Draw.TextureUniform
.
set_texture!
:
TextureUniform
,
Texture
=>
{ }
Draw
.
Vec3
: { x :
F32
, y :
F32
, z :
F32
}
Draw
.
Vec4
: { x :
F32
, y :
F32
, z :
F32
, w :
F32
}
Draw
.
BlendMode
: [
Alpha
,
Additive
,
Multiplied
,
AddColors
,
SubtractColors
,
AlphaPremultiply
]
Draw
.
ScopeError
: [
ScopeLimit
,
ScopeUnavailable
]
Gamepad
.
from_index
:
U64
->
Try
(
GamepadId
, [
InvalidGamepadIndex
, ..])
Gamepad
.
lookup
:
Snapshot
,
GamepadId
->
[
Connected
(
ConnectedPad
),
Disconnected
]
Gamepad
.
available
: { ..
state
, connected :
List
(
U8
) },
GamepadId
->
Bool
Gamepad
.
button_down
: { ..
state
, buttons :
List
(
U8
) },
GamepadId
,
Button
->
Bool
Gamepad
.
button_up
: { ..
state
, buttons :
List
(
U8
) },
GamepadId
,
Button
->
Bool
Gamepad
.
button_pressed
: { ..
state
, buttons :
List
(
U8
) },
GamepadId
,
Button
->
Bool
Gamepad
.
button_released
: { ..
state
, buttons :
List
(
U8
) },
GamepadId
,
Button
->
Bool
Gamepad
.
axis
: { ..
state
, axes :
List
(
F32
) },
GamepadId
,
Axis
->
F32
Gamepad
.
left_stick
: { ..
state
, axes :
List
(
F32
) },
GamepadId
->
{ x :
F32
, y :
F32
}
Gamepad
.
right_stick
: { ..
state
, axes :
List
(
F32
) },
GamepadId
->
{ x :
F32
, y :
F32
}
Gamepad
.
Snapshot
:= { connected :
List
(
U8
), buttons :
List
(
U8
), axes :
List
(
F32
) }
Gamepad
.
GamepadId
:= [
One
,
Two
,
Three
,
Four
]
Gamepad
.
Button
:= [
Unknown
,
DpadUp
,
DpadRight
,
DpadDown
,
DpadLeft
,
FaceUp
,
FaceRight
,
FaceDown
,
FaceLeft
,
LeftBumper
,
LeftTrigger
,
RightBumper
,
RightTrigger
,
Select
,
Guide
,
Start
,
LeftStick
,
RightStick
]
Gamepad
.
Axis
:= [
LeftX
,
LeftY
,
RightX
,
RightY
,
LeftTriggerAxis
,
RightTriggerAxis
]
Gamepad
.
ConnectedPad
Gamepad.ConnectedPad
.
id
:
ConnectedPad
->
GamepadId
Gamepad.ConnectedPad
.
button_down
:
ConnectedPad
,
Button
->
Bool
Gamepad.ConnectedPad
.
button_up
:
ConnectedPad
,
Button
->
Bool
Gamepad.ConnectedPad
.
button_pressed
:
ConnectedPad
,
Button
->
Bool
Gamepad.ConnectedPad
.
button_released
:
ConnectedPad
,
Button
->
Bool
Gamepad.ConnectedPad
.
axis
:
ConnectedPad
,
Axis
->
F32
Gamepad.ConnectedPad
.
left_stick
:
ConnectedPad
->
{ x :
F32
, y :
F32
}
Gamepad.ConnectedPad
.
right_stick
:
ConnectedPad
->
{ x :
F32
, y :
F32
}
Host
.
key_down
:
Host
,
KeyboardKey
->
Bool
Host
.
key_up
:
Host
,
KeyboardKey
->
Bool
Host
.
key_pressed
:
Host
,
KeyboardKey
->
Bool
Host
.
key_released
:
Host
,
KeyboardKey
->
Bool
Host
.
gamepad
:
Host
,
GamepadId
->
[
Connected
(
ConnectedPad
),
Disconnected
]
Host
.
exit!
:
Host
,
I32
=>
{ }
Host
.
read_env!
:
Host
,
Str
=>
Try
(
Str
, [
NotFound
, ..])
Host
.
read_file!
:
Host
,
Str
=>
Try
(
Str
, [
NotFound
,
ReadFailed
, ..])
Host
.
random_i32!
:
Host
,
I32
,
I32
=>
I32
Host
.
set_screen_size!
:
Host
, { width :
I32
, height :
I32
}
=>
Try
({ }, [
InvalidSize
,
NotSupported
, ..])
Host
.
set_target_fps!
:
Host
,
I32
=>
{ }
Host
.
set_cursor_mode!
:
Host
,
CursorMode
=>
{ }
Host
.
set_cursor!
:
Host
,
Cursor
=>
{ }
Host
.
CursorMode
: [
Visible
,
Hidden
,
Locked
]
Keys
.
from_code
:
U64
->
Try
(
KeyboardKey
, [
InvalidKeyCode
, ..])
Keys
.
key_code
:
KeyboardKey
->
U64
Keys
.
key_down
: { ..
state
, keys :
List
(
U8
) },
KeyboardKey
->
Bool
Keys
.
key_up
: { ..
state
, keys :
List
(
U8
) },
KeyboardKey
->
Bool
Keys
.
key_pressed
: { ..
state
, keys :
List
(
U8
) },
KeyboardKey
->
Bool
Keys
.
key_released
: { ..
state
, keys :
List
(
U8
) },
KeyboardKey
->
Bool
Keys
.
KeyboardKey
:= [
KeyAndroidBack
,
KeyAndroidMenu
,
KeyVolumeUp
,
KeyVolumeDown
,
KeyApostrophe
,
KeyComma
,
KeyMinus
,
KeyPeriod
,
KeySlash
,
Key0
,
Key1
,
Key2
,
Key3
,
Key4
,
Key5
,
Key6
,
Key7
,
Key8
,
Key9
,
KeySemicolon
,
KeyEqual
,
KeyA
,
KeyB
,
KeyC
,
KeyD
,
KeyE
,
KeyF
,
KeyG
,
KeyH
,
KeyI
,
KeyJ
,
KeyK
,
KeyL
,
KeyM
,
KeyN
,
KeyO
,
KeyP
,
KeyQ
,
KeyR
,
KeyS
,
KeyT
,
KeyU
,
KeyV
,
KeyW
,
KeyX
,
KeyY
,
KeyZ
,
KeyLeftBracket
,
KeyBackslash
,
KeyRightBracket
,
KeyGrave
,
KeySpace
,
KeyEscape
,
KeyEnter
,
KeyTab
,
KeyBackspace
,
KeyInsert
,
KeyDelete
,
KeyRight
,
KeyLeft
,
KeyDown
,
KeyUp
,
KeyPageUp
,
KeyPageDown
,
KeyHome
,
KeyEnd
,
KeyCapsLock
,
KeyScrollLock
,
KeyNumLock
,
KeyPrintScreen
,
KeyPause
,
KeyF1
,
KeyF2
,
KeyF3
,
KeyF4
,
KeyF5
,
KeyF6
,
KeyF7
,
KeyF8
,
KeyF9
,
KeyF10
,
KeyF11
,
KeyF12
,
KeyLeftShift
,
KeyLeftControl
,
KeyLeftAlt
,
KeyLeftSuper
,
KeyRightShift
,
KeyRightControl
,
KeyRightAlt
,
KeyRightSuper
,
KeyKbMenu
,
KeyKp0
,
KeyKp1
,
KeyKp2
,
KeyKp3
,
KeyKp4
,
KeyKp5
,
KeyKp6
,
KeyKp7
,
KeyKp8
,
KeyKp9
,
KeyKpDecimal
,
KeyKpDivide
,
KeyKpMultiply
,
KeyKpSubtract
,
KeyKpAdd
,
KeyKpEnter
,
KeyKpEqual
,
Raw
(
U64
)]
Math
.
vec2
:
F32
,
F32
->
Vec2
Math
.
zero
:
Vec2
Math
.
rect
:
F32
,
F32
,
F32
,
F32
->
Rect
Math
.
circle
:
Vec2
,
F32
->
Circle
Math
.
clamp
:
F32
,
F32
,
F32
->
F32
Math
.
clamp01
:
F32
->
F32
Math
.
lerp
:
F32
,
F32
,
F32
->
F32
Math
.
sqrt
:
F32
->
F32
Math
.
add
:
Vec2
,
Vec2
->
Vec2
Math
.
sub
:
Vec2
,
Vec2
->
Vec2
Math
.
scale
:
Vec2
,
F32
->
Vec2
Math
.
dot
:
Vec2
,
Vec2
->
F32
Math
.
length_squared
:
Vec2
->
F32
Math
.
length
:
Vec2
->
F32
Math
.
distance_squared
:
Vec2
,
Vec2
->
F32
Math
.
distance
:
Vec2
,
Vec2
->
F32
Math
.
normalize
:
Vec2
->
Vec2
Math
.
lerp_vec2
:
Vec2
,
Vec2
,
F32
->
Vec2
Math
.
left
:
Rect
->
F32
Math
.
right
:
Rect
->
F32
Math
.
top
:
Rect
->
F32
Math
.
bottom
:
Rect
->
F32
Math
.
center
:
Rect
->
Vec2
Math
.
closest_point
:
Rect
,
Vec2
->
Vec2
Math
.
contains
:
Rect
,
Vec2
->
Bool
Math
.
circle_contains
:
Circle
,
Vec2
->
Bool
Math
.
overlaps
:
Rect
,
Rect
->
Bool
Math
.
circle_overlaps
:
Circle
,
Circle
->
Bool
Math
.
circle_rect
:
Circle
,
Rect
->
Bool
Math
.
contains_point
:
Circle
,
Vec2
->
Bool
Math
.
overlaps_circle
:
Circle
,
Circle
->
Bool
Math
.
overlaps_rect
:
Circle
,
Rect
->
Bool
Math
.
Vec2
:= { x :
F32
, y :
F32
}
Math.Vec2
.
is_eq
: _
Math
.
Rect
:= { x :
F32
, y :
F32
, width :
F32
, height :
F32
}
Math.Rect
.
is_eq
: _
Math
.
Circle
:= { center :
Vec2
, radius :
F32
}
Math.Circle
.
is_eq
: _
Mouse
.
position
: { ..
state
, x :
F32
, y :
F32
}
->
{ x :
F32
, y :
F32
}
Mouse
.
delta
: { ..
state
, delta_x :
F32
, delta_y :
F32
}
->
{ x :
F32
, y :
F32
}
Mouse
.
wheel_delta
: { ..
state
, wheel_x :
F32
, wheel_y :
F32
}
->
{ x :
F32
, y :
F32
}
Mouse
.
button_down
: { ..
state
, buttons :
List
(
U8
) },
MouseButton
->
Bool
Mouse
.
button_up
: { ..
state
, buttons :
List
(
U8
) },
MouseButton
->
Bool
Mouse
.
button_pressed
: { ..
state
, buttons :
List
(
U8
) },
MouseButton
->
Bool
Mouse
.
button_released
: { ..
state
, buttons :
List
(
U8
) },
MouseButton
->
Bool
Mouse
.
State
:= { buttons :
List
(
U8
), left :
Bool
, middle :
Bool
, right :
Bool
, wheel :
F32
, wheel_x :
F32
, wheel_y :
F32
, delta_x :
F32
, delta_y :
F32
, x :
F32
, y :
F32
}
Mouse.State
.
button_down
:
State
,
MouseButton
->
Bool
Mouse.State
.
button_up
:
State
,
MouseButton
->
Bool
Mouse.State
.
button_pressed
:
State
,
MouseButton
->
Bool
Mouse.State
.
button_released
:
State
,
MouseButton
->
Bool
Mouse.State
.
position
:
State
->
{ x :
F32
, y :
F32
}
Mouse.State
.
delta
:
State
->
{ x :
F32
, y :
F32
}
Mouse.State
.
wheel_delta
:
State
->
{ x :
F32
, y :
F32
}
Mouse
.
Cursor
:= [
Default
,
Arrow
,
IBeam
,
Crosshair
,
PointingHand
,
ResizeEastWest
,
ResizeNorthSouth
,
ResizeNorthwestSoutheast
,
ResizeNortheastSouthwest
,
ResizeAll
,
NotAllowed
]
Mouse
.
MouseButton
:= [
Left
,
Right
,
Middle
,
Side
,
Extra
,
Forward
,
Back
]
Physics
.
point
:
F32
,
F32
,
F32
->
Point
Physics
.
point_xy
:
F32
,
F32
->
Point
Physics
.
origin
:
Point
Physics
.
vector
:
F32
,
F32
,
F32
->
Vector
Physics
.
vector_xy
:
F32
,
F32
->
Vector
Physics
.
zero
:
Vector
Physics
.
coords
:
Point
->
Coords
Physics
.
components
:
Vector
->
Coords
Physics
.
xy
:
Point
->
Vec2
Physics
.
vector_xy_components
:
Vector
->
Vec2
Physics
.
point_coeffs
:
Point
->
PointCoeffs
Physics
.
vector_coeffs
:
Vector
->
VectorCoeffs
Physics
.
plane_coeffs
:
Plane
->
PlaneCoeffs
Physics
.
line_coeffs
:
Line
->
LineCoeffs
Physics
.
motor_coeffs
:
Motor
->
MotorCoeffs
Physics
.
add
:
Point
,
Vector
->
Point
Physics
.
sub
:
Point
,
Point
->
Vector
Physics
.
add_vec
:
Vector
,
Vector
->
Vector
Physics
.
sub_vec
:
Vector
,
Vector
->
Vector
Physics
.
scale
:
Vector
,
F32
->
Vector
Physics
.
dot
:
Vector
,
Vector
->
F32
Physics
.
cross
:
Vector
,
Vector
->
Vector
Physics
.
length_squared
:
Vector
->
F32
Physics
.
length
:
Vector
->
F32
Physics
.
normalize
:
Vector
->
Vector
Physics
.
reflect
:
Vector
,
Vector
->
Vector
Physics
.
distance
:
Point
,
Point
->
F32
Physics
.
plane
:
Vector
,
F32
->
Plane
Physics
.
plane_from_point_normal
:
Point
,
Vector
->
Plane
Physics
.
signed_distance
:
Plane
,
Point
->
F32
Physics
.
project_point_plane
:
Plane
,
Point
->
Point
Physics
.
line_from_points
:
Point
,
Point
->
Line
Physics
.
motor_identity
:
Motor
Physics
.
translation
:
Vector
->
Motor
Physics
.
translation_vector
:
Motor
->
Vector
Physics
.
apply_motor_point
:
Motor
,
Point
->
Point
Physics
.
body
:
Point
,
Vector
->
Body
Physics
.
apply_acceleration
:
Body
,
Vector
,
F32
->
Body
Physics
.
integrate_body
:
Body
,
F32
->
Body
Physics
.
clamp_y
:
Vector
,
F32
,
F32
->
Vector
Physics
.
Point
:= { e032 :
F32
, e013 :
F32
, e021 :
F32
, e123 :
F32
}
Physics
.
Vector
:= { e032 :
F32
, e013 :
F32
, e021 :
F32
}
Physics
.
Plane
:= { e0 :
F32
, e1 :
F32
, e2 :
F32
, e3 :
F32
}
Physics
.
Line
:= { e01 :
F32
, e02 :
F32
, e03 :
F32
, e23 :
F32
, e31 :
F32
, e12 :
F32
}
Physics
.
Motor
:= { s :
F32
, e23 :
F32
, e31 :
F32
, e12 :
F32
, e01 :
F32
, e02 :
F32
, e03 :
F32
, e0123 :
F32
}
Physics
.
Body
:= { position :
Point
, velocity :
Vector
}
Physics
.
Coords
: { x :
F32
, y :
F32
, z :
F32
}
Physics
.
PointCoeffs
: { e032 :
F32
, e013 :
F32
, e021 :
F32
, e123 :
F32
}
Physics
.
VectorCoeffs
: { e032 :
F32
, e013 :
F32
, e021 :
F32
}
Physics
.
PlaneCoeffs
: { e0 :
F32
, e1 :
F32
, e2 :
F32
, e3 :
F32
}
Physics
.
LineCoeffs
: { e01 :
F32
, e02 :
F32
, e03 :
F32
, e23 :
F32
, e31 :
F32
, e12 :
F32
}
Physics
.
MotorCoeffs
: { s :
F32
, e23 :
F32
, e31 :
F32
, e12 :
F32
, e01 :
F32
, e02 :
F32
, e03 :
F32
, e0123 :
F32
}
Sprite
.
source
:
Sprite
,
Rect
->
Sprite
Sprite
.
pos
:
Sprite
,
Vec2
->
Sprite
Sprite
.
origin
:
Sprite
,
Vec2
->
Sprite
Sprite
.
centered
:
Sprite
->
Sprite
Sprite
.
rotation
:
Sprite
,
F32
->
Sprite
Sprite
.
scale_xy
:
Sprite
,
Vec2
->
Sprite
Sprite
.
scale
:
Sprite
,
F32
->
Sprite
Sprite
.
tint
:
Sprite
,
Color
->
Sprite
Sprite
.
to_texture_draw
:
Sprite
->
TextureDraw
Sprite
.
draw!
:
Sprite
,
Frame
=>
{ }
Sprite
.
from_texture
:
Texture
->
Sprite
Sprite
.
with_source
:
Sprite
,
Rect
->
Sprite
Sprite
.
with_pos
:
Sprite
,
Vec2
->
Sprite
Sprite
.
with_origin
:
Sprite
,
Vec2
->
Sprite
Sprite
.
with_origin_center
:
Sprite
->
Sprite
Sprite
.
with_rotation
:
Sprite
,
F32
->
Sprite
Sprite
.
with_scale_xy
:
Sprite
,
Vec2
->
Sprite
Sprite
.
with_scale
:
Sprite
,
F32
->
Sprite
Sprite
.
with_tint
:
Sprite
,
Color
->
Sprite
Sprite
.
sheet_frame
: { frame_size :
Vec2
, row :
U64
, col :
U64
}
->
Rect
Sprite
.
animation
: { frame_count :
U64
, fps :
F32
}
->
Animation
Sprite
.
step
:
Animation
,
F32
->
Animation
Sprite
.
animation_source
:
Animation
, { frame_size :
Vec2
, row :
U64
}
->
Rect
Sprite
.
Animation
: { frame :
U64
, frame_count :
U64
, fps :
F32
, elapsed :
F32
}
Text
.
default_font
:
Font
Text
.
default_spacing
:
F32
Text
.
from
:
Str
->
Builder
Text
.
load_font!
:
LoadFont
=>
Try
(
Font
, [
FontLoadFailed
,
ResourceLimit
, ..])
Text
.
measure_builder!
:
Builder
=>
Size
Text
.
prepare_builder!
:
Builder
=>
Try
(
Prepared
, [
ResourceLimit
, ..])
Text
.
align_top_left
:
Align
Text
.
align_top_center
:
Align
Text
.
align_top_right
:
Align
Text
.
align_center
:
Align
Text
.
align_middle_left
:
Align
Text
.
align_middle_right
:
Align
Text
.
align_bottom_left
:
Align
Text
.
align_bottom_center
:
Align
Text
.
align_bottom_right
:
Align
Text
.
align_offset
:
Size
,
Align
->
Vec2
Text
.
origin_for
:
Vec2
,
Size
,
Align
->
Vec2
Text
.
draw_prepared!
:
Frame
, { text :
Prepared
, pos :
Vec2
, color :
Color
, align :
Align
}
=>
{ }
Text
.
Font
:
Font
Text
.
HAlign
: [
Left
,
Center
,
Right
]
Text
.
VAlign
: [
Top
,
Middle
,
Bottom
]
Text
.
Align
: { horizontal :
HAlign
, vertical :
VAlign
}
Text
.
Size
: { width :
F32
, height :
F32
}
Text
.
LoadFont
: { path :
Str
, size :
I32
}
Text
.
Placement
: { pos :
Vec2
, color :
Color
, align :
Align
}
Text
.
Builder
Text.Builder
.
size
:
Builder
,
F32
->
Builder
Text.Builder
.
spacing
:
Builder
,
F32
->
Builder
Text.Builder
.
font
:
Builder
,
Font
->
Builder
Text.Builder
.
measure!
:
Builder
=>
Size
Text.Builder
.
prepare!
:
Builder
=>
Try
(
Prepared
, [
ResourceLimit
, ..])
Text
.
Prepared
Text.Prepared
.
bounds
:
Prepared
->
Size
Text.Prepared
.
draw!
:
Prepared
,
Frame
,
Placement
=>
{ }
Tilemap
.
empty_raw_map
:
TilemapRawMap
Tilemap
.
empty
:
Tilemap
Tilemap
.
load_tmx!
:
Str
=>
Try
(
TilemapRawMap
, [
NotFound
,
ReadFailed
,
ParseFailed
,
Unsupported
, ..])
Tilemap
.
from_raw
:
TilemapRawMap
->
TilemapBuilder
Tilemap
.
raw_map
:
Tilemap
->
TilemapRawMap
Tilemap
.
layer_role_for
:
Tilemap
,
TilemapRawLayer
->
TilemapLayerRole
Tilemap
.
object_role_for
:
Tilemap
,
TilemapRawObject
->
TilemapObjectRole
Tilemap
.
objects
:
Tilemap
->
List
(
TilemapRawObject
)
Tilemap
.
objects_named
:
Tilemap
,
Str
->
List
(
TilemapRawObject
)
Tilemap
.
objects_typed
:
Tilemap
,
Str
->
List
(
TilemapRawObject
)
Tilemap
.
objects_with_role
:
Tilemap
,
TilemapObjectRole
->
List
(
TilemapRawObject
)
Tilemap
.
first_object
:
Tilemap
,
TilemapObjectRole
->
Try
(
TilemapRawObject
, [
NotFound
, ..])
Tilemap
.
object_center
:
TilemapRawObject
->
Vec2
Tilemap
.
object_rect
:
TilemapRawObject
->
Rect
Tilemap
.
object_circle
:
TilemapRawObject
->
Circle
Tilemap
.
object_world_center
:
Tilemap
,
TilemapRawObject
->
Vec2
Tilemap
.
object_world_rect
:
Tilemap
,
TilemapRawObject
->
Rect
Tilemap
.
object_world_circle
:
Tilemap
,
TilemapRawObject
->
Circle
Tilemap
.
property_named
:
TilemapRawMap
,
U64
,
U64
,
Str
->
Try
(
TilemapRawProperty
, [
NotFound
, ..])
Tilemap
.
object_property
:
TilemapRawMap
,
TilemapRawObject
,
Str
->
Try
(
TilemapRawProperty
, [
NotFound
, ..])
Tilemap
.
layer_property
:
TilemapRawMap
,
TilemapRawLayer
,
Str
->
Try
(
TilemapRawProperty
, [
NotFound
, ..])
Tilemap
.
property_str
:
TilemapRawMap
,
TilemapRawObject
,
Str
,
Str
->
Str
Tilemap
.
property_f32
:
TilemapRawMap
,
TilemapRawObject
,
Str
,
F32
->
F32
Tilemap
.
property_i64
:
TilemapRawMap
,
TilemapRawObject
,
Str
,
I64
->
I64
Tilemap
.
property_bool
:
TilemapRawMap
,
TilemapRawObject
,
Str
,
Bool
->
Bool
Tilemap
.
cell_at_world
:
Tilemap
,
Vec2
->
Try
(
TilemapCell
, [
OutOfBounds
, ..])
Tilemap
.
cell_range_for_world_rect
:
Tilemap
,
Rect
->
Try
(
TilemapCellRange
, [
OutOfBounds
, ..])
Tilemap
.
world_rect_for_cell
:
Tilemap
,
TilemapCell
->
Rect
Tilemap
.
gid_at
:
Tilemap
,
Str
,
TilemapCell
->
Try
(
U64
, [
NotFound
,
OutOfBounds
, ..])
Tilemap
.
solid_cell
:
Tilemap
,
TilemapCell
->
Bool
Tilemap
.
solid_at_world
:
Tilemap
,
Vec2
->
Bool
Tilemap
.
circle_touches_solid
:
Tilemap
,
Circle
->
Bool
Tilemap
.
draw_layer!
:
Tilemap
,
Frame
,
Str
=>
{ }
Tilemap
.
draw_layer_in!
:
Tilemap
,
Frame
,
Str
,
Rect
=>
{ }
Tilemap
.
draw_layers!
:
Tilemap
,
Frame
,
TilemapDrawRole
=>
{ }
Tilemap
.
draw_layers_in!
:
Tilemap
,
Frame
,
TilemapDrawRole
,
Rect
=>
{ }
Tilemap
.
draw_all!
:
Tilemap
,
Frame
=>
{ }
Tilemap
.
draw_all_in!
:
Tilemap
,
Frame
,
Rect
=>
{ }
Tilemap
.
viewport_for_camera
:
Camera2D
,
Vec2
->
Rect
Tilemap
.
draw_all_for_camera!
:
Tilemap
,
Frame
,
Camera2D
,
Vec2
=>
{ }
Tilemap
.
flip_for_gid
:
U64
->
TilemapFlip
Tilemap
.
clean_gid
:
U64
->
U64
Tilemap
.
RawMap
:
TilemapRawMap
Tilemap
.
RawLayer
:
TilemapRawLayer
Tilemap
.
RawObject
:
TilemapRawObject
Tilemap
.
RawProperty
:
TilemapRawProperty
Tilemap
.
RawTileset
:
TilemapRawTileset
Tilemap
.
RawPoint
:
TilemapRawPoint
Tilemap
.
Cell
:
TilemapCell
Tilemap
.
CellRange
:
TilemapCellRange
Tilemap
.
Flip
:
TilemapFlip
Tilemap
.
ResolvedTileset
:
TilemapResolvedTileset
Tilemap
.
LayerRole
:
TilemapLayerRole
Tilemap
.
DrawRole
:
TilemapDrawRole
Tilemap
.
ObjectRole
:
TilemapObjectRole
Tilemap
.
Builder
:
TilemapBuilder
Time
.
to_seconds
:
U64
->
F32
Time
.
delta_seconds
:
U64
,
U64
->
F32