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

me-webgpu-react

v1.5.51

Published

React wrapper for **MatrixEngine WebGPU** — a lightweight WebGPU 3D engine for meshes, physics, and more.

Downloads

89

Readme

🚀 me-webgpu-react

React wrapper for MatrixEngine WebGPU — a lightweight WebGPU 3D engine for meshes, physics, and more.

NPM Version GitHub Stars


🖼️ Logo

Logo includes the official WebGPU logo.
WebGPU logo by W3C
Licensed under Creative Commons Attribution 4.0


✅ Supported Features

🎯 Mesh rendering from .obj files
🔷 Built-in primitives: Cube, Ball, and generic Mesh
🧲 Basic physics support via Ammo.js
🎯 Raycasting support — click to detect 3D object intersections
🎮 Easy access to the raw engine object
⚙️ Flexible control of transforms, rotation, scaling, and textures 🧊 GLB binary file loader with animation skeletal (bvh) support (from code for now)


📦 Installation

npm install me-webgpu-react

or

yarn add me-webgpu-react

⚡ Usage Example

import React from "react";
import {MatrixEngineCanvas, Mesh} from "me-webgpu-react";

function App() {
  const handleEngineReady = (engine: any) => {
    console.log("Main app object [engine]:", engine);
    // Access the raw engine here
  };

  return (
    <MatrixEngineCanvas
      onReady={handleEngineReady}
      canvasSize={{w: 256, h: 256}}
      clearColor={"black"}>
      <Mesh
        position={[0, -2, -10]}
        rotation={[0, 0, 0]}
        rotationSpeed={[0, 0, 0]}
        physics={{enabled: false}}
        texture={"/res/meshes/cube.png"}
        meshPath="/res/my-meshes/swat.obj"
        scale={[5, 5, 5]}
      />
    </MatrixEngineCanvas>
  );
}

export default App;

🧠 Access the engine from anywhere

const engine = useMatrixEngineWGPU();

Use this hook inside any component to access the engine instance, including raycast utilities and scene graph control.

🔍 Raycasting Support

You can cast rays from the camera into the 3D scene to detect intersections with objects.

✅ Ideal for building object interaction systems like:

Object click / selection

Highlighting

UI placement in 3D

Physics-based triggers

📚 Related Projects 🔧 Core engine: matrix-engine-wgpu

🧪 Physics: ammo.js

🧪🐍 Concept "From code"

Objects (obj) sequence animation example :

downloadMeshes(
  makeObjSeqArg({
    id: "swat-walk-pistol",
    path: "res/my-meshes/objs-sequence/swat-walk-pistol",
    from: 1,
    to: 20,
  }),
  (m: any) => {
    setMeshData(m["swat-walk-pistol"]);
    engine.addMeshObj({
      position: {x: 0, y: 0, z: -5},
      rotation: {x: 0, y: 0, z: 0},
      rotationSpeed: {x: 0, y: 0, z: 0},
      texturesPaths: ["./res/meshes/cube.png"],
      name: "swat-walk-pistol",
      mesh: m["swat-walk-pistol"],
      physics: {enabled: false},
      objAnim: {
        id: "swat-walk-pistol",
        meshList: m,
        currentAni: 1,
        animations: {
          active: "walk",
          walk: {
            from: 1,
            to: 20,
            speed: 3,
          },
          // walkPistol: { JUST FOR EXAMPLE ...
          //   from: 36,
          //   to: 60,
          //   speed: 3
          // }
        },
      },
    });
  },
  {scale: [1, 1, 1]}
);

🖼️ GLB loader

Material (same for addMeshObj) enumerators: material: {type: "standard", useTextureFromGlb: true}, material: {type: "normalmap", useTextureFromGlb: true}, material: {type: "power", useTextureFromGlb: true}, material: {type: "pong", useTextureFromGlb: true},

See demo6

var glbFile11 = await fetch("res/my-meshes/glb/woman1.glb").then(res =>
  res.arrayBuffer().then(buf => uploadGLBModel(buf, engine.device))
);
engine.addGlbObj(
  {
    material: {type: "normalmap", useTextureFromGlb: true},
    scale: [20, 20, 20],
    position: {x: 0, y: -4, z: -28},
    name: "woman1",
    texturesPaths: ["./res/images/logo.png"],
  },
  null,
  glbFile11
);

🌐 Live demo link: https://maximumroulette.com/apps/webgpu/react/index.html

📄 License

MIT License Created by Nikola Lukić ✉️ [email protected] 🌐 maximumroulette.com

Credits

  • 3d rig animations downloaded from great mixamo.com service.
  • All other reference you can find on engine readme file.