mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-12-02 07:33:45 +08:00
Switch to nanobind raylib bindings (#39193)
This commit is contained in:
@@ -4,7 +4,7 @@ import functools
|
||||
import itertools
|
||||
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
|
||||
# (ec codewords per block, block count) for levels L, M, Q, H, versions 1-40
|
||||
@@ -237,12 +237,8 @@ def make_texture(data: str, inverted: bool = False) -> rl.Texture:
|
||||
gray = ((modules == inverted) * 255).astype(np.uint8)
|
||||
img_array = np.dstack((gray, gray, gray, np.full_like(gray, 255)))
|
||||
|
||||
rl_image = rl.Image()
|
||||
rl_image.data = rl.ffi.cast("void *", img_array.ctypes.data)
|
||||
rl_image.width = img_array.shape[1]
|
||||
rl_image.height = img_array.shape[0]
|
||||
rl_image.mipmaps = 1
|
||||
rl_image.format = rl.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
|
||||
rl_image = rl.Image(img_array, img_array.shape[1], img_array.shape[0], 1,
|
||||
rl.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
|
||||
return rl.load_texture_from_image(rl_image)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import time
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import time
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from enum import IntEnum
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.selfdrive.ui.widgets.offroad_alerts import UpdateAlert, OffroadAlert
|
||||
@@ -122,9 +122,9 @@ class HomeLayout(Widget):
|
||||
def _handle_mouse_release(self, mouse_pos: MousePos):
|
||||
super()._handle_mouse_release(mouse_pos)
|
||||
|
||||
if self.update_available and rl.check_collision_point_rec(mouse_pos, self.update_notif_rect):
|
||||
if self.update_available and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self.update_notif_rect):
|
||||
self._set_state(HomeLayoutState.UPDATE)
|
||||
elif self.alert_count > 0 and rl.check_collision_point_rec(mouse_pos, self.alert_notif_rect):
|
||||
elif self.alert_count > 0 and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self.alert_notif_rect):
|
||||
self._set_state(HomeLayoutState.ALERTS)
|
||||
|
||||
def _render_header(self):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from enum import IntEnum
|
||||
import openpilot.cereal.messaging as messaging
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
|
||||
@@ -3,7 +3,7 @@ import re
|
||||
import threading
|
||||
from enum import IntEnum
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.system.ui.lib.application import FontWeight, gui_app, TextAlignment
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
@@ -61,16 +61,16 @@ class TrainingGuide(Widget):
|
||||
self._image_objs.append(gui_app._load_image_from_path(path))
|
||||
|
||||
def _handle_mouse_release(self, mouse_pos):
|
||||
if rl.check_collision_point_rec(mouse_pos, STEP_RECTS[self._step]):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), STEP_RECTS[self._step]):
|
||||
# Record DM camera?
|
||||
if self._step == DM_RECORD_STEP:
|
||||
yes = rl.check_collision_point_rec(mouse_pos, DM_RECORD_YES_RECT)
|
||||
yes = rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), DM_RECORD_YES_RECT)
|
||||
print(f"putting RecordFront to {yes}")
|
||||
ui_state.params.put_bool("RecordFront", yes, block=True)
|
||||
|
||||
# Restart training?
|
||||
elif self._step == len(self._image_paths) - 1:
|
||||
if rl.check_collision_point_rec(mouse_pos, RESTART_TRAINING_RECT):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), RESTART_TRAINING_RECT):
|
||||
self._step = -1
|
||||
|
||||
self._step += 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE
|
||||
from openpilot.system.ui.lib.multilang import tr, tr_noop
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import time
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.common.constants import CV
|
||||
from openpilot.selfdrive.car.cruise import V_CRUISE_INITIAL, V_CRUISE_MAX
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum
|
||||
from collections.abc import Callable
|
||||
@@ -147,14 +147,14 @@ class SettingsLayout(Widget):
|
||||
|
||||
def _handle_mouse_release(self, mouse_pos: MousePos) -> None:
|
||||
# Check close button
|
||||
if rl.check_collision_point_rec(mouse_pos, self._close_btn_rect):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._close_btn_rect):
|
||||
if self._close_callback:
|
||||
self._close_callback()
|
||||
return
|
||||
|
||||
# Check navigation buttons
|
||||
for panel_type, panel_info in self._panels.items():
|
||||
if rl.check_collision_point_rec(mouse_pos, panel_info.button_rect):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), panel_info.button_rect):
|
||||
self.set_current_panel(panel_type)
|
||||
return
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from collections.abc import Callable
|
||||
@@ -141,13 +141,13 @@ class Sidebar(Widget):
|
||||
self._panda_status.update(tr_noop("VEHICLE"), tr_noop("ONLINE"), Colors.GOOD)
|
||||
|
||||
def _handle_mouse_release(self, mouse_pos: MousePos):
|
||||
if rl.check_collision_point_rec(mouse_pos, SETTINGS_BTN):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), SETTINGS_BTN):
|
||||
if self._on_settings_click:
|
||||
self._on_settings_click()
|
||||
elif rl.check_collision_point_rec(mouse_pos, HOME_BTN) and ui_state.started:
|
||||
elif rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), HOME_BTN) and ui_state.started:
|
||||
if self._on_flag_click:
|
||||
self._on_flag_click()
|
||||
elif self._recording_audio and rl.check_collision_point_rec(mouse_pos, self._mic_indicator_rect):
|
||||
elif self._recording_audio and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._mic_indicator_rect):
|
||||
if self._open_settings_callback:
|
||||
self._open_settings_callback()
|
||||
|
||||
@@ -156,12 +156,12 @@ class Sidebar(Widget):
|
||||
mouse_down = self.is_pressed and rl.is_mouse_button_down(rl.MouseButton.MOUSE_BUTTON_LEFT)
|
||||
|
||||
# Settings button
|
||||
settings_down = mouse_down and rl.check_collision_point_rec(mouse_pos, SETTINGS_BTN)
|
||||
settings_down = mouse_down and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), SETTINGS_BTN)
|
||||
tint = Colors.BUTTON_PRESSED if settings_down else Colors.BUTTON_NORMAL
|
||||
rl.draw_texture_ex(self._settings_img, rl.Vector2(SETTINGS_BTN.x, SETTINGS_BTN.y), 0.0, 1.0, tint)
|
||||
|
||||
# Home/Flag button
|
||||
flag_pressed = mouse_down and rl.check_collision_point_rec(mouse_pos, HOME_BTN)
|
||||
flag_pressed = mouse_down and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), HOME_BTN)
|
||||
button_img = self._flag_img if ui_state.started else self._home_img
|
||||
|
||||
tint = Colors.BUTTON_PRESSED if (ui_state.started and flag_pressed) else Colors.BUTTON_NORMAL
|
||||
@@ -171,7 +171,7 @@ class Sidebar(Widget):
|
||||
if self._recording_audio:
|
||||
self._mic_indicator_rect = rl.Rectangle(rect.x + rect.width - 130, rect.y + 245, 75, 40)
|
||||
|
||||
mic_pressed = mouse_down and rl.check_collision_point_rec(mouse_pos, self._mic_indicator_rect)
|
||||
mic_pressed = mouse_down and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._mic_indicator_rect)
|
||||
bg_color = rl.Color(Colors.DANGER.r, Colors.DANGER.g, Colors.DANGER.b, int(255 * 0.65)) if mic_pressed else Colors.DANGER
|
||||
|
||||
rl.draw_rectangle_rounded(self._mic_indicator_rect, 1, 10, bg_color)
|
||||
|
||||
@@ -4,7 +4,7 @@ import datetime
|
||||
import math
|
||||
|
||||
from openpilot.cereal import log
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
from openpilot.system.ui.widgets.layouts import HBoxLayout
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import openpilot.cereal.messaging as messaging
|
||||
from openpilot.selfdrive.ui.mici.layouts.home import MiciHomeLayout
|
||||
from openpilot.selfdrive.ui.mici.layouts.settings.settings import SettingsLayout
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import re
|
||||
import threading
|
||||
import time
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import math
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.common.filter_simple import FirstOrderFilter
|
||||
from openpilot.selfdrive.ui.mici.widgets.qr import QR
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from typing import Union
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import time
|
||||
|
||||
from openpilot.common.api import Api
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import requests
|
||||
import threading
|
||||
import time
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.common.api import api_get
|
||||
from openpilot.common.params import Params
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import math
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
|
||||
from openpilot.selfdrive.ui.layouts.settings.initial_cruise_speed import get_speed_options, set_initial_cruise_speed
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.cereal import log
|
||||
from openpilot.selfdrive.ui.mici.layouts.settings.network.wifi_ui import WifiIcon
|
||||
@@ -104,4 +104,4 @@ class WifiNetworkButton(BigButton):
|
||||
icon_y = btn_y + 30
|
||||
lock_x = icon_x + self._txt_icon.width - self._lock_txt.width + 7
|
||||
lock_y = icon_y + self._txt_icon.height - self._lock_txt.height + 8
|
||||
rl.draw_texture_ex(self._lock_txt, (lock_x, lock_y), 0.0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(self._lock_txt, rl.Vector2(lock_x, lock_y), 0.0, 1.0, rl.WHITE)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import threading
|
||||
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.cereal import log
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
@@ -41,13 +41,13 @@ class ProfileActionButton(Widget):
|
||||
|
||||
def _render(self, _):
|
||||
bg_txt = self._bg_pressed_txt if self.is_pressed else self._bg_txt
|
||||
rl.draw_texture_ex(bg_txt, (self._rect.x + (self._rect.width - self._bg_txt.width) / 2,
|
||||
rl.draw_texture_ex(bg_txt, rl.Vector2(self._rect.x + (self._rect.width - self._bg_txt.width) / 2,
|
||||
self._rect.y + (self._rect.height - self._bg_txt.height) / 2), 0, 1.0, rl.WHITE)
|
||||
color = rl.Color(255, 105, 115, 255) if self._delete else DEFAULT_TEXT_COLOR
|
||||
if not self.enabled:
|
||||
color = rl.Color(color.r, color.g, color.b, 90)
|
||||
if self._trash_txt:
|
||||
rl.draw_texture_ex(self._trash_txt, (self._rect.x + (self._rect.width - self._trash_txt.width) / 2,
|
||||
rl.draw_texture_ex(self._trash_txt, rl.Vector2(self._rect.x + (self._rect.width - self._trash_txt.width) / 2,
|
||||
self._rect.y + (self._rect.height - self._trash_txt.height) / 2), 0, 1.0, color)
|
||||
else:
|
||||
gui_label(self._rect, "Aa", 30, color=color, alignment=TextAlignment.CENTER)
|
||||
@@ -229,9 +229,9 @@ class EsimProfileButton(BigButton):
|
||||
self._cellular_manager.nickname_profile(self._profile.iccid, nickname.strip())
|
||||
|
||||
def _handle_mouse_release(self, mouse_pos: MousePos):
|
||||
if self._show_delete_btn and rl.check_collision_point_rec(mouse_pos, self._delete_btn.rect):
|
||||
if self._show_delete_btn and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._delete_btn.rect):
|
||||
return
|
||||
if self._rename_btn is not None and rl.check_collision_point_rec(mouse_pos, self._rename_btn.rect):
|
||||
if self._rename_btn is not None and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._rename_btn.rect):
|
||||
return
|
||||
super()._handle_mouse_release(mouse_pos)
|
||||
|
||||
@@ -263,10 +263,10 @@ class EsimProfileButton(BigButton):
|
||||
self._sub_label.render(sub_label_rect)
|
||||
|
||||
if self._comma_txt:
|
||||
rl.draw_texture_ex(self._comma_txt, (self._rect.x + 36, btn_y + 38), 0.0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(self._comma_txt, rl.Vector2(self._rect.x + 36, btn_y + 38), 0.0, 1.0, rl.WHITE)
|
||||
else:
|
||||
cell_icon = self._cell_full_txt if active else self._cell_none_txt
|
||||
rl.draw_texture_ex(cell_icon, (self._rect.x + 30, btn_y + 38), 0.0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(cell_icon, rl.Vector2(self._rect.x + 30, btn_y + 38), 0.0, 1.0, rl.WHITE)
|
||||
|
||||
btn_x = self._rect.x + self._rect.width - (ProfileActionButton.MARGIN - ProfileActionButton.HORIZONTAL_MARGIN)
|
||||
btn_bottom = btn_y + self._rect.height
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import math
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
|
||||
from openpilot.common.swaglog import cloudlog
|
||||
@@ -71,13 +71,13 @@ class WifiIcon(Widget):
|
||||
else:
|
||||
strength_icon = self._wifi_low_txt
|
||||
|
||||
rl.draw_texture_ex(strength_icon, (self._rect.x, self._rect.y + self._rect.height - strength_icon.height), 0.0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(strength_icon, rl.Vector2(self._rect.x, self._rect.y + self._rect.height - strength_icon.height), 0.0, 1.0, rl.WHITE)
|
||||
|
||||
# Render lock icon at lower right of wifi icon if secured
|
||||
if self._network.security_type not in (SecurityType.OPEN, SecurityType.UNSUPPORTED):
|
||||
lock_x = self._rect.x + self._rect.width - self._lock_txt.width
|
||||
lock_y = self._rect.y + self._rect.height - self._lock_txt.height + 6
|
||||
rl.draw_texture_ex(self._lock_txt, (lock_x, lock_y), 0.0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(self._lock_txt, rl.Vector2(lock_x, lock_y), 0.0, 1.0, rl.WHITE)
|
||||
|
||||
|
||||
class WifiButton(BigButton):
|
||||
@@ -144,7 +144,7 @@ class WifiButton(BigButton):
|
||||
return (self._is_saved and not self._wrong_password) or self._is_connecting
|
||||
|
||||
def _handle_mouse_release(self, mouse_pos: MousePos):
|
||||
if self._show_forget_btn and rl.check_collision_point_rec(mouse_pos, self._forget_btn.rect):
|
||||
if self._show_forget_btn and rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._forget_btn.rect):
|
||||
return
|
||||
super()._handle_mouse_release(mouse_pos)
|
||||
|
||||
@@ -251,12 +251,12 @@ class ForgetButton(Widget):
|
||||
|
||||
def _render(self, _):
|
||||
bg_txt = self._bg_pressed_txt if self.is_pressed else self._bg_txt
|
||||
rl.draw_texture_ex(bg_txt, (self._rect.x + (self._rect.width - self._bg_txt.width) / 2,
|
||||
rl.draw_texture_ex(bg_txt, rl.Vector2(self._rect.x + (self._rect.width - self._bg_txt.width) / 2,
|
||||
self._rect.y + (self._rect.height - self._bg_txt.height) / 2), 0, 1.0, rl.WHITE)
|
||||
|
||||
trash_x = self._rect.x + (self._rect.width - self._trash_txt.width) / 2
|
||||
trash_y = self._rect.y + (self._rect.height - self._trash_txt.height) / 2
|
||||
rl.draw_texture_ex(self._trash_txt, (trash_x, trash_y), 0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(self._trash_txt, rl.Vector2(trash_x, trash_y), 0, 1.0, rl.WHITE)
|
||||
|
||||
|
||||
class ScanningButton(BigButton):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import subprocess
|
||||
import threading
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from enum import IntEnum
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
SIDE_PANEL_WIDTH = 60
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import time
|
||||
from enum import StrEnum
|
||||
from typing import NamedTuple
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import random
|
||||
import string
|
||||
from dataclasses import dataclass
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal import log
|
||||
from opendbc.car.structs import car
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal import log, messaging
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
from openpilot.selfdrive.ui.mici.onroad.cameraview import CameraView
|
||||
@@ -217,8 +217,8 @@ class BaseCabinCameraDialog(Widget):
|
||||
fill_opacity = eye_prob
|
||||
orange_opacity = 1.0 - eye_prob
|
||||
|
||||
rl.draw_texture_v(self._eye_orange_texture, (eye_x, eye_y), rl.Color(255, 255, 255, int(255 * orange_opacity)))
|
||||
rl.draw_texture_v(self._eye_fill_texture, (eye_x, eye_y), rl.Color(255, 255, 255, int(255 * fill_opacity)))
|
||||
rl.draw_texture_v(self._eye_orange_texture, rl.Vector2(eye_x, eye_y), rl.Color(255, 255, 255, int(255 * orange_opacity)))
|
||||
rl.draw_texture_v(self._eye_fill_texture, rl.Vector2(eye_x, eye_y), rl.Color(255, 255, 255, int(255 * fill_opacity)))
|
||||
|
||||
# Draw sunglasses indicator based on sunglasses probability
|
||||
# Position glasses centered between the two eyes at top left
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pyray as rl
|
||||
from array import array
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
from openpilot.common.hardware import COMMA_HARDWARE
|
||||
@@ -78,9 +79,9 @@ class CameraView(BaseCameraView):
|
||||
def __init__(self, name: str, stream_type: VisionStreamType):
|
||||
super().__init__(name, stream_type)
|
||||
self._engaged_loc = rl.get_shader_location(self.shader, "engaged")
|
||||
self._engaged_val = rl.ffi.new("int[1]", [1])
|
||||
self._engaged_val = array("i", [1])
|
||||
self._enhance_driver_loc = rl.get_shader_location(self.shader, "enhance_driver")
|
||||
self._enhance_driver_val = rl.ffi.new("int[1]", [1 if stream_type == VisionStreamType.VISION_STREAM_CABIN else 0])
|
||||
self._enhance_driver_val = array("i", [1 if stream_type == VisionStreamType.VISION_STREAM_CABIN else 0])
|
||||
|
||||
def _set_shader_uniforms(self) -> None:
|
||||
self._engaged_val[0] = 1 if ui_state.status != UIStatus.DISENGAGED else 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import math
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.selfdrive.ui.mici.onroad import SIDE_PANEL_WIDTH
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import numpy as np
|
||||
import math
|
||||
from openpilot.cereal import log
|
||||
@@ -158,7 +158,7 @@ class DriverStateRenderer(Widget):
|
||||
color = rl.Color(166, 166, 166, 255)
|
||||
|
||||
if f.x > 0.01:
|
||||
rl.draw_line_ex((start_x, start_y), (end_x, end_y), 12, color)
|
||||
rl.draw_line_ex(rl.Vector2(start_x, start_y), rl.Vector2(end_x, end_y), 12, color)
|
||||
|
||||
def get_driver_data(self):
|
||||
sm = ui_state.sm
|
||||
@@ -192,9 +192,9 @@ class DriverStateRenderer(Widget):
|
||||
pitchd = math.degrees(pitch)
|
||||
yawd = math.degrees(yaw)
|
||||
|
||||
rl.draw_line_ex((0, 100), (200, 100), 3, rl.RED)
|
||||
rl.draw_line_ex((0, 120), (200, 120), 3, rl.RED)
|
||||
rl.draw_line_ex((0, 140), (200, 140), 3, rl.RED)
|
||||
rl.draw_line_ex(rl.Vector2(0, 100), rl.Vector2(200, 100), 3, rl.RED)
|
||||
rl.draw_line_ex(rl.Vector2(0, 120), rl.Vector2(200, 120), 3, rl.RED)
|
||||
rl.draw_line_ex(rl.Vector2(0, 140), rl.Vector2(200, 140), 3, rl.RED)
|
||||
|
||||
pitch_x = 100 + pitchd
|
||||
yaw_x = 100 + yawd
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import math
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from dataclasses import dataclass
|
||||
from openpilot.common.constants import CV
|
||||
from openpilot.selfdrive.ui.mici.onroad.torque_bar import TorqueBar
|
||||
@@ -60,7 +60,7 @@ class TurnIntent(Widget):
|
||||
dest_rect = rl.Rectangle(self._rect.x + self._rect.width / 2, self._rect.y + self._rect.height / 2,
|
||||
turn_intent_texture.width, turn_intent_texture.height)
|
||||
|
||||
origin = (turn_intent_texture.width / 2, self._rect.height / 2)
|
||||
origin = rl.Vector2(turn_intent_texture.width / 2, self._rect.height / 2)
|
||||
color = rl.Color(255, 255, 255, int(255 * self._turn_intent_alpha_filter.x))
|
||||
rl.draw_texture_pro(turn_intent_texture, src_rect, dest_rect, origin, self._turn_intent_rotation_filter.x, color)
|
||||
|
||||
@@ -240,7 +240,7 @@ class HudRenderer(Widget):
|
||||
|
||||
src_rect = rl.Rectangle(0, 0, wheel_txt.width, wheel_txt.height)
|
||||
dest_rect = rl.Rectangle(pos_x, pos_y, wheel_txt.width, wheel_txt.height)
|
||||
origin = (wheel_txt.width / 2, wheel_txt.height / 2)
|
||||
origin = rl.Vector2(wheel_txt.width / 2, wheel_txt.height / 2)
|
||||
|
||||
# color and draw
|
||||
color = rl.Color(255, 255, 255, int(self._wheel_alpha_filter.x))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal import log
|
||||
from openpilot.common.filter_simple import FirstOrderFilter
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal import log
|
||||
from openpilot.common.filter_simple import FirstOrderFilter
|
||||
from openpilot.selfdrive.controls.radard import RADAR_TO_CAMERA
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from msgq.visionipc import VisionIpcClient
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
@@ -54,7 +54,7 @@ class NavigationPanel(Widget):
|
||||
frame = self._client.recv(timeout_ms=0)
|
||||
if frame is not None:
|
||||
gray = np.frombuffer(frame.data, dtype=np.uint8, count=SIZE * SIZE)
|
||||
rl.update_texture(self._texture, rl.ffi.cast("void *", rl.ffi.from_buffer(MAP_COLORS[gray])))
|
||||
rl.update_texture(self._texture, MAP_COLORS[gray])
|
||||
# Without a usable map, mapsd publishes black frames with a zero timestamp.
|
||||
self._frame_time = rl.get_time() if self._client.timestamp_sof else 0.0
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from functools import wraps
|
||||
from collections import OrderedDict
|
||||
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from opendbc.car import ACCELERATION_DUE_TO_GRAVITY
|
||||
from openpilot.selfdrive.ui.mici.onroad import blend_colors
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus
|
||||
|
||||
@@ -45,7 +45,7 @@ from openpilot.common.test import OpenpilotTestCase
|
||||
class TestWidgetLeaks(OpenpilotTestCase):
|
||||
@unittest.skip("segfaults")
|
||||
def test_dialogs_do_not_leak(self):
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
rl.set_config_flags(rl.ConfigFlags.FLAG_WINDOW_HIDDEN)
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import math
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from typing import TYPE_CHECKING, Union
|
||||
from enum import Enum
|
||||
from collections.abc import Callable
|
||||
@@ -85,7 +85,7 @@ class BigCircleButton(BaseButton):
|
||||
def _draw_content(self, btn_y: float):
|
||||
# draw icon
|
||||
icon_color = rl.Color(255, 255, 255, int(255 * 0.9)) if self.enabled else rl.Color(255, 255, 255, int(255 * 0.35))
|
||||
rl.draw_texture_ex(self._txt_icon, (self._rect.x + (self._rect.width - self._txt_icon.width) / 2 + self._icon_offset[0],
|
||||
rl.draw_texture_ex(self._txt_icon, rl.Vector2(self._rect.x + (self._rect.width - self._txt_icon.width) / 2 + self._icon_offset[0],
|
||||
btn_y + (self._rect.height - self._txt_icon.height) / 2 + self._icon_offset[1]), 0, 1.0, icon_color)
|
||||
|
||||
def _render(self, _):
|
||||
@@ -99,7 +99,7 @@ class BigCircleButton(BaseButton):
|
||||
scale = self._scale_filter.update(PRESSED_SCALE if self.is_pressed else 1.0)
|
||||
btn_x = self._rect.x + (self._rect.width * (1 - scale)) / 2
|
||||
btn_y = self._rect.y + (self._rect.height * (1 - scale)) / 2
|
||||
rl.draw_texture_ex(txt_bg, (btn_x, btn_y), 0, scale, rl.WHITE)
|
||||
rl.draw_texture_ex(txt_bg, rl.Vector2(btn_x, btn_y), 0, scale, rl.WHITE)
|
||||
|
||||
self._draw_content(btn_y)
|
||||
|
||||
@@ -132,7 +132,7 @@ class BigCircleToggle(BigCircleButton):
|
||||
|
||||
# draw status icon
|
||||
rl.draw_texture_ex(self._txt_toggle_enabled if self._checked else self._txt_toggle_disabled,
|
||||
(self._rect.x + (self._rect.width - self._txt_toggle_enabled.width) / 2, btn_y + 5),
|
||||
rl.Vector2(self._rect.x + (self._rect.width - self._txt_toggle_enabled.width) / 2, btn_y + 5),
|
||||
0, 1.0, rl.WHITE)
|
||||
|
||||
|
||||
@@ -280,9 +280,9 @@ class BigButton(BaseButton):
|
||||
rl.draw_rectangle_rounded(scaled_rect, 0.4, 7, rl.Color(0, 0, 0, int(255 * 0.5)))
|
||||
|
||||
self._draw_content(btn_y)
|
||||
rl.draw_texture_ex(txt_bg, (btn_x, btn_y), 0, scale, rl.WHITE)
|
||||
rl.draw_texture_ex(txt_bg, rl.Vector2(btn_x, btn_y), 0, scale, rl.WHITE)
|
||||
else:
|
||||
rl.draw_texture_ex(txt_bg, (btn_x, btn_y), 0, scale, rl.WHITE)
|
||||
rl.draw_texture_ex(txt_bg, rl.Vector2(btn_x, btn_y), 0, scale, rl.WHITE)
|
||||
self._draw_content(btn_y)
|
||||
|
||||
|
||||
@@ -311,9 +311,9 @@ class BigToggle(BigButton):
|
||||
def _draw_pill(self, x: float, y: float, checked: bool):
|
||||
# draw toggle icon top right
|
||||
if checked:
|
||||
rl.draw_texture_ex(self._txt_enabled_toggle, (x, y), 0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(self._txt_enabled_toggle, rl.Vector2(x, y), 0, 1.0, rl.WHITE)
|
||||
else:
|
||||
rl.draw_texture_ex(self._txt_disabled_toggle, (x, y), 0, 1.0, rl.WHITE)
|
||||
rl.draw_texture_ex(self._txt_disabled_toggle, rl.Vector2(x, y), 0, 1.0, rl.WHITE)
|
||||
|
||||
def _draw_content(self, btn_y: float):
|
||||
super()._draw_content(btn_y)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import abc
|
||||
import math
|
||||
import re
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from typing import Union
|
||||
from collections.abc import Callable
|
||||
from openpilot.system.ui.widgets.nav_widget import NavWidget
|
||||
@@ -140,7 +140,8 @@ class BigInputDialog(BigDialogBase):
|
||||
return
|
||||
|
||||
last_mouse_event = gui_app.last_mouse_event
|
||||
if last_mouse_event.left_down and rl.check_collision_point_rec(last_mouse_event.pos, self._top_right_button_rect) and self._backspace_img_alpha.x > 1:
|
||||
mouse_pos = rl.Vector2(last_mouse_event.pos.x, last_mouse_event.pos.y)
|
||||
if last_mouse_event.left_down and rl.check_collision_point_rec(mouse_pos, self._top_right_button_rect) and self._backspace_img_alpha.x > 1:
|
||||
if self._backspace_held_time is None:
|
||||
self._backspace_held_time = rl.get_time()
|
||||
|
||||
@@ -238,9 +239,9 @@ class BigInputDialog(BigDialogBase):
|
||||
return
|
||||
|
||||
# handle backspace icon click
|
||||
if rl.check_collision_point_rec(mouse_pos, self._top_right_button_rect) and self._backspace_img_alpha.x > 254:
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._top_right_button_rect) and self._backspace_img_alpha.x > 254:
|
||||
self._keyboard.backspace()
|
||||
elif rl.check_collision_point_rec(mouse_pos, self._top_left_button_rect) and self._enter_img_alpha.x > 254:
|
||||
elif rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), self._top_left_button_rect) and self._enter_img_alpha.x > 254:
|
||||
# handle enter icon click
|
||||
self._confirm_callback()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.system.ui.lib.application import FontWeight
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.common.swaglog import cloudlog
|
||||
from openpilot.system.ui.lib.application import FontWeight
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import time
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from dataclasses import dataclass
|
||||
from openpilot.cereal import messaging, log
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal import log
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
from openpilot.selfdrive.ui import UI_BORDER_SIZE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
from openpilot.selfdrive.ui.onroad.cameraview import CameraView
|
||||
from openpilot.selfdrive.ui.onroad.driver_state import DriverStateRenderer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import platform
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
from msgq.visionipc import VisionIpcClient, VisionBuf
|
||||
@@ -270,8 +270,8 @@ class CameraView(Widget):
|
||||
y_data = self.frame.data[: self.frame.uv_offset]
|
||||
uv_data = self.frame.data[self.frame.uv_offset:]
|
||||
|
||||
rl.update_texture(self.texture_y, rl.ffi.cast("void *", rl.ffi.from_buffer(y_data)))
|
||||
rl.update_texture(self.texture_uv, rl.ffi.cast("void *", rl.ffi.from_buffer(uv_data)))
|
||||
rl.update_texture(self.texture_y, y_data)
|
||||
rl.update_texture(self.texture_uv, uv_data)
|
||||
self._texture_needs_update = False
|
||||
|
||||
# Render with shader
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal import log
|
||||
from dataclasses import dataclass
|
||||
from openpilot.selfdrive.ui import UI_BORDER_SIZE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from dataclasses import dataclass
|
||||
from openpilot.common.constants import CV
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import colorsys
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.cereal import messaging
|
||||
from opendbc.car.structs import car
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import os
|
||||
import argparse
|
||||
import coverage
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from tqdm import tqdm
|
||||
from typing import Literal
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import os
|
||||
import time
|
||||
import cProfile
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import numpy as np
|
||||
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.cereal.visionipc import VisionStreamType
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from enum import IntEnum
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import Callable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import time
|
||||
|
||||
from openpilot.common.api import Api
|
||||
@@ -120,7 +120,7 @@ class PairingDialog(Widget):
|
||||
rl.draw_circle(int(circle_x), int(circle_y), circle_radius, rl.Color(70, 70, 70, 255))
|
||||
number = str(i + 1)
|
||||
number_size = measure_text_cached(font, number, 30)
|
||||
rl.draw_text_ex(font, number, (int(circle_x - number_size.x // 2), int(circle_y - number_size.y // 2)), 30, 0, rl.WHITE)
|
||||
rl.draw_text_ex(font, number, rl.Vector2(int(circle_x - number_size.x // 2), int(circle_y - number_size.y // 2)), 30, 0, rl.WHITE)
|
||||
|
||||
# Text
|
||||
rl.draw_text_ex(font, "\n".join(wrapped), rl.Vector2(text_x, y), 47, 0.0, rl.BLACK)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.common.time_helpers import system_time_valid
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
from openpilot.selfdrive.ui.widgets.pairing_dialog import PairingDialog
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import requests
|
||||
import threading
|
||||
from collections.abc import Callable
|
||||
@@ -109,7 +109,7 @@ class SshKeyAction(ItemAction):
|
||||
rl.draw_text_ex(
|
||||
self._text_font,
|
||||
self._username,
|
||||
(rect.x + rect.width - BUTTON_WIDTH - text_size.x - 30, rect.y + (rect.height - text_size.y) / 2),
|
||||
rl.Vector2(rect.x + rect.width - BUTTON_WIDTH - text_size.x - 30, rect.y + (rect.height - text_size.y) / 2),
|
||||
VALUE_FONT_SIZE,
|
||||
1.0,
|
||||
rl.Color(170, 170, 170, 255),
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import atexit
|
||||
import cffi
|
||||
import math
|
||||
import os
|
||||
import queue
|
||||
import time
|
||||
import signal
|
||||
import sys
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import threading
|
||||
import platform
|
||||
import subprocess
|
||||
@@ -685,7 +684,7 @@ class GuiApplication:
|
||||
if RECORD:
|
||||
image = rl.load_image_from_texture(self._render_texture.texture)
|
||||
data_size = image.width * image.height * 4
|
||||
data = bytes(rl.ffi.buffer(image.data, data_size))
|
||||
data = image.to_bytes(data_size)
|
||||
self._ffmpeg_queue.put(data) # Async write via background thread
|
||||
rl.unload_image(image)
|
||||
|
||||
@@ -706,10 +705,9 @@ class GuiApplication:
|
||||
chars = set(map(chr, range(32, 127))) | set(EXTRA_FONT_CHARS)
|
||||
chars.update(TRANSLATIONS_DIR.joinpath(f"app_{language}.po").read_text(encoding="utf-8"))
|
||||
codepoints = sorted(map(ord, chars))
|
||||
codepoint_buffer = rl.ffi.new("int[]", codepoints)
|
||||
with as_file(FONT_DIR) as fspath:
|
||||
font = rl.load_font_ex((fspath / NOTO_FONTS[language]).as_posix(), 48,
|
||||
rl.ffi.cast("int *", codepoint_buffer), len(codepoints))
|
||||
codepoints, len(codepoints))
|
||||
rl.gen_texture_mipmaps(font.texture)
|
||||
rl.set_texture_filter(font.texture, rl.TextureFilter.TEXTURE_FILTER_TRILINEAR)
|
||||
self._fallback_fonts[language] = font
|
||||
@@ -735,9 +733,8 @@ class GuiApplication:
|
||||
with as_file(FONT_DIR) as fspath:
|
||||
unifont = font_weight_file == FontWeight.UNIFONT
|
||||
codepoints = sorted(map(ord, unifont_chars if unifont else base_chars))
|
||||
codepoint_buffer = rl.ffi.new("int[]", codepoints)
|
||||
font = rl.load_font_ex((fspath / font_weight_file).as_posix(), 16 if unifont else 200,
|
||||
rl.ffi.cast("int *", codepoint_buffer), len(codepoints))
|
||||
codepoints, len(codepoints))
|
||||
if font_weight_file != FontWeight.UNIFONT:
|
||||
rl.gen_texture_mipmaps(font.texture)
|
||||
rl.set_texture_filter(font.texture, rl.TextureFilter.TEXTURE_FILTER_TRILINEAR)
|
||||
@@ -746,7 +743,7 @@ class GuiApplication:
|
||||
self.fallback_font()
|
||||
|
||||
def _patch_text_functions(self):
|
||||
# Wrap pyray text APIs to apply a global text size scale so our px sizes match Qt
|
||||
# Wrap raylib text APIs to apply a global text size scale so our px sizes match Qt
|
||||
if not hasattr(rl, "_orig_draw_text_ex"):
|
||||
rl._orig_draw_text_ex = rl.draw_text_ex
|
||||
|
||||
@@ -771,30 +768,7 @@ class GuiApplication:
|
||||
rl.begin_scissor_mode = _begin_scissor_mode_scaled
|
||||
|
||||
def _set_log_callback(self):
|
||||
ffi_libc = cffi.FFI()
|
||||
ffi_libc.cdef("""
|
||||
int vasprintf(char **strp, const char *fmt, void *ap);
|
||||
void free(void *ptr);
|
||||
""")
|
||||
libc = ffi_libc.dlopen(None)
|
||||
|
||||
@rl.ffi.callback("void(int, char *, void *)")
|
||||
def trace_log_callback(log_level, text, args):
|
||||
try:
|
||||
text_addr = int(rl.ffi.cast("uintptr_t", text))
|
||||
args_addr = int(rl.ffi.cast("uintptr_t", args))
|
||||
text_libc = ffi_libc.cast("char *", text_addr)
|
||||
args_libc = ffi_libc.cast("void *", args_addr)
|
||||
|
||||
out = ffi_libc.new("char **")
|
||||
if libc.vasprintf(out, text_libc, args_libc) >= 0 and out[0] != ffi_libc.NULL:
|
||||
text_str = ffi_libc.string(out[0]).decode("utf-8", "replace")
|
||||
libc.free(out[0])
|
||||
else:
|
||||
text_str = rl.ffi.string(text).decode("utf-8", "replace")
|
||||
except Exception as e:
|
||||
text_str = f"[Log decode error: {e}]"
|
||||
|
||||
def trace_log_callback(log_level, text_str):
|
||||
if log_level == rl.TraceLogLevel.LOG_ERROR:
|
||||
cloudlog.error(f"raylib: {text_str}")
|
||||
elif log_level == rl.TraceLogLevel.LOG_WARNING:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import math
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from enum import IntEnum
|
||||
from openpilot.system.ui.lib.application import gui_app, MouseEvent
|
||||
from openpilot.common.filter_simple import FirstOrderFilter
|
||||
@@ -77,7 +77,7 @@ class GuiScrollPanel:
|
||||
|
||||
def _handle_mouse_event(self, mouse_event: MouseEvent, bounds: rl.Rectangle, content: rl.Rectangle):
|
||||
if self._scroll_state == ScrollState.IDLE:
|
||||
if rl.check_collision_point_rec(mouse_event.pos, bounds):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_event.pos.x, mouse_event.pos.y), bounds):
|
||||
if mouse_event.left_pressed:
|
||||
self._start_mouse_y = mouse_event.pos.y
|
||||
# Interrupt scrolling with new drag
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import math
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from enum import Enum
|
||||
from typing import cast
|
||||
@@ -158,7 +158,7 @@ class GuiScrollPanel2:
|
||||
self._position_buffer.clear()
|
||||
|
||||
elif self._state == ScrollState.STEADY:
|
||||
if rl.check_collision_point_rec(mouse_event.pos, bounds):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_event.pos.x, mouse_event.pos.y), bounds):
|
||||
if mouse_event.left_pressed:
|
||||
self._state = ScrollState.PRESSED
|
||||
self._initial_click_event = mouse_event
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pyray as rl
|
||||
from array import array
|
||||
import raylib_nb as rl
|
||||
import numpy as np
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Optional, cast
|
||||
@@ -119,12 +120,12 @@ class ShaderState:
|
||||
'mvp': None,
|
||||
}
|
||||
|
||||
# Pre-allocated FFI objects
|
||||
self.fill_color_ptr = rl.ffi.new("float[]", [0.0, 0.0, 0.0, 0.0])
|
||||
self.use_gradient_ptr = rl.ffi.new("int[]", [0])
|
||||
self.color_count_ptr = rl.ffi.new("int[]", [0])
|
||||
self.gradient_colors_ptr = rl.ffi.new("float[]", MAX_GRADIENT_COLORS * 4)
|
||||
self.gradient_stops_ptr = rl.ffi.new("float[]", MAX_GRADIENT_COLORS)
|
||||
# Pre-allocated uniform buffers
|
||||
self.fill_color_ptr = array("f", [0.0, 0.0, 0.0, 0.0])
|
||||
self.use_gradient_ptr = array("i", [0])
|
||||
self.color_count_ptr = array("i", [0])
|
||||
self.gradient_colors_ptr = array("f", [0.0]) * (MAX_GRADIENT_COLORS * 4)
|
||||
self.gradient_stops_ptr = array("f", [0.0]) * MAX_GRADIENT_COLORS
|
||||
|
||||
def initialize(self):
|
||||
if self.initialized:
|
||||
@@ -157,7 +158,7 @@ def _configure_shader_color(state: ShaderState, color: Optional[rl.Color], # no
|
||||
for i in range(len(gradient.colors)):
|
||||
c = gradient.colors[i]
|
||||
base = i * 4
|
||||
state.gradient_colors_ptr[base:base + 4] = [c.r / 255.0, c.g / 255.0, c.b / 255.0, c.a / 255.0]
|
||||
state.gradient_colors_ptr[base:base + 4] = array("f", [c.r / 255.0, c.g / 255.0, c.b / 255.0, c.a / 255.0])
|
||||
rl.set_shader_value_v(state.shader, state.locations['gradientColors'], state.gradient_colors_ptr, UNIFORM_VEC4, len(gradient.colors))
|
||||
|
||||
for i in range(len(gradient.stops)):
|
||||
@@ -173,7 +174,7 @@ def _configure_shader_color(state: ShaderState, color: Optional[rl.Color], # no
|
||||
rl.set_shader_value(state.shader, state.locations['gradientEnd'], end_vec, UNIFORM_VEC2)
|
||||
else:
|
||||
color = color or rl.WHITE
|
||||
state.fill_color_ptr[0:4] = [color.r / 255.0, color.g / 255.0, color.b / 255.0, color.a / 255.0]
|
||||
state.fill_color_ptr[0:4] = array("f", [color.r / 255.0, color.g / 255.0, color.b / 255.0, color.a / 255.0])
|
||||
rl.set_shader_value(state.shader, state.locations['fillColor'], state.fill_color_ptr, UNIFORM_VEC4)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.system.ui.lib.application import FONT_SCALE, font_fallback
|
||||
|
||||
_cache: dict[int, rl.Vector2] = {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.system.ui.lib.text_measure import measure_text_cached
|
||||
from openpilot.system.ui.lib.application import font_fallback
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import time
|
||||
import threading
|
||||
from enum import IntEnum
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.common.hardware import HARDWARE, PC
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
|
||||
@@ -9,7 +9,7 @@ import urllib.error
|
||||
from urllib.parse import urlparse
|
||||
from collections.abc import Callable
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.cereal import log
|
||||
from openpilot.common.filter_simple import BounceFilter
|
||||
@@ -120,7 +120,7 @@ class StartPage(Widget):
|
||||
draw_x = base_draw_x + (self._start_bg_txt.width * (1 - scale)) / 2
|
||||
draw_y = base_draw_y + (self._start_bg_txt.height * (1 - scale)) / 2
|
||||
texture = self._start_bg_pressed_txt if self.is_pressed else self._start_bg_txt
|
||||
rl.draw_texture_ex(texture, (draw_x, draw_y), 0, scale, rl.WHITE)
|
||||
rl.draw_texture_ex(texture, rl.Vector2(draw_x, draw_y), 0, scale, rl.WHITE)
|
||||
|
||||
self._title.render(rl.Rectangle(rect.x, rect.y + (draw_y - base_draw_y), rect.width, rect.height))
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import sys
|
||||
import subprocess
|
||||
import threading
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.common.realtime import config_realtime_process, set_core_affinity
|
||||
from openpilot.common.hardware import HARDWARE, COMMA_HARDWARE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import select
|
||||
import sys
|
||||
|
||||
@@ -25,7 +25,7 @@ DEGREES_PER_SECOND = 360.0 # one full rotation per second
|
||||
MARGIN_H = 100
|
||||
FONT_SIZE = 96
|
||||
LINE_HEIGHT = 104
|
||||
DARKGRAY = (55, 55, 55, 255)
|
||||
DARKGRAY = rl.Color(55, 55, 55, 255)
|
||||
|
||||
|
||||
def clamp(value, min_value, max_value):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import sys
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.common.hardware import HARDWARE, PC
|
||||
from openpilot.system.ui.lib.application import BIG_UI, gui_app
|
||||
from openpilot.system.ui.lib.scroll_panel import GuiScrollPanel
|
||||
|
||||
@@ -5,7 +5,7 @@ import threading
|
||||
import time
|
||||
from enum import IntEnum
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.common.hardware import PC
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE
|
||||
|
||||
@@ -8,7 +8,7 @@ import urllib.error
|
||||
from urllib.parse import urlparse
|
||||
from enum import IntEnum
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.cereal import log
|
||||
from openpilot.common.hardware import HARDWARE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import sys
|
||||
import subprocess
|
||||
import threading
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from enum import IntEnum
|
||||
|
||||
from openpilot.common.hardware import HARDWARE
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import abc
|
||||
import time
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from enum import IntEnum
|
||||
from typing import Protocol, TypeVar
|
||||
from collections.abc import Callable
|
||||
@@ -162,7 +162,7 @@ class Widget(abc.ABC):
|
||||
if not self._multi_touch and mouse_event.slot != 0:
|
||||
continue
|
||||
|
||||
mouse_in_rect = rl.check_collision_point_rec(mouse_event.pos, hit_rect)
|
||||
mouse_in_rect = rl.check_collision_point_rec(rl.Vector2(mouse_event.pos.x, mouse_event.pos.y), hit_rect)
|
||||
# Ignores touches/presses that start outside our rect
|
||||
# Allows touch to leave the rect and come back in focus if mouse did not release
|
||||
if mouse_event.left_pressed and touch_valid:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from collections.abc import Callable
|
||||
from enum import IntEnum
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, TextAlignment
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import re
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from typing import Any
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import time
|
||||
from openpilot.system.ui.lib.application import gui_app, MousePos, FONT_SCALE
|
||||
from openpilot.system.ui.lib.text_measure import measure_text_cached
|
||||
|
||||
@@ -3,7 +3,7 @@ import time
|
||||
from typing import Literal
|
||||
from collections.abc import Callable
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
|
||||
@@ -2,7 +2,7 @@ import math
|
||||
from enum import IntEnum
|
||||
from collections.abc import Callable
|
||||
from typing import Union
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_COLOR, FONT_SCALE, TextAlignment, TextAlignmentVertical
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import math
|
||||
import os
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from abc import ABC
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, TextAlignment, TextAlignmentVertical
|
||||
@@ -233,7 +233,7 @@ class MultipleButtonAction(ItemAction):
|
||||
|
||||
# Check button state
|
||||
mouse_pos = rl.get_mouse_position()
|
||||
is_pressed = rl.check_collision_point_rec(mouse_pos, button_rect) and self.enabled and self.is_pressed
|
||||
is_pressed = rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), button_rect) and self.enabled and self.is_pressed
|
||||
is_selected = i == self.selected_button
|
||||
|
||||
# Button colors
|
||||
@@ -264,7 +264,7 @@ class MultipleButtonAction(ItemAction):
|
||||
for i, _ in enumerate(self.buttons):
|
||||
button_x = self._rect.x + i * (self.button_width + spacing)
|
||||
button_rect = rl.Rectangle(button_x, button_y, self.button_width, BUTTON_HEIGHT)
|
||||
if rl.check_collision_point_rec(mouse_pos, button_rect):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), button_rect):
|
||||
self.selected_button = i
|
||||
if self.callback:
|
||||
self.callback(i)
|
||||
@@ -316,7 +316,7 @@ class ListItem(Widget):
|
||||
# Check not in action rect
|
||||
if self.action_item:
|
||||
action_rect = self.get_right_item_rect(self._rect)
|
||||
if rl.check_collision_point_rec(mouse_pos, action_rect):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_pos.x, mouse_pos.y), action_rect):
|
||||
# Click was on right item, don't toggle description
|
||||
return
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from enum import IntEnum
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import numpy as np
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, MouseEvent
|
||||
from openpilot.system.ui.lib.text_measure import measure_text_cached
|
||||
@@ -85,7 +85,7 @@ class Key(Widget):
|
||||
text_size = measure_text_cached(self._font, self.char, self._get_font_size())
|
||||
x = self._rect.x + self._rect.width / 2 - text_size.x / 2
|
||||
y = self._rect.y + self._rect.height / 2 - text_size.y / 2
|
||||
rl.draw_text_ex(self._font, self.char, (x, y), self._get_font_size(), 0, self._color)
|
||||
rl.draw_text_ex(self._font, self.char, rl.Vector2(x, y), self._get_font_size(), 0, self._color)
|
||||
|
||||
if DEBUG:
|
||||
rl.draw_circle(int(self._rect.x), int(self._rect.y), 5, rl.RED) # Debug: draw circle around key
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import abc
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
from openpilot.common.filter_simple import BounceFilter, FirstOrderFilter
|
||||
|
||||
@@ -2,7 +2,7 @@ from enum import IntEnum
|
||||
from functools import partial
|
||||
from typing import cast
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.system.ui.lib.application import gui_app, TextAlignment
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
from openpilot.system.ui.lib.scroll_panel import GuiScrollPanel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
import numpy as np
|
||||
from collections.abc import Callable, Sequence
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Sequence
|
||||
from openpilot.system.ui.lib.scroll_panel import GuiScrollPanel
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import abc
|
||||
from collections.abc import Callable
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
@@ -90,7 +90,7 @@ class SliderBase(Widget, abc.ABC):
|
||||
self._circle_bg_txt.width + self.HORIZONTAL_PADDING * 2,
|
||||
self._rect.height,
|
||||
)
|
||||
if rl.check_collision_point_rec(mouse_event.pos, circle_button_rect):
|
||||
if rl.check_collision_point_rec(rl.Vector2(mouse_event.pos.x, mouse_event.pos.y), circle_button_rect):
|
||||
self._start_x_circle = mouse_event.pos.x
|
||||
self._is_dragging_circle = True
|
||||
self._circle_press_time = rl.get_time()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.system.ui.lib.application import MousePos
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
|
||||
@@ -234,7 +234,7 @@ def load_route_metadata(route):
|
||||
|
||||
|
||||
def draw_text_box(text, x, y, size, gui_app, font, color=None, center=False):
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
from openpilot.system.ui.lib.text_measure import measure_text_cached
|
||||
box_color, text_color = rl.Color(0, 0, 0, 85), color or rl.WHITE
|
||||
text_size = measure_text_cached(font, text, size)
|
||||
@@ -286,7 +286,7 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
|
||||
title: str | None = None, show_metadata: bool = True, show_time: bool = True, use_qcam: bool = False):
|
||||
timer, duration = Timer(), end - start
|
||||
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
if big:
|
||||
from openpilot.selfdrive.ui.onroad.augmented_road_view import AugmentedRoadView
|
||||
else:
|
||||
|
||||
@@ -2,7 +2,7 @@ import itertools
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
from matplotlib.backends.backend_agg import FigureCanvasAgg
|
||||
from matplotlib.artist import Artist
|
||||
@@ -151,7 +151,7 @@ def init_plots(arr, name_to_arr_idx, plot_xlims, plot_ylims, plot_names, plot_co
|
||||
axs[plot_select[i]].draw_artist(plots[i])
|
||||
|
||||
raw_data = np.ascontiguousarray(canvas.buffer_rgba(), dtype=np.uint8)
|
||||
rl.update_texture(plot_texture, rl.ffi.cast("void *", raw_data.ctypes.data))
|
||||
rl.update_texture(plot_texture, raw_data)
|
||||
return plot_texture
|
||||
|
||||
return draw_plots
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
import pyray as rl
|
||||
import raylib_nb as rl
|
||||
|
||||
import openpilot.cereal.messaging as messaging
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
@@ -204,7 +204,7 @@ def ui_thread():
|
||||
mask = np.any(img > 0, axis=2)
|
||||
overlay_img[:, :, :3] = img
|
||||
overlay_img[:, :, 3] = mask * 255
|
||||
rl.update_texture(overlay_texture, rl.ffi.cast("void *", overlay_img.ctypes.data))
|
||||
rl.update_texture(overlay_texture, overlay_img)
|
||||
rl.draw_texture(overlay_texture, 0, 0, rl.WHITE) # noqa: TID251
|
||||
|
||||
# display alerts
|
||||
@@ -221,7 +221,7 @@ def ui_thread():
|
||||
# Convert lid_overlay to RGBA and update top_down texture
|
||||
# lid_overlay is (384, 960), need to transpose to (960, 384) for row-major RGBA buffer
|
||||
lid_rgba = palette[lid_overlay.T]
|
||||
rl.update_texture(top_down_texture, rl.ffi.cast("void *", np.ascontiguousarray(lid_rgba).ctypes.data))
|
||||
rl.update_texture(top_down_texture, np.ascontiguousarray(lid_rgba))
|
||||
rl.draw_texture(top_down_texture, 640, 0, rl.WHITE) # noqa: TID251
|
||||
|
||||
SPACING = 25
|
||||
|
||||
+5
-5
@@ -134,11 +134,11 @@ lint.flake8-implicit-str-concat.allow-multiline = false
|
||||
|
||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||
"time.time".msg = "Use time.monotonic. time.time can skip due to its reference clock, you probably want a monotonic clock"
|
||||
"pyray.measure_text_ex".msg = "Use openpilot.system.ui.lib.text_measure"
|
||||
"pyray.is_mouse_button_pressed".msg = "This can miss events. Use Widget._handle_mouse_press"
|
||||
"pyray.is_mouse_button_released".msg = "This can miss events. Use Widget._handle_mouse_release"
|
||||
"pyray.draw_text".msg = "Use a function (such as rl.draw_font_ex) that takes font as an argument"
|
||||
"pyray.draw_texture".msg = "Use rl.draw_texture_ex for float position support"
|
||||
"raylib_nb.measure_text_ex".msg = "Use openpilot.system.ui.lib.text_measure"
|
||||
"raylib_nb.is_mouse_button_pressed".msg = "This can miss events. Use Widget._handle_mouse_press"
|
||||
"raylib_nb.is_mouse_button_released".msg = "This can miss events. Use Widget._handle_mouse_release"
|
||||
"raylib_nb.draw_text".msg = "Use a function (such as rl.draw_font_ex) that takes font as an argument"
|
||||
"raylib_nb.draw_texture".msg = "Use rl.draw_texture_ex for float position support"
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "preserve"
|
||||
|
||||
@@ -209,15 +209,15 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "comma-deps-raylib"
|
||||
version = "6.0.0.1.post103"
|
||||
version = "6.0.0.1.post106"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cffi" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6f/e3/21e3be3ad1e2382b9ecab7d836e7ca19ea0959fe714d539a71c6b87ba510/comma_deps_raylib-6.0.0.1.post103-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d8bef63b7e49bc8704eda9fecdefbff01d7f6c9027069cb1b1f5150cac077ed1", size = 1885397, upload-time = "2026-09-11T22:33:22.617Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3d/4d/cceaf969d771af8870094d06bb84dca805f9268584a9a3c134dfee2307c7/comma_deps_raylib-6.0.0.1.post103-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:d9b9bebb39167442bacf627958d57ae95e452550ced1b68337cbf2a73375856a", size = 21707647, upload-time = "2026-09-11T22:33:26.533Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/27/ce/e8b941bcf0b213ca9cb4d8cb69b18398b4dad77923925d80bc3281837461/comma_deps_raylib-6.0.0.1.post103-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:942ec942ec01005f05584eede1a6add483043e8e8f764e68cfebb7c21c443b89", size = 20722617, upload-time = "2026-09-11T22:33:31.158Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fb/71/e8a63d9969441d0e31b5cd5fa908a245b46e160bd86b73ce13f85aa9eb45/comma_deps_raylib-6.0.0.1.post106-cp312-abi3-macosx_11_0_arm64.whl", hash = "sha256:d3dba4ad783f11f9f1e56105afa856cf3ffb9268dcca44ac3dc1d93e7cbf1874", size = 2383355, upload-time = "2026-11-01T22:33:11.034Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/12/4f/865bf68faf83832540d51c344685d6810a2927cb1c4a5ba5ef6a80cf799b/comma_deps_raylib-6.0.0.1.post106-cp312-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:cfcfd422e36caa47b7cf6a315653a40be2dde87a419637bd87d917ec3b13dec3", size = 26737944, upload-time = "2026-11-01T22:33:15.262Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ab/56/791a9c5d8ccb0aef0d793dc6a12d574df45861fbb860f8255e4eebf9e05a/comma_deps_raylib-6.0.0.1.post106-cp312-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:22a267761192f9303d13bffe765b9e9bde27986293a10653960aa07a8c65c0ff", size = 24258130, upload-time = "2026-11-01T22:33:20.148Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user