import pyray as RL from pyray import (Rectangle as Rect, Vector2 as Vec2, Vector3 as Vec3, Camera3D) import math import pdb import random from typing import Optional, Tuple, List from dataclasses import dataclass, field screen_width = 1280 screen_height = 1024 @dataclass class World: cam: Camera3D frame_count: int = 0 def init() -> World: pass def player_input(w: World): pass def update(w: World): pass def draw_3d(w: World): pass def draw_2d(w: World): pass RL.init_window(screen_width, screen_height, "Starter"); RL.set_target_fps(60) init() cam = Camera3D(Vec3(0, 0, 10), RL.vector3_zero(), Vec3(0, 1, 0), 60, 1) w = World(cam) while not RL.window_should_close(): player_input(w) update(w) # Drawing RL.begin_drawing() RL.clear_background(RL.WHITE) RL.begin_mode_3d(w.cam) draw_3d(w) RL.end_mode_3d() draw_2d(w) RL.end_drawing() w.frame_count += 1