node-addon-api test with binding https://github.com/raysan5/raylib
import * as raylib from 'raylib-4.0'
const raylib = require('raylib-4.0')
let screenWidth = 800
let screenHeight = 450
raylib.InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window")
raylib.SetTargetFPS(60)
while(!raylib.WindowShouldClose()) {
raylib.BeginDrawing()
raylib.ClearBackground(raylib.RAYWHITE)
raylib.DrawText("Congrats! You created your first window!", 190, 200, 20, raylib.LIGHTGRAY)
raylib.EndDrawing()
}
raylib.CloseWindow()
Not all raylib functions are currently working or enabled. Read on unsupported_functions.md for more details.
While in development this package is not available on NPM You can currently install the library through github:
npm i https://github.com/twuky/raylib-4.0
generate
: Reads raylib API JSON and generates Cpp bindings and TS Definitions.
test
: Runs tests for the package.
benchmark
: Runs an example "Bunnymark" benchmark.