Python API
This is a wrapper around the C API with some syntactic sugar.
The API is still the same as Raylib, so you should still reply on:
The differences are:
the function names are in snake_case.
Some string and pointer conversions are handled automatically.
There are some helper functions to create structures.
Examples
Example program:
import pyray as pr
pr.init_window(800, 450, "Hello Pyray")
pr.set_target_fps(60)
camera = pr.Camera3D([18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0)
while not pr.window_should_close():
pr.update_camera(camera, pr.CAMERA_ORBITAL)
pr.begin_drawing()
pr.clear_background(pr.RAYWHITE)
pr.begin_mode_3d(camera)
pr.draw_grid(20, 1.0)
pr.end_mode_3d()
pr.draw_text("Hello world", 190, 200, 20, pr.VIOLET)
pr.end_drawing()
pr.close_window()
Tip
New in 3.7.0.post9:
You can also now import the functions with no prefix:
from pyray import *
init_window(800, 450, "Raylib texture test")
...
API reference
- class pyray.AudioStream(buffer: Any | None = None, processor: Any | None = None, sampleRate: int | None = None, sampleSize: int | None = None, channels: int | None = None)
struct
- buffer: Any
- channels: int
- processor: Any
- sampleRate: int
- sampleSize: int
- class pyray.AutomationEvent(frame: int | None = None, type: int | None = None, params: list | None = None)
struct
- frame: int
- params: list
- type: int
- class pyray.AutomationEventList(capacity: int | None = None, count: int | None = None, events: Any | None = None)
struct
- capacity: int
- count: int
- events: Any
- class pyray.BlendMode
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- BLEND_ADDITIVE = 1
- BLEND_ADD_COLORS = 3
- BLEND_ALPHA = 0
- BLEND_ALPHA_PREMULTIPLY = 5
- BLEND_CUSTOM = 6
- BLEND_CUSTOM_SEPARATE = 7
- BLEND_MULTIPLIED = 2
- BLEND_SUBTRACT_COLORS = 4
- class pyray.BoneInfo(name: list | None = None, parent: int | None = None)
struct
- name: list
- parent: int
- class pyray.BoundingBox(min: Vector3 | list | tuple | None = None, max: Vector3 | list | tuple | None = None)
struct
- class pyray.Camera2D(offset: Vector2 | list | tuple | None = None, target: Vector2 | list | tuple | None = None, rotation: float | None = None, zoom: float | None = None)
struct
- rotation: float
- zoom: float
- class pyray.Camera3D(position: Vector3 | list | tuple | None = None, target: Vector3 | list | tuple | None = None, up: Vector3 | list | tuple | None = None, fovy: float | None = None, projection: int | None = None)
struct
- fovy: float
- projection: int
- class pyray.CameraMode
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- CAMERA_CUSTOM = 0
- CAMERA_FIRST_PERSON = 3
- CAMERA_FREE = 1
- CAMERA_ORBITAL = 2
- CAMERA_THIRD_PERSON = 4
- class pyray.CameraProjection
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- CAMERA_ORTHOGRAPHIC = 1
- CAMERA_PERSPECTIVE = 0
- class pyray.Color(r: int | None = None, g: int | None = None, b: int | None = None, a: int | None = None)
struct
- a: int
- b: int
- g: int
- r: int
- class pyray.ConfigFlags
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- FLAG_BORDERLESS_WINDOWED_MODE = 32768
- FLAG_FULLSCREEN_MODE = 2
- FLAG_INTERLACED_HINT = 65536
- FLAG_MSAA_4X_HINT = 32
- FLAG_VSYNC_HINT = 64
- FLAG_WINDOW_ALWAYS_RUN = 256
- FLAG_WINDOW_HIDDEN = 128
- FLAG_WINDOW_HIGHDPI = 8192
- FLAG_WINDOW_MAXIMIZED = 1024
- FLAG_WINDOW_MINIMIZED = 512
- FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
- FLAG_WINDOW_RESIZABLE = 4
- FLAG_WINDOW_TOPMOST = 4096
- FLAG_WINDOW_TRANSPARENT = 16
- FLAG_WINDOW_UNDECORATED = 8
- FLAG_WINDOW_UNFOCUSED = 2048
- class pyray.CubemapLayout
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- CUBEMAP_LAYOUT_AUTO_DETECT = 0
- CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4
- CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3
- CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2
- CUBEMAP_LAYOUT_LINE_VERTICAL = 1
- class pyray.FilePathList(capacity: int | None = None, count: int | None = None, paths: list[str] | None = None)
struct
- capacity: int
- count: int
- paths: list[str]
- class pyray.Font(baseSize: int | None = None, glyphCount: int | None = None, glyphPadding: int | None = None, texture: Texture | list | tuple | None = None, recs: Any | None = None, glyphs: Any | None = None)
struct
- baseSize: int
- glyphCount: int
- glyphPadding: int
- glyphs: Any
- recs: Any
- class pyray.FontType
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- FONT_BITMAP = 1
- FONT_DEFAULT = 0
- FONT_SDF = 2
- class pyray.GamepadAxis
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- GAMEPAD_AXIS_LEFT_TRIGGER = 4
- GAMEPAD_AXIS_LEFT_X = 0
- GAMEPAD_AXIS_LEFT_Y = 1
- GAMEPAD_AXIS_RIGHT_TRIGGER = 5
- GAMEPAD_AXIS_RIGHT_X = 2
- GAMEPAD_AXIS_RIGHT_Y = 3
- class pyray.GamepadButton
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3
- GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4
- GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2
- GAMEPAD_BUTTON_LEFT_FACE_UP = 1
- GAMEPAD_BUTTON_LEFT_THUMB = 16
- GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9
- GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10
- GAMEPAD_BUTTON_MIDDLE = 14
- GAMEPAD_BUTTON_MIDDLE_LEFT = 13
- GAMEPAD_BUTTON_MIDDLE_RIGHT = 15
- GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7
- GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8
- GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6
- GAMEPAD_BUTTON_RIGHT_FACE_UP = 5
- GAMEPAD_BUTTON_RIGHT_THUMB = 17
- GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11
- GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12
- GAMEPAD_BUTTON_UNKNOWN = 0
- class pyray.Gesture
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- GESTURE_DOUBLETAP = 2
- GESTURE_DRAG = 8
- GESTURE_HOLD = 4
- GESTURE_NONE = 0
- GESTURE_PINCH_IN = 256
- GESTURE_PINCH_OUT = 512
- GESTURE_SWIPE_DOWN = 128
- GESTURE_SWIPE_LEFT = 32
- GESTURE_SWIPE_RIGHT = 16
- GESTURE_SWIPE_UP = 64
- GESTURE_TAP = 1
- class pyray.GlyphInfo(value: int | None = None, offsetX: int | None = None, offsetY: int | None = None, advanceX: int | None = None, image: Image | list | tuple | None = None)
struct
- advanceX: int
- offsetX: int
- offsetY: int
- value: int
- class pyray.GuiCheckBoxProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- CHECK_PADDING = 16
- class pyray.GuiColorPickerProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- COLOR_SELECTOR_SIZE = 16
- HUEBAR_PADDING = 18
- HUEBAR_SELECTOR_HEIGHT = 19
- HUEBAR_SELECTOR_OVERFLOW = 20
- HUEBAR_WIDTH = 17
- class pyray.GuiComboBoxProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- COMBO_BUTTON_SPACING = 17
- COMBO_BUTTON_WIDTH = 16
- class pyray.GuiControl
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- BUTTON = 2
- CHECKBOX = 6
- COLORPICKER = 13
- COMBOBOX = 7
- DEFAULT = 0
- DROPDOWNBOX = 8
- LABEL = 1
- LISTVIEW = 12
- PROGRESSBAR = 5
- SCROLLBAR = 14
- SLIDER = 4
- SPINNER = 11
- STATUSBAR = 15
- TEXTBOX = 9
- TOGGLE = 3
- VALUEBOX = 10
- class pyray.GuiControlProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- BASE_COLOR_DISABLED = 10
- BASE_COLOR_FOCUSED = 4
- BASE_COLOR_NORMAL = 1
- BASE_COLOR_PRESSED = 7
- BORDER_COLOR_DISABLED = 9
- BORDER_COLOR_FOCUSED = 3
- BORDER_COLOR_NORMAL = 0
- BORDER_COLOR_PRESSED = 6
- BORDER_WIDTH = 12
- TEXT_ALIGNMENT = 14
- TEXT_COLOR_DISABLED = 11
- TEXT_COLOR_FOCUSED = 5
- TEXT_COLOR_NORMAL = 2
- TEXT_COLOR_PRESSED = 8
- TEXT_PADDING = 13
- class pyray.GuiDefaultProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- BACKGROUND_COLOR = 19
- LINE_COLOR = 18
- TEXT_ALIGNMENT_VERTICAL = 21
- TEXT_LINE_SPACING = 20
- TEXT_SIZE = 16
- TEXT_SPACING = 17
- TEXT_WRAP_MODE = 22
- class pyray.GuiDropdownBoxProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- ARROW_PADDING = 16
- DROPDOWN_ARROW_HIDDEN = 18
- DROPDOWN_ITEMS_SPACING = 17
- DROPDOWN_ROLL_UP = 19
- class pyray.GuiIconName
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- ICON_1UP = 148
- ICON_229 = 229
- ICON_230 = 230
- ICON_231 = 231
- ICON_232 = 232
- ICON_233 = 233
- ICON_234 = 234
- ICON_235 = 235
- ICON_236 = 236
- ICON_237 = 237
- ICON_238 = 238
- ICON_239 = 239
- ICON_240 = 240
- ICON_241 = 241
- ICON_242 = 242
- ICON_243 = 243
- ICON_244 = 244
- ICON_245 = 245
- ICON_246 = 246
- ICON_247 = 247
- ICON_248 = 248
- ICON_249 = 249
- ICON_250 = 250
- ICON_251 = 251
- ICON_252 = 252
- ICON_253 = 253
- ICON_254 = 254
- ICON_255 = 255
- ICON_ALARM = 205
- ICON_ALPHA_CLEAR = 93
- ICON_ALPHA_MULTIPLY = 92
- ICON_ARROW_DOWN = 116
- ICON_ARROW_DOWN_FILL = 120
- ICON_ARROW_LEFT = 114
- ICON_ARROW_LEFT_FILL = 118
- ICON_ARROW_RIGHT = 115
- ICON_ARROW_RIGHT_FILL = 119
- ICON_ARROW_UP = 117
- ICON_ARROW_UP_FILL = 121
- ICON_AUDIO = 122
- ICON_BIN = 143
- ICON_BOX = 80
- ICON_BOX_BOTTOM = 85
- ICON_BOX_BOTTOM_LEFT = 86
- ICON_BOX_BOTTOM_RIGHT = 84
- ICON_BOX_CENTER = 89
- ICON_BOX_CIRCLE_MASK = 90
- ICON_BOX_CONCENTRIC = 110
- ICON_BOX_CORNERS_BIG = 99
- ICON_BOX_CORNERS_SMALL = 98
- ICON_BOX_DOTS_BIG = 109
- ICON_BOX_DOTS_SMALL = 108
- ICON_BOX_GRID = 96
- ICON_BOX_GRID_BIG = 111
- ICON_BOX_LEFT = 87
- ICON_BOX_MULTISIZE = 102
- ICON_BOX_RIGHT = 83
- ICON_BOX_TOP = 81
- ICON_BOX_TOP_LEFT = 88
- ICON_BOX_TOP_RIGHT = 82
- ICON_BREAKPOINT_OFF = 213
- ICON_BREAKPOINT_ON = 212
- ICON_BRUSH_CLASSIC = 24
- ICON_BRUSH_PAINTER = 25
- ICON_BURGER_MENU = 214
- ICON_CAMERA = 169
- ICON_CASE_SENSITIVE = 215
- ICON_CLOCK = 139
- ICON_COIN = 146
- ICON_COLOR_BUCKET = 29
- ICON_COLOR_PICKER = 27
- ICON_CORNER = 187
- ICON_CPU = 206
- ICON_CRACK = 155
- ICON_CRACK_POINTS = 156
- ICON_CROP = 36
- ICON_CROP_ALPHA = 37
- ICON_CROSS = 113
- ICON_CROSSLINE = 192
- ICON_CROSS_SMALL = 128
- ICON_CUBE = 162
- ICON_CUBE_FACE_BACK = 168
- ICON_CUBE_FACE_BOTTOM = 166
- ICON_CUBE_FACE_FRONT = 165
- ICON_CUBE_FACE_LEFT = 164
- ICON_CUBE_FACE_RIGHT = 167
- ICON_CUBE_FACE_TOP = 163
- ICON_CURSOR_CLASSIC = 21
- ICON_CURSOR_HAND = 19
- ICON_CURSOR_MOVE = 52
- ICON_CURSOR_MOVE_FILL = 68
- ICON_CURSOR_POINTER = 20
- ICON_CURSOR_SCALE = 53
- ICON_CURSOR_SCALE_FILL = 69
- ICON_CURSOR_SCALE_LEFT = 55
- ICON_CURSOR_SCALE_LEFT_FILL = 71
- ICON_CURSOR_SCALE_RIGHT = 54
- ICON_CURSOR_SCALE_RIGHT_FILL = 70
- ICON_DEMON = 152
- ICON_DITHERING = 94
- ICON_DOOR = 158
- ICON_EMPTYBOX = 63
- ICON_EMPTYBOX_SMALL = 79
- ICON_EXIT = 159
- ICON_EXPLOSION = 147
- ICON_EYE_OFF = 45
- ICON_EYE_ON = 44
- ICON_FILE = 218
- ICON_FILETYPE_ALPHA = 194
- ICON_FILETYPE_AUDIO = 11
- ICON_FILETYPE_BINARY = 200
- ICON_FILETYPE_HOME = 195
- ICON_FILETYPE_IMAGE = 12
- ICON_FILETYPE_INFO = 15
- ICON_FILETYPE_PLAY = 13
- ICON_FILETYPE_TEXT = 10
- ICON_FILETYPE_VIDEO = 14
- ICON_FILE_ADD = 8
- ICON_FILE_COPY = 16
- ICON_FILE_CUT = 17
- ICON_FILE_DELETE = 9
- ICON_FILE_EXPORT = 7
- ICON_FILE_NEW = 203
- ICON_FILE_OPEN = 5
- ICON_FILE_PASTE = 18
- ICON_FILE_SAVE = 6
- ICON_FILE_SAVE_CLASSIC = 2
- ICON_FILTER = 47
- ICON_FILTER_BILINEAR = 35
- ICON_FILTER_POINT = 34
- ICON_FILTER_TOP = 46
- ICON_FOLDER = 217
- ICON_FOLDER_ADD = 204
- ICON_FOLDER_FILE_OPEN = 1
- ICON_FOLDER_OPEN = 3
- ICON_FOLDER_SAVE = 4
- ICON_FOUR_BOXES = 100
- ICON_FX = 123
- ICON_GEAR = 141
- ICON_GEAR_BIG = 142
- ICON_GEAR_EX = 154
- ICON_GRID = 97
- ICON_GRID_FILL = 101
- ICON_HAND_POINTER = 144
- ICON_HEART = 186
- ICON_HELP = 193
- ICON_HELP_BOX = 221
- ICON_HEX = 201
- ICON_HIDPI = 199
- ICON_HOT = 228
- ICON_HOUSE = 185
- ICON_INFO = 191
- ICON_INFO_BOX = 222
- ICON_KEY = 151
- ICON_LASER = 145
- ICON_LAYERS = 197
- ICON_LAYERS2 = 225
- ICON_LAYERS_ISO = 224
- ICON_LAYERS_VISIBLE = 196
- ICON_LENS = 42
- ICON_LENS_BIG = 43
- ICON_LIFE_BARS = 190
- ICON_LINK = 174
- ICON_LINK_BOXES = 172
- ICON_LINK_BROKE = 175
- ICON_LINK_MULTI = 173
- ICON_LINK_NET = 171
- ICON_LOCK_CLOSE = 137
- ICON_LOCK_OPEN = 138
- ICON_MAGNET = 136
- ICON_MAILBOX = 180
- ICON_MAPS = 227
- ICON_MIPMAPS = 95
- ICON_MLAYERS = 226
- ICON_MODE_2D = 160
- ICON_MODE_3D = 161
- ICON_MONITOR = 181
- ICON_MUTATE = 59
- ICON_MUTATE_FILL = 75
- ICON_NONE = 0
- ICON_NOTEBOOK = 177
- ICON_OK_TICK = 112
- ICON_PENCIL = 22
- ICON_PENCIL_BIG = 23
- ICON_PHOTO_CAMERA = 183
- ICON_PHOTO_CAMERA_FLASH = 184
- ICON_PLAYER = 149
- ICON_PLAYER_JUMP = 150
- ICON_PLAYER_NEXT = 134
- ICON_PLAYER_PAUSE = 132
- ICON_PLAYER_PLAY = 131
- ICON_PLAYER_PLAY_BACK = 130
- ICON_PLAYER_PREVIOUS = 129
- ICON_PLAYER_RECORD = 135
- ICON_PLAYER_STOP = 133
- ICON_POT = 91
- ICON_PRINTER = 182
- ICON_PRIORITY = 223
- ICON_REDO = 57
- ICON_REDO_FILL = 73
- ICON_REG_EXP = 216
- ICON_REPEAT = 61
- ICON_REPEAT_FILL = 77
- ICON_REREDO = 58
- ICON_REREDO_FILL = 74
- ICON_RESIZE = 33
- ICON_RESTART = 211
- ICON_ROM = 207
- ICON_ROTATE = 60
- ICON_ROTATE_FILL = 76
- ICON_RUBBER = 28
- ICON_SAND_TIMER = 219
- ICON_SCALE = 32
- ICON_SHIELD = 202
- ICON_SHUFFLE = 62
- ICON_SHUFFLE_FILL = 78
- ICON_SPECIAL = 170
- ICON_SQUARE_TOGGLE = 38
- ICON_STAR = 157
- ICON_STEP_INTO = 209
- ICON_STEP_OUT = 210
- ICON_STEP_OVER = 208
- ICON_SUITCASE = 178
- ICON_SUITCASE_ZIP = 179
- ICON_SYMMETRY = 39
- ICON_SYMMETRY_HORIZONTAL = 40
- ICON_SYMMETRY_VERTICAL = 41
- ICON_TARGET = 64
- ICON_TARGET_BIG = 50
- ICON_TARGET_BIG_FILL = 66
- ICON_TARGET_MOVE = 51
- ICON_TARGET_MOVE_FILL = 67
- ICON_TARGET_POINT = 48
- ICON_TARGET_SMALL = 49
- ICON_TARGET_SMALL_FILL = 65
- ICON_TEXT_A = 31
- ICON_TEXT_NOTES = 176
- ICON_TEXT_POPUP = 153
- ICON_TEXT_T = 30
- ICON_TOOLS = 140
- ICON_UNDO = 56
- ICON_UNDO_FILL = 72
- ICON_VERTICAL_BARS = 188
- ICON_VERTICAL_BARS_FILL = 189
- ICON_WARNING = 220
- ICON_WATER_DROP = 26
- ICON_WAVE = 124
- ICON_WAVE_SINUS = 125
- ICON_WAVE_SQUARE = 126
- ICON_WAVE_TRIANGULAR = 127
- ICON_WINDOW = 198
- ICON_ZOOM_ALL = 106
- ICON_ZOOM_BIG = 105
- ICON_ZOOM_CENTER = 107
- ICON_ZOOM_MEDIUM = 104
- ICON_ZOOM_SMALL = 103
- class pyray.GuiListViewProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- LIST_ITEMS_BORDER_WIDTH = 20
- LIST_ITEMS_HEIGHT = 16
- LIST_ITEMS_SPACING = 17
- SCROLLBAR_SIDE = 19
- SCROLLBAR_WIDTH = 18
- class pyray.GuiProgressBarProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- PROGRESS_PADDING = 16
- class pyray.GuiScrollBarProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- ARROWS_SIZE = 16
- ARROWS_VISIBLE = 17
- SCROLL_PADDING = 20
- SCROLL_SLIDER_PADDING = 18
- SCROLL_SLIDER_SIZE = 19
- SCROLL_SPEED = 21
- class pyray.GuiSliderProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- SLIDER_PADDING = 17
- SLIDER_WIDTH = 16
- class pyray.GuiSpinnerProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- SPIN_BUTTON_SPACING = 17
- SPIN_BUTTON_WIDTH = 16
- class pyray.GuiState
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- STATE_DISABLED = 3
- STATE_FOCUSED = 1
- STATE_NORMAL = 0
- STATE_PRESSED = 2
- class pyray.GuiStyleProp(controlId: int | None = None, propertyId: int | None = None, propertyValue: int | None = None)
struct
- controlId: int
- propertyId: int
- propertyValue: int
- class pyray.GuiTextAlignment
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- TEXT_ALIGN_CENTER = 1
- TEXT_ALIGN_LEFT = 0
- TEXT_ALIGN_RIGHT = 2
- class pyray.GuiTextAlignmentVertical
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- TEXT_ALIGN_BOTTOM = 2
- TEXT_ALIGN_MIDDLE = 1
- TEXT_ALIGN_TOP = 0
- class pyray.GuiTextBoxProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- TEXT_READONLY = 16
- class pyray.GuiTextWrapMode
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- TEXT_WRAP_CHAR = 1
- TEXT_WRAP_NONE = 0
- TEXT_WRAP_WORD = 2
- class pyray.GuiToggleProperty
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- GROUP_PADDING = 16
- class pyray.Image(data: Any | None = None, width: int | None = None, height: int | None = None, mipmaps: int | None = None, format: int | None = None)
struct
- data: Any
- format: int
- height: int
- mipmaps: int
- width: int
- class pyray.KeyboardKey
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- KEY_A = 65
- KEY_APOSTROPHE = 39
- KEY_B = 66
- KEY_BACK = 4
- KEY_BACKSLASH = 92
- KEY_BACKSPACE = 259
- KEY_C = 67
- KEY_CAPS_LOCK = 280
- KEY_COMMA = 44
- KEY_D = 68
- KEY_DELETE = 261
- KEY_DOWN = 264
- KEY_E = 69
- KEY_EIGHT = 56
- KEY_END = 269
- KEY_ENTER = 257
- KEY_EQUAL = 61
- KEY_ESCAPE = 256
- KEY_F = 70
- KEY_F1 = 290
- KEY_F10 = 299
- KEY_F11 = 300
- KEY_F12 = 301
- KEY_F2 = 291
- KEY_F3 = 292
- KEY_F4 = 293
- KEY_F5 = 294
- KEY_F6 = 295
- KEY_F7 = 296
- KEY_F8 = 297
- KEY_F9 = 298
- KEY_FIVE = 53
- KEY_FOUR = 52
- KEY_G = 71
- KEY_GRAVE = 96
- KEY_H = 72
- KEY_HOME = 268
- KEY_I = 73
- KEY_INSERT = 260
- KEY_J = 74
- KEY_K = 75
- KEY_KB_MENU = 348
- KEY_KP_0 = 320
- KEY_KP_1 = 321
- KEY_KP_2 = 322
- KEY_KP_3 = 323
- KEY_KP_4 = 324
- KEY_KP_5 = 325
- KEY_KP_6 = 326
- KEY_KP_7 = 327
- KEY_KP_8 = 328
- KEY_KP_9 = 329
- KEY_KP_ADD = 334
- KEY_KP_DECIMAL = 330
- KEY_KP_DIVIDE = 331
- KEY_KP_ENTER = 335
- KEY_KP_EQUAL = 336
- KEY_KP_MULTIPLY = 332
- KEY_KP_SUBTRACT = 333
- KEY_L = 76
- KEY_LEFT = 263
- KEY_LEFT_ALT = 342
- KEY_LEFT_BRACKET = 91
- KEY_LEFT_CONTROL = 341
- KEY_LEFT_SHIFT = 340
- KEY_LEFT_SUPER = 343
- KEY_M = 77
- KEY_MENU = 5
- KEY_MINUS = 45
- KEY_N = 78
- KEY_NINE = 57
- KEY_NULL = 0
- KEY_NUM_LOCK = 282
- KEY_O = 79
- KEY_ONE = 49
- KEY_P = 80
- KEY_PAGE_DOWN = 267
- KEY_PAGE_UP = 266
- KEY_PAUSE = 284
- KEY_PERIOD = 46
- KEY_PRINT_SCREEN = 283
- KEY_Q = 81
- KEY_R = 82
- KEY_RIGHT = 262
- KEY_RIGHT_ALT = 346
- KEY_RIGHT_BRACKET = 93
- KEY_RIGHT_CONTROL = 345
- KEY_RIGHT_SHIFT = 344
- KEY_RIGHT_SUPER = 347
- KEY_S = 83
- KEY_SCROLL_LOCK = 281
- KEY_SEMICOLON = 59
- KEY_SEVEN = 55
- KEY_SIX = 54
- KEY_SLASH = 47
- KEY_SPACE = 32
- KEY_T = 84
- KEY_TAB = 258
- KEY_THREE = 51
- KEY_TWO = 50
- KEY_U = 85
- KEY_UP = 265
- KEY_V = 86
- KEY_VOLUME_DOWN = 25
- KEY_VOLUME_UP = 24
- KEY_W = 87
- KEY_X = 88
- KEY_Y = 89
- KEY_Z = 90
- KEY_ZERO = 48
- class pyray.Material(shader: Shader | list | tuple | None = None, maps: Any | None = None, params: list | None = None)
struct
- maps: Any
- params: list
- class pyray.MaterialMap(texture: Texture | list | tuple | None = None, color: Color | list | tuple | None = None, value: float | None = None)
struct
- value: float
- class pyray.MaterialMapIndex
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- MATERIAL_MAP_ALBEDO = 0
- MATERIAL_MAP_BRDF = 10
- MATERIAL_MAP_CUBEMAP = 7
- MATERIAL_MAP_EMISSION = 5
- MATERIAL_MAP_HEIGHT = 6
- MATERIAL_MAP_IRRADIANCE = 8
- MATERIAL_MAP_METALNESS = 1
- MATERIAL_MAP_NORMAL = 2
- MATERIAL_MAP_OCCLUSION = 4
- MATERIAL_MAP_PREFILTER = 9
- MATERIAL_MAP_ROUGHNESS = 3
- class pyray.Matrix(m0: float | None = None, m4: float | None = None, m8: float | None = None, m12: float | None = None, m1: float | None = None, m5: float | None = None, m9: float | None = None, m13: float | None = None, m2: float | None = None, m6: float | None = None, m10: float | None = None, m14: float | None = None, m3: float | None = None, m7: float | None = None, m11: float | None = None, m15: float | None = None)
struct
- m0: float
- m1: float
- m10: float
- m11: float
- m12: float
- m13: float
- m14: float
- m15: float
- m2: float
- m3: float
- m4: float
- m5: float
- m6: float
- m7: float
- m8: float
- m9: float
- class pyray.Matrix2x2(m00: float | None = None, m01: float | None = None, m10: float | None = None, m11: float | None = None)
struct
- m00: float
- m01: float
- m10: float
- m11: float
- class pyray.Mesh(vertexCount: int | None = None, triangleCount: int | None = None, vertices: Any | None = None, texcoords: Any | None = None, texcoords2: Any | None = None, normals: Any | None = None, tangents: Any | None = None, colors: str | None = None, indices: Any | None = None, animVertices: Any | None = None, animNormals: Any | None = None, boneIds: str | None = None, boneWeights: Any | None = None, boneMatrices: Any | None = None, boneCount: int | None = None, vaoId: int | None = None, vboId: Any | None = None)
struct
- animNormals: Any
- animVertices: Any
- boneCount: int
- boneIds: str
- boneMatrices: Any
- boneWeights: Any
- colors: str
- indices: Any
- normals: Any
- tangents: Any
- texcoords: Any
- texcoords2: Any
- triangleCount: int
- vaoId: int
- vboId: Any
- vertexCount: int
- vertices: Any
- class pyray.Model(transform: Matrix | list | tuple | None = None, meshCount: int | None = None, materialCount: int | None = None, meshes: Any | None = None, materials: Any | None = None, meshMaterial: Any | None = None, boneCount: int | None = None, bones: Any | None = None, bindPose: Any | None = None)
struct
- bindPose: Any
- boneCount: int
- bones: Any
- materialCount: int
- materials: Any
- meshCount: int
- meshMaterial: Any
- meshes: Any
- class pyray.ModelAnimation(boneCount: int | None = None, frameCount: int | None = None, bones: Any | None = None, framePoses: Any | None = None, name: list | None = None)
struct
- boneCount: int
- bones: Any
- frameCount: int
- framePoses: Any
- name: list
- class pyray.MouseButton
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- MOUSE_BUTTON_BACK = 6
- MOUSE_BUTTON_EXTRA = 4
- MOUSE_BUTTON_FORWARD = 5
- MOUSE_BUTTON_LEFT = 0
- MOUSE_BUTTON_MIDDLE = 2
- MOUSE_BUTTON_RIGHT = 1
- MOUSE_BUTTON_SIDE = 3
- class pyray.MouseCursor
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- MOUSE_CURSOR_ARROW = 1
- MOUSE_CURSOR_CROSSHAIR = 3
- MOUSE_CURSOR_DEFAULT = 0
- MOUSE_CURSOR_IBEAM = 2
- MOUSE_CURSOR_NOT_ALLOWED = 10
- MOUSE_CURSOR_POINTING_HAND = 4
- MOUSE_CURSOR_RESIZE_ALL = 9
- MOUSE_CURSOR_RESIZE_EW = 5
- MOUSE_CURSOR_RESIZE_NESW = 8
- MOUSE_CURSOR_RESIZE_NS = 6
- MOUSE_CURSOR_RESIZE_NWSE = 7
- class pyray.Music(stream: AudioStream | list | tuple | None = None, frameCount: int | None = None, looping: bool | None = None, ctxType: int | None = None, ctxData: Any | None = None)
struct
- ctxData: Any
- ctxType: int
- frameCount: int
- looping: bool
- stream: AudioStream
- class pyray.NPatchInfo(source: Rectangle | list | tuple | None = None, left: int | None = None, top: int | None = None, right: int | None = None, bottom: int | None = None, layout: int | None = None)
struct
- bottom: int
- layout: int
- left: int
- right: int
- top: int
- class pyray.NPatchLayout
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- NPATCH_NINE_PATCH = 0
- NPATCH_THREE_PATCH_HORIZONTAL = 2
- NPATCH_THREE_PATCH_VERTICAL = 1
- class pyray.PhysicsBodyData(id: int | None = None, enabled: bool | None = None, position: Vector2 | list | tuple | None = None, velocity: Vector2 | list | tuple | None = None, force: Vector2 | list | tuple | None = None, angularVelocity: float | None = None, torque: float | None = None, orient: float | None = None, inertia: float | None = None, inverseInertia: float | None = None, mass: float | None = None, inverseMass: float | None = None, staticFriction: float | None = None, dynamicFriction: float | None = None, restitution: float | None = None, useGravity: bool | None = None, isGrounded: bool | None = None, freezeOrient: bool | None = None, shape: PhysicsShape | list | tuple | None = None)
struct
- angularVelocity: float
- dynamicFriction: float
- enabled: bool
- freezeOrient: bool
- id: int
- inertia: float
- inverseInertia: float
- inverseMass: float
- isGrounded: bool
- mass: float
- orient: float
- restitution: float
- shape: PhysicsShape
- staticFriction: float
- torque: float
- useGravity: bool
- class pyray.PhysicsManifoldData(id: int | None = None, bodyA: Any | None = None, bodyB: Any | None = None, penetration: float | None = None, normal: Vector2 | list | tuple | None = None, contacts: list | None = None, contactsCount: int | None = None, restitution: float | None = None, dynamicFriction: float | None = None, staticFriction: float | None = None)
struct
- bodyA: Any
- bodyB: Any
- contacts: list
- contactsCount: int
- dynamicFriction: float
- id: int
- penetration: float
- restitution: float
- staticFriction: float
- class pyray.PhysicsShape(type: PhysicsShapeType | None = None, body: Any | None = None, vertexData: PhysicsVertexData | list | tuple | None = None, radius: float | None = None, transform: Matrix2x2 | list | tuple | None = None)
struct
- body: Any
- radius: float
- type: PhysicsShapeType
- vertexData: PhysicsVertexData
- class pyray.PhysicsVertexData(vertexCount: int | None = None, positions: list | None = None, normals: list | None = None)
struct
- normals: list
- positions: list
- vertexCount: int
- class pyray.PixelFormat
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
- PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
- PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
- PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
- PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
- PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
- PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
- PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
- PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
- PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
- PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
- PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
- PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2
- PIXELFORMAT_UNCOMPRESSED_R16 = 11
- PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
- PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
- PIXELFORMAT_UNCOMPRESSED_R32 = 8
- PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
- PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
- PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6
- PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5
- PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3
- PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4
- PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7
- class pyray.Ray(position: Vector3 | list | tuple | None = None, direction: Vector3 | list | tuple | None = None)
struct
- class pyray.RayCollision(hit: bool | None = None, distance: float | None = None, point: Vector3 | list | tuple | None = None, normal: Vector3 | list | tuple | None = None)
struct
- distance: float
- hit: bool
- class pyray.Rectangle(x: float | None = None, y: float | None = None, width: float | None = None, height: float | None = None)
struct
- height: float
- width: float
- x: float
- y: float
- class pyray.RenderTexture(id: int | None = None, texture: Texture | list | tuple | None = None, depth: Texture | list | tuple | None = None)
struct
- id: int
- class pyray.ShaderAttributeDataType
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- SHADER_ATTRIB_FLOAT = 0
- SHADER_ATTRIB_VEC2 = 1
- SHADER_ATTRIB_VEC3 = 2
- SHADER_ATTRIB_VEC4 = 3
- class pyray.ShaderLocationIndex
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- SHADER_LOC_BONE_MATRICES = 28
- SHADER_LOC_COLOR_AMBIENT = 14
- SHADER_LOC_COLOR_DIFFUSE = 12
- SHADER_LOC_COLOR_SPECULAR = 13
- SHADER_LOC_MAP_ALBEDO = 15
- SHADER_LOC_MAP_BRDF = 25
- SHADER_LOC_MAP_CUBEMAP = 22
- SHADER_LOC_MAP_EMISSION = 20
- SHADER_LOC_MAP_HEIGHT = 21
- SHADER_LOC_MAP_IRRADIANCE = 23
- SHADER_LOC_MAP_METALNESS = 16
- SHADER_LOC_MAP_NORMAL = 17
- SHADER_LOC_MAP_OCCLUSION = 19
- SHADER_LOC_MAP_PREFILTER = 24
- SHADER_LOC_MAP_ROUGHNESS = 18
- SHADER_LOC_MATRIX_MODEL = 9
- SHADER_LOC_MATRIX_MVP = 6
- SHADER_LOC_MATRIX_NORMAL = 10
- SHADER_LOC_MATRIX_PROJECTION = 8
- SHADER_LOC_MATRIX_VIEW = 7
- SHADER_LOC_VECTOR_VIEW = 11
- SHADER_LOC_VERTEX_BONEIDS = 26
- SHADER_LOC_VERTEX_BONEWEIGHTS = 27
- SHADER_LOC_VERTEX_COLOR = 5
- SHADER_LOC_VERTEX_NORMAL = 3
- SHADER_LOC_VERTEX_POSITION = 0
- SHADER_LOC_VERTEX_TANGENT = 4
- SHADER_LOC_VERTEX_TEXCOORD01 = 1
- SHADER_LOC_VERTEX_TEXCOORD02 = 2
- class pyray.ShaderUniformDataType
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- SHADER_UNIFORM_FLOAT = 0
- SHADER_UNIFORM_INT = 4
- SHADER_UNIFORM_IVEC2 = 5
- SHADER_UNIFORM_IVEC3 = 6
- SHADER_UNIFORM_IVEC4 = 7
- SHADER_UNIFORM_SAMPLER2D = 8
- SHADER_UNIFORM_VEC2 = 1
- SHADER_UNIFORM_VEC3 = 2
- SHADER_UNIFORM_VEC4 = 3
- class pyray.Sound(stream: AudioStream | list | tuple | None = None, frameCount: int | None = None)
struct
- frameCount: int
- stream: AudioStream
- class pyray.Texture(id: int | None = None, width: int | None = None, height: int | None = None, mipmaps: int | None = None, format: int | None = None)
struct
- format: int
- height: int
- id: int
- mipmaps: int
- width: int
- class pyray.Texture2D(id: int | None = None, width: int | None = None, height: int | None = None, mipmaps: int | None = None, format: int | None = None)
struct
- format: int
- height: int
- id: int
- mipmaps: int
- width: int
- class pyray.TextureFilter
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- TEXTURE_FILTER_ANISOTROPIC_16X = 5
- TEXTURE_FILTER_ANISOTROPIC_4X = 3
- TEXTURE_FILTER_ANISOTROPIC_8X = 4
- TEXTURE_FILTER_BILINEAR = 1
- TEXTURE_FILTER_POINT = 0
- TEXTURE_FILTER_TRILINEAR = 2
- class pyray.TextureWrap
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- TEXTURE_WRAP_CLAMP = 1
- TEXTURE_WRAP_MIRROR_CLAMP = 3
- TEXTURE_WRAP_MIRROR_REPEAT = 2
- TEXTURE_WRAP_REPEAT = 0
- class pyray.TraceLogLevel
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- LOG_ALL = 0
- LOG_DEBUG = 2
- LOG_ERROR = 5
- LOG_FATAL = 6
- LOG_INFO = 3
- LOG_NONE = 7
- LOG_TRACE = 1
- LOG_WARNING = 4
- class pyray.Transform(translation: Vector3 | list | tuple | None = None, rotation: Vector4 | list | tuple | None = None, scale: Vector3 | list | tuple | None = None)
struct
- class pyray.Vector3(x: float | None = None, y: float | None = None, z: float | None = None)
struct
- x: float
- y: float
- z: float
- class pyray.Vector4(x: float | None = None, y: float | None = None, z: float | None = None, w: float | None = None)
struct
- w: float
- x: float
- y: float
- z: float
- class pyray.VrDeviceInfo(hResolution: int | None = None, vResolution: int | None = None, hScreenSize: float | None = None, vScreenSize: float | None = None, eyeToScreenDistance: float | None = None, lensSeparationDistance: float | None = None, interpupillaryDistance: float | None = None, lensDistortionValues: list | None = None, chromaAbCorrection: list | None = None)
struct
- chromaAbCorrection: list
- eyeToScreenDistance: float
- hResolution: int
- hScreenSize: float
- interpupillaryDistance: float
- lensDistortionValues: list
- lensSeparationDistance: float
- vResolution: int
- vScreenSize: float
- class pyray.VrStereoConfig(projection: list | None = None, viewOffset: list | None = None, leftLensCenter: list | None = None, rightLensCenter: list | None = None, leftScreenCenter: list | None = None, rightScreenCenter: list | None = None, scale: list | None = None, scaleIn: list | None = None)
struct
- leftLensCenter: list
- leftScreenCenter: list
- projection: list
- rightLensCenter: list
- rightScreenCenter: list
- scale: list
- scaleIn: list
- viewOffset: list
- class pyray.Wave(frameCount: int | None = None, sampleRate: int | None = None, sampleSize: int | None = None, channels: int | None = None, data: Any | None = None)
struct
- channels: int
- data: Any
- frameCount: int
- sampleRate: int
- sampleSize: int
- pyray.attach_audio_mixed_processor(processor: Any) None
Attach audio stream processor to the entire audio pipeline, receives the samples as ‘float’
- pyray.attach_audio_stream_processor(stream: AudioStream | list | tuple, processor: Any) None
Attach audio stream processor to stream, receives the samples as ‘float’
- pyray.begin_blend_mode(mode: int) None
Begin blending mode (alpha, additive, multiplied, subtract, custom)
- pyray.begin_drawing() None
Setup canvas (framebuffer) to start drawing
- pyray.begin_scissor_mode(x: int, y: int, width: int, height: int) None
Begin scissor mode (define screen area for following drawing)
- pyray.begin_texture_mode(target: RenderTexture | list | tuple) None
Begin drawing to render texture
- pyray.begin_vr_stereo_mode(config: VrStereoConfig | list | tuple) None
Begin stereo rendering (requires VR simulator)
- pyray.change_directory(dir: str) bool
Change working directory, return true on success
- pyray.check_collision_box_sphere(box: BoundingBox | list | tuple, center: Vector3 | list | tuple, radius: float) bool
Check collision between box and sphere
- pyray.check_collision_boxes(box1: BoundingBox | list | tuple, box2: BoundingBox | list | tuple) bool
Check collision between two bounding boxes
- pyray.check_collision_circle_line(center: Vector2 | list | tuple, radius: float, p1: Vector2 | list | tuple, p2: Vector2 | list | tuple) bool
Check if circle collides with a line created betweeen two points [p1] and [p2]
- pyray.check_collision_circle_rec(center: Vector2 | list | tuple, radius: float, rec: Rectangle | list | tuple) bool
Check collision between circle and rectangle
- pyray.check_collision_circles(center1: Vector2 | list | tuple, radius1: float, center2: Vector2 | list | tuple, radius2: float) bool
Check collision between two circles
- pyray.check_collision_lines(startPos1: Vector2 | list | tuple, endPos1: Vector2 | list | tuple, startPos2: Vector2 | list | tuple, endPos2: Vector2 | list | tuple, collisionPoint: Any | list | tuple) bool
Check the collision between two lines defined by two points each, returns collision point by reference
- pyray.check_collision_point_circle(point: Vector2 | list | tuple, center: Vector2 | list | tuple, radius: float) bool
Check if point is inside circle
- pyray.check_collision_point_line(point: Vector2 | list | tuple, p1: Vector2 | list | tuple, p2: Vector2 | list | tuple, threshold: int) bool
Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
- pyray.check_collision_point_poly(point: Vector2 | list | tuple, points: Any | list | tuple, pointCount: int) bool
Check if point is within a polygon described by array of vertices
- pyray.check_collision_point_rec(point: Vector2 | list | tuple, rec: Rectangle | list | tuple) bool
Check if point is inside rectangle
- pyray.check_collision_point_triangle(point: Vector2 | list | tuple, p1: Vector2 | list | tuple, p2: Vector2 | list | tuple, p3: Vector2 | list | tuple) bool
Check if point is inside a triangle
- pyray.check_collision_recs(rec1: Rectangle | list | tuple, rec2: Rectangle | list | tuple) bool
Check collision between two rectangles
- pyray.check_collision_spheres(center1: Vector3 | list | tuple, radius1: float, center2: Vector3 | list | tuple, radius2: float) bool
Check collision between two spheres
- pyray.clamp(value: float, min_1: float, max_2: float) float
- pyray.clear_background(color: Color | list | tuple) None
Set background color (framebuffer clear color)
- pyray.clear_window_state(flags: int) None
Clear window configuration state flags
- pyray.close_audio_device() None
Close the audio device and context
- pyray.close_physics() None
Close physics system and unload used memory
- pyray.close_window() None
Close window and unload OpenGL context
- pyray.codepoint_to_utf8(codepoint: int, utf8Size: Any) str
Encode one codepoint into UTF-8 byte array (array length returned as parameter)
- pyray.color_alpha(color: Color | list | tuple, alpha: float) Color
Get color with alpha applied, alpha goes from 0.0f to 1.0f
- pyray.color_alpha_blend(dst: Color | list | tuple, src: Color | list | tuple, tint: Color | list | tuple) Color
Get src alpha-blended into dst color with tint
- pyray.color_brightness(color: Color | list | tuple, factor: float) Color
Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
- pyray.color_contrast(color: Color | list | tuple, contrast: float) Color
Get color with contrast correction, contrast values between -1.0f and 1.0f
- pyray.color_from_hsv(hue: float, saturation: float, value: float) Color
Get a Color from HSV values, hue [0..360], saturation/value [0..1]
- pyray.color_from_normalized(normalized: Vector4 | list | tuple) Color
Get Color from normalized values [0..1]
- pyray.color_is_equal(col1: Color | list | tuple, col2: Color | list | tuple) bool
Check if two colors are equal
- pyray.color_lerp(color1: Color | list | tuple, color2: Color | list | tuple, factor: float) Color
Get color lerp interpolation between two colors, factor [0.0f..1.0f]
- pyray.color_tint(color: Color | list | tuple, tint: Color | list | tuple) Color
Get color multiplied with another color
- pyray.color_to_hsv(color: Color | list | tuple) Vector3
Get HSV values for a Color, hue [0..360], saturation/value [0..1]
- pyray.color_to_int(color: Color | list | tuple) int
Get hexadecimal value for a Color (0xRRGGBBAA)
- pyray.compress_data(data: str, dataSize: int, compDataSize: Any) str
Compress data (DEFLATE algorithm), memory must be MemFree()
- pyray.compute_crc32(data: str, dataSize: int) int
Compute CRC32 hash code
- pyray.compute_md5(data: str, dataSize: int) Any
Compute MD5 hash code, returns static int[4] (16 bytes)
- pyray.compute_sha1(data: str, dataSize: int) Any
Compute SHA1 hash code, returns static int[5] (20 bytes)
- pyray.create_physics_body_circle(pos: Vector2 | list | tuple, radius: float, density: float) Any
Creates a new circle physics body with generic parameters
- pyray.create_physics_body_polygon(pos: Vector2 | list | tuple, radius: float, sides: int, density: float) Any
Creates a new polygon physics body with generic parameters
- pyray.create_physics_body_rectangle(pos: Vector2 | list | tuple, width: float, height: float, density: float) Any
Creates a new rectangle physics body with generic parameters
- pyray.decode_data_base64(data: str, outputSize: Any) str
Decode Base64 string data, memory must be MemFree()
- pyray.decompress_data(compData: str, compDataSize: int, dataSize: Any) str
Decompress data (DEFLATE algorithm), memory must be MemFree()
- pyray.destroy_physics_body(body: Any | list | tuple) None
Destroy a physics body
- pyray.detach_audio_mixed_processor(processor: Any) None
Detach audio stream processor from the entire audio pipeline
- pyray.detach_audio_stream_processor(stream: AudioStream | list | tuple, processor: Any) None
Detach audio stream processor from stream
- pyray.directory_exists(dirPath: str) bool
Check if a directory path exists
- pyray.disable_cursor() None
Disables cursor (lock cursor)
- pyray.disable_event_waiting() None
Disable waiting for events on EndDrawing(), automatic events polling
- pyray.draw_billboard(camera: Camera3D | list | tuple, texture: Texture | list | tuple, position: Vector3 | list | tuple, scale: float, tint: Color | list | tuple) None
Draw a billboard texture
- pyray.draw_billboard_pro(camera: Camera3D | list | tuple, texture: Texture | list | tuple, source: Rectangle | list | tuple, position: Vector3 | list | tuple, up: Vector3 | list | tuple, size: Vector2 | list | tuple, origin: Vector2 | list | tuple, rotation: float, tint: Color | list | tuple) None
Draw a billboard texture defined by source and rotation
- pyray.draw_billboard_rec(camera: Camera3D | list | tuple, texture: Texture | list | tuple, source: Rectangle | list | tuple, position: Vector3 | list | tuple, size: Vector2 | list | tuple, tint: Color | list | tuple) None
Draw a billboard texture defined by source
- pyray.draw_bounding_box(box: BoundingBox | list | tuple, color: Color | list | tuple) None
Draw bounding box (wires)
- pyray.draw_capsule(startPos: Vector3 | list | tuple, endPos: Vector3 | list | tuple, radius: float, slices: int, rings: int, color: Color | list | tuple) None
Draw a capsule with the center of its sphere caps at startPos and endPos
- pyray.draw_capsule_wires(startPos: Vector3 | list | tuple, endPos: Vector3 | list | tuple, radius: float, slices: int, rings: int, color: Color | list | tuple) None
Draw capsule wireframe with the center of its sphere caps at startPos and endPos
- pyray.draw_circle(centerX: int, centerY: int, radius: float, color: Color | list | tuple) None
Draw a color-filled circle
- pyray.draw_circle_3d(center: Vector3 | list | tuple, radius: float, rotationAxis: Vector3 | list | tuple, rotationAngle: float, color: Color | list | tuple) None
Draw a circle in 3D world space
- pyray.draw_circle_gradient(centerX: int, centerY: int, radius: float, inner: Color | list | tuple, outer: Color | list | tuple) None
Draw a gradient-filled circle
- pyray.draw_circle_lines(centerX: int, centerY: int, radius: float, color: Color | list | tuple) None
Draw circle outline
- pyray.draw_circle_lines_v(center: Vector2 | list | tuple, radius: float, color: Color | list | tuple) None
Draw circle outline (Vector version)
- pyray.draw_circle_sector(center: Vector2 | list | tuple, radius: float, startAngle: float, endAngle: float, segments: int, color: Color | list | tuple) None
Draw a piece of a circle
- pyray.draw_circle_sector_lines(center: Vector2 | list | tuple, radius: float, startAngle: float, endAngle: float, segments: int, color: Color | list | tuple) None
Draw circle sector outline
- pyray.draw_circle_v(center: Vector2 | list | tuple, radius: float, color: Color | list | tuple) None
Draw a color-filled circle (Vector version)
- pyray.draw_cube(position: Vector3 | list | tuple, width: float, height: float, length: float, color: Color | list | tuple) None
Draw cube
- pyray.draw_cube_v(position: Vector3 | list | tuple, size: Vector3 | list | tuple, color: Color | list | tuple) None
Draw cube (Vector version)
- pyray.draw_cube_wires(position: Vector3 | list | tuple, width: float, height: float, length: float, color: Color | list | tuple) None
Draw cube wires
- pyray.draw_cube_wires_v(position: Vector3 | list | tuple, size: Vector3 | list | tuple, color: Color | list | tuple) None
Draw cube wires (Vector version)
- pyray.draw_cylinder(position: Vector3 | list | tuple, radiusTop: float, radiusBottom: float, height: float, slices: int, color: Color | list | tuple) None
Draw a cylinder/cone
- pyray.draw_cylinder_ex(startPos: Vector3 | list | tuple, endPos: Vector3 | list | tuple, startRadius: float, endRadius: float, sides: int, color: Color | list | tuple) None
Draw a cylinder with base at startPos and top at endPos
- pyray.draw_cylinder_wires(position: Vector3 | list | tuple, radiusTop: float, radiusBottom: float, height: float, slices: int, color: Color | list | tuple) None
Draw a cylinder/cone wires
- pyray.draw_cylinder_wires_ex(startPos: Vector3 | list | tuple, endPos: Vector3 | list | tuple, startRadius: float, endRadius: float, sides: int, color: Color | list | tuple) None
Draw a cylinder wires with base at startPos and top at endPos
- pyray.draw_ellipse(centerX: int, centerY: int, radiusH: float, radiusV: float, color: Color | list | tuple) None
Draw ellipse
- pyray.draw_ellipse_lines(centerX: int, centerY: int, radiusH: float, radiusV: float, color: Color | list | tuple) None
Draw ellipse outline
- pyray.draw_fps(posX: int, posY: int) None
Draw current FPS
- pyray.draw_grid(slices: int, spacing: float) None
Draw a grid (centered at (0, 0, 0))
- pyray.draw_line(startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: Color | list | tuple) None
Draw a line
- pyray.draw_line_3d(startPos: Vector3 | list | tuple, endPos: Vector3 | list | tuple, color: Color | list | tuple) None
Draw a line in 3D world space
- pyray.draw_line_bezier(startPos: Vector2 | list | tuple, endPos: Vector2 | list | tuple, thick: float, color: Color | list | tuple) None
Draw line segment cubic-bezier in-out interpolation
- pyray.draw_line_ex(startPos: Vector2 | list | tuple, endPos: Vector2 | list | tuple, thick: float, color: Color | list | tuple) None
Draw a line (using triangles/quads)
- pyray.draw_line_strip(points: Any | list | tuple, pointCount: int, color: Color | list | tuple) None
Draw lines sequence (using gl lines)
- pyray.draw_line_v(startPos: Vector2 | list | tuple, endPos: Vector2 | list | tuple, color: Color | list | tuple) None
Draw a line (using gl lines)
- pyray.draw_mesh(mesh: Mesh | list | tuple, material: Material | list | tuple, transform: Matrix | list | tuple) None
Draw a 3d mesh with material and transform
- pyray.draw_mesh_instanced(mesh: Mesh | list | tuple, material: Material | list | tuple, transforms: Any | list | tuple, instances: int) None
Draw multiple mesh instances with material and different transforms
- pyray.draw_model(model: Model | list | tuple, position: Vector3 | list | tuple, scale: float, tint: Color | list | tuple) None
Draw a model (with texture if set)
- pyray.draw_model_ex(model: Model | list | tuple, position: Vector3 | list | tuple, rotationAxis: Vector3 | list | tuple, rotationAngle: float, scale: Vector3 | list | tuple, tint: Color | list | tuple) None
Draw a model with extended parameters
- pyray.draw_model_points(model: Model | list | tuple, position: Vector3 | list | tuple, scale: float, tint: Color | list | tuple) None
Draw a model as points
- pyray.draw_model_points_ex(model: Model | list | tuple, position: Vector3 | list | tuple, rotationAxis: Vector3 | list | tuple, rotationAngle: float, scale: Vector3 | list | tuple, tint: Color | list | tuple) None
Draw a model as points with extended parameters
- pyray.draw_model_wires(model: Model | list | tuple, position: Vector3 | list | tuple, scale: float, tint: Color | list | tuple) None
Draw a model wires (with texture if set)
- pyray.draw_model_wires_ex(model: Model | list | tuple, position: Vector3 | list | tuple, rotationAxis: Vector3 | list | tuple, rotationAngle: float, scale: Vector3 | list | tuple, tint: Color | list | tuple) None
Draw a model wires (with texture if set) with extended parameters
- pyray.draw_pixel(posX: int, posY: int, color: Color | list | tuple) None
Draw a pixel using geometry [Can be slow, use with care]
- pyray.draw_pixel_v(position: Vector2 | list | tuple, color: Color | list | tuple) None
Draw a pixel using geometry (Vector version) [Can be slow, use with care]
- pyray.draw_plane(centerPos: Vector3 | list | tuple, size: Vector2 | list | tuple, color: Color | list | tuple) None
Draw a plane XZ
- pyray.draw_point_3d(position: Vector3 | list | tuple, color: Color | list | tuple) None
Draw a point in 3D space, actually a small line
- pyray.draw_poly(center: Vector2 | list | tuple, sides: int, radius: float, rotation: float, color: Color | list | tuple) None
Draw a regular polygon (Vector version)
- pyray.draw_poly_lines(center: Vector2 | list | tuple, sides: int, radius: float, rotation: float, color: Color | list | tuple) None
Draw a polygon outline of n sides
- pyray.draw_poly_lines_ex(center: Vector2 | list | tuple, sides: int, radius: float, rotation: float, lineThick: float, color: Color | list | tuple) None
Draw a polygon outline of n sides with extended parameters
- pyray.draw_rectangle(posX: int, posY: int, width: int, height: int, color: Color | list | tuple) None
Draw a color-filled rectangle
- pyray.draw_rectangle_gradient_ex(rec: Rectangle | list | tuple, topLeft: Color | list | tuple, bottomLeft: Color | list | tuple, topRight: Color | list | tuple, bottomRight: Color | list | tuple) None
Draw a gradient-filled rectangle with custom vertex colors
- pyray.draw_rectangle_gradient_h(posX: int, posY: int, width: int, height: int, left: Color | list | tuple, right: Color | list | tuple) None
Draw a horizontal-gradient-filled rectangle
- pyray.draw_rectangle_gradient_v(posX: int, posY: int, width: int, height: int, top: Color | list | tuple, bottom: Color | list | tuple) None
Draw a vertical-gradient-filled rectangle
- pyray.draw_rectangle_lines(posX: int, posY: int, width: int, height: int, color: Color | list | tuple) None
Draw rectangle outline
- pyray.draw_rectangle_lines_ex(rec: Rectangle | list | tuple, lineThick: float, color: Color | list | tuple) None
Draw rectangle outline with extended parameters
- pyray.draw_rectangle_pro(rec: Rectangle | list | tuple, origin: Vector2 | list | tuple, rotation: float, color: Color | list | tuple) None
Draw a color-filled rectangle with pro parameters
- pyray.draw_rectangle_rec(rec: Rectangle | list | tuple, color: Color | list | tuple) None
Draw a color-filled rectangle
- pyray.draw_rectangle_rounded(rec: Rectangle | list | tuple, roundness: float, segments: int, color: Color | list | tuple) None
Draw rectangle with rounded edges
- pyray.draw_rectangle_rounded_lines(rec: Rectangle | list | tuple, roundness: float, segments: int, color: Color | list | tuple) None
Draw rectangle lines with rounded edges
- pyray.draw_rectangle_rounded_lines_ex(rec: Rectangle | list | tuple, roundness: float, segments: int, lineThick: float, color: Color | list | tuple) None
Draw rectangle with rounded edges outline
- pyray.draw_rectangle_v(position: Vector2 | list | tuple, size: Vector2 | list | tuple, color: Color | list | tuple) None
Draw a color-filled rectangle (Vector version)
- pyray.draw_ring(center: Vector2 | list | tuple, innerRadius: float, outerRadius: float, startAngle: float, endAngle: float, segments: int, color: Color | list | tuple) None
Draw ring
- pyray.draw_ring_lines(center: Vector2 | list | tuple, innerRadius: float, outerRadius: float, startAngle: float, endAngle: float, segments: int, color: Color | list | tuple) None
Draw ring outline
- pyray.draw_sphere(centerPos: Vector3 | list | tuple, radius: float, color: Color | list | tuple) None
Draw sphere
- pyray.draw_sphere_ex(centerPos: Vector3 | list | tuple, radius: float, rings: int, slices: int, color: Color | list | tuple) None
Draw sphere with extended parameters
- pyray.draw_sphere_wires(centerPos: Vector3 | list | tuple, radius: float, rings: int, slices: int, color: Color | list | tuple) None
Draw sphere wires
- pyray.draw_spline_basis(points: Any | list | tuple, pointCount: int, thick: float, color: Color | list | tuple) None
Draw spline: B-Spline, minimum 4 points
- pyray.draw_spline_bezier_cubic(points: Any | list | tuple, pointCount: int, thick: float, color: Color | list | tuple) None
Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6…]
- pyray.draw_spline_bezier_quadratic(points: Any | list | tuple, pointCount: int, thick: float, color: Color | list | tuple) None
Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4…]
- pyray.draw_spline_catmull_rom(points: Any | list | tuple, pointCount: int, thick: float, color: Color | list | tuple) None
Draw spline: Catmull-Rom, minimum 4 points
- pyray.draw_spline_linear(points: Any | list | tuple, pointCount: int, thick: float, color: Color | list | tuple) None
Draw spline: Linear, minimum 2 points
- pyray.draw_spline_segment_basis(p1: Vector2 | list | tuple, p2: Vector2 | list | tuple, p3: Vector2 | list | tuple, p4: Vector2 | list | tuple, thick: float, color: Color | list | tuple) None
Draw spline segment: B-Spline, 4 points
- pyray.draw_spline_segment_bezier_cubic(p1: Vector2 | list | tuple, c2: Vector2 | list | tuple, c3: Vector2 | list | tuple, p4: Vector2 | list | tuple, thick: float, color: Color | list | tuple) None
Draw spline segment: Cubic Bezier, 2 points, 2 control points
- pyray.draw_spline_segment_bezier_quadratic(p1: Vector2 | list | tuple, c2: Vector2 | list | tuple, p3: Vector2 | list | tuple, thick: float, color: Color | list | tuple) None
Draw spline segment: Quadratic Bezier, 2 points, 1 control point
- pyray.draw_spline_segment_catmull_rom(p1: Vector2 | list | tuple, p2: Vector2 | list | tuple, p3: Vector2 | list | tuple, p4: Vector2 | list | tuple, thick: float, color: Color | list | tuple) None
Draw spline segment: Catmull-Rom, 4 points
- pyray.draw_spline_segment_linear(p1: Vector2 | list | tuple, p2: Vector2 | list | tuple, thick: float, color: Color | list | tuple) None
Draw spline segment: Linear, 2 points
- pyray.draw_text(text: str, posX: int, posY: int, fontSize: int, color: Color | list | tuple) None
Draw text (using default font)
- pyray.draw_text_codepoint(font: Font | list | tuple, codepoint: int, position: Vector2 | list | tuple, fontSize: float, tint: Color | list | tuple) None
Draw one character (codepoint)
- pyray.draw_text_codepoints(font: Font | list | tuple, codepoints: Any, codepointCount: int, position: Vector2 | list | tuple, fontSize: float, spacing: float, tint: Color | list | tuple) None
Draw multiple character (codepoint)
- pyray.draw_text_ex(font: Font | list | tuple, text: str, position: Vector2 | list | tuple, fontSize: float, spacing: float, tint: Color | list | tuple) None
Draw text using font and additional parameters
- pyray.draw_text_pro(font: Font | list | tuple, text: str, position: Vector2 | list | tuple, origin: Vector2 | list | tuple, rotation: float, fontSize: float, spacing: float, tint: Color | list | tuple) None
Draw text using Font and pro parameters (rotation)
- pyray.draw_texture(texture: Texture | list | tuple, posX: int, posY: int, tint: Color | list | tuple) None
Draw a Texture2D
- pyray.draw_texture_ex(texture: Texture | list | tuple, position: Vector2 | list | tuple, rotation: float, scale: float, tint: Color | list | tuple) None
Draw a Texture2D with extended parameters
- pyray.draw_texture_n_patch(texture: Texture | list | tuple, nPatchInfo: NPatchInfo | list | tuple, dest: Rectangle | list | tuple, origin: Vector2 | list | tuple, rotation: float, tint: Color | list | tuple) None
Draws a texture (or part of it) that stretches or shrinks nicely
- pyray.draw_texture_pro(texture: Texture | list | tuple, source: Rectangle | list | tuple, dest: Rectangle | list | tuple, origin: Vector2 | list | tuple, rotation: float, tint: Color | list | tuple) None
Draw a part of a texture defined by a rectangle with ‘pro’ parameters
- pyray.draw_texture_rec(texture: Texture | list | tuple, source: Rectangle | list | tuple, position: Vector2 | list | tuple, tint: Color | list | tuple) None
Draw a part of a texture defined by a rectangle
- pyray.draw_texture_v(texture: Texture | list | tuple, position: Vector2 | list | tuple, tint: Color | list | tuple) None
Draw a Texture2D with position defined as Vector2
- pyray.draw_triangle(v1: Vector2 | list | tuple, v2: Vector2 | list | tuple, v3: Vector2 | list | tuple, color: Color | list | tuple) None
Draw a color-filled triangle (vertex in counter-clockwise order!)
- pyray.draw_triangle_3d(v1: Vector3 | list | tuple, v2: Vector3 | list | tuple, v3: Vector3 | list | tuple, color: Color | list | tuple) None
Draw a color-filled triangle (vertex in counter-clockwise order!)
- pyray.draw_triangle_fan(points: Any | list | tuple, pointCount: int, color: Color | list | tuple) None
Draw a triangle fan defined by points (first vertex is the center)
- pyray.draw_triangle_lines(v1: Vector2 | list | tuple, v2: Vector2 | list | tuple, v3: Vector2 | list | tuple, color: Color | list | tuple) None
Draw triangle outline (vertex in counter-clockwise order!)
- pyray.draw_triangle_strip(points: Any | list | tuple, pointCount: int, color: Color | list | tuple) None
Draw a triangle strip defined by points
- pyray.draw_triangle_strip_3d(points: Any | list | tuple, pointCount: int, color: Color | list | tuple) None
Draw a triangle strip defined by points
- pyray.enable_cursor() None
Enables cursor (unlock cursor)
- pyray.enable_event_waiting() None
Enable waiting for events on EndDrawing(), no automatic event polling
- pyray.encode_data_base64(data: str, dataSize: int, outputSize: Any) str
Encode data to Base64 string, memory must be MemFree()
- pyray.end_blend_mode() None
End blending mode (reset to default: alpha blending)
- pyray.end_drawing() None
End canvas drawing and swap buffers (double buffering)
- pyray.end_mode_2d() None
Ends 2D mode with custom camera
- pyray.end_mode_3d() None
Ends 3D mode and returns to default 2D orthographic mode
- pyray.end_scissor_mode() None
End scissor mode
- pyray.end_shader_mode() None
End custom shader drawing (use default shader)
- pyray.end_texture_mode() None
Ends drawing to render texture
- pyray.end_vr_stereo_mode() None
End stereo rendering (requires VR simulator)
- pyray.export_automation_event_list(list_0: AutomationEventList | list | tuple, fileName: str) bool
Export automation events list as text file
- pyray.export_data_as_code(data: str, dataSize: int, fileName: str) bool
Export data to code (.h), returns true on success
- pyray.export_font_as_code(font: Font | list | tuple, fileName: str) bool
Export font as code file, returns true on success
- pyray.export_image(image: Image | list | tuple, fileName: str) bool
Export image data to file, returns true on success
- pyray.export_image_as_code(image: Image | list | tuple, fileName: str) bool
Export image as code file defining an array of bytes, returns true on success
- pyray.export_image_to_memory(image: Image | list | tuple, fileType: str, fileSize: Any) str
Export image to memory buffer
- pyray.export_mesh(mesh: Mesh | list | tuple, fileName: str) bool
Export mesh data to file, returns true on success
- pyray.export_mesh_as_code(mesh: Mesh | list | tuple, fileName: str) bool
Export mesh as code file (.h) defining multiple arrays of vertex attributes
- pyray.export_wave(wave: Wave | list | tuple, fileName: str) bool
Export wave data to file, returns true on success
- pyray.export_wave_as_code(wave: Wave | list | tuple, fileName: str) bool
Export wave sample data to code (.h), returns true on success
- pyray.fade(color: Color | list | tuple, alpha: float) Color
Get color with alpha applied, alpha goes from 0.0f to 1.0f
- pyray.ffi: _cffi_backend.FFI
- pyray.file_exists(fileName: str) bool
Check if file exists
- pyray.float_equals(x: float, y: float) int
- pyray.gen_image_cellular(width: int, height: int, tileSize: int) Image
Generate image: cellular algorithm, bigger tileSize means bigger cells
- pyray.gen_image_checked(width: int, height: int, checksX: int, checksY: int, col1: Color | list | tuple, col2: Color | list | tuple) Image
Generate image: checked
- pyray.gen_image_color(width: int, height: int, color: Color | list | tuple) Image
Generate image: plain color
- pyray.gen_image_font_atlas(glyphs: Any | list | tuple, glyphRecs: Any | list | tuple, glyphCount: int, fontSize: int, padding: int, packMethod: int) Image
Generate image font atlas using chars info
- pyray.gen_image_gradient_linear(width: int, height: int, direction: int, start: Color | list | tuple, end: Color | list | tuple) Image
Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
- pyray.gen_image_gradient_radial(width: int, height: int, density: float, inner: Color | list | tuple, outer: Color | list | tuple) Image
Generate image: radial gradient
- pyray.gen_image_gradient_square(width: int, height: int, density: float, inner: Color | list | tuple, outer: Color | list | tuple) Image
Generate image: square gradient
- pyray.gen_image_perlin_noise(width: int, height: int, offsetX: int, offsetY: int, scale: float) Image
Generate image: perlin noise
- pyray.gen_image_text(width: int, height: int, text: str) Image
Generate image: grayscale image from text data
- pyray.gen_image_white_noise(width: int, height: int, factor: float) Image
Generate image: white noise
- pyray.gen_mesh_cubicmap(cubicmap: Image | list | tuple, cubeSize: Vector3 | list | tuple) Mesh
Generate cubes-based map mesh from image data
- pyray.gen_mesh_heightmap(heightmap: Image | list | tuple, size: Vector3 | list | tuple) Mesh
Generate heightmap mesh from image data
- pyray.gen_mesh_hemi_sphere(radius: float, rings: int, slices: int) Mesh
Generate half-sphere mesh (no bottom cap)
- pyray.gen_mesh_knot(radius: float, size: float, radSeg: int, sides: int) Mesh
Generate trefoil knot mesh
- pyray.gen_mesh_plane(width: float, length: float, resX: int, resZ: int) Mesh
Generate plane mesh (with subdivisions)
- pyray.gen_mesh_sphere(radius: float, rings: int, slices: int) Mesh
Generate sphere mesh (standard sphere)
- pyray.gen_mesh_tangents(mesh: Any | list | tuple) None
Compute mesh tangents
- pyray.gen_mesh_torus(radius: float, size: float, radSeg: int, sides: int) Mesh
Generate torus mesh
- pyray.gen_texture_mipmaps(texture: Any | list | tuple) None
Generate GPU mipmaps for a texture
- pyray.get_application_directory() str
Get the directory of the running application (uses static string)
- pyray.get_camera_matrix(camera: Camera3D | list | tuple) Matrix
Get camera transform matrix (view matrix)
- pyray.get_char_pressed() int
Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
- pyray.get_clipboard_text() str
Get clipboard text content
- pyray.get_codepoint(text: str, codepointSize: Any) int
Get next codepoint in a UTF-8 encoded string, 0x3f(‘?’) is returned on failure
- pyray.get_codepoint_count(text: str) int
Get total number of codepoints in a UTF-8 encoded string
- pyray.get_codepoint_next(text: str, codepointSize: Any) int
Get next codepoint in a UTF-8 encoded string, 0x3f(‘?’) is returned on failure
- pyray.get_codepoint_previous(text: str, codepointSize: Any) int
Get previous codepoint in a UTF-8 encoded string, 0x3f(‘?’) is returned on failure
- pyray.get_collision_rec(rec1: Rectangle | list | tuple, rec2: Rectangle | list | tuple) Rectangle
Get collision rectangle for two rectangles collision
- pyray.get_current_monitor() int
Get current monitor where window is placed
- pyray.get_directory_path(filePath: str) str
Get full path for a given fileName with path (uses static string)
- pyray.get_file_extension(fileName: str) str
Get pointer to extension for a filename string (includes dot: ‘.png’)
- pyray.get_file_length(fileName: str) int
Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
- pyray.get_file_mod_time(fileName: str) int
Get file modification time (last write time)
- pyray.get_file_name(filePath: str) str
Get pointer to filename for a path string
- pyray.get_file_name_without_ext(filePath: str) str
Get filename string without extension (uses static string)
- pyray.get_fps() int
Get current FPS
- pyray.get_frame_time() float
Get time in seconds for last frame drawn (delta time)
- pyray.get_gamepad_axis_count(gamepad: int) int
Get gamepad axis count for a gamepad
- pyray.get_gamepad_axis_movement(gamepad: int, axis: int) float
Get axis movement value for a gamepad axis
- pyray.get_gamepad_button_pressed() int
Get the last gamepad button pressed
- pyray.get_gamepad_name(gamepad: int) str
Get gamepad internal name id
- pyray.get_gesture_detected() int
Get latest detected gesture
- pyray.get_gesture_drag_angle() float
Get gesture drag angle
- pyray.get_gesture_hold_duration() float
Get gesture hold time in seconds
- pyray.get_gesture_pinch_angle() float
Get gesture pinch angle
- pyray.get_glyph_atlas_rec(font: Font | list | tuple, codepoint: int) Rectangle
Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to ‘?’ if not found
- pyray.get_glyph_index(font: Font | list | tuple, codepoint: int) int
Get glyph index position in font for a codepoint (unicode character), fallback to ‘?’ if not found
- pyray.get_glyph_info(font: Font | list | tuple, codepoint: int) GlyphInfo
Get glyph font info data for a codepoint (unicode character), fallback to ‘?’ if not found
- pyray.get_image_alpha_border(image: Image | list | tuple, threshold: float) Rectangle
Get image alpha border rectangle
- pyray.get_image_color(image: Image | list | tuple, x: int, y: int) Color
Get image pixel color at (x, y) position
- pyray.get_key_pressed() int
Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
- pyray.get_master_volume() float
Get master volume (listener)
- pyray.get_mesh_bounding_box(mesh: Mesh | list | tuple) BoundingBox
Compute mesh bounding box limits
- pyray.get_model_bounding_box(model: Model | list | tuple) BoundingBox
Compute model bounding box limits (considers all meshes)
- pyray.get_monitor_count() int
Get number of connected monitors
- pyray.get_monitor_height(monitor: int) int
Get specified monitor height (current video mode used by monitor)
- pyray.get_monitor_name(monitor: int) str
Get the human-readable, UTF-8 encoded name of the specified monitor
- pyray.get_monitor_physical_height(monitor: int) int
Get specified monitor physical height in millimetres
- pyray.get_monitor_physical_width(monitor: int) int
Get specified monitor physical width in millimetres
- pyray.get_monitor_refresh_rate(monitor: int) int
Get specified monitor refresh rate
- pyray.get_monitor_width(monitor: int) int
Get specified monitor width (current video mode used by monitor)
- pyray.get_mouse_wheel_move() float
Get mouse wheel movement for X or Y, whichever is larger
- pyray.get_mouse_x() int
Get mouse position X
- pyray.get_mouse_y() int
Get mouse position Y
- pyray.get_music_time_played(music: Music | list | tuple) float
Get current music time played (in seconds)
- pyray.get_physics_bodies_count() int
Returns the current amount of created physics bodies
- pyray.get_physics_body(index: int) Any
Returns a physics body of the bodies pool at a specific index
- pyray.get_physics_shape_type(index: int) int
Returns the physics body shape type (PHYSICS_CIRCLE or PHYSICS_POLYGON)
- pyray.get_physics_shape_vertex(body: Any | list | tuple, vertex: int) Vector2
Returns transformed position of a body shape (body position + vertex transformed position)
- pyray.get_physics_shape_vertices_count(index: int) int
Returns the amount of vertices of a physics body shape
- pyray.get_pixel_color(srcPtr: Any, format: int) Color
Get Color from a source pixel pointer of certain format
- pyray.get_pixel_data_size(width: int, height: int, format: int) int
Get pixel data size in bytes for certain format
- pyray.get_prev_directory_path(dirPath: str) str
Get previous directory path for a given path (uses static string)
- pyray.get_random_value(min_0: int, max_1: int) int
Get a random value between min and max (both included)
- pyray.get_ray_collision_box(ray: Ray | list | tuple, box: BoundingBox | list | tuple) RayCollision
Get collision info between ray and box
- pyray.get_ray_collision_mesh(ray: Ray | list | tuple, mesh: Mesh | list | tuple, transform: Matrix | list | tuple) RayCollision
Get collision info between ray and mesh
- pyray.get_ray_collision_quad(ray: Ray | list | tuple, p1: Vector3 | list | tuple, p2: Vector3 | list | tuple, p3: Vector3 | list | tuple, p4: Vector3 | list | tuple) RayCollision
Get collision info between ray and quad
- pyray.get_ray_collision_sphere(ray: Ray | list | tuple, center: Vector3 | list | tuple, radius: float) RayCollision
Get collision info between ray and sphere
- pyray.get_ray_collision_triangle(ray: Ray | list | tuple, p1: Vector3 | list | tuple, p2: Vector3 | list | tuple, p3: Vector3 | list | tuple) RayCollision
Get collision info between ray and triangle
- pyray.get_render_height() int
Get current render height (it considers HiDPI)
- pyray.get_render_width() int
Get current render width (it considers HiDPI)
- pyray.get_screen_height() int
Get current screen height
- pyray.get_screen_to_world_2d(position: Vector2 | list | tuple, camera: Camera2D | list | tuple) Vector2
Get the world space position for a 2d camera screen space position
- pyray.get_screen_to_world_ray(position: Vector2 | list | tuple, camera: Camera3D | list | tuple) Ray
Get a ray trace from screen position (i.e mouse)
- pyray.get_screen_to_world_ray_ex(position: Vector2 | list | tuple, camera: Camera3D | list | tuple, width: int, height: int) Ray
Get a ray trace from screen position (i.e mouse) in a viewport
- pyray.get_screen_width() int
Get current screen width
- pyray.get_shader_location(shader: Shader | list | tuple, uniformName: str) int
Get shader uniform location
- pyray.get_shader_location_attrib(shader: Shader | list | tuple, attribName: str) int
Get shader attribute location
- pyray.get_shapes_texture_rectangle() Rectangle
Get texture source rectangle that is used for shapes drawing
- pyray.get_spline_point_basis(p1: Vector2 | list | tuple, p2: Vector2 | list | tuple, p3: Vector2 | list | tuple, p4: Vector2 | list | tuple, t: float) Vector2
Get (evaluate) spline point: B-Spline
- pyray.get_spline_point_bezier_cubic(p1: Vector2 | list | tuple, c2: Vector2 | list | tuple, c3: Vector2 | list | tuple, p4: Vector2 | list | tuple, t: float) Vector2
Get (evaluate) spline point: Cubic Bezier
- pyray.get_spline_point_bezier_quad(p1: Vector2 | list | tuple, c2: Vector2 | list | tuple, p3: Vector2 | list | tuple, t: float) Vector2
Get (evaluate) spline point: Quadratic Bezier
- pyray.get_spline_point_catmull_rom(p1: Vector2 | list | tuple, p2: Vector2 | list | tuple, p3: Vector2 | list | tuple, p4: Vector2 | list | tuple, t: float) Vector2
Get (evaluate) spline point: Catmull-Rom
- pyray.get_spline_point_linear(startPos: Vector2 | list | tuple, endPos: Vector2 | list | tuple, t: float) Vector2
Get (evaluate) spline point: Linear
- pyray.get_time() float
Get elapsed time in seconds since InitWindow()
- pyray.get_touch_point_count() int
Get number of touch points
- pyray.get_touch_point_id(index: int) int
Get touch point identifier for given index
- pyray.get_touch_position(index: int) Vector2
Get touch position XY for a touch point index (relative to screen size)
- pyray.get_touch_x() int
Get touch position X for touch point 0 (relative to screen size)
- pyray.get_touch_y() int
Get touch position Y for touch point 0 (relative to screen size)
- pyray.get_window_handle() Any
Get native window handle
- pyray.get_working_directory() str
Get current working directory (uses static string)
- pyray.get_world_to_screen(position: Vector3 | list | tuple, camera: Camera3D | list | tuple) Vector2
Get the screen space position for a 3d world space position
- pyray.get_world_to_screen_2d(position: Vector2 | list | tuple, camera: Camera2D | list | tuple) Vector2
Get the screen space position for a 2d camera world space position
- pyray.get_world_to_screen_ex(position: Vector3 | list | tuple, camera: Camera3D | list | tuple, width: int, height: int) Vector2
Get size position for a 3d world space position
- pyray.glfw_create_cursor(image: Any | list | tuple, xhot: int, yhot: int) Any
- pyray.glfw_create_standard_cursor(shape: int) Any
- pyray.glfw_create_window(width: int, height: int, title: str, monitor: Any | list | tuple, share: Any | list | tuple) Any
- pyray.glfw_default_window_hints() None
- pyray.glfw_destroy_cursor(cursor: Any | list | tuple) None
- pyray.glfw_destroy_window(window: Any | list | tuple) None
- pyray.glfw_extension_supported(extension: str) int
- pyray.glfw_focus_window(window: Any | list | tuple) None
- pyray.glfw_get_clipboard_string(window: Any | list | tuple) str
- pyray.glfw_get_current_context() Any
- pyray.glfw_get_cursor_pos(window: Any | list | tuple, xpos: Any, ypos: Any) None
- pyray.glfw_get_error(description: list[str]) int
- pyray.glfw_get_framebuffer_size(window: Any | list | tuple, width: Any, height: Any) None
- pyray.glfw_get_gamepad_name(jid: int) str
- pyray.glfw_get_gamepad_state(jid: int, state: Any | list | tuple) int
- pyray.glfw_get_gamma_ramp(monitor: Any | list | tuple) Any
- pyray.glfw_get_input_mode(window: Any | list | tuple, mode: int) int
- pyray.glfw_get_joystick_axes(jid: int, count: Any) Any
- pyray.glfw_get_joystick_buttons(jid: int, count: Any) str
- pyray.glfw_get_joystick_guid(jid: int) str
- pyray.glfw_get_joystick_hats(jid: int, count: Any) str
- pyray.glfw_get_joystick_name(jid: int) str
- pyray.glfw_get_joystick_user_pointer(jid: int) Any
- pyray.glfw_get_key(window: Any | list | tuple, key: int) int
- pyray.glfw_get_key_name(key: int, scancode: int) str
- pyray.glfw_get_key_scancode(key: int) int
- pyray.glfw_get_monitor_content_scale(monitor: Any | list | tuple, xscale: Any, yscale: Any) None
- pyray.glfw_get_monitor_name(monitor: Any | list | tuple) str
- pyray.glfw_get_monitor_physical_size(monitor: Any | list | tuple, widthMM: Any, heightMM: Any) None
- pyray.glfw_get_monitor_pos(monitor: Any | list | tuple, xpos: Any, ypos: Any) None
- pyray.glfw_get_monitor_user_pointer(monitor: Any | list | tuple) Any
- pyray.glfw_get_monitor_workarea(monitor: Any | list | tuple, xpos: Any, ypos: Any, width: Any, height: Any) None
- pyray.glfw_get_monitors(count: Any) Any
- pyray.glfw_get_mouse_button(window: Any | list | tuple, button: int) int
- pyray.glfw_get_platform() int
- pyray.glfw_get_primary_monitor() Any
- pyray.glfw_get_proc_address(procname: str) Any
- pyray.glfw_get_required_instance_extensions(count: Any) list[str]
- pyray.glfw_get_time() float
- pyray.glfw_get_timer_frequency() int
- pyray.glfw_get_timer_value() int
- pyray.glfw_get_version(major: Any, minor: Any, rev: Any) None
- pyray.glfw_get_version_string() str
- pyray.glfw_get_video_mode(monitor: Any | list | tuple) Any
- pyray.glfw_get_video_modes(monitor: Any | list | tuple, count: Any) Any
- pyray.glfw_get_window_attrib(window: Any | list | tuple, attrib: int) int
- pyray.glfw_get_window_content_scale(window: Any | list | tuple, xscale: Any, yscale: Any) None
- pyray.glfw_get_window_frame_size(window: Any | list | tuple, left: Any, top: Any, right: Any, bottom: Any) None
- pyray.glfw_get_window_monitor(window: Any | list | tuple) Any
- pyray.glfw_get_window_opacity(window: Any | list | tuple) float
- pyray.glfw_get_window_pos(window: Any | list | tuple, xpos: Any, ypos: Any) None
- pyray.glfw_get_window_size(window: Any | list | tuple, width: Any, height: Any) None
- pyray.glfw_get_window_title(window: Any | list | tuple) str
- pyray.glfw_get_window_user_pointer(window: Any | list | tuple) Any
- pyray.glfw_hide_window(window: Any | list | tuple) None
- pyray.glfw_iconify_window(window: Any | list | tuple) None
- pyray.glfw_init() int
- pyray.glfw_init_allocator(allocator: Any | list | tuple) None
- pyray.glfw_init_hint(hint: int, value: int) None
- pyray.glfw_joystick_is_gamepad(jid: int) int
- pyray.glfw_joystick_present(jid: int) int
- pyray.glfw_make_context_current(window: Any | list | tuple) None
- pyray.glfw_maximize_window(window: Any | list | tuple) None
- pyray.glfw_platform_supported(platform: int) int
- pyray.glfw_poll_events() None
- pyray.glfw_post_empty_event() None
- pyray.glfw_raw_mouse_motion_supported() int
- pyray.glfw_request_window_attention(window: Any | list | tuple) None
- pyray.glfw_restore_window(window: Any | list | tuple) None
- pyray.glfw_set_char_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_char_mods_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_clipboard_string(window: Any | list | tuple, string: str) None
- pyray.glfw_set_cursor(window: Any | list | tuple, cursor: Any | list | tuple) None
- pyray.glfw_set_cursor_enter_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_cursor_pos(window: Any | list | tuple, xpos: float, ypos: float) None
- pyray.glfw_set_cursor_pos_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_drop_callback(window: Any | list | tuple, callback: list[str] | list | tuple) list[str]
- pyray.glfw_set_error_callback(callback: str) str
- pyray.glfw_set_framebuffer_size_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_gamma(monitor: Any | list | tuple, gamma: float) None
- pyray.glfw_set_gamma_ramp(monitor: Any | list | tuple, ramp: Any | list | tuple) None
- pyray.glfw_set_input_mode(window: Any | list | tuple, mode: int, value: int) None
- pyray.glfw_set_joystick_callback(callback: Any) Any
- pyray.glfw_set_joystick_user_pointer(jid: int, pointer: Any) None
- pyray.glfw_set_key_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_monitor_callback(callback: Any | list | tuple) Any
- pyray.glfw_set_monitor_user_pointer(monitor: Any | list | tuple, pointer: Any) None
- pyray.glfw_set_mouse_button_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_scroll_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_time(time: float) None
- pyray.glfw_set_window_aspect_ratio(window: Any | list | tuple, numer: int, denom: int) None
- pyray.glfw_set_window_attrib(window: Any | list | tuple, attrib: int, value: int) None
- pyray.glfw_set_window_close_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_content_scale_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_focus_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_icon(window: Any | list | tuple, count: int, images: Any | list | tuple) None
- pyray.glfw_set_window_iconify_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_maximize_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_monitor(window: Any | list | tuple, monitor: Any | list | tuple, xpos: int, ypos: int, width: int, height: int, refreshRate: int) None
- pyray.glfw_set_window_opacity(window: Any | list | tuple, opacity: float) None
- pyray.glfw_set_window_pos(window: Any | list | tuple, xpos: int, ypos: int) None
- pyray.glfw_set_window_pos_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_refresh_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_should_close(window: Any | list | tuple, value: int) None
- pyray.glfw_set_window_size(window: Any | list | tuple, width: int, height: int) None
- pyray.glfw_set_window_size_callback(window: Any | list | tuple, callback: Any | list | tuple) Any
- pyray.glfw_set_window_size_limits(window: Any | list | tuple, minwidth: int, minheight: int, maxwidth: int, maxheight: int) None
- pyray.glfw_set_window_title(window: Any | list | tuple, title: str) None
- pyray.glfw_set_window_user_pointer(window: Any | list | tuple, pointer: Any) None
- pyray.glfw_show_window(window: Any | list | tuple) None
- pyray.glfw_swap_buffers(window: Any | list | tuple) None
- pyray.glfw_swap_interval(interval: int) None
- pyray.glfw_terminate() None
- pyray.glfw_update_gamepad_mappings(string: str) int
- pyray.glfw_vulkan_supported() int
- pyray.glfw_wait_events() None
- pyray.glfw_wait_events_timeout(timeout: float) None
- pyray.glfw_window_hint(hint: int, value: int) None
- pyray.glfw_window_hint_string(hint: int, value: str) None
- pyray.glfw_window_should_close(window: Any | list | tuple) int
- pyray.gui_button(bounds: Rectangle | list | tuple, text: str) int
Button control, returns true when clicked
- pyray.gui_check_box(bounds: Rectangle | list | tuple, text: str, checked: Any) int
Check Box control, returns true when active
- pyray.gui_color_bar_alpha(bounds: Rectangle | list | tuple, text: str, alpha: Any) int
Color Bar Alpha control
- pyray.gui_color_bar_hue(bounds: Rectangle | list | tuple, text: str, value: Any) int
Color Bar Hue control
- pyray.gui_color_panel(bounds: Rectangle | list | tuple, text: str, color: Any | list | tuple) int
Color Panel control
- pyray.gui_color_panel_hsv(bounds: Rectangle | list | tuple, text: str, colorHsv: Any | list | tuple) int
Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()
- pyray.gui_color_picker(bounds: Rectangle | list | tuple, text: str, color: Any | list | tuple) int
Color Picker control (multiple color controls)
- pyray.gui_color_picker_hsv(bounds: Rectangle | list | tuple, text: str, colorHsv: Any | list | tuple) int
Color Picker control that avoids conversion to RGB on each call (multiple color controls)
- pyray.gui_combo_box(bounds: Rectangle | list | tuple, text: str, active: Any) int
Combo Box control
- pyray.gui_disable() None
Disable gui controls (global state)
- pyray.gui_disable_tooltip() None
Disable gui tooltips (global state)
- pyray.gui_draw_icon(iconId: int, posX: int, posY: int, pixelSize: int, color: Color | list | tuple) None
Draw icon using pixel size at specified position
- pyray.gui_dropdown_box(bounds: Rectangle | list | tuple, text: str, active: Any, editMode: bool) int
Dropdown Box control
- pyray.gui_dummy_rec(bounds: Rectangle | list | tuple, text: str) int
Dummy control for placeholders
- pyray.gui_enable() None
Enable gui controls (global state)
- pyray.gui_enable_tooltip() None
Enable gui tooltips (global state)
- pyray.gui_get_icons() Any
Get raygui icons data pointer
- pyray.gui_get_state() int
Get gui state (global state)
- pyray.gui_get_style(control: int, property: int) int
Get one style property
- pyray.gui_grid(bounds: Rectangle | list | tuple, text: str, spacing: float, subdivs: int, mouseCell: Any | list | tuple) int
Grid control
- pyray.gui_group_box(bounds: Rectangle | list | tuple, text: str) int
Group Box control with text name
- pyray.gui_icon_text(iconId: int, text: str) str
Get text with icon id prepended (if supported)
- pyray.gui_is_locked() bool
Check if gui is locked (global state)
- pyray.gui_label_button(bounds: Rectangle | list | tuple, text: str) int
Label button control, returns true when clicked
- pyray.gui_line(bounds: Rectangle | list | tuple, text: str) int
Line separator control, could contain text
- pyray.gui_list_view(bounds: Rectangle | list | tuple, text: str, scrollIndex: Any, active: Any) int
List View control
- pyray.gui_list_view_ex(bounds: Rectangle | list | tuple, text: list[str], count: int, scrollIndex: Any, active: Any, focus: Any) int
List View with extended parameters
- pyray.gui_load_icons(fileName: str, loadIconsName: bool) list[str]
Load raygui icons file (.rgi) into internal icons data
- pyray.gui_load_style(fileName: str) None
Load style file over global style variable (.rgs)
- pyray.gui_load_style_default() None
Load style default over global style
- pyray.gui_lock() None
Lock gui controls (global state)
- pyray.gui_message_box(bounds: Rectangle | list | tuple, title: str, message: str, buttons: str) int
Message Box control, displays a message
- pyray.gui_panel(bounds: Rectangle | list | tuple, text: str) int
Panel control, useful to group controls
- pyray.gui_progress_bar(bounds: Rectangle | list | tuple, textLeft: str, textRight: str, value: Any, minValue: float, maxValue: float) int
Progress Bar control
- pyray.gui_scroll_panel(bounds: Rectangle | list | tuple, text: str, content: Rectangle | list | tuple, scroll: Any | list | tuple, view: Any | list | tuple) int
Scroll Panel control
- pyray.gui_set_alpha(alpha: float) None
Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
- pyray.gui_set_icon_scale(scale: int) None
Set default icon drawing size
- pyray.gui_set_state(state: int) None
Set gui state (global state)
- pyray.gui_set_style(control: int, property: int, value: int) None
Set one style property
- pyray.gui_set_tooltip(tooltip: str) None
Set tooltip string
- pyray.gui_slider(bounds: Rectangle | list | tuple, textLeft: str, textRight: str, value: Any, minValue: float, maxValue: float) int
Slider control
- pyray.gui_slider_bar(bounds: Rectangle | list | tuple, textLeft: str, textRight: str, value: Any, minValue: float, maxValue: float) int
Slider Bar control
- pyray.gui_spinner(bounds: Rectangle | list | tuple, text: str, value: Any, minValue: int, maxValue: int, editMode: bool) int
Spinner control
- pyray.gui_status_bar(bounds: Rectangle | list | tuple, text: str) int
Status Bar control, shows info text
- pyray.gui_tab_bar(bounds: Rectangle | list | tuple, text: list[str], count: int, active: Any) int
Tab Bar control, returns TAB to be closed or -1
- pyray.gui_text_box(bounds: Rectangle | list | tuple, text: str, textSize: int, editMode: bool) int
Text Box control, updates input text
- pyray.gui_text_input_box(bounds: Rectangle | list | tuple, title: str, message: str, buttons: str, text: str, textMaxSize: int, secretViewActive: Any) int
Text Input Box control, ask for text, supports secret
- pyray.gui_toggle(bounds: Rectangle | list | tuple, text: str, active: Any) int
Toggle Button control
- pyray.gui_toggle_group(bounds: Rectangle | list | tuple, text: str, active: Any) int
Toggle Group control
- pyray.gui_toggle_slider(bounds: Rectangle | list | tuple, text: str, active: Any) int
Toggle Slider control
- pyray.gui_unlock() None
Unlock gui controls (global state)
- pyray.gui_value_box(bounds: Rectangle | list | tuple, text: str, value: Any, minValue: int, maxValue: int, editMode: bool) int
Value Box control, updates input text with numbers
- pyray.gui_value_box_float(bounds: Rectangle | list | tuple, text: str, textValue: str, value: Any, editMode: bool) int
Value box control for float values
- pyray.gui_window_box(bounds: Rectangle | list | tuple, title: str) int
Window Box control, shows a window that can be closed
- pyray.hide_cursor() None
Hides cursor
- pyray.image_alpha_clear(image: Any | list | tuple, color: Color | list | tuple, threshold: float) None
Clear alpha channel to desired color
- pyray.image_alpha_crop(image: Any | list | tuple, threshold: float) None
Crop image depending on alpha value
- pyray.image_alpha_mask(image: Any | list | tuple, alphaMask: Image | list | tuple) None
Apply alpha mask to image
- pyray.image_alpha_premultiply(image: Any | list | tuple) None
Premultiply alpha channel
- pyray.image_blur_gaussian(image: Any | list | tuple, blurSize: int) None
Apply Gaussian blur using a box blur approximation
- pyray.image_clear_background(dst: Any | list | tuple, color: Color | list | tuple) None
Clear image background with given color
- pyray.image_color_brightness(image: Any | list | tuple, brightness: int) None
Modify image color: brightness (-255 to 255)
- pyray.image_color_contrast(image: Any | list | tuple, contrast: float) None
Modify image color: contrast (-100 to 100)
- pyray.image_color_grayscale(image: Any | list | tuple) None
Modify image color: grayscale
- pyray.image_color_invert(image: Any | list | tuple) None
Modify image color: invert
- pyray.image_color_replace(image: Any | list | tuple, color: Color | list | tuple, replace: Color | list | tuple) None
Modify image color: replace color
- pyray.image_color_tint(image: Any | list | tuple, color: Color | list | tuple) None
Modify image color: tint
- pyray.image_copy(image: Image | list | tuple) Image
Create an image duplicate (useful for transformations)
- pyray.image_crop(image: Any | list | tuple, crop: Rectangle | list | tuple) None
Crop an image to a defined rectangle
- pyray.image_dither(image: Any | list | tuple, rBpp: int, gBpp: int, bBpp: int, aBpp: int) None
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
- pyray.image_draw(dst: Any | list | tuple, src: Image | list | tuple, srcRec: Rectangle | list | tuple, dstRec: Rectangle | list | tuple, tint: Color | list | tuple) None
Draw a source image within a destination image (tint applied to source)
- pyray.image_draw_circle(dst: Any | list | tuple, centerX: int, centerY: int, radius: int, color: Color | list | tuple) None
Draw a filled circle within an image
- pyray.image_draw_circle_lines(dst: Any | list | tuple, centerX: int, centerY: int, radius: int, color: Color | list | tuple) None
Draw circle outline within an image
- pyray.image_draw_circle_lines_v(dst: Any | list | tuple, center: Vector2 | list | tuple, radius: int, color: Color | list | tuple) None
Draw circle outline within an image (Vector version)
- pyray.image_draw_circle_v(dst: Any | list | tuple, center: Vector2 | list | tuple, radius: int, color: Color | list | tuple) None
Draw a filled circle within an image (Vector version)
- pyray.image_draw_line(dst: Any | list | tuple, startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: Color | list | tuple) None
Draw line within an image
- pyray.image_draw_line_ex(dst: Any | list | tuple, start: Vector2 | list | tuple, end: Vector2 | list | tuple, thick: int, color: Color | list | tuple) None
Draw a line defining thickness within an image
- pyray.image_draw_line_v(dst: Any | list | tuple, start: Vector2 | list | tuple, end: Vector2 | list | tuple, color: Color | list | tuple) None
Draw line within an image (Vector version)
- pyray.image_draw_pixel(dst: Any | list | tuple, posX: int, posY: int, color: Color | list | tuple) None
Draw pixel within an image
- pyray.image_draw_pixel_v(dst: Any | list | tuple, position: Vector2 | list | tuple, color: Color | list | tuple) None
Draw pixel within an image (Vector version)
- pyray.image_draw_rectangle(dst: Any | list | tuple, posX: int, posY: int, width: int, height: int, color: Color | list | tuple) None
Draw rectangle within an image
- pyray.image_draw_rectangle_lines(dst: Any | list | tuple, rec: Rectangle | list | tuple, thick: int, color: Color | list | tuple) None
Draw rectangle lines within an image
- pyray.image_draw_rectangle_rec(dst: Any | list | tuple, rec: Rectangle | list | tuple, color: Color | list | tuple) None
Draw rectangle within an image
- pyray.image_draw_rectangle_v(dst: Any | list | tuple, position: Vector2 | list | tuple, size: Vector2 | list | tuple, color: Color | list | tuple) None
Draw rectangle within an image (Vector version)
- pyray.image_draw_text(dst: Any | list | tuple, text: str, posX: int, posY: int, fontSize: int, color: Color | list | tuple) None
Draw text (using default font) within an image (destination)
- pyray.image_draw_text_ex(dst: Any | list | tuple, font: Font | list | tuple, text: str, position: Vector2 | list | tuple, fontSize: float, spacing: float, tint: Color | list | tuple) None
Draw text (custom sprite font) within an image (destination)
- pyray.image_draw_triangle(dst: Any | list | tuple, v1: Vector2 | list | tuple, v2: Vector2 | list | tuple, v3: Vector2 | list | tuple, color: Color | list | tuple) None
Draw triangle within an image
- pyray.image_draw_triangle_ex(dst: Any | list | tuple, v1: Vector2 | list | tuple, v2: Vector2 | list | tuple, v3: Vector2 | list | tuple, c1: Color | list | tuple, c2: Color | list | tuple, c3: Color | list | tuple) None
Draw triangle with interpolated colors within an image
- pyray.image_draw_triangle_fan(dst: Any | list | tuple, points: Any | list | tuple, pointCount: int, color: Color | list | tuple) None
Draw a triangle fan defined by points within an image (first vertex is the center)
- pyray.image_draw_triangle_lines(dst: Any | list | tuple, v1: Vector2 | list | tuple, v2: Vector2 | list | tuple, v3: Vector2 | list | tuple, color: Color | list | tuple) None
Draw triangle outline within an image
- pyray.image_draw_triangle_strip(dst: Any | list | tuple, points: Any | list | tuple, pointCount: int, color: Color | list | tuple) None
Draw a triangle strip defined by points within an image
- pyray.image_flip_horizontal(image: Any | list | tuple) None
Flip image horizontally
- pyray.image_flip_vertical(image: Any | list | tuple) None
Flip image vertically
- pyray.image_format(image: Any | list | tuple, newFormat: int) None
Convert image data to desired format
- pyray.image_from_channel(image: Image | list | tuple, selectedChannel: int) Image
Create an image from a selected channel of another image (GRAYSCALE)
- pyray.image_from_image(image: Image | list | tuple, rec: Rectangle | list | tuple) Image
Create an image from another image piece
- pyray.image_kernel_convolution(image: Any | list | tuple, kernel: Any, kernelSize: int) None
Apply custom square convolution kernel to image
- pyray.image_mipmaps(image: Any | list | tuple) None
Compute all mipmap levels for a provided image
- pyray.image_resize(image: Any | list | tuple, newWidth: int, newHeight: int) None
Resize image (Bicubic scaling algorithm)
- pyray.image_resize_canvas(image: Any | list | tuple, newWidth: int, newHeight: int, offsetX: int, offsetY: int, fill: Color | list | tuple) None
Resize canvas and fill with color
- pyray.image_resize_nn(image: Any | list | tuple, newWidth: int, newHeight: int) None
Resize image (Nearest-Neighbor scaling algorithm)
- pyray.image_rotate(image: Any | list | tuple, degrees: int) None
Rotate image by input angle in degrees (-359 to 359)
- pyray.image_rotate_ccw(image: Any | list | tuple) None
Rotate image counter-clockwise 90deg
- pyray.image_rotate_cw(image: Any | list | tuple) None
Rotate image clockwise 90deg
- pyray.image_text(text: str, fontSize: int, color: Color | list | tuple) Image
Create an image from text (default font)
- pyray.image_text_ex(font: Font | list | tuple, text: str, fontSize: float, spacing: float, tint: Color | list | tuple) Image
Create an image from text (custom sprite font)
- pyray.image_to_pot(image: Any | list | tuple, fill: Color | list | tuple) None
Convert image to POT (power-of-two)
- pyray.init_audio_device() None
Initialize audio device and context
- pyray.init_physics() None
Initializes physics system
- pyray.init_window(width: int, height: int, title: str) None
Initialize window and OpenGL context
- pyray.is_audio_device_ready() bool
Check if audio device has been initialized successfully
- pyray.is_audio_stream_playing(stream: AudioStream | list | tuple) bool
Check if audio stream is playing
- pyray.is_audio_stream_processed(stream: AudioStream | list | tuple) bool
Check if any audio stream buffers requires refill
- pyray.is_audio_stream_valid(stream: AudioStream | list | tuple) bool
Checks if an audio stream is valid (buffers initialized)
Check if cursor is not visible
- pyray.is_cursor_on_screen() bool
Check if cursor is on the screen
- pyray.is_file_dropped() bool
Check if a file has been dropped into window
- pyray.is_file_extension(fileName: str, ext: str) bool
Check file extension (including point: .png, .wav)
- pyray.is_file_name_valid(fileName: str) bool
Check if fileName is valid for the platform/OS
- pyray.is_font_valid(font: Font | list | tuple) bool
Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
- pyray.is_gamepad_available(gamepad: int) bool
Check if a gamepad is available
- pyray.is_gamepad_button_down(gamepad: int, button: int) bool
Check if a gamepad button is being pressed
- pyray.is_gamepad_button_pressed(gamepad: int, button: int) bool
Check if a gamepad button has been pressed once
- pyray.is_gamepad_button_released(gamepad: int, button: int) bool
Check if a gamepad button has been released once
- pyray.is_gamepad_button_up(gamepad: int, button: int) bool
Check if a gamepad button is NOT being pressed
- pyray.is_gesture_detected(gesture: int) bool
Check if a gesture have been detected
- pyray.is_image_valid(image: Image | list | tuple) bool
Check if an image is valid (data and parameters)
- pyray.is_key_down(key: int) bool
Check if a key is being pressed
- pyray.is_key_pressed(key: int) bool
Check if a key has been pressed once
- pyray.is_key_pressed_repeat(key: int) bool
Check if a key has been pressed again
- pyray.is_key_released(key: int) bool
Check if a key has been released once
- pyray.is_key_up(key: int) bool
Check if a key is NOT being pressed
- pyray.is_material_valid(material: Material | list | tuple) bool
Check if a material is valid (shader assigned, map textures loaded in GPU)
- pyray.is_model_animation_valid(model: Model | list | tuple, anim: ModelAnimation | list | tuple) bool
Check model animation skeleton match
- pyray.is_model_valid(model: Model | list | tuple) bool
Check if a model is valid (loaded in GPU, VAO/VBOs)
- pyray.is_mouse_button_down(button: int) bool
Check if a mouse button is being pressed
- pyray.is_mouse_button_pressed(button: int) bool
Check if a mouse button has been pressed once
- pyray.is_mouse_button_released(button: int) bool
Check if a mouse button has been released once
- pyray.is_mouse_button_up(button: int) bool
Check if a mouse button is NOT being pressed
- pyray.is_music_valid(music: Music | list | tuple) bool
Checks if a music stream is valid (context and buffers initialized)
- pyray.is_path_file(path: str) bool
Check if a given path is a file or a directory
- pyray.is_render_texture_valid(target: RenderTexture | list | tuple) bool
Check if a render texture is valid (loaded in GPU)
- pyray.is_shader_valid(shader: Shader | list | tuple) bool
Check if a shader is valid (loaded on GPU)
- pyray.is_sound_valid(sound: Sound | list | tuple) bool
Checks if a sound is valid (data loaded and buffers initialized)
- pyray.is_texture_valid(texture: Texture | list | tuple) bool
Check if a texture is valid (loaded in GPU)
- pyray.is_wave_valid(wave: Wave | list | tuple) bool
Checks if wave data is valid (data loaded and parameters)
- pyray.is_window_focused() bool
Check if window is currently focused
- pyray.is_window_fullscreen() bool
Check if window is currently fullscreen
Check if window is currently hidden
- pyray.is_window_maximized() bool
Check if window is currently maximized
- pyray.is_window_minimized() bool
Check if window is currently minimized
- pyray.is_window_ready() bool
Check if window has been initialized successfully
- pyray.is_window_resized() bool
Check if window has been resized last frame
- pyray.is_window_state(flag: int) bool
Check if one specific window flag is enabled
- pyray.lerp(start: float, end: float, amount: float) float
- pyray.load_audio_stream(sampleRate: int, sampleSize: int, channels: int) AudioStream
Load audio stream (to stream raw audio pcm data)
- pyray.load_automation_event_list(fileName: str) AutomationEventList
Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
- pyray.load_codepoints(text: str, count: Any) Any
Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
- pyray.load_directory_files(dirPath: str) FilePathList
Load directory filepaths
- pyray.load_directory_files_ex(basePath: str, filter: str, scanSubdirs: bool) FilePathList
Load directory filepaths with extension filtering and recursive directory scan. Use ‘DIR’ in the filter string to include directories in the result
- pyray.load_dropped_files() FilePathList
Load dropped filepaths
- pyray.load_file_data(fileName: str, dataSize: Any) str
Load file data as byte array (read)
- pyray.load_file_text(fileName: str) str
Load text data from file (read), returns a ‘' terminated string
- pyray.load_font_data(fileData: str, dataSize: int, fontSize: int, codepoints: Any, codepointCount: int, type: int) Any
Load font data for further use
- pyray.load_font_ex(fileName: str, fontSize: int, codepoints: Any, codepointCount: int) Font
Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
- pyray.load_font_from_image(image: Image | list | tuple, key: Color | list | tuple, firstChar: int) Font
Load font from Image (XNA style)
- pyray.load_font_from_memory(fileType: str, fileData: str, dataSize: int, fontSize: int, codepoints: Any, codepointCount: int) Font
Load font from memory buffer, fileType refers to extension: i.e. ‘.ttf’
- pyray.load_image_anim(fileName: str, frames: Any) Image
Load image sequence from file (frames appended to image.data)
- pyray.load_image_anim_from_memory(fileType: str, fileData: str, dataSize: int, frames: Any) Image
Load image sequence from memory buffer
- pyray.load_image_colors(image: Image | list | tuple) Any
Load color data from image as a Color array (RGBA - 32bit)
- pyray.load_image_from_memory(fileType: str, fileData: str, dataSize: int) Image
Load image from memory buffer, fileType refers to extension: i.e. ‘.png’
- pyray.load_image_from_texture(texture: Texture | list | tuple) Image
Load image from GPU texture data
- pyray.load_image_palette(image: Image | list | tuple, maxPaletteSize: int, colorCount: Any) Any
Load colors palette from image as a Color array (RGBA - 32bit)
- pyray.load_image_raw(fileName: str, width: int, height: int, format: int, headerSize: int) Image
Load image from RAW file data
- pyray.load_material_default() Material
Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
- pyray.load_materials(fileName: str, materialCount: Any) Any
Load materials from model file
- pyray.load_model_animations(fileName: str, animCount: Any) Any
Load model animations from file
- pyray.load_model_from_mesh(mesh: Mesh | list | tuple) Model
Load model from generated mesh (default material)
- pyray.load_music_stream_from_memory(fileType: str, data: str, dataSize: int) Music
Load music stream from data
- pyray.load_random_sequence(count: int, min_1: int, max_2: int) Any
Load random values sequence, no values repeated
- pyray.load_render_texture(width: int, height: int) RenderTexture
Load texture for rendering (framebuffer)
- pyray.load_shader(vsFileName: str, fsFileName: str) Shader
Load shader from files and bind default locations
- pyray.load_shader_from_memory(vsCode: str, fsCode: str) Shader
Load shader from code strings and bind default locations
- pyray.load_sound_alias(source: Sound | list | tuple) Sound
Create a new sound that shares the same sample data as the source sound, does not own the sound data
- pyray.load_texture_cubemap(image: Image | list | tuple, layout: int) Texture
Load cubemap from image, multiple image cubemap layouts supported
- pyray.load_utf8(codepoints: Any, length: int) str
Load UTF-8 text encoded from codepoints array
- pyray.load_vr_stereo_config(device: VrDeviceInfo | list | tuple) VrStereoConfig
Load VR stereo config for VR simulator device parameters
- pyray.load_wave_from_memory(fileType: str, fileData: str, dataSize: int) Wave
Load wave from memory buffer, fileType refers to extension: i.e. ‘.wav’
- pyray.load_wave_samples(wave: Wave | list | tuple) Any
Load samples data from wave as a 32bit float data array
- pyray.make_directory(dirPath: str) int
Create directories (including full path requested), returns 0 on success
- pyray.matrix_decompose(mat: Matrix | list | tuple, translation: Any | list | tuple, rotation: Any | list | tuple, scale: Any | list | tuple) None
- pyray.matrix_frustum(left: float, right: float, bottom: float, top: float, nearPlane: float, farPlane: float) Matrix
- pyray.matrix_look_at(eye: Vector3 | list | tuple, target: Vector3 | list | tuple, up: Vector3 | list | tuple) Matrix
- pyray.matrix_ortho(left: float, right: float, bottom: float, top: float, nearPlane: float, farPlane: float) Matrix
- pyray.maximize_window() None
Set window state: maximized, if resizable
- pyray.measure_text(text: str, fontSize: int) int
Measure string width for default font
- pyray.measure_text_ex(font: Font | list | tuple, text: str, fontSize: float, spacing: float) Vector2
Measure string size for Font
- pyray.mem_alloc(size: int) Any
Internal memory allocator
- pyray.mem_free(ptr: Any) None
Internal memory free
- pyray.mem_realloc(ptr: Any, size: int) Any
Internal memory reallocator
- pyray.minimize_window() None
Set window state: minimized, if resizable
- pyray.normalize(value: float, start: float, end: float) float
- pyray.open_url(url: str) None
Open URL with default system browser (if available)
- pyray.pause_audio_stream(stream: AudioStream | list | tuple) None
Pause audio stream
- pyray.physics_add_force(body: Any | list | tuple, force: Vector2 | list | tuple) None
Adds a force to a physics body
- pyray.physics_add_torque(body: Any | list | tuple, amount: float) None
Adds an angular force to a physics body
- pyray.physics_shatter(body: Any | list | tuple, position: Vector2 | list | tuple, force: float) None
Shatters a polygon shape physics body to little physics bodies with explosion force
- pyray.play_audio_stream(stream: AudioStream | list | tuple) None
Play audio stream
- pyray.play_automation_event(event: AutomationEvent | list | tuple) None
Play a recorded automation event
- pyray.poll_input_events() None
Register all input events
- pyray.quaternion_cubic_hermite_spline(q1: Vector4 | list | tuple, outTangent1: Vector4 | list | tuple, q2: Vector4 | list | tuple, inTangent2: Vector4 | list | tuple, t: float) Vector4
- pyray.quaternion_from_vector3_to_vector3(from_0: Vector3 | list | tuple, to: Vector3 | list | tuple) Vector4
- pyray.quaternion_lerp(q1: Vector4 | list | tuple, q2: Vector4 | list | tuple, amount: float) Vector4
- pyray.quaternion_nlerp(q1: Vector4 | list | tuple, q2: Vector4 | list | tuple, amount: float) Vector4
- pyray.quaternion_slerp(q1: Vector4 | list | tuple, q2: Vector4 | list | tuple, amount: float) Vector4
- pyray.quaternion_to_axis_angle(q: Vector4 | list | tuple, outAxis: Any | list | tuple, outAngle: Any) None
- pyray.remap(value: float, inputStart: float, inputEnd: float, outputStart: float, outputEnd: float) float
- pyray.reset_physics() None
Reset physics system (global variables)
- pyray.restore_window() None
Set window state: not minimized/maximized
- pyray.resume_audio_stream(stream: AudioStream | list | tuple) None
Resume audio stream
- class pyray.rlBlendMode
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_BLEND_ADDITIVE = 1
- RL_BLEND_ADD_COLORS = 3
- RL_BLEND_ALPHA = 0
- RL_BLEND_ALPHA_PREMULTIPLY = 5
- RL_BLEND_CUSTOM = 6
- RL_BLEND_CUSTOM_SEPARATE = 7
- RL_BLEND_MULTIPLIED = 2
- RL_BLEND_SUBTRACT_COLORS = 4
- class pyray.rlCullMode
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_CULL_FACE_BACK = 1
- RL_CULL_FACE_FRONT = 0
- class pyray.rlDrawCall(mode: int | None = None, vertexCount: int | None = None, vertexAlignment: int | None = None, textureId: int | None = None)
struct
- mode: int
- textureId: int
- vertexAlignment: int
- vertexCount: int
- class pyray.rlFramebufferAttachTextureType
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5
- RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0
- RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2
- RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4
- RL_ATTACHMENT_RENDERBUFFER = 200
- RL_ATTACHMENT_TEXTURE2D = 100
- class pyray.rlFramebufferAttachType
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_ATTACHMENT_COLOR_CHANNEL0 = 0
- RL_ATTACHMENT_COLOR_CHANNEL1 = 1
- RL_ATTACHMENT_COLOR_CHANNEL2 = 2
- RL_ATTACHMENT_COLOR_CHANNEL3 = 3
- RL_ATTACHMENT_COLOR_CHANNEL4 = 4
- RL_ATTACHMENT_COLOR_CHANNEL5 = 5
- RL_ATTACHMENT_COLOR_CHANNEL6 = 6
- RL_ATTACHMENT_COLOR_CHANNEL7 = 7
- RL_ATTACHMENT_DEPTH = 100
- RL_ATTACHMENT_STENCIL = 200
- class pyray.rlGlVersion
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_OPENGL_11 = 1
- RL_OPENGL_21 = 2
- RL_OPENGL_33 = 3
- RL_OPENGL_43 = 4
- RL_OPENGL_ES_20 = 5
- RL_OPENGL_ES_30 = 6
- class pyray.rlPixelFormat
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
- RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
- RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
- RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
- RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
- RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
- RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
- RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
- RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
- RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
- RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
- RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
- RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2
- RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11
- RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
- RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
- RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8
- RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
- RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
- RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6
- RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5
- RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3
- RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4
- RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7
- class pyray.rlRenderBatch(bufferCount: int | None = None, currentBuffer: int | None = None, vertexBuffer: Any | None = None, draws: Any | None = None, drawCounter: int | None = None, currentDepth: float | None = None)
struct
- bufferCount: int
- currentBuffer: int
- currentDepth: float
- drawCounter: int
- draws: Any
- vertexBuffer: Any
- class pyray.rlShaderAttributeDataType
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_SHADER_ATTRIB_FLOAT = 0
- RL_SHADER_ATTRIB_VEC2 = 1
- RL_SHADER_ATTRIB_VEC3 = 2
- RL_SHADER_ATTRIB_VEC4 = 3
- class pyray.rlShaderLocationIndex
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_SHADER_LOC_COLOR_AMBIENT = 14
- RL_SHADER_LOC_COLOR_DIFFUSE = 12
- RL_SHADER_LOC_COLOR_SPECULAR = 13
- RL_SHADER_LOC_MAP_ALBEDO = 15
- RL_SHADER_LOC_MAP_BRDF = 25
- RL_SHADER_LOC_MAP_CUBEMAP = 22
- RL_SHADER_LOC_MAP_EMISSION = 20
- RL_SHADER_LOC_MAP_HEIGHT = 21
- RL_SHADER_LOC_MAP_IRRADIANCE = 23
- RL_SHADER_LOC_MAP_METALNESS = 16
- RL_SHADER_LOC_MAP_NORMAL = 17
- RL_SHADER_LOC_MAP_OCCLUSION = 19
- RL_SHADER_LOC_MAP_PREFILTER = 24
- RL_SHADER_LOC_MAP_ROUGHNESS = 18
- RL_SHADER_LOC_MATRIX_MODEL = 9
- RL_SHADER_LOC_MATRIX_MVP = 6
- RL_SHADER_LOC_MATRIX_NORMAL = 10
- RL_SHADER_LOC_MATRIX_PROJECTION = 8
- RL_SHADER_LOC_MATRIX_VIEW = 7
- RL_SHADER_LOC_VECTOR_VIEW = 11
- RL_SHADER_LOC_VERTEX_COLOR = 5
- RL_SHADER_LOC_VERTEX_NORMAL = 3
- RL_SHADER_LOC_VERTEX_POSITION = 0
- RL_SHADER_LOC_VERTEX_TANGENT = 4
- RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1
- RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2
- class pyray.rlShaderUniformDataType
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_SHADER_UNIFORM_FLOAT = 0
- RL_SHADER_UNIFORM_INT = 4
- RL_SHADER_UNIFORM_IVEC2 = 5
- RL_SHADER_UNIFORM_IVEC3 = 6
- RL_SHADER_UNIFORM_IVEC4 = 7
- RL_SHADER_UNIFORM_SAMPLER2D = 12
- RL_SHADER_UNIFORM_UINT = 8
- RL_SHADER_UNIFORM_UIVEC2 = 9
- RL_SHADER_UNIFORM_UIVEC3 = 10
- RL_SHADER_UNIFORM_UIVEC4 = 11
- RL_SHADER_UNIFORM_VEC2 = 1
- RL_SHADER_UNIFORM_VEC3 = 2
- RL_SHADER_UNIFORM_VEC4 = 3
- class pyray.rlTextureFilter
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5
- RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3
- RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4
- RL_TEXTURE_FILTER_BILINEAR = 1
- RL_TEXTURE_FILTER_POINT = 0
- RL_TEXTURE_FILTER_TRILINEAR = 2
- class pyray.rlTraceLogLevel
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- RL_LOG_ALL = 0
- RL_LOG_DEBUG = 2
- RL_LOG_ERROR = 5
- RL_LOG_FATAL = 6
- RL_LOG_INFO = 3
- RL_LOG_NONE = 7
- RL_LOG_TRACE = 1
- RL_LOG_WARNING = 4
- class pyray.rlVertexBuffer(elementCount: int | None = None, vertices: Any | None = None, texcoords: Any | None = None, normals: Any | None = None, colors: str | None = None, indices: Any | None = None, vaoId: int | None = None, vboId: list | None = None)
struct
- colors: str
- elementCount: int
- indices: Any
- normals: Any
- texcoords: Any
- vaoId: int
- vboId: list
- vertices: Any
- pyray.rl_active_draw_buffers(count: int) None
Activate multiple draw color buffers
- pyray.rl_active_texture_slot(slot: int) None
Select and active a texture slot
- pyray.rl_begin(mode: int) None
Initialize drawing mode (how to organize vertex)
- pyray.rl_bind_framebuffer(target: int, framebuffer: int) None
Bind framebuffer (FBO)
- pyray.rl_bind_image_texture(id: int, index: int, format: int, readonly: bool) None
Bind image texture
- pyray.rl_bind_shader_buffer(id: int, index: int) None
Bind SSBO buffer
- pyray.rl_blit_framebuffer(srcX: int, srcY: int, srcWidth: int, srcHeight: int, dstX: int, dstY: int, dstWidth: int, dstHeight: int, bufferMask: int) None
Blit active framebuffer to main framebuffer
- pyray.rl_check_errors() None
Check and log OpenGL error codes
- pyray.rl_check_render_batch_limit(vCount: int) bool
Check internal buffer overflow for a given number of vertex
- pyray.rl_clear_color(r: int, g: int, b: int, a: int) None
Clear color buffer with color
- pyray.rl_clear_screen_buffers() None
Clear used screen buffers (color and depth)
- pyray.rl_color3f(x: float, y: float, z: float) None
Define one vertex (color) - 3 float
- pyray.rl_color4f(x: float, y: float, z: float, w: float) None
Define one vertex (color) - 4 float
- pyray.rl_color4ub(r: int, g: int, b: int, a: int) None
Define one vertex (color) - 4 byte
- pyray.rl_color_mask(r: bool, g: bool, b: bool, a: bool) None
Color mask control
- pyray.rl_compile_shader(shaderCode: str, type: int) int
Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
- pyray.rl_compute_shader_dispatch(groupX: int, groupY: int, groupZ: int) None
Dispatch compute shader (equivalent to draw for graphics pipeline)
- pyray.rl_copy_shader_buffer(destId: int, srcId: int, destOffset: int, srcOffset: int, count: int) None
Copy SSBO data between buffers
- pyray.rl_cubemap_parameters(id: int, param: int, value: int) None
Set cubemap parameters (filter, wrap)
- pyray.rl_disable_backface_culling() None
Disable backface culling
- pyray.rl_disable_color_blend() None
Disable color blending
- pyray.rl_disable_depth_mask() None
Disable depth write
- pyray.rl_disable_depth_test() None
Disable depth test
- pyray.rl_disable_framebuffer() None
Disable render texture (fbo), return to default framebuffer
- pyray.rl_disable_scissor_test() None
Disable scissor test
- pyray.rl_disable_shader() None
Disable shader program
- pyray.rl_disable_smooth_lines() None
Disable line aliasing
- pyray.rl_disable_stereo_render() None
Disable stereo rendering
- pyray.rl_disable_texture() None
Disable texture
- pyray.rl_disable_texture_cubemap() None
Disable texture cubemap
- pyray.rl_disable_vertex_array() None
Disable vertex array (VAO, if supported)
- pyray.rl_disable_vertex_attribute(index: int) None
Disable vertex attribute index
- pyray.rl_disable_vertex_buffer() None
Disable vertex buffer (VBO)
- pyray.rl_disable_vertex_buffer_element() None
Disable vertex buffer element (VBO element)
- pyray.rl_disable_wire_mode() None
Disable wire (and point) mode
- pyray.rl_draw_render_batch(batch: Any | list | tuple) None
Draw render batch data (Update->Draw->Reset)
- pyray.rl_draw_render_batch_active() None
Update and draw internal render batch
- pyray.rl_draw_vertex_array(offset: int, count: int) None
Draw vertex array (currently active vao)
- pyray.rl_draw_vertex_array_elements(offset: int, count: int, buffer: Any) None
Draw vertex array elements
- pyray.rl_draw_vertex_array_elements_instanced(offset: int, count: int, buffer: Any, instances: int) None
Draw vertex array elements with instancing
- pyray.rl_draw_vertex_array_instanced(offset: int, count: int, instances: int) None
Draw vertex array (currently active vao) with instancing
- pyray.rl_enable_backface_culling() None
Enable backface culling
- pyray.rl_enable_color_blend() None
Enable color blending
- pyray.rl_enable_depth_mask() None
Enable depth write
- pyray.rl_enable_depth_test() None
Enable depth test
- pyray.rl_enable_framebuffer(id: int) None
Enable render texture (fbo)
- pyray.rl_enable_point_mode() None
Enable point mode
- pyray.rl_enable_scissor_test() None
Enable scissor test
- pyray.rl_enable_shader(id: int) None
Enable shader program
- pyray.rl_enable_smooth_lines() None
Enable line aliasing
- pyray.rl_enable_stereo_render() None
Enable stereo rendering
- pyray.rl_enable_texture(id: int) None
Enable texture
- pyray.rl_enable_texture_cubemap(id: int) None
Enable texture cubemap
- pyray.rl_enable_vertex_array(vaoId: int) bool
Enable vertex array (VAO, if supported)
- pyray.rl_enable_vertex_attribute(index: int) None
Enable vertex attribute index
- pyray.rl_enable_vertex_buffer(id: int) None
Enable vertex buffer (VBO)
- pyray.rl_enable_vertex_buffer_element(id: int) None
Enable vertex buffer element (VBO element)
- pyray.rl_enable_wire_mode() None
Enable wire mode
- pyray.rl_end() None
Finish vertex providing
- pyray.rl_framebuffer_attach(fboId: int, texId: int, attachType: int, texType: int, mipLevel: int) None
Attach texture/renderbuffer to a framebuffer
- pyray.rl_framebuffer_complete(id: int) bool
Verify framebuffer is complete
- pyray.rl_frustum(left: float, right: float, bottom: float, top: float, znear: float, zfar: float) None
- pyray.rl_gen_texture_mipmaps(id: int, width: int, height: int, format: int, mipmaps: Any) None
Generate mipmap data for selected texture
- pyray.rl_get_active_framebuffer() int
Get the currently active render texture (fbo), 0 for default framebuffer
- pyray.rl_get_cull_distance_far() float
Get cull plane distance far
- pyray.rl_get_cull_distance_near() float
Get cull plane distance near
- pyray.rl_get_framebuffer_height() int
Get default framebuffer height
- pyray.rl_get_framebuffer_width() int
Get default framebuffer width
- pyray.rl_get_gl_texture_formats(format: int, glInternalFormat: Any, glFormat: Any, glType: Any) None
Get OpenGL internal formats
- pyray.rl_get_line_width() float
Get the line drawing width
- pyray.rl_get_location_attrib(shaderId: int, attribName: str) int
Get shader location attribute
- pyray.rl_get_location_uniform(shaderId: int, uniformName: str) int
Get shader location uniform
- pyray.rl_get_matrix_projection_stereo(eye: int) Matrix
Get internal projection matrix for stereo render (selected eye)
- pyray.rl_get_matrix_view_offset_stereo(eye: int) Matrix
Get internal view offset matrix for stereo render (selected eye)
- pyray.rl_get_pixel_format_name(format: int) str
Get name string for pixel format
- pyray.rl_get_shader_buffer_size(id: int) int
Get SSBO buffer size
- pyray.rl_get_shader_id_default() int
Get default shader id
- pyray.rl_get_shader_locs_default() Any
Get default shader locations
- pyray.rl_get_texture_id_default() int
Get default texture id
- pyray.rl_get_version() int
Get current OpenGL version
- pyray.rl_is_stereo_render_enabled() bool
Check if stereo render is enabled
- pyray.rl_load_compute_shader_program(shaderId: int) int
Load compute shader program
- pyray.rl_load_draw_cube() None
Load and draw a cube
- pyray.rl_load_draw_quad() None
Load and draw a quad
- pyray.rl_load_extensions(loader: Any) None
Load OpenGL extensions (loader function required)
- pyray.rl_load_framebuffer() int
Load an empty framebuffer
- pyray.rl_load_identity() None
Reset current matrix to identity matrix
- pyray.rl_load_render_batch(numBuffers: int, bufferElements: int) rlRenderBatch
Load a render batch system
- pyray.rl_load_shader_buffer(size: int, data: Any, usageHint: int) int
Load shader storage buffer object (SSBO)
- pyray.rl_load_shader_code(vsCode: str, fsCode: str) int
Load shader from code strings
- pyray.rl_load_shader_program(vShaderId: int, fShaderId: int) int
Load custom shader program
- pyray.rl_load_texture(data: Any, width: int, height: int, format: int, mipmapCount: int) int
Load texture data
- pyray.rl_load_texture_cubemap(data: Any, size: int, format: int, mipmapCount: int) int
Load texture cubemap data
- pyray.rl_load_texture_depth(width: int, height: int, useRenderBuffer: bool) int
Load depth texture/renderbuffer (to be attached to fbo)
- pyray.rl_load_vertex_array() int
Load vertex array (vao) if supported
- pyray.rl_load_vertex_buffer(buffer: Any, size: int, dynamic: bool) int
Load a vertex buffer object
- pyray.rl_load_vertex_buffer_element(buffer: Any, size: int, dynamic: bool) int
Load vertex buffer elements object
- pyray.rl_matrix_mode(mode: int) None
Choose the current matrix to be transformed
- pyray.rl_mult_matrixf(matf: Any) None
Multiply the current matrix by another matrix
- pyray.rl_normal3f(x: float, y: float, z: float) None
Define one vertex (normal) - 3 float
- pyray.rl_ortho(left: float, right: float, bottom: float, top: float, znear: float, zfar: float) None
- pyray.rl_pop_matrix() None
Pop latest inserted matrix from stack
- pyray.rl_push_matrix() None
Push the current matrix to stack
- pyray.rl_read_screen_pixels(width: int, height: int) str
Read screen pixel data (color buffer)
- pyray.rl_read_shader_buffer(id: int, dest: Any, count: int, offset: int) None
Read SSBO buffer data (GPU->CPU)
- pyray.rl_read_texture_pixels(id: int, width: int, height: int, format: int) Any
Read texture pixel data
- pyray.rl_rotatef(angle: float, x: float, y: float, z: float) None
Multiply the current matrix by a rotation matrix
- pyray.rl_scalef(x: float, y: float, z: float) None
Multiply the current matrix by a scaling matrix
- pyray.rl_scissor(x: int, y: int, width: int, height: int) None
Scissor test
- pyray.rl_set_blend_factors(glSrcFactor: int, glDstFactor: int, glEquation: int) None
Set blending mode factor and equation (using OpenGL factors)
- pyray.rl_set_blend_factors_separate(glSrcRGB: int, glDstRGB: int, glSrcAlpha: int, glDstAlpha: int, glEqRGB: int, glEqAlpha: int) None
Set blending mode factors and equations separately (using OpenGL factors)
- pyray.rl_set_blend_mode(mode: int) None
Set blending mode
- pyray.rl_set_clip_planes(nearPlane: float, farPlane: float) None
Set clip planes distances
- pyray.rl_set_cull_face(mode: int) None
Set face culling mode
- pyray.rl_set_framebuffer_height(height: int) None
Set current framebuffer height
- pyray.rl_set_framebuffer_width(width: int) None
Set current framebuffer width
- pyray.rl_set_line_width(width: float) None
Set the line drawing width
- pyray.rl_set_matrix_modelview(view: Matrix | list | tuple) None
Set a custom modelview matrix (replaces internal modelview matrix)
- pyray.rl_set_matrix_projection(proj: Matrix | list | tuple) None
Set a custom projection matrix (replaces internal projection matrix)
- pyray.rl_set_matrix_projection_stereo(right: Matrix | list | tuple, left: Matrix | list | tuple) None
Set eyes projection matrices for stereo rendering
- pyray.rl_set_matrix_view_offset_stereo(right: Matrix | list | tuple, left: Matrix | list | tuple) None
Set eyes view offsets matrices for stereo rendering
- pyray.rl_set_render_batch_active(batch: Any | list | tuple) None
Set the active render batch for rlgl (NULL for default internal)
- pyray.rl_set_shader(id: int, locs: Any) None
Set shader currently active (id and locations)
- pyray.rl_set_texture(id: int) None
Set current texture for render batch and check buffers limits
- pyray.rl_set_uniform(locIndex: int, value: Any, uniformType: int, count: int) None
Set shader value uniform
- pyray.rl_set_uniform_matrices(locIndex: int, mat: Any | list | tuple, count: int) None
Set shader value matrices
- pyray.rl_set_uniform_matrix(locIndex: int, mat: Matrix | list | tuple) None
Set shader value matrix
- pyray.rl_set_uniform_sampler(locIndex: int, textureId: int) None
Set shader value sampler
- pyray.rl_set_vertex_attribute(index: int, compSize: int, type: int, normalized: bool, stride: int, offset: int) None
Set vertex attribute data configuration
- pyray.rl_set_vertex_attribute_default(locIndex: int, value: Any, attribType: int, count: int) None
Set vertex attribute default value, when attribute to provided
- pyray.rl_set_vertex_attribute_divisor(index: int, divisor: int) None
Set vertex attribute data divisor
- pyray.rl_tex_coord2f(x: float, y: float) None
Define one vertex (texture coordinate) - 2 float
- pyray.rl_texture_parameters(id: int, param: int, value: int) None
Set texture parameters (filter, wrap)
- pyray.rl_translatef(x: float, y: float, z: float) None
Multiply the current matrix by a translation matrix
- pyray.rl_unload_framebuffer(id: int) None
Delete framebuffer from GPU
- pyray.rl_unload_render_batch(batch: rlRenderBatch | list | tuple) None
Unload render batch system
- pyray.rl_unload_shader_buffer(ssboId: int) None
Unload shader storage buffer object (SSBO)
- pyray.rl_unload_shader_program(id: int) None
Unload shader program
- pyray.rl_unload_texture(id: int) None
Unload texture from GPU memory
- pyray.rl_unload_vertex_array(vaoId: int) None
Unload vertex array (vao)
- pyray.rl_unload_vertex_buffer(vboId: int) None
Unload vertex buffer object
- pyray.rl_update_shader_buffer(id: int, data: Any, dataSize: int, offset: int) None
Update SSBO buffer data
- pyray.rl_update_texture(id: int, offsetX: int, offsetY: int, width: int, height: int, format: int, data: Any) None
Update texture with new data on GPU
- pyray.rl_update_vertex_buffer(bufferId: int, data: Any, dataSize: int, offset: int) None
Update vertex buffer object data on GPU buffer
- pyray.rl_update_vertex_buffer_elements(id: int, data: Any, dataSize: int, offset: int) None
Update vertex buffer elements data on GPU buffer
- pyray.rl_vertex2f(x: float, y: float) None
Define one vertex (position) - 2 float
- pyray.rl_vertex2i(x: int, y: int) None
Define one vertex (position) - 2 int
- pyray.rl_vertex3f(x: float, y: float, z: float) None
Define one vertex (position) - 3 float
- pyray.rl_viewport(x: int, y: int, width: int, height: int) None
Set the viewport area
- pyray.rlgl_close() None
De-initialize rlgl (buffers, shaders, textures)
- pyray.rlgl_init(width: int, height: int) None
Initialize rlgl (buffers, shaders, textures, states)
- pyray.save_file_data(fileName: str, data: Any, dataSize: int) bool
Save data to file from byte array (write), returns true on success
- pyray.save_file_text(fileName: str, text: str) bool
Save text data to file (write), string must be ‘' terminated, returns true on success
- pyray.seek_music_stream(music: Music | list | tuple, position: float) None
Seek music to a position (in seconds)
- pyray.set_audio_stream_buffer_size_default(size: int) None
Default size for new audio streams
- pyray.set_audio_stream_callback(stream: AudioStream | list | tuple, callback: Any) None
Audio thread callback to request new data
- pyray.set_audio_stream_pan(stream: AudioStream | list | tuple, pan: float) None
Set pan for audio stream (0.5 is centered)
- pyray.set_audio_stream_pitch(stream: AudioStream | list | tuple, pitch: float) None
Set pitch for audio stream (1.0 is base level)
- pyray.set_audio_stream_volume(stream: AudioStream | list | tuple, volume: float) None
Set volume for audio stream (1.0 is max level)
- pyray.set_automation_event_base_frame(frame: int) None
Set automation event internal base frame to start recording
- pyray.set_automation_event_list(list_0: Any | list | tuple) None
Set automation event list to record to
- pyray.set_clipboard_text(text: str) None
Set clipboard text content
- pyray.set_config_flags(flags: int) None
Setup init configuration flags (view FLAGS)
- pyray.set_exit_key(key: int) None
Set a custom key to exit program (default is ESC)
- pyray.set_gamepad_mappings(mappings: str) int
Set internal gamepad mappings (SDL_GameControllerDB)
- pyray.set_gamepad_vibration(gamepad: int, leftMotor: float, rightMotor: float, duration: float) None
Set gamepad vibration for both motors (duration in seconds)
- pyray.set_gestures_enabled(flags: int) None
Enable a set of gestures using flags
- pyray.set_load_file_data_callback(callback: str) None
Set custom file binary data loader
- pyray.set_load_file_text_callback(callback: str) None
Set custom file text data loader
- pyray.set_master_volume(volume: float) None
Set master volume (listener)
- pyray.set_material_texture(material: Any | list | tuple, mapType: int, texture: Texture | list | tuple) None
Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR…)
- pyray.set_model_mesh_material(model: Any | list | tuple, meshId: int, materialId: int) None
Set material for a mesh
- pyray.set_mouse_cursor(cursor: int) None
Set mouse cursor
- pyray.set_mouse_offset(offsetX: int, offsetY: int) None
Set mouse offset
- pyray.set_mouse_position(x: int, y: int) None
Set mouse position XY
- pyray.set_mouse_scale(scaleX: float, scaleY: float) None
Set mouse scaling
- pyray.set_music_pan(music: Music | list | tuple, pan: float) None
Set pan for a music (0.5 is center)
- pyray.set_music_pitch(music: Music | list | tuple, pitch: float) None
Set pitch for a music (1.0 is base level)
- pyray.set_music_volume(music: Music | list | tuple, volume: float) None
Set volume for music (1.0 is max level)
- pyray.set_physics_body_rotation(body: Any | list | tuple, radians: float) None
Sets physics body shape transform based on radians parameter
- pyray.set_physics_gravity(x: float, y: float) None
Sets physics global gravity force
- pyray.set_physics_time_step(delta: float) None
Sets physics fixed time step in milliseconds. 1.666666 by default
- pyray.set_pixel_color(dstPtr: Any, color: Color | list | tuple, format: int) None
Set color formatted into destination pixel pointer
- pyray.set_random_seed(seed: int) None
Set the seed for the random number generator
- pyray.set_save_file_data_callback(callback: str) None
Set custom file binary data saver
- pyray.set_save_file_text_callback(callback: str) None
Set custom file text data saver
- pyray.set_shader_value(shader: Shader | list | tuple, locIndex: int, value: Any, uniformType: int) None
Set shader uniform value
- pyray.set_shader_value_matrix(shader: Shader | list | tuple, locIndex: int, mat: Matrix | list | tuple) None
Set shader uniform value (matrix 4x4)
- pyray.set_shader_value_texture(shader: Shader | list | tuple, locIndex: int, texture: Texture | list | tuple) None
Set shader uniform value for texture (sampler2d)
- pyray.set_shader_value_v(shader: Shader | list | tuple, locIndex: int, value: Any, uniformType: int, count: int) None
Set shader uniform value vector
- pyray.set_shapes_texture(texture: Texture | list | tuple, source: Rectangle | list | tuple) None
Set texture and rectangle to be used on shapes drawing
- pyray.set_sound_pan(sound: Sound | list | tuple, pan: float) None
Set pan for a sound (0.5 is center)
- pyray.set_sound_pitch(sound: Sound | list | tuple, pitch: float) None
Set pitch for a sound (1.0 is base level)
- pyray.set_sound_volume(sound: Sound | list | tuple, volume: float) None
Set volume for a sound (1.0 is max level)
- pyray.set_target_fps(fps: int) None
Set target FPS (maximum)
- pyray.set_text_line_spacing(spacing: int) None
Set vertical line spacing when drawing with line-breaks
- pyray.set_texture_filter(texture: Texture | list | tuple, filter: int) None
Set texture scaling filter mode
- pyray.set_trace_log_callback(callback: str) None
Set custom trace log
- pyray.set_trace_log_level(logLevel: int) None
Set the current threshold (minimum) log level
- pyray.set_window_focused() None
Set window focused
- pyray.set_window_icon(image: Image | list | tuple) None
Set icon for window (single image, RGBA 32bit)
- pyray.set_window_icons(images: Any | list | tuple, count: int) None
Set icon for window (multiple images, RGBA 32bit)
- pyray.set_window_max_size(width: int, height: int) None
Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
- pyray.set_window_min_size(width: int, height: int) None
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
- pyray.set_window_monitor(monitor: int) None
Set monitor for the current window
- pyray.set_window_opacity(opacity: float) None
Set window opacity [0.0f..1.0f]
- pyray.set_window_position(x: int, y: int) None
Set window position on screen
- pyray.set_window_size(width: int, height: int) None
Set window dimensions
- pyray.set_window_state(flags: int) None
Set window configuration state using flags
- pyray.set_window_title(title: str) None
Set title for window
- pyray.show_cursor() None
Shows cursor
- pyray.start_automation_event_recording() None
Start recording automation events (AutomationEventList must be set)
- pyray.stop_audio_stream(stream: AudioStream | list | tuple) None
Stop audio stream
- pyray.stop_automation_event_recording() None
Stop recording automation events
- pyray.swap_screen_buffer() None
Swap back buffer with front buffer (screen drawing)
- pyray.take_screenshot(fileName: str) None
Takes a screenshot of current screen (filename extension defines format)
- pyray.text_append(text: str, append: str, position: Any) None
Append text at specific position and move cursor!
- pyray.text_copy(dst: str, src: str) int
Copy one string to another, returns bytes copied
- pyray.text_find_index(text: str, find: str) int
Find first text occurrence within a string
- pyray.text_format(*args) str
VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI
- pyray.text_insert(text: str, insert: str, position: int) str
Insert text in a position (WARNING: memory must be freed!)
- pyray.text_is_equal(text1: str, text2: str) bool
Check if two text string are equal
- pyray.text_join(textList: list[str], count: int, delimiter: str) str
Join text strings with delimiter
- pyray.text_length(text: str) int
Get text length, checks for ‘' ending
- pyray.text_replace(text: str, replace: str, by: str) str
Replace text string (WARNING: memory must be freed!)
- pyray.text_split(text: str, delimiter: str, count: Any) list[str]
Split text into multiple strings
- pyray.text_subtext(text: str, position: int, length: int) str
Get a piece of a text string
- pyray.text_to_camel(text: str) str
Get Camel case notation version of provided string
- pyray.text_to_float(text: str) float
Get float value from text (negative values not supported)
- pyray.text_to_integer(text: str) int
Get integer value from text (negative values not supported)
- pyray.text_to_lower(text: str) str
Get lower case version of provided string
- pyray.text_to_pascal(text: str) str
Get Pascal case notation version of provided string
- pyray.text_to_snake(text: str) str
Get Snake case notation version of provided string
- pyray.text_to_upper(text: str) str
Get upper case version of provided string
- pyray.toggle_borderless_windowed() None
Toggle window state: borderless windowed, resizes window to match monitor resolution
- pyray.toggle_fullscreen() None
Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
- pyray.trace_log(*args) None
VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI
- pyray.unload_audio_stream(stream: AudioStream | list | tuple) None
Unload audio stream and free memory
- pyray.unload_automation_event_list(list_0: AutomationEventList | list | tuple) None
Unload automation events list from file
- pyray.unload_codepoints(codepoints: Any) None
Unload codepoints data from memory
- pyray.unload_directory_files(files: FilePathList | list | tuple) None
Unload filepaths
- pyray.unload_dropped_files(files: FilePathList | list | tuple) None
Unload dropped filepaths
- pyray.unload_file_data(data: str) None
Unload file data allocated by LoadFileData()
- pyray.unload_file_text(text: str) None
Unload file text data allocated by LoadFileText()
- pyray.unload_font_data(glyphs: Any | list | tuple, glyphCount: int) None
Unload font chars info data (RAM)
- pyray.unload_image_colors(colors: Any | list | tuple) None
Unload color data loaded with LoadImageColors()
- pyray.unload_image_palette(colors: Any | list | tuple) None
Unload colors palette loaded with LoadImagePalette()
- pyray.unload_material(material: Material | list | tuple) None
Unload material from GPU memory (VRAM)
- pyray.unload_model(model: Model | list | tuple) None
Unload model (including meshes) from memory (RAM and/or VRAM)
- pyray.unload_model_animation(anim: ModelAnimation | list | tuple) None
Unload animation data
- pyray.unload_model_animations(animations: Any | list | tuple, animCount: int) None
Unload animation array data
- pyray.unload_random_sequence(sequence: Any) None
Unload random values sequence
- pyray.unload_render_texture(target: RenderTexture | list | tuple) None
Unload render texture from GPU memory (VRAM)
- pyray.unload_sound_alias(alias: Sound | list | tuple) None
Unload a sound alias (does not deallocate sample data)
- pyray.unload_utf8(text: str) None
Unload UTF-8 text encoded from codepoints array
- pyray.unload_vr_stereo_config(config: VrStereoConfig | list | tuple) None
Unload VR stereo config
- pyray.unload_wave_samples(samples: Any) None
Unload samples data loaded with LoadWaveSamples()
- pyray.update_audio_stream(stream: AudioStream | list | tuple, data: Any, frameCount: int) None
Update audio stream buffers with data
- pyray.update_camera(camera: Any | list | tuple, mode: int) None
Update camera position for selected mode
- pyray.update_camera_pro(camera: Any | list | tuple, movement: Vector3 | list | tuple, rotation: Vector3 | list | tuple, zoom: float) None
Update camera movement/rotation
- pyray.update_mesh_buffer(mesh: Mesh | list | tuple, index: int, data: Any, dataSize: int, offset: int) None
Update mesh vertex data in GPU for a specific buffer index
- pyray.update_model_animation(model: Model | list | tuple, anim: ModelAnimation | list | tuple, frame: int) None
Update model animation pose (CPU)
- pyray.update_model_animation_bones(model: Model | list | tuple, anim: ModelAnimation | list | tuple, frame: int) None
Update model animation mesh bone matrices (GPU skinning)
- pyray.update_physics() None
Update physics system
- pyray.update_sound(sound: Sound | list | tuple, data: Any, sampleCount: int) None
Update sound buffer with new data
- pyray.update_texture(texture: Texture | list | tuple, pixels: Any) None
Update GPU texture with new data
- pyray.update_texture_rec(texture: Texture | list | tuple, rec: Rectangle | list | tuple, pixels: Any) None
Update GPU texture rectangle with new data
- pyray.upload_mesh(mesh: Any | list | tuple, dynamic: bool) None
Upload mesh vertex data in GPU and provide VAO/VBO ids
- pyray.vector2_clamp(v: Vector2 | list | tuple, min_1: Vector2 | list | tuple, max_2: Vector2 | list | tuple) Vector2
- pyray.vector2_move_towards(v: Vector2 | list | tuple, target: Vector2 | list | tuple, maxDistance: float) Vector2
- pyray.vector3_barycenter(p: Vector3 | list | tuple, a: Vector3 | list | tuple, b: Vector3 | list | tuple, c: Vector3 | list | tuple) Vector3
- pyray.vector3_clamp(v: Vector3 | list | tuple, min_1: Vector3 | list | tuple, max_2: Vector3 | list | tuple) Vector3
- pyray.vector3_cubic_hermite(v1: Vector3 | list | tuple, tangent1: Vector3 | list | tuple, v2: Vector3 | list | tuple, tangent2: Vector3 | list | tuple, amount: float) Vector3
- pyray.vector3_move_towards(v: Vector3 | list | tuple, target: Vector3 | list | tuple, maxDistance: float) Vector3
- pyray.vector3_ortho_normalize(v1: Any | list | tuple, v2: Any | list | tuple) None
- pyray.vector3_rotate_by_axis_angle(v: Vector3 | list | tuple, axis: Vector3 | list | tuple, angle: float) Vector3
- pyray.vector3_unproject(source: Vector3 | list | tuple, projection: Matrix | list | tuple, view: Matrix | list | tuple) Vector3
- pyray.vector4_move_towards(v: Vector4 | list | tuple, target: Vector4 | list | tuple, maxDistance: float) Vector4
- pyray.wait_time(seconds: float) None
Wait for some time (halt program execution)
- pyray.wave_crop(wave: Any | list | tuple, initFrame: int, finalFrame: int) None
Crop a wave to defined frames range
- pyray.wave_format(wave: Any | list | tuple, sampleRate: int, sampleSize: int, channels: int) None
Convert wave data to desired format
- pyray.window_should_close() bool
Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
- pyray.wrap(value: float, min_1: float, max_2: float) float