npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

3d-core-raub

v5.3.0

Published

An extensible Node3D core for desktop applications

Downloads

161

Readme

Node.js 3D Core

This is a part of Node3D project.

NPM ESLint Test

npm i -s 3d-core-raub

This package uses pre-compiled Node.js addons. There is no compilation during npm i. The addons are compiled for: Win64, Linux64, Linux ARM64, MacOS ARM64.

Example

  • WebGL/OpenGL on Node.js with support for web libs, such as three.js.
  • Multi-window apps, low-level window control with glfw-raub.
  • Modern OpenGL functions also available, see webgl-raub.
  • Image loading/saving in popular formats with image-raub.

This module exports 2 methods:

  1. export const init: (opts?: TInitOpts) => TCore3D;

    Initialize Node3D. Creates the first window/document and sets up the global environment. This function can be called repeatedly, but will ignore further calls. The return value is cached and will be returned immediately for repeating calls.

  2. export const addThreeHelpers: (three: TUnknownObject, gl: typeof webgl) => void;

    Teaches three.FileLoader.load to work with Node fs. Additionally implements three.Texture.fromId static method to create THREE textures from known GL resource IDs.

See TS declarations for more details.

Example

(As in crate-lean.mjs):

import * as THREE from 'three';

import node3d from '../index.js';
const { init, addThreeHelpers } = node3d;

const { gl, loop, Screen } = init({
	isGles3: true, vsync: true, autoEsc: true, autoFullscreen: true, title: 'Crate',
});
addThreeHelpers(THREE, gl);
const screen = new Screen({ three: THREE, fov: 70, z: 2 });

const texture = new THREE.TextureLoader().load('three/textures/crate.gif');
texture.colorSpace = THREE.SRGBColorSpace;
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({ map: texture });
const mesh = new THREE.Mesh(geometry, material);
screen.scene.add(mesh);

loop((now) => {
	mesh.rotation.x = now * 0.0005;
	mesh.rotation.y = now * 0.001;
	screen.draw();
});

Example Notes:

  1. You can use mjs, tsx or commonjs with require().
  2. loop is a convenience method, you can use requestAnimationFrame too.
  3. autoFullscreen option enables "CTRL+F", "CTRL+SHIFT+F", "CTRL+ALT+F" to switch window modes.
  4. Screen helps with three.js-oriented resource management, but is not required.
  5. three.js uses VAO, so if not using Screen, handling the window mode changes (which creates a separate OpenGL context) is up to you. Basically, doc.on('mode', () => {...}) - here you should re-create THREE.WebGLRenderer.

OpenGL Features

  1. This is real native OpenGL, and you have direct access to GL resource IDs. This may be useful for resource sharing and compute interop (such as CUDA-GL interop).
  2. The flag isGles3 lets you use a GL ES 3 preset, which is closest to "real" WebGL. If set to false, WebGL stuff (such as three.js) will still work, but now with some hacks. However, if you are planning to use non-WebGL features (e.g. OpenGL 4.5 features), you might want it off, and then select a specific context version manually.
  3. The flag isWebGL2 impacts how web libraries recognize the WebGL version. But it doesn't really change the capabilities of the engine.
  4. Offscreen rendering is possible on Windows and Linux, as demonstrated by the tests running in GitHub Actions. There are test cases that generate and compare screenshots, and they do work in headless mode.
  5. OpenGL context sharing is enabled. You can obtain HDC, HWND, CTX for Windows and whatever those are called on Linux and MacOS. See glfw-raub.

License

You get this for free. Have fun!

Some of the components have their separate licenses, but all of them may be used commercially, without royalty.