![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
webgl-raub
Advanced tools
This is a part of Node3D project.
npm i webgl-raub
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.
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.
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 withglfw.windowHint
calls.
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.
FAQs
WebGL for Node.js
The npm package webgl-raub receives a total of 66 weekly downloads. As such, webgl-raub popularity was classified as not popular.
We found that webgl-raub demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.