Home
main-default
App
default
map2
config
init
title
width
height
size
target_fps
resizable
fullscreen
vsync
cursor_visible
Config
InitCallback
Init
Assets
load_texture_raw!
load_texture!
info
width
height
size
rect
TextureInfo
Texture
LoadTextureRawResult
Audio
gen_tone_raw!
gen_sound_raw!
load_sound_raw!
load_music_raw!
play_raw!
set_volume_raw!
set_pitch_raw!
set_pan_raw!
play_music_raw!
stop_music_raw!
pause_music_raw!
resume_music_raw!
set_music_volume_raw!
set_music_pitch_raw!
set_music_pan_raw!
set_music_looping_raw!
waveform_code
raw_config
sound_from_handle
music_from_handle
load_sound!
load_music!
gen_sound!
gen_tone!
play!
set_volume!
set_pitch!
set_pan!
play_music!
stop_music!
pause_music!
resume_music!
set_music_volume!
set_music_pitch!
set_music_pan!
set_music_looping!
Sound
Music
Waveform
GenSound
GenSoundRaw
Camera
default
new
centered
follow
with_target
with_offset
with_rotation
with_zoom
clamp_zoom
Settings
Camera2D
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
Draw
TextureDrawBuilder
default_options
map2
empty
run
pos
source
dest
origin
origin_center
rotation
scale
scale_xy
tint
begin_camera!
begin_frame!
circle_raw!
circle_gradient!
circle_lines_raw!
clear!
end_frame!
fps!
line_raw!
load_font_raw!
measure_text_raw!
polygon_raw!
polygon_lines_raw!
rectangle_raw!
rectangle_gradient_h!
rectangle_gradient_v!
rectangle_lines_raw!
rounded_rectangle_raw!
rounded_rectangle_lines_raw!
text_raw!
draw_texture_raw!
end_camera!
triangle_raw!
triangle_lines_raw!
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
center_in_rect
rectangle!
rounded_rectangle!
circle!
line!
triangle!
polygon!
measure_text!
load_font!
texture_draw
texture_at
texture!
draw_texture!
with_camera!
with_mode_2d!
text!
debug_text!
text_at!
text_centered!
draw!
Vector2
Rect
Camera2D
Fill
Stroke
ShapeStyle
Rectangle
RectangleRaw
RectangleLinesRaw
RoundedRectangle
RoundedRectangleRaw
RoundedRectangleLinesRaw
RectangleGradientV
RectangleGradientH
Circle
CircleRaw
CircleLinesRaw
CircleGradient
Line
LineRaw
Triangle
TriangleRaw
TriangleLinesRaw
Polygon
PolygonRaw
PolygonLinesRaw
Fps
Font
HAlign
VAlign
TextAlign
TextSize
Text
DebugText
SimpleText
TextRaw
MeasureText
MeasureTextRaw
LoadFont
TextureDraw
CameraMode
TextureDrawRaw
Host
exit!
get_screen_size!
read_env_raw!
read_env!
read_file_raw!
read_file!
random_i32!
set_screen_size_raw!
set_screen_size!
set_target_fps!
ScreenSize
ReadFileRawResult
Keys
key_count
from_code
key_code
key_state
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
Vec2
Rect
Circle
Mouse
button_count
button_code
button_state
button_down
button_up
button_pressed
button_released
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
Tilemap
TilemapBuilder
with_origin
with_tileset_texture
layer_role
object_role
build
err_not_found
err_read_failed
err_parse_failed
err_unsupported
empty_raw_map
load_tmx_raw!
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
world_rect_for_cell
gid_at
solid_cell
solid_at_world
circle_touches_solid
draw_layer!
draw_layers!
draw_all!
clean_gid
RawMap
RawLayer
RawObject
RawProperty
RawTileset
RawPoint
Cell
LayerRole
ObjectRole
LoadTmxRawResult
Builder
Time
to_seconds
delta_seconds
App
.
default
:
Config
App
.
map2
:
App
(
a
),
App
(
b
), (
a
,
b
->
c
)
->
App
(
c
)
App
.
config
:
App
(
a
)
->
Config
App
.
init
:
Config
,
InitCallback
(
model
,
errors
)
->
Init
(
model
,
errors
)
App
.
title
:
Str
->
App
(
Str
)
App
.
width
:
I32
->
App
(
I32
)
App
.
height
:
I32
->
App
(
I32
)
App
.
size
: { width :
I32
, height :
I32
}
->
App
({ width :
I32
, height :
I32
})
App
.
target_fps
:
I32
->
App
(
I32
)
App
.
resizable
:
Bool
->
App
(
Bool
)
App
.
fullscreen
:
Bool
->
App
(
Bool
)
App
.
vsync
:
Bool
->
App
(
Bool
)
App
.
cursor_visible
:
Bool
->
App
(
Bool
)
App
.
Config
:
AppConfig
App
.
InitCallback
:
Host
=>
Try
(
model
, [
Exit
(
I64
), ..
errors
])
App
.
Init
: { config :
Config
, run! :
InitCallback
(
model
,
errors
) }
Assets
.
load_texture_raw!
:
Str
=>
LoadTextureRawResult
Assets
.
load_texture!
:
Str
=>
Try
(
Texture
, [
TextureLoadFailed
, ..])
Assets
.
info
:
Texture
->
TextureInfo
Assets
.
width
:
Texture
->
F32
Assets
.
height
:
Texture
->
F32
Assets
.
size
:
Texture
->
Vec2
Assets
.
rect
:
Texture
->
Rect
Assets
.
TextureInfo
: { handle :
U64
, width :
F32
, height :
F32
}
Assets
.
Texture
:
Box
(
TextureInfo
)
Assets
.
LoadTextureRawResult
: { handle :
U64
, width :
F32
, height :
F32
}
Audio
.
gen_tone_raw!
: { freq :
F32
, ms :
I32
}
=>
U64
Audio
.
gen_sound_raw!
:
GenSoundRaw
=>
U64
Audio
.
load_sound_raw!
:
Str
=>
U64
Audio
.
load_music_raw!
:
Str
=>
U64
Audio
.
play_raw!
:
U64
=>
{ }
Audio
.
set_volume_raw!
:
U64
,
F32
=>
{ }
Audio
.
set_pitch_raw!
:
U64
,
F32
=>
{ }
Audio
.
set_pan_raw!
:
U64
,
F32
=>
{ }
Audio
.
play_music_raw!
:
U64
=>
{ }
Audio
.
stop_music_raw!
:
U64
=>
{ }
Audio
.
pause_music_raw!
:
U64
=>
{ }
Audio
.
resume_music_raw!
:
U64
=>
{ }
Audio
.
set_music_volume_raw!
:
U64
,
F32
=>
{ }
Audio
.
set_music_pitch_raw!
:
U64
,
F32
=>
{ }
Audio
.
set_music_pan_raw!
:
U64
,
F32
=>
{ }
Audio
.
set_music_looping_raw!
:
U64
,
Bool
=>
{ }
Audio
.
waveform_code
:
Waveform
->
U8
Audio
.
raw_config
:
GenSound
->
GenSoundRaw
Audio
.
sound_from_handle
:
U64
->
Try
(
Sound
, [
SoundLoadFailed
, ..])
Audio
.
music_from_handle
:
U64
->
Try
(
Music
, [
MusicLoadFailed
, ..])
Audio
.
load_sound!
:
Str
=>
Try
(
Sound
, [
SoundLoadFailed
, ..])
Audio
.
load_music!
:
Str
=>
Try
(
Music
, [
MusicLoadFailed
, ..])
Audio
.
gen_sound!
:
GenSound
=>
Sound
Audio
.
gen_tone!
: { freq :
F32
, ms :
I32
}
=>
Sound
Audio
.
play!
:
Sound
=>
{ }
Audio
.
set_volume!
:
Sound
,
F32
=>
{ }
Audio
.
set_pitch!
:
Sound
,
F32
=>
{ }
Audio
.
set_pan!
:
Sound
,
F32
=>
{ }
Audio
.
play_music!
:
Music
=>
{ }
Audio
.
stop_music!
:
Music
=>
{ }
Audio
.
pause_music!
:
Music
=>
{ }
Audio
.
resume_music!
:
Music
=>
{ }
Audio
.
set_music_volume!
:
Music
,
F32
=>
{ }
Audio
.
set_music_pitch!
:
Music
,
F32
=>
{ }
Audio
.
set_music_pan!
:
Music
,
F32
=>
{ }
Audio
.
set_music_looping!
:
Music
,
Bool
=>
{ }
Audio
.
Sound
:
Box
(
U64
)
Audio
.
Music
:
Box
(
U64
)
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
}
Audio
.
GenSoundRaw
: { waveform :
U8
, 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
->
Camera2D
Camera
.
centered
:
Vec2
,
Vec2
->
Camera2D
Camera
.
follow
:
Vec2
, { screen :
Vec2
, zoom :
F32
}
->
Camera2D
Camera
.
with_target
:
Camera2D
,
Vec2
->
Camera2D
Camera
.
with_offset
:
Camera2D
,
Vec2
->
Camera2D
Camera
.
with_rotation
:
Camera2D
,
F32
->
Camera2D
Camera
.
with_zoom
:
Camera2D
,
F32
->
Camera2D
Camera
.
clamp_zoom
:
Camera2D
, { min :
F32
, max :
F32
}
->
Camera2D
Camera
.
Settings
: { target :
Vec2
, offset :
Vec2
, rotation :
F32
, zoom :
F32
}
Camera
.
Camera2D
:
Settings
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
Draw.TextureDrawBuilder
.
default_options
:
TextureDrawOptions
Draw.TextureDrawBuilder
.
map2
:
TextureDrawBuilder
(
a
),
TextureDrawBuilder
(
b
), (
a
,
b
->
c
)
->
TextureDrawBuilder
(
c
)
Draw.TextureDrawBuilder
.
empty
:
TextureDrawBuilder
({ })
Draw.TextureDrawBuilder
.
run
:
TextureDrawBuilder
(
a
),
Texture
->
TextureDrawConfig
Draw.TextureDrawBuilder
.
pos
:
Vec2
->
TextureDrawBuilder
(
Vec2
)
Draw.TextureDrawBuilder
.
source
:
Rect
->
TextureDrawBuilder
(
Rect
)
Draw.TextureDrawBuilder
.
dest
:
Rect
->
TextureDrawBuilder
(
Rect
)
Draw.TextureDrawBuilder
.
origin
:
Vec2
->
TextureDrawBuilder
(
Vec2
)
Draw.TextureDrawBuilder
.
origin_center
:
TextureDrawBuilder
({ })
Draw.TextureDrawBuilder
.
rotation
:
F32
->
TextureDrawBuilder
(
F32
)
Draw.TextureDrawBuilder
.
scale
:
F32
->
TextureDrawBuilder
(
F32
)
Draw.TextureDrawBuilder
.
scale_xy
:
Vec2
->
TextureDrawBuilder
(
Vec2
)
Draw.TextureDrawBuilder
.
tint
:
Color
->
TextureDrawBuilder
(
Color
)
Draw
.
begin_camera!
:
CameraMode
=>
{ }
Draw
.
begin_frame!
: ()
=>
{ }
Draw
.
circle_raw!
:
CircleRaw
=>
{ }
Draw
.
circle_gradient!
:
CircleGradient
=>
{ }
Draw
.
circle_lines_raw!
:
CircleLinesRaw
=>
{ }
Draw
.
clear!
:
Color
=>
{ }
Draw
.
end_frame!
: ()
=>
{ }
Draw
.
fps!
:
Fps
=>
{ }
Draw
.
line_raw!
:
LineRaw
=>
{ }
Draw
.
load_font_raw!
:
LoadFont
=>
U64
Draw
.
measure_text_raw!
:
MeasureTextRaw
=>
TextSize
Draw
.
polygon_raw!
:
PolygonRaw
=>
{ }
Draw
.
polygon_lines_raw!
:
PolygonLinesRaw
=>
{ }
Draw
.
rectangle_raw!
:
RectangleRaw
=>
{ }
Draw
.
rectangle_gradient_h!
:
RectangleGradientH
=>
{ }
Draw
.
rectangle_gradient_v!
:
RectangleGradientV
=>
{ }
Draw
.
rectangle_lines_raw!
:
RectangleLinesRaw
=>
{ }
Draw
.
rounded_rectangle_raw!
:
RoundedRectangleRaw
=>
{ }
Draw
.
rounded_rectangle_lines_raw!
:
RoundedRectangleLinesRaw
=>
{ }
Draw
.
text_raw!
:
TextRaw
=>
{ }
Draw
.
draw_texture_raw!
:
TextureDrawRaw
=>
{ }
Draw
.
end_camera!
: ()
=>
{ }
Draw
.
triangle_raw!
:
TriangleRaw
=>
{ }
Draw
.
triangle_lines_raw!
:
TriangleLinesRaw
=>
{ }
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
.
center_in_rect
:
Rectangle
,
TextSize
->
Vector2
Draw
.
rectangle!
:
Rectangle
=>
{ }
Draw
.
rounded_rectangle!
:
RoundedRectangle
=>
{ }
Draw
.
circle!
:
Circle
=>
{ }
Draw
.
line!
:
Line
=>
{ }
Draw
.
triangle!
:
Triangle
=>
{ }
Draw
.
polygon!
:
Polygon
=>
{ }
Draw
.
measure_text!
:
MeasureText
=>
TextSize
Draw
.
load_font!
:
LoadFont
=>
Try
(
Font
, [
FontLoadFailed
, ..])
Draw
.
texture_draw
:
Texture
->
TextureDraw
Draw
.
texture_at
:
Texture
,
Vec2
->
TextureDraw
Draw
.
texture!
:
TextureDraw
=>
{ }
Draw
.
draw_texture!
:
TextureDraw
=>
{ }
Draw
.
with_camera!
:
CameraMode
, (()
=>
{ })
=>
{ }
Draw
.
with_mode_2d!
:
CameraMode
, (()
=>
{ })
=>
{ }
Draw
.
text!
:
Text
=>
{ }
Draw
.
debug_text!
:
DebugText
=>
{ }
Draw
.
text_at!
:
SimpleText
=>
{ }
Draw
.
text_centered!
:
SimpleText
=>
{ }
Draw
.
draw!
:
Color
, (()
=>
{ })
=>
{ }
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
.
RectangleRaw
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, color :
Color
}
Draw
.
RectangleLinesRaw
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, color :
Color
, thickness :
F32
}
Draw
.
RoundedRectangle
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, radius :
F32
, segments :
I32
, style :
ShapeStyle
}
Draw
.
RoundedRectangleRaw
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, radius :
F32
, segments :
I32
, color :
Color
}
Draw
.
RoundedRectangleLinesRaw
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
, radius :
F32
, segments :
I32
, color :
Color
, thickness :
F32
}
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
.
CircleRaw
: { center :
Vector2
, radius :
F32
, color :
Color
}
Draw
.
CircleLinesRaw
: { center :
Vector2
, radius :
F32
, color :
Color
, thickness :
F32
}
Draw
.
CircleGradient
: { center :
Vector2
, radius :
F32
, color_inner :
Color
, color_outer :
Color
}
Draw
.
Line
: { start :
Vector2
, end :
Vector2
, stroke :
Stroke
}
Draw
.
LineRaw
: { start :
Vector2
, end :
Vector2
, color :
Color
, thickness :
F32
}
Draw
.
Triangle
: { a :
Vector2
, b :
Vector2
, c :
Vector2
, style :
ShapeStyle
}
Draw
.
TriangleRaw
: { a :
Vector2
, b :
Vector2
, c :
Vector2
, color :
Color
}
Draw
.
TriangleLinesRaw
: { a :
Vector2
, b :
Vector2
, c :
Vector2
, color :
Color
, thickness :
F32
}
Draw
.
Polygon
: { points :
List
(
Vector2
), style :
ShapeStyle
}
Draw
.
PolygonRaw
: { points :
List
(
Vector2
), color :
Color
}
Draw
.
PolygonLinesRaw
: { points :
List
(
Vector2
), color :
Color
, thickness :
F32
}
Draw
.
Fps
: { pos :
Vector2
, size :
F32
, color :
Color
}
Draw
.
Font
:
Box
(
U64
)
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
.
TextRaw
: { pos :
Vector2
, text :
Str
, size :
F32
, spacing :
F32
, color :
Color
, font :
U64
}
Draw
.
MeasureText
: { text :
Str
, size :
F32
, spacing :
F32
, font :
Font
}
Draw
.
MeasureTextRaw
: { text :
Str
, size :
F32
, spacing :
F32
, font :
U64
}
Draw
.
LoadFont
: { path :
Str
, size :
I32
}
Draw
.
TextureDraw
:
TextureDrawConfig
Draw
.
CameraMode
:
Camera2D
Draw
.
TextureDrawRaw
: { texture :
U64
, source :
Rect
, dest :
Rect
, origin :
Vec2
, rotation :
F32
, tint :
Color
}
Host
.
exit!
:
I32
=>
{ }
Host
.
get_screen_size!
: ()
=>
ScreenSize
Host
.
read_env_raw!
:
Host
,
Str
=>
Try
(
Str
, [
NotFound
])
Host
.
read_env!
:
Host
,
Str
=>
Try
(
Str
, [
NotFound
])
Host
.
read_file_raw!
:
Str
=>
ReadFileRawResult
Host
.
read_file!
:
Str
=>
Try
(
Str
, [
NotFound
,
ReadFailed
])
Host
.
random_i32!
:
I32
,
I32
=>
I32
Host
.
set_screen_size_raw!
: { width :
F32
, height :
F32
}
=>
Try
({ }, [
NotSupported
])
Host
.
set_screen_size!
: { width :
F32
, height :
F32
}
=>
Try
({ }, [
NotSupported
])
Host
.
set_target_fps!
:
I32
=>
{ }
Host
.
ScreenSize
: { width :
I32
, height :
I32
}
Host
.
ReadFileRawResult
: { ok :
Bool
, err :
U8
, contents :
Str
}
Keys
.
key_count
:
U64
Keys
.
from_code
:
U64
->
Try
(
KeyboardKey
, [
InvalidKeyCode
])
Keys
.
key_code
:
KeyboardKey
->
U64
Keys
.
key_state
:
List
(
U8
),
KeyboardKey
->
Bool
Keys
.
key_down
:
List
(
U8
),
KeyboardKey
->
Bool
Keys
.
key_up
:
List
(
U8
),
KeyboardKey
->
Bool
Keys
.
key_pressed
:
List
(
U8
),
KeyboardKey
->
Bool
Keys
.
key_released
:
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
.
Vec2
: { x :
F32
, y :
F32
}
Math
.
Rect
: { x :
F32
, y :
F32
, width :
F32
, height :
F32
}
Math
.
Circle
: { center :
Vec2
, radius :
F32
}
Mouse
.
button_count
:
U64
Mouse
.
button_code
:
MouseButton
->
U64
Mouse
.
button_state
:
List
(
U8
),
MouseButton
->
Bool
Mouse
.
button_down
: { ..
state
, buttons :
List
(
U8
) },
MouseButton
->
Bool
Mouse
.
button_up
: { ..
state
, buttons :
List
(
U8
) },
MouseButton
->
Bool
Mouse
.
button_pressed
: { ..
state
, buttons_pressed :
List
(
U8
) },
MouseButton
->
Bool
Mouse
.
button_released
: { ..
state
, buttons_released :
List
(
U8
) },
MouseButton
->
Bool
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
=>
{ }
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
}
Tilemap.TilemapBuilder
.
with_origin
:
TilemapBuilder
,
Vec2
->
TilemapBuilder
Tilemap.TilemapBuilder
.
with_tileset_texture
:
TilemapBuilder
,
U64
,
Texture
->
TilemapBuilder
Tilemap.TilemapBuilder
.
layer_role
:
TilemapBuilder
,
Str
,
TilemapLayerRole
->
TilemapBuilder
Tilemap.TilemapBuilder
.
object_role
:
TilemapBuilder
,
Str
,
TilemapObjectRole
->
TilemapBuilder
Tilemap.TilemapBuilder
.
build
:
TilemapBuilder
->
Tilemap
Tilemap
.
err_not_found
:
U8
Tilemap
.
err_read_failed
:
U8
Tilemap
.
err_parse_failed
:
U8
Tilemap
.
err_unsupported
:
U8
Tilemap
.
empty_raw_map
:
TilemapRawMap
Tilemap
.
load_tmx_raw!
:
Str
=>
TilemapLoadTmxRawResult
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
.
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
,
Str
=>
{ }
Tilemap
.
draw_layers!
:
Tilemap
,
TilemapLayerRole
=>
{ }
Tilemap
.
draw_all!
:
Tilemap
=>
{ }
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
.
LayerRole
:
TilemapLayerRole
Tilemap
.
ObjectRole
:
TilemapObjectRole
Tilemap
.
LoadTmxRawResult
:
TilemapLoadTmxRawResult
Tilemap
.
Builder
:
TilemapBuilder
Time
.
to_seconds
:
U64
->
F32
Time
.
delta_seconds
:
U64
,
U64
->
F32