change built-in component names

This commit is contained in:
wooshings
2026-10-27 21:26:29 -07:00
parent c45e6b1dbb
commit 16bf55f093
4 changed files with 45 additions and 12 deletions
+4 -4
View File
@@ -5,7 +5,7 @@ import rl "vendor:raylib"
// what the app's window opens with: size, title, and the clear color.
// DefaultPlugin opens the window from it at STARTUP and paints the clear
// color at PRE_DRAW
WindowComponent :: struct {
Window :: struct {
width: i32,
height: i32,
title: string,
@@ -13,20 +13,20 @@ WindowComponent :: struct {
}
// the mouse position, refreshed every UPDATE by DefaultPlugin
CursorComponent :: struct {
Cursor :: struct {
position: rl.Vector2,
}
// a texture DefaultPlugin draws at DRAW, placed by the same entity's
// TransformComponent (so every sprite entity needs a Transform component
// too)
SpriteComponent :: struct {
Sprite :: struct {
texture: rl.Texture2D,
}
// 2D translation + rotation, read back by draw_sprite when it places the
// entity's SpriteComponent
TransformComponent :: struct {
Transform :: struct {
translation: rl.Vector2,
rotation: f32,
}