All Projects β†’ node-3d β†’ webgl-raub

node-3d / webgl-raub

Licence: MIT license
WebGL bindings to desktop OpenGL

Programming Languages

C++
36643 projects - #6 most used programming language
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to webgl-raub

3d-core-raub
An extensible Node.js 3D core for desktop applications
Stars: ✭ 55 (-16.67%)
Mutual labels:  native, gl, node-3d
Lambda Lantern
πŸ§™ β€Žβ€Ž A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
Stars: ✭ 122 (+84.85%)
Mutual labels:  native, bindings
webviewhs
🌐 A Haskell binding to the webview library created by Serge Zaitsev.
Stars: ✭ 109 (+65.15%)
Mutual labels:  native, bindings
libandroidjni
Android JNI bindings library
Stars: ✭ 66 (+0%)
Mutual labels:  native, bindings
ghostscript4js
Ghostscript4JS binds the Ghostscript C API to the Node.JS world.
Stars: ✭ 53 (-19.7%)
Mutual labels:  native, addon
Bacardi
Bacardi project is an effort to provide multi-language binding for Node.js native layer.
Stars: ✭ 115 (+74.24%)
Mutual labels:  native, addon
hexen-dll-injector
HEX-EN DLL Injector
Stars: ✭ 20 (-69.7%)
Mutual labels:  native, addon
crc16
A native node addon to calcalate and verify CRC16 values, adopted by MODBUS agreement
Stars: ✭ 24 (-63.64%)
Mutual labels:  addon
ember-best-language
🏳 A FastBoot-enabled addon to detect the best language for your user.
Stars: ✭ 18 (-72.73%)
Mutual labels:  addon
go-wlroots
Go binding for wlroots
Stars: ✭ 92 (+39.39%)
Mutual labels:  bindings
ofxPS3EyeGrabber
A Sony PS3 Eye Camera grabber for openFrameworks.
Stars: ✭ 83 (+25.76%)
Mutual labels:  addon
bindingsrx
A 2 way binding system for unity using unirx
Stars: ✭ 109 (+65.15%)
Mutual labels:  bindings
repository.dobbelina
repository.dobbelina- Kodi is a registered trademark of the XBMC Foundation.We are not connected to or in any other way affiliated with Kodi
Stars: ✭ 161 (+143.94%)
Mutual labels:  addon
create-material-ui-app
create-react-app + storybook + storybook-addon-material-ui
Stars: ✭ 55 (-16.67%)
Mutual labels:  addon
scala-native-bindgen
Scala Native Binding Generator
Stars: ✭ 29 (-56.06%)
Mutual labels:  bindings
wfc 2D B3D
2D Wave Function Collapse as Blender Plugin
Stars: ✭ 29 (-56.06%)
Mutual labels:  addon
kodi
KODI Addons Project
Stars: ✭ 48 (-27.27%)
Mutual labels:  addon
nuklear4j
Java binding for nuklear
Stars: ✭ 61 (-7.58%)
Mutual labels:  bindings
av.imageview
Titanium native ImageView module that extends the default Titanium ImageView with more capabilities and a different caching system.
Stars: ✭ 97 (+46.97%)
Mutual labels:  native
NativeCompile
android εŠ¨ζ€εΊ“θΏœη¨‹δΎθ΅–
Stars: ✭ 13 (-80.3%)
Mutual labels:  native

WebGL for Node.js

This is a part of Node3D project.

NPM CodeFactor

npm i webgl-raub

Synopsis

Node.js addon with WebGL bindings.

Note: this addon uses N-API, and therefore is ABI-compatible across different Node.js versions. Addon binaries are precompiled and there is no compilation step during the npm i command.

Example

This module does not provide a window control system, and it can not set up an OpenGL context on its own. This API simply maps the native OpenGL function calls to their JS counterpart.

TL;DR: see 3d-core-raub for a quick start in a fully sufficient environment.

Usage

const webgl = require('webgl-raub');

Here webgl contains all the WebGL API, like a WebGLRenderingContext instance would. See WebGLRenderingContext docs.

To use browser WebGL libs, like three.js, several additional interfaces must also be provided to mimic the browser.

There is node-glfw module, which solves both window handling and additional browser-like interfaces. It is also bundled into the 3d-core-raub module, for that matter.

const webgl = require('webgl-raub');
const { Document } = require('glfw-raub');

Document.setWebgl(webgl); // plug this WebGL impl into the Document

const doc = new Document();
global.document = global.window = doc;

const canvas = document.createElement('canvas'); // === doc
const gl = canvas.getContext('webgl'); // === webgl

OSX Note: some features may depend on OpenGL profile being used. Core profile is necessary for VAO and other OpenGL 3.2+ features. Depending on your windowing backend, set the OpenGL profile of your preference. In case glfw-raub is used, the profile can be set through the Window/Document constructor or with glfw.windowHint calls.


Three.js

Being a low level interface, WebGL requires a lot of effort to build apps. For that matter there are numerous frameworks around it. One of them is three.js. It is known to work well on Node.js with this implementation of WebGL.

You can try to use three.js your own way, but there is a far better option: node-3d-core, which gets you two steps ahead for free.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].