RobLoach / node-raylib

Node.js bindings for Raylib
https://robloach.github.io/node-raylib/
Other
248 stars 20 forks source link

Rename to raylib-js #15

Closed RobLoach closed 5 years ago

RobLoach commented 5 years ago

raylib-js

Will match the other raylib naming conventions :smile:

raysan5 commented 5 years ago

Why? I mean, node-raylib feels ok to me... and I understand the binding requires Node.js, right?

RobLoach commented 5 years ago

Been thinking you may have been right about questioning node-raylib as a name for two reasons....

  1. "Usually, raylib bindings follow the convention: raylib-{language}"
  2. Would like to allow using Raylib through JavaScript on the desktop (Node.js), and on the web (emscripten).

While it is Node.js for the desktop, it's technically not Node.js on the web through emscripten. Both cases, however, use JavaScript. So raylib-js might make sense for both, and it would match the conventions of the other names.....

Still trying to figure out how it can be built for both cases though. Tried in three build systems.....

  1. Node Addon API: This is what its currently using. Unfortunately I don't think it'll build the Emscripten bindings.
  2. Emscripten: While it does work on the web, and you can make raylib calls from JavaScript, the bindings won't work on the Desktop.
  3. NBind: Got this working for the desktop, but requires a bit more work, since structs don't pass correctly.

Again, the name change all depends on if the bindings for both desktop and web work. Then, raylib-js makes sense... Until then, node-raylib will do. :+1:

RobLoach commented 5 years ago

Would like to rename the name in the package.json to raylib so that it becomes...

const r = require('raylib')