Camera2D Module
Helper functions for 2D Cameras (Orthographic projection).
Use these for top-down, side-scrolling, or any 2D game rendering.
Functions and values
| Function or value |
Description
|
Full Usage:
clampTarget camera minX minY maxX maxY
Parameters:
byref<Camera2D>
-
Passed by reference so mutations are visible to the caller.
minX : float32
minY : float32
maxX : float32
maxY : float32
Modifiers: inline |
Clamp the camera target to a world bounds rectangle.
|
|
|
|
Picture-in-picture overlay. Clears with black by default.
|
|
Create a rendering config from a 2D camera. Defaults: fullscreen, no clear.
|
|
|
|
|
|
Split-screen bottom half. Clears with given color.
|
|
Split-screen left half. Clears with given color.
|
|
Split-screen right half. Clears with given color.
|
|
Split-screen top half. Clears with given color.
|
|
|
Full Usage:
withClear color config
Parameters:
Color
config : Camera2DConfig
Returns: Camera2DConfig
|
Clear with this color before rendering.
|
Full Usage:
withViewport viewport config
Parameters:
Rectangle
config : Camera2DConfig
Returns: Camera2DConfig
|
Set viewport in normalized screen coordinates (0-1).
|
|
Mibo.Raylib