New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

raylib

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raylib - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

docs/_config.yml

2

CMakeLists.txt

@@ -5,3 +5,3 @@ include(FetchContent)

project (node-raylib
VERSION 0.9.1
VERSION 0.9.2
DESCRIPTION "Node.js bindings for raylib"

@@ -8,0 +8,0 @@ HOMEPAGE_URL "https://github.com/RobLoach/node-raylib"

{
"name": "raylib",
"version": "0.9.1",
"version": "0.9.2",
"description": "Node.js bindings for raylib.",

@@ -19,3 +19,4 @@ "main": "index.js",

"pkg": "node tools/pkg.js",
"gen:code": "node tools/generate.js"
"gen:code": "node tools/generate.js",
"gen:docs": "jsdoc2md > docs/API.md"
},

@@ -67,6 +68,12 @@ "repository": "github:RobLoach/node-raylib",

"archiver": "^5.3.1",
"jest": "^28.0.2",
"pkg": "^5.6.0",
"jest": "^28.1.0",
"jsdoc-to-markdown": "^7.1.1",
"pkg": "^5.7.0",
"standard": "^17.0.0"
},
"jsdoc2md": {
"files": [
"src/generated/node-raylib.js"
]
}
}

@@ -7,6 +7,10 @@ ![node-raylib Logo](logo/raylib-node_256x256.png)

## Sample Applications
## Examples
- [Flappy](https://github.com/arthurmassanes/flappy) - Flappy Bird clone by [@arthurmassanes](https://github.com/arthurmassanes)
- Check out the [examples folder](examples)
| Name | Description | Author |
|:-----|:------------|:-------|
| [Offical Examples](examples) | Ports of raylib's examples to node-raylib | [@RobLoach](https://github.com/robloach), [@twunky](https://github.com/twuky), [@kunsumer](https://github.com/konsumer) |
| [Flappy](https://github.com/arthurmassanes/flappy) | A [Flappy Bird](https://en.wikipedia.org/wiki/Flappy_Bird) clone | [@arthurmassanes](https://github.com/arthurmassanes) |
| [Retro RPG Template](https://github.com/notnullgames/raylib-example-retro_rpg) | Small prototype to build a retro-inspired RPG game | [@konsumer](https://github.com/konsumer) |
| [Chip8](https://github.com/taniarascia/chip8) | A [CHIP-8](https://en.wikipedia.org/wiki/CHIP-8) emulator whose native client using node-raylib | [@taniarascia](https://github.com/taniarascia) |

@@ -23,14 +27,15 @@ ## Dependencies

cd myexample
npm init
```
2. Use the runtime by adding this to the `scripts` section of your package.json.
```json
{
"scripts": {
"start": "npx -y raylib"
2. Create a `package.json` file with:
``` json
{
"dependencies": {
"raylib": "*"
},
"scripts": {
"start": "node index.js"
}
}
}
```
```

@@ -49,12 +54,18 @@ 3. Create a `index.js` JavaScript file, like [`core_basic_window.js`](examples/core/core_basic_window.js):

r.ClearBackground(r.RAYWHITE)
r.DrawText("Congrats! You created your first window!", 190, 200, 20, r.LIGHTGRAY)
r.DrawText("Congrats! You created your first node-raylib window!", 120, 200, 20, r.LIGHTGRAY)
r.EndDrawing()
}
r.CloseWindow() // Close window and OpenGL context
r.CloseWindow()
```
4. Run `index.js` through Node.js:
4. Have npm install the dependencies for you:
``` bash
npm install
```
5. Run `index.js` through Node.js:
``` bash
npm start
```
![Screenshot](examples/core/core_basic_window.png)

@@ -64,5 +75,12 @@ Check for more [examples](examples) organized by raylib modules.

## Installation
Raylib is implemented as bindings with the node-addon-api. Bindings are prebuilt for many platforms in [Releases](https://github.com/RobLoach/node-raylib/releases). If your platform is not supported by a prebuilt binary, you will need CMake to build the native addon. Windows users building manually will also require MSVC Build Tools 2019, or Visual Studio 2019 with build tools for C/C++.
## CLI
Raylib is implemented as bindings with [node-addon-api](https://github.com/nodejs/node-addon-api). Bindings are prebuilt for many platforms in [Releases](https://github.com/RobLoach/node-raylib/releases). If your platform is not supported by a prebuilt binary, you will need CMake to build the native addon. Windows users building manually will also require MSVC Build Tools 2019, or Visual Studio 2019 with build tools for C/C++.
In general, to install node-raylib locally, use [npm](https://www.npmjs.com/):
```
npm install raylib
```
### CLI
The project comes with a [`node-raylib`](https://github.com/RobLoach/node-raylib/blob/master/bin/node-raylib) command-line tool to run `node-raylib` files directly:

@@ -83,3 +101,2 @@

node-raylib --version
npx -y raylib --version

@@ -90,7 +107,5 @@ ```

The following are a few notes and resources when developing `node-raylib`...
[node-addon-api](https://github.com/nodejs/node-addon-api) is used to construct the bindings. Raylib provides a header parser that generates a JSON file containing information on the API. The code binding raylib to NodeJS is automatically generated based on this file. For information on how bindings are written for raylib read the [documentation](docs). Code generators for the C++ bindings, TypeScript definitions, and JavaScript wrapper functions are found in the [tools/generate_templates folder](tools/generate_templates).
[node-addon-api](https://github.com/nodejs/node-addon-api) is used to construct the bindings. Raylib provides a header parser that generates a JSON file containing information on the API. The code binding raylib to NodeJS is automatically generated based on this file. For information on how bindings are written for raylib read the [docs here](https://github.com/RobLoach/node-raylib/tree/raylib4/docs). Code generators for the C++ bindings, TS Definitions, and JS wrapper functions are located [here](https://github.com/RobLoach/node-raylib/tree/raylib4/tools/generate_templates).
### Testing
### Testing
Run the following to run tests...

@@ -107,3 +122,3 @@

Typescript definitions are provided by a generator based on raylib's header parser. See [here](https://github.com/RobLoach/node-raylib/blob/raylib4/tools/generate_templates/node-raylib-definitions.js) for information on how to generate them.
Typescript definitions are provided by a generator based on raylib's header parser. See [node-raylib-definitions.js](tools/generate_templates/node-raylib-definitions.js) for information on how to generate them.

@@ -110,0 +125,0 @@ ### Package

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc