2023-05-10 21:26:53 +00:00
|
|
|
import * as rlc from "raylib.core"
|
2023-05-08 21:37:58 +00:00
|
|
|
import { loadImage } from "raylib.texture"
|
2023-05-06 21:43:40 +00:00
|
|
|
import { gc } from "std"
|
|
|
|
|
2023-05-10 21:26:53 +00:00
|
|
|
// Initialization
|
|
|
|
//--------------------------------------------------------------------------------------
|
|
|
|
const screenWidth = 800;
|
|
|
|
const screenHeight = 450;
|
2023-05-06 21:43:40 +00:00
|
|
|
|
2023-05-10 21:26:53 +00:00
|
|
|
rlc.initWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
|
2023-05-06 21:43:40 +00:00
|
|
|
|
2023-05-10 21:26:53 +00:00
|
|
|
rlc.setTargetFPS(60); // Set our game to run at 60 frames-per-second
|
|
|
|
//--------------------------------------------------------------------------------------
|
2023-05-01 16:24:56 +00:00
|
|
|
|
2023-05-09 21:25:28 +00:00
|
|
|
|
2023-05-10 21:26:53 +00:00
|
|
|
// Main game loop
|
|
|
|
while (!rlc.windowShouldClose()) // Detect window close button or ESC key
|
|
|
|
{
|
|
|
|
// Update
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
// TODO: Update your variables here
|
|
|
|
//----------------------------------------------------------------------------------
|
2023-05-01 16:24:56 +00:00
|
|
|
|
2023-05-10 21:26:53 +00:00
|
|
|
// Draw
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
rlc.beginDrawing();
|
|
|
|
|
|
|
|
rlc.clearBackground(rlc.RAYWHITE);
|
|
|
|
|
|
|
|
rlc.drawText("Congrats! You created your first window!", 190, 200, 20, rlc.LIGHTGRAY);
|
|
|
|
|
|
|
|
rlc.endDrawing();
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
}
|
2023-05-01 16:24:56 +00:00
|
|
|
|