Lots of stuff (Big ones are cam and frame initial features)

There is now a 2D camera in the workspace!
We have a basic 'Frame' definition. It doesn't have any interaction yet...

I started to define spacial math, mostly for doing conversion and getting a grounding on pixel/points/cm reference. The world space is in cm.
This commit is contained in:
2024-02-10 03:40:53 -05:00
parent 2d698d22c9
commit f76ba4e9ba
13 changed files with 390 additions and 178 deletions

View File

@ -3,7 +3,7 @@ package sectr
import "core:unicode/utf8"
import rl "vendor:raylib"
debug_text :: proc( content : string, x, y : f32, size : f32 = 16.0, color : rl.Color = rl.WHITE, font : rl.Font = {} )
debug_text :: proc( content : string, pos : Vec2, size : f32 = 16.0, color : rl.Color = rl.WHITE, font : rl.Font = {} )
{
if len( content ) == 0 {
return
@ -17,7 +17,7 @@ debug_text :: proc( content : string, x, y : f32, size : f32 = 16.0, color : rl.
rl.DrawTextCodepoints( font,
raw_data(runes), cast(i32) len(runes),
position = rl.Vector2 { x, y },
position = transmute(rl.Vector2) pos,
fontSize = size,
spacing = 0.0,
tint = color );