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

@kirknock/node-openxr-demo-scene

v0.1.1

Published

Babylon.js WebXR demo scene on OpenXR from Node.js (Linux, no browser): run it on Monado or WiVRn and stream to a VR headset.

Readme

node-openxr-demo-scene

Plain browser-style Babylon.js WebXR app on Linux platform (OpenXR from Node.js) without a browser.

Tested on Linux Mint 22.3 - Cinnamon 64-bit, AMD Ryzen 9 3950X, RTX 4070 12GB VRAM.

Works well in combination Monado OpenXR runtime + WayVR + WiVR.

Compared with WebXR in the headset’s browser

  • You get a desktop GPU’s power. A Quest browser has a mobile chip’s power and heat limits. Here the scene renders on a Linux PC or server GPU and the headset only decodes video, so you can use much heavier scenes, PBR materials and higher resolution.
  • No browser sandbox. Node gives you the filesystem, native addons (koffi, @napi-rs/canvas, Dawn), local sockets, serial and USB devices, databases and child processes, without HTTPS, CORS or a permission prompt in the way.
  • You control the runtime and its version. The browser’s WebXR support changes when the headset updates its browser. Here you pin Node, Babylon, the OpenXR loader and Monado/WiVRn exactly (see the version pins in package.json), and that combination stays fixed.
  • The same code still runs in a browser. src/app/ imports only @babylonjs/* and @kirknock/node-openxr-babylonjs. You can still show it as a normal WebXR page later; you just don’t depend on that.
  • You can debug and test it like a server program. You can attach the Node debugger in WebStorm, test headlessly on llvmpipe (welcome-scene-gl-smoke.ts), and read back pixels in CI without a headset. That’s much harder with WebXR running inside the headset’s browser.

Compared with Unity or Unreal

  • It’s all TypeScript and npm. There’s no editor-specific project format or C#/C++ build pipeline, and no gigabytes of engine and editor to install. A web developer can work on it straight away, and changes take effect immediately with tsx rather than after a domain reload or shader rebuild.
  • No licence fees or revenue share. Babylon.js, OpenXR, Monado and WiVRn are open source, so seat counts, runtime fees and Unity or Unreal licence terms never come into it.
  • The whole thing is small and can run without a display. The packaged app is about 175 MB, with Node, dist/ and a trimmed node_modules. It can run as a systemd service on a headless Linux box or a cloud GPU instance and be updated over rsync (scripts/deploy.sh). Unity and Unreal Linux builds are much larger, and the editors are mainly built for Windows and macOS.
  • Every layer is open, and it uses OpenXR directly. You can read and patch every layer, from the OpenXR runtime (Monado) through the renderer bindings to Babylon. You also stay on the vendor-neutral OpenXR standard rather than a single vendor’s SDK or engine plugin.
  • It suits enterprise and connected uses. The scene runs as a Node process next to your backend, so live data, IoT feeds, digital twins, remote rendering for several headsets and central updates fit naturally. Nothing is installed on the headset except the streaming client.
  • The platform packages are the public @kirknock/node-openxr-* packages on npmjs.com (-core, -webgl, -webgpu, -dawn, -babylonjs); every dependency comes from npmjs.com.

Install and run

Needs Linux, Node.js 24+ and an OpenXR runtime (Monado, or WiVRn to stream to a headset).

npx @kirknock/node-openxr-demo-scene                     # the system's active OpenXR runtime
npx @kirknock/node-openxr-demo-scene --runtime wivrn     # or monado, or a path to a runtime manifest .json

npm install -g @kirknock/node-openxr-demo-scene          # or install the command
node-openxr-demo-scene --renderer webgpu --frames 1800

| Option | | |---|---| | --runtime wivrn\|monado\|<file> | OpenXR runtime manifest. Default: XR_RUNTIME_JSON, then the system's active runtime (~/.config/openxr/1, /etc/xdg/openxr/1), then Monado | | --renderer webgl2\|webgpu | renderer (default webgl2; webgpu uses the Dawn build in @kirknock/node-openxr-dawn) | | --passthrough | ask for passthrough (AR) when the device offers it | | --frames N | stop after N frames (default 0: until Ctrl+C) | | --version, --help | |

XR_PROFILE defaults to perf; other XR_* variables are passed through to @kirknock/node-openxr-core.

Debug

See the scene using Monado OpenXR. Navigate scene using Monado OpenXR Remote (using node-openxr-monado-remote or remote-mndset):

The welcome sign and the rotating DamagedHelmet over the dot-grid floor, both eyes in the Monado window

Setup

npm install                                     # commit package-lock.json
npm run typecheck

.npmrc pins the registry to https://registry.npmjs.org/, overriding any other registry set in ~/.npmrc.

  • Tests are standalone smoke programs (tests/*-smoke.ts) that print ok/FAIL lines and exit non-zero on failure; there is no test framework. Groups are listed in tests/groups.mjs — add new tests there (and usually an npm run smoke:* script).
  • The app itself is never run by the test runner; it is run by hand, on the target (scripts/package.sh, scripts/deploy.sh user@host --run check; see README).
  • Diagnostics: npm run probe, probe:env, probe:input, probe:bindings, pattern.

Conventions and constraints

  • ESM with nodenext resolution: relative imports use the .js extension even for .ts sources.
  • strict, noUnusedLocals, noUnusedParameters are on.
  • Versions are pinned exactly. When upgrading, set the latest version of each @kirknock/node-openxr-* package (-dawn is versioned separately; -webgl/-webgpu peer-depend on ^ ranges of -core/-dawn), and keep @babylonjs/*, iwer, koffi, @napi-rs/canvas equal to the packages' peer pins, or duplicate copies get installed (startup warning).
  • Doc comments at the top of each module explain what it does and why (including past bugs); keep them current when changing behavior.

Layout

| Path | Holds | |---|---| | src/cli.ts | the package's command node-openxr-demo-scene: picks the OpenXR runtime (--runtime), switches to the package folder, then runs main.ts | | src/main.ts | entry: starts the platform (@kirknock/node-openxr-webgl, or @kirknock/node-openxr-webgpu with --renderer webgpu), then loads the app and runs the frame loop | | src/app/ | the application: browser-style Babylon code that imports only @babylonjs/*, @kirknock/node-openxr-babylonjs and its own files (never @kirknock/node-openxr-core etc.), so it would run in a browser unchanged | | src/app/scene.ts | the scene: light and dot-grid floor; src/app/index.ts adds the content: assets/DamagedHelmet.glb (spinning) and the welcome sign | | src/welcome-sign/ | the big "Welcome to OpenXR / with Babylon.js / and Node.js" sign, text drawn on a DynamicTexture with the bundled DejaVu font | | assets/ | local assets, loaded by URL relative to the working directory: DamagedHelmet.glb, fonts/DejaVuSans-Bold.ttf (credits and licences in assets/README.md) | | scripts/run.sh | runs dist/main.js (or src/main.ts) with XR_RUNTIME_JSON set (Monado by default) | | scripts/package.sh, deploy.sh, deploy-local.sh, target/run.sh | packaging and deploying (below), as in node-openxr's apps/demo-app | | mirror/ | offline copies of remote content, listed in mirror/urls.txt (npm run mirror:prefetch); committed and shipped in the package | | .github/workflows/ | CI (ci.yml) and npm release (release.yml), below |

Running

npm run build && scripts/run.sh                 # until Ctrl+C
npm run build && npm start -- --runtime wivrn # the package's command, from the checkout
scripts/run.sh --frames 600 --renderer webgpu   # 600 frames, WebGPU
XR_RUNTIME_JSON=/path/to/wivrn.json scripts/run.sh

Diagnostics from the packages: npm run probe, npm run probe:env, npm run probe:input, npm run probe:bindings, npm run pattern.

WebStorm

.idea/ is checked in, with shared run configurations in .idea/runConfigurations/ (debuggable, sources run through node --import tsx):

| Configuration | What it runs | |---|---| | App (WebGL2) / App (WebGPU) / App (passthrough) | src/cli.ts with no flag / --renderer webgpu / --passthrough; the runtime is chosen as by the command (add --runtime wivrn to the parameters, or set XR_RUNTIME_JSON) | | Welcome scene GL smoke | tests/welcome-scene-gl-smoke.ts | | npm build / npm typecheck / npm test | the npm scripts |

Personal IDE state (.idea/workspace.xml etc.) stays out of git through .idea/.gitignore.

Packaging and deploying

These scripts are the same as demo-app's; they install the dependencies from npmjs.com. The package is a folder that needs only Node.js 24+ on the target: no npm, compiler or network.

scripts/package.sh [--no-zip]                  # out/node-openxr-demo-scene/ + out/node-openxr-demo-scene-<rev>.zip
scripts/deploy.sh user@host --run check        # rsync to ~/node-openxr-demo-scene on the target, then run ./run.sh check there
scripts/deploy.sh --zip user@host [dir] --run --runtime wivrn --frames 1800
scripts/deploy-local.sh [--start-monado] ...   # same package into /cache/tmp/node-openxr-local/node-openxr-demo-scene, run against local Monado
  • package.sh: needs a package-lock.json and access to npmjs.com.
    • It builds (stamping build.json with the git rev and dirty flag) and refreshes the mirror.
    • It installs the production dependencies from the lockfile into the package, and checks that each shared library has a single copy.
    • It trims koffi to this platform.
  • deploy.sh: keeps the target's logs/ and saves the output of --run in target-logs/.
  • On the target: ./run.sh [--runtime wivrn|monado|<manifest.json>] [--frames N] [--renderer webgpu], or ./run.sh check (probes, test pattern). Every run is logged to logs/.

The package folder's name differs from demo-app's node-openxr/, so both can live side by side on the target.

Upgrading

Check the latest versions (npm view @kirknock/node-openxr-core version, likewise for the others; -dawn is versioned on its own). Set them on the @kirknock/node-openxr-* entries in package.json and run npm install. If a release moves the shared libraries (@babylonjs/*, iwer, koffi, @napi-rs/canvas), change their pins to match. The packages' peer pins must equal this app's versions, or two copies get installed (startup warning).

CI and releases

  • CI (.github/workflows/ci.yml, every push to main and every PR): npm ci, typecheck, build, the gl tests on Mesa llvmpipe, and npm pack --dry-run. The app itself needs an OpenXR runtime and is tested by hand.
  • Release (.github/workflows/release.yml, on a v* tag): the same checks, then npm pack and npm publish to npmjs.com through trusted publishing (OIDC, no npm token in GitHub, provenance attached), and a GitHub release with the tarball. A tag with a prerelease part (v0.2.0-beta.1) publishes under the next dist-tag.
npm version patch            # bumps package.json, commits, tags vX.Y.Z
git push --follow-tags       # the tag starts the Release workflow
npm pack --dry-run           # what the package contains (dist/, assets/, mirror/)