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

@random-mesh/rmsl-three

v0.2.0

Published

[![npm](https://img.shields.io/badge/npm-@random--mesh/rmsl--three-blue)](https://www.npmjs.com/package/@random-mesh/rmsl-three) [![GitHub](https://img.shields.io/badge/github-clinuxrulz/rmsl--three-181717?logo=github)](https://github.com/clinuxrulz/rmsl-

Readme

RMSL Three.js

npm GitHub

Three.js adapter for RMSL (Random Mesh Shading Language) — a TypeScript DSL that compiles to GLSL ES 3.0 or WGSL.

Provides two material classes that accept raw RMSL node graph definitions and produce the appropriate shader code for your chosen renderer.

Materials

| Class | Renderer | Description | |---|---|---| | RMSLShaderMaterial | WebGLRenderer | Extends RawShaderMaterial. Compiles RMSL to GLSL ES 3.0. | | RMSLNodeMaterial | WebGPURenderer | Extends NodeMaterial (TSL). Compiles RMSL to both GLSL and WGSL, selecting the correct variant at build time based on the backend. |

RMSLShaderMaterial is designed for use with WebGLRenderer only.
RMSLNodeMaterial is designed for use with WebGPURenderer only.

Project Structure

rmsl-three/
├── apps/
│   ├── demo/              # WebGL demo application
│   │   ├── index.html
│   │   ├── main.ts
│   │   ├── package.json
│   │   ├── tsconfig.json
│   │   └── vite.config.ts
│   └── demo-webgpu/       # WebGPU demo application
│       ├── index.html
│       ├── main.ts
│       ├── package.json
│       ├── tsconfig.json
│       └── vite.config.ts
├── src/
│   ├── RMSLNodeMaterial.ts
│   ├── RMSLShaderMaterial.ts
│   ├── index.ts
│   └── types.d.ts
├── dist/                  # Build output (generated)
├── package.json
├── pnpm-workspace.yaml
└── tsconfig.json

Quick Start

1. Install Dependencies

pnpm install

2. Build the Library

pnpm build

3. Run a Demo

WebGL demo (uses RMSLShaderMaterial with WebGLRenderer):

pnpm demo:start

WebGPU demo (uses RMSLNodeMaterial with WebGPURenderer):

pnpm demo:webgpu:start

Each command will:

  1. Build the RMSL Three.js adapter
  2. Build the demo application
  3. Start a dev server at http://localhost:5173

Usage

WebGL — RMSLShaderMaterial

import { WebGLRenderer, Scene, Mesh, SphereGeometry } from 'three';
import { RMSLShaderMaterial } from '@random-mesh/rmsl-three';
import { Fn, vec4, uniformRaw, output, builtinPosition } from '@random-mesh/rmsl';

const vertexMain = Fn(() => {
  // ... RMSL vertex shader graph
  builtinPosition().assign(vec4(/* ... */));
});

const fragmentMain = Fn(() => {
  const outputColor = output('vec4');
  // ... RMSL fragment shader graph
  outputColor.assign(vec4(1.0));
  return outputColor;
});

const material = new RMSLShaderMaterial({
  vertex: vertexMain,
  fragment: fragmentMain,
});
material.attachGeometry(geometry);

See the WebGL demo source for a complete example.

WebGPU — RMSLNodeMaterial

import { WebGPURenderer, Scene, Mesh, SphereGeometry } from 'three/webgpu';
import { RMSLNodeMaterial } from '@random-mesh/rmsl-three';
import { Fn, vec4 } from '@random-mesh/rmsl';

const vertexMain = Fn((uTime, position, uv) => {
  // ... RMSL vertex shader graph
  return vec4(/* ... */);
});

const material = new RMSLNodeMaterial({
  vertex: {
    fn: vertexMain,
    params: [
      { name: 'uTime', type: 'float' },
      { name: 'position', type: 'vec3' },
      { name: 'uv', type: 'vec2' },
    ],
    tsl: {
      uTime: /* three.js uniform node */,
      position: /* three.js attribute node */,
      uv: /* three.js attribute node */,
    },
  },
  fragment: { /* ... */ },
});

See the WebGPU demo source for a complete example.

Development Scripts

pnpm type-check          # TypeScript type checking
pnpm build               # Build the library
pnpm demo:dev            # WebGL demo dev mode (hot-reload)
pnpm demo:start          # Build + run WebGL demo
pnpm demo:webgpu:dev     # WebGPU demo dev mode (hot-reload)
pnpm demo:webgpu:start   # Build + run WebGPU demo
pnpm demo:setup          # Install demo dependencies

Technical Details

  • RMSL Version: ^1.0.6
  • Three.js Version: ^0.170.0
  • Build Tool: Vite
  • Monorepo: pnpm workspaces
  • Language: TypeScript

License

MIT