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

webgl-raub

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webgl-raub

WebGL for Node.js

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
decreased by-60.23%
Maintainers
1
Weekly downloads
 
Created
Source

WebGL for Node.js

This is a part of Node3D project.

Synopsis

Node.js addon with WebGL bindings.

Install

npm i -s webgl-raub

Note: compilation tools must be in place on your system. For Windows, use ADMIN PRIVELEGED command line: `npm i -g windows-build-tools`. Also Windows needs vcredist 2013 to be installed.

Usage

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

Here webgl is what contains all the WebGL api - WebGLRenderingContext. However a window is required to exercise your GL skills on. There is a nice implementation for that, though different ones are quite possible.

As soon as you create and set up a window, simply follow the WebGLRenderingContext docs.

NOTE: If you are planning to use browser WebGL libs, be aware of their browser-affinity. You would have to provide several additional interfaces to mimic the browser. There is node-glfw module, which exports the Document class. It can be used the following way:

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

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 more steps ahead for free.

Keywords

FAQs

Package last updated on 15 May 2018

Did you know?

Socket

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.

Install

Related posts

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