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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rhodonite

v0.19.4

Published

Rhodonite is a WebGL library written in TypeScript.

Readme

Rhodonite

Rhodonite

Rhodonite is a Web3D(WebGL2/WebGPU) library written in TypeScript.

npm license test workflow

Official Website

https://librn.com/

Features

  • Component-oriented
  • Blittable Memory Architecture (Original GPU data storage system with floating point texture)
  • Physically-based Rendering with Image-based Lighting
  • Node-based Shader System
  • Support loading the following 3D model files: glTF2, glTF1, VRM
  • Support Draco compression, Basis Universal and KTX2, etc
  • Support Effekseer for particle system
  • WebGPU Support
  • WebXR(VR) Support (in both WebGL & WebGPU)

What's the "Blittable Memory Architecture"

With the Blittable Memory Architecture, Rhodonite stores almost all of its data in a large pre-allocated ArrayBuffer. Data storage for matrix or vector classes in Rhodonite's component classes and materials are assigned from the memory pool, which means most of the data are on that memory pool, transferred to the GPU every frame as a floating-point texture. This architecture allows all shaders always to access a vast amount of data.

For example, Rhodonite can handle and blend all morph targets (38 targets) of VRM characters simultaneously in the shader.

Viewer

You can try our library via https://editor.librn.com/. This viewer supports glTF/VRM/efkpkg(Effekseer package) files Drag & Drop to display. (Drag & Drop all files if glTF data consists of multiple files.)

Poly model poly

Advanced PBR PBR

VRM avatar model and VRMA animation VRM

Shader Node Editor ShaderNodeEditor

WebXR(VR) with multiview extension WebXR_VR

Supported Browsers

Google Chrome, Firefox, Safari, Microsoft Edge (chromium-based), and other modern browsers are supported. IE11 is not supported.

Install

You can install Rhodonite easily.

$ npm install rhodonite

Note

If you get an error like "webxr-input-profiles not found" when building a project using Rhodonite, Try "npm install" or "yarn install" again.

Coding with Rhodonite

In JavaScript

<body>
  <canvas id="world"></canvas>
  <script src="../../../dist/iife/rhodonite.min.js"></script>
  <script>
  // Init Rhodonite
  const engine = await Rn.Engine.init({
    approach: Rn.ProcessApproach.DataTexture,
    canvas: document.getElementById('world'),
  });

  // create a Plane mesh
  const planeEntity = Rn.MeshHelper.createPlane(engine);
  planeEntity.eulerAngles = Rn.Vector3.fromCopy3(Math.PI * 0.5, 0, 0);

  // Render Loop
  engine.startRenderLoop(() => {
    engine.processAuto();
  });
  </script>
</body>

In TypeScript

There are two package versions of Rhodonite: ESModule and IIFE.

Using ESModule package

You don't need any bundler.

<script type="module" src="main.js">
// main.ts
import Rn from 'rhodonite/dist/esm/index.js';
// import Rn from 'rhodonite/dist/esmdev/index.js'; // use this if you want to display the source map or step through the library

// Init Rhodonite
const engine = await Rn.Engine.init({
  approach: Rn.ProcessApproach.DataTexture,
  canvas: document.getElementById('world') as HTMLCanvasElement,
});

// create a Plane mesh
const planeEntity = Rn.MeshHelper.createPlane(engine);
planeEntity.eulerAngles = Rn.Vector3.fromCopy3(Math.PI * 0.5, 0, 0);

// Render Loop
engine.startRenderLoop(() => {
  engine.processAuto();
});
// tsconfig.json
{
  ...
  "compilerOptions": {
    "module": "ESNext",
    "moduleResolution": "node",
    "esModuleInterop": true,
    ...
  }
  ...
}

If you use bundler, you can simply import rhodonite, like

import Rn from 'rhodonite';

Using IIFE package

See the last part of https://github.com/actnwit/RhodoniteTS/wiki/Install .

Building Rhodonite

Prerequisites

  • Node.js 22 or later

Setup Project

$ pnpm install

Build command for Rhodonite library

$ pnpm run build

Build command for samples

$ pnpm run build-samples

Try Samples

After building Rhodonite, try:

$ pnpm run watch-samples

Then, access http://localhost:8082/ with your web browser. When you are finished, press ctrl + c.

Build command for API documents

$ pnpm run doc

Testing Rhodonite

The following command runs unit tests and E2E tests.

$ pnpm run test

The E2E test uses a headless browser for rendering. Because the results are GPU hardware-dependent rather than software-dependent, results will vary depending on your environment. Since the correct images were run in the library author's environment, it is likely that many tests will fail in your environment.

You can execute a part of tests like this.

For unit test

$ pnpm run test-unit-part -- ./src/foundation/core
$ pnpm run test-unit-part -- ./src/foundation/core/Entity.test.ts

For E2E (visual) test

$ pnpm run test-e2e-part -- ./samples/test_e2e/DataTextureInstancedDrawing

Development using VSCode devcontainer

This project supports the VSCode devcontainer for any docker-installed OS.

Input the following command in the VSCode command palette.

> Remote-Containers: Reopen in Container

After a new dev container window opens, You can work in the Debian Linux container environment. All dependencies (node, npm, yarn, typescript, chromium, and all packages for Rhodonite) are already set up.

Debugging inside VSCode (Step execution in VSCode Debug tab)

  1. Install the "Debugger for Chrome" VSCode Extension.
  2. Start the local server with $ yarn start.
  3. Push the run icon by choosing "Launch Chrome to debug Rhodonite samples" in the RUN tab of VSCode's left pane to start debugging.

If you use the VSCode devcontainer environment, You should open another RhodoniteTS VSCode window locally and do debug ops on it instead of the devcontainer VSCode window.

Contributing

See CONTRIBUTING.md for guidelines on setting up the project, running tests and submitting pull requests.

License

MIT License

Acknowledgements

Source Code

This library includes portions of code originally developed by the Khronos Group. Some of these portions have been translated and modified for use in the RhodoniteTS library.

  • glTF-Sample-Renderer (https://github.com/KhronosGroup/glTF-Sample-Renderer)

See LICENSES/glTF-Sample-Renderer.LICENSE for details.

Libraries

This library uses the following libraries.

Assets

This library also uses the following assets.

Contributors

GitHub Contributors Image