Return to Roc packages
Documentation
RocRay
▶
PlatformState
NetworkState
NetworkPeers
NetworkMessage
KeyboardKey
Rectangle
Vector2
Color
Texture
RenderTexture
Sound
Camera
UUID
rgba
exit!
log!
init_window!
get_screen_size!
set_target_fps!
display_fps!
take_screenshot!
load_file_to_str!
send_to_peer!
random_i32!
Camera
▶
Settings
create!
update!
Draw
▶
draw!
with_mode_2d!
with_texture!
text!
line!
rectangle!
rectangle_gradient_v!
rectangle_gradient_h!
circle!
circle_gradient!
texture_rec!
render_texture_rec!
Font
▶
Font
load!
default
measure!
Keys
▶
KeyboardKey
Keys
down
up
pressed
released
pressed_repeat
any_down
any_up
any_pressed
any_released
Mouse
▶
ButtonState
Buttons
up
down
pressed
released
Music
▶
Music
load!
play!
stop!
pause!
resume!
get_time_played!
length
Network
▶
configure!
UUID
from_u64_pair
to_u64_pair
to_str
RenderTexture
▶
create!
Sound
▶
load!
play!
Texture
▶
load!
Time
▶
Time
to_nanos
sleep_millis!
(press
s
)
RocRay
.
PlatformState
RocRay
.
NetworkState
RocRay
.
NetworkPeers
RocRay
.
NetworkMessage
RocRay
.
KeyboardKey
RocRay
.
Rectangle
RocRay
.
Vector2
RocRay
.
Color
RocRay
.
Texture
RocRay
.
RenderTexture
RocRay
.
Sound
RocRay
.
Camera
RocRay
.
UUID
: Network.UUID
RocRay
.
rgba
: Color -> InternalColor.RocColor
RocRay
.
exit!
: {} => {}
RocRay
.
log!
: Str, [ LogAll, LogTrace, LogDebug, LogInfo, LogWarning, LogError, LogFatal, LogNone ] => {}
RocRay
.
init_window!
: { title ? Str, width ? F32, height ? F32 } => {}
RocRay
.
get_screen_size!
: {} => { height : F32, width : F32 }
RocRay
.
set_target_fps!
: I32 => {}
RocRay
.
display_fps!
: { fps : [ Visible, Hidden ], pos : Vector2 } => {}
RocRay
.
take_screenshot!
: Str => {}
RocRay
.
load_file_to_str!
: Str => Result Str [LoadErr Str]
RocRay
.
send_to_peer!
: List U8, UUID => {}
RocRay
.
random_i32!
: { min : I32, max : I32 } => I32
Camera
.
Settings
Camera
.
create!
: Settings => Result Camera [LoadErr Str]
Camera
.
update!
: Camera, Settings => {}
Draw
.
draw!
: Color, ({} => {}) => {}
Draw
.
with_mode_2d!
: Camera, ({} => {}) => {}
Draw
.
with_texture!
: RenderTexture, Color, ({} => {}) => {}
Draw
.
text!
: { font ? Font, pos : { x : F32, y : F32 }, text : Str, size ? F32, spacing ? F32, color ? Color } => {}
Draw
.
line!
: { start : Vector2, end : Vector2, color : Color } => {}
Draw
.
rectangle!
: { rect : Rectangle, color : Color } => {}
Draw
.
rectangle_gradient_v!
: { rect : Rectangle, top : Color, bottom : Color } => {}
Draw
.
rectangle_gradient_h!
: { rect : Rectangle, left : Color, right : Color } => {}
Draw
.
circle!
: { center : Vector2, radius : F32, color : Color } => {}
Draw
.
circle_gradient!
: { center : Vector2, radius : F32, inner : Color, outer : Color } => {}
Draw
.
texture_rec!
: { texture : Texture, source : Rectangle, pos : Vector2, tint : Color } => {}
Draw
.
render_texture_rec!
: { texture : RenderTexture, source : Rectangle, pos : Vector2, tint : Color } => {}
Font
.
Font
Font
.
load!
: Str => Result Font [LoadErr Str]
Font
.
default
: Font
Font
.
measure!
: { font ? Font, text : Str, size ? F32, spacing ? F32 } => { width : F32, height : F32 }
Keys
.
KeyboardKey
Keys
.
Keys
Keys
.
down
: Keys, KeyboardKey -> Bool
Keys
.
up
: Keys, KeyboardKey -> Bool
Keys
.
pressed
: Keys, KeyboardKey -> Bool
Keys
.
released
: Keys, KeyboardKey -> Bool
Keys
.
pressed_repeat
: Keys, KeyboardKey -> Bool
Keys
.
any_down
: Keys, List KeyboardKey -> Bool
Keys
.
any_up
: Keys, List KeyboardKey -> Bool
Keys
.
any_pressed
: Keys, List KeyboardKey -> Bool
Keys
.
any_released
: Keys, List KeyboardKey -> Bool
Mouse
.
ButtonState
: [ Up, Down, Pressed, Released ]
Mouse
.
Buttons
Mouse
.
up
: ButtonState -> Bool
Mouse
.
down
: ButtonState -> Bool
Mouse
.
pressed
: ButtonState -> Bool
Mouse
.
released
: ButtonState -> Bool
Music
.
Music
Music
.
load!
: Str => Result Music [LoadErr Str]
Music
.
play!
: Music => {}
Music
.
stop!
: Music => {}
Music
.
pause!
: Music => {}
Music
.
resume!
: Music => {}
Music
.
get_time_played!
: Music => F32
Music
.
length
: Music -> F32
Network
.
configure!
: { server_url : Str } => {}
Network
.
UUID
Network
.
from_u64_pair
: { upper : U64, lower : U64 }a -> UUID
Network
.
to_u64_pair
: UUID -> Effect.RawUUID
Network
.
to_str
: UUID -> Str
RenderTexture
.
create!
: { width : F32, height : F32 } => Result RenderTexture [LoadErr Str]
Sound
.
load!
: Str => Result Sound [LoadErr Str]
Sound
.
play!
: Sound => {}
Texture
.
load!
: Str => Result Texture [LoadErr Str]
Time
.
Time
Time
.
to_nanos
: U64 -> U64
Time
.
sleep_millis!
: U64 => {}
🤖
AI docs
Exposed Modules
RocRay
Camera
Draw
Font
Keys
Mouse
Music
Network
RenderTexture
Sound
Texture
Time