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

react-three-utils

v1.0.3

Published

A TypeScript library built on react-three-fiber and drei that provides utilities that simplify 3D development. Designed for developers who prioritize clean, maintainable code.

Readme

React-Three-Utils (R3U)

Craft immersive 3D web experiences without the boilerplate
A TypeScript library built on react-three-fiber and drei that simplifies 3D development. Designed for developers who prioritize clean, maintainable code.

Live CodeSandbox Demo


npm version License: MIT TypeScript

Why R3U?

Developing 3D interfaces shouldn't be unnecessarily complex. React-Three-Utils offers:

  • Well-designed components for animations, effects, and environments
  • A straightforward API that is easy to understand and use
  • TypeScript-first implementation for type safety and reliability
  • Minimal yet effective abstractions that enhance productivity

Getting Started

Installation

npm install react-three-utils @react-three/fiber @react-three/drei three

Quick Demo Breakdown

This example creates a scene with floating cubes that:

  • Slide into view while fading in
  • Continuously rotate
  • Emit red particles in arcs
  • Shrink in the final 20% of their movement
import "./styles.css";
import { Fade, Slide, Throw, StarField, Motion } from "react-three-utils";
import { useState, useMemo } from "react";
import { Mesh, SphereGeometry, MeshStandardMaterial } from "three";
import { OrbitControls } from "@react-three/drei";
import { Canvas } from "@react-three/fiber";

export default function CosmicCube() {
  const [launchParticles, setLaunchParticles] = useState(false);

  // Preload particle geometry
  const redParticle = useMemo(() => {
    return new Mesh(
      new SphereGeometry(0.1),
      new MeshStandardMaterial({ color: "white" })
    );
  }, []);

  return (
    <Canvas>
      <StarField movements={{ y: 0.01 }} />
      <Slide enabled from={[0, 3, 3]} speed={0.3} animateScale>
        <Motion rotation={{ y: 0.01 }}>
          <Throw
            enabled={launchParticles}
            object={redParticle}
            interval={1000}
            travelDistance={5}
            velocity={(clock) => [0, 3, Math.cos(clock.getElapsedTime()) * 0.3]}
            onUpdate={(obj, progress) => {
              if (progress > 0.8) {
                obj.scale.setScalar(1 - (progress - 0.8) * 0.5);
              }
            }}
          >
            <Fade 
              enabled 
              type="in" 
              onComplete={() => setLaunchParticles(true)}
            >
              <mesh>
                <boxGeometry args={[1, 1, 1]} />
                <meshStandardMaterial color="#2193c0" />
              </mesh>
            </Fade>
          </Throw>
        </Motion>
      </Slide>
      <ambientLight />
      <OrbitControls />
    </Canvas>
  );
}

Full API Documentation

Visit R3U Documentation Here

Contributing

If you encounter an issue or have a feature suggestion, consider contributing:

  • Implement clear, maintainable TypeScript code
  • Improve documentation for better clarity
  • Write tests to ensure stability

Contribution Process:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/new-feature
  3. Commit changes with meaningful messages
  4. Push to the branch
  5. Open a Pull Request

License

MIT Licensed - Use freely while respecting ethical software practices.

Developed with ❤️ by AmtCode, with a focus on simplicity and efficiency. Powered by the react-three-fiber and drei ecosystems.