๐Ÿ“ฆ RobLoach / node-raylib

Node.js bindings for Raylib

โ˜… 307 stars โ‘‚ 29 forks ๐Ÿ‘ 307 watching โš–๏ธ Other
nodejsraylib
๐Ÿ“ฅ Clone https://github.com/RobLoach/node-raylib.git
HTTPS git clone https://github.com/RobLoach/node-raylib.git
SSH git clone git@github.com:RobLoach/node-raylib.git
CLI gh repo clone RobLoach/node-raylib
Rob Loach Rob Loach Merge pull request #193 from mordof/master 6764fc3 4 months ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ bin
๐Ÿ“ docs
๐Ÿ“ drm
๐Ÿ“ examples
๐Ÿ“ logo
๐Ÿ“ man
๐Ÿ“ src
๐Ÿ“ templates
๐Ÿ“ test
๐Ÿ“ tools
๐Ÿ“„ _config.yml
๐Ÿ“„ .clang-format
๐Ÿ“„ .editorconfig
๐Ÿ“„ .gitignore
๐Ÿ“„ .npmrc
๐Ÿ“„ .prettierrc
๐Ÿ“„ CMakeLists.txt
๐Ÿ“„ index.js
๐Ÿ“„ LICENSE.md
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ README.md
node-raylib Logo

node-raylib npm version Tests

Node.js bindings for raylib, a simple and easy-to-use library to enjoy videogames programming (www.raylib.com).

Examples

NameDescriptionAuthor
Offical ExamplesPorts of raylib's examples to node-raylib@RobLoach, @twunky, @konsumer
FlappyA Flappy Bird clone@arthurmassanes
Retro RPG TemplateSmall prototype to build a retro-inspired RPG game@konsumer
Chip8A CHIP-8 emulator whose native client using node-raylib@taniarascia

Dependencies

Usage

  • Create a new Node.js project:
`` bash mkdir myexample cd myexample %%CODEBLOCK0%% json { "dependencies": { "raylib": "*" }, "scripts": { "start": "node index.js" } } %%CODEBLOCK1%% javascript const r = require('raylib') const screenWidth = 800 const screenHeight = 450 r.InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window") r.SetTargetFPS(60) while (!r.WindowShouldClose()) { r.BeginDrawing(); r.ClearBackground(r.RAYWHITE) r.DrawText("Congrats! You created your first node-raylib window!", 120, 200, 20, r.LIGHTGRAY) r.EndDrawing() } r.CloseWindow() %%CODEBLOCK2%% bash npm install %%CODEBLOCK3%% bash npm start %%CODEBLOCK4%% npm install raylib %%CODEBLOCK5%%js import * as rl from 'raylib/drm/index.js' const rl = require('raylib/drm') %%CODEBLOCK6%% bash # Unix ./bin/node-raylib core_basic_window.js # Windows node bin/node-raylib core_basic_window.js %%CODEBLOCK7%% bash npm install raylib --global node-raylib --version npx -y raylib --version %%CODEBLOCK8%% git clone https://github.com/RobLoach/node-raylib.git cd node-raylib npm i npm t %%CODEBLOCK9%% npm run pkg ``

License

node-raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.

Copyright (c) 2022 Rob Loach (@RobLoach)