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

@tuel/three

v0.2.0

Published

Three.js components and utilities for TUEL

Readme

@tuel/three

Three.js components and utilities for React. Create stunning 3D animations and WebGL experiences.

npm version TypeScript License: MIT

Features

  • 🎨 3D Components - Pre-built Three.js React components
  • 🚀 High Performance - Optimized WebGL rendering
  • 🔧 React Three Fiber - Built on @react-three/fiber
  • 📦 Drei Integration - Includes useful @react-three/drei helpers
  • 🎭 GSAP Support - Animate 3D objects with GSAP
  • 🌳 Tree-shakeable - Import only what you need

Installation

pnpm add @tuel/three

# Peer dependencies
pnpm add react react-dom three @react-three/fiber @react-three/drei

Quick Start

import { Canvas, FloatingObjects } from '@tuel/three';

function App() {
  return (
    <Canvas>
      <FloatingObjects count={50} />
    </Canvas>
  );
}

Components

Canvas

Wrapper component that sets up Three.js scene.

<Canvas
  camera={{ position: [0, 0, 5], fov: 75 }}
  dpr={[1, 2]}
>
  {/* Your 3D content */}
</Canvas>

FloatingObjects

Animated floating 3D objects.

<FloatingObjects
  count={30}
  speed={1}
  radius={5}
  colors={['#0070f3', '#7928ca']}
/>

ParticleField

3D particle system with physics.

<ParticleField
  count={1000}
  size={0.05}
  color="#ffffff"
  velocity={0.5}
/>

MorphingShapes

Morphing 3D geometry animations.

<MorphingShapes
  shapes={['sphere', 'box', 'torus']}
  duration={2}
  color="#ff0080"
/>

Usage Examples

Basic 3D Scene

import { Canvas } from '@tuel/three';
import { OrbitControls } from '@react-three/drei';

function Scene() {
  return (
    <Canvas>
      <ambientLight intensity={0.5} />
      <pointLight position={[10, 10, 10]} />
      <FloatingObjects count={20} />
      <OrbitControls />
    </Canvas>
  );
}

Animated Particles

import { Canvas, ParticleField } from '@tuel/three';

function ParticleScene() {
  return (
    <Canvas camera={{ position: [0, 0, 10] }}>
      <ParticleField
        count={5000}
        size={0.02}
        color="#0070f3"
        velocity={0.3}
      />
    </Canvas>
  );
}

Interactive 3D Objects

import { Canvas } from '@tuel/three';
import { useState } from 'react';

function InteractiveScene() {
  const [hovered, setHovered] = useState(false);

  return (
    <Canvas>
      <mesh
        onPointerOver={() => setHovered(true)}
        onPointerOut={() => setHovered(false)}
        scale={hovered ? 1.5 : 1}
      >
        <boxGeometry args={[1, 1, 1]} />
        <meshStandardMaterial color={hovered ? 'hotpink' : 'orange'} />
      </mesh>
    </Canvas>
  );
}

Morphing Animation

import { Canvas, MorphingShapes } from '@tuel/three';

function MorphScene() {
  return (
    <Canvas>
      <ambientLight intensity={0.5} />
      <directionalLight position={[5, 5, 5]} />
      <MorphingShapes
        shapes={['sphere', 'box', 'torus', 'cone']}
        duration={3}
        color="#7928ca"
      />
    </Canvas>
  );
}

Custom Shader Material

import { Canvas } from '@tuel/three';
import { shaderMaterial } from '@react-three/drei';
import { extend } from '@react-three/fiber';

const CustomMaterial = shaderMaterial(
  { time: 0, color: new THREE.Color(0.2, 0.0, 0.1) },
  // vertex shader
  `varying vec2 vUv;
   void main() {
     vUv = uv;
     gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
   }`,
  // fragment shader
  `uniform float time;
   uniform vec3 color;
   varying vec2 vUv;
   void main() {
     gl_FragColor = vec4(color * vUv.x * sin(time), 1.0);
   }`
);

extend({ CustomMaterial });

function ShaderScene() {
  return (
    <Canvas>
      <mesh>
        <planeGeometry args={[2, 2]} />
        <customMaterial time={0} />
      </mesh>
    </Canvas>
  );
}

Performance Tips

  • Use dpr={[1, 2]} for responsive pixel ratio
  • Implement frustum culling for off-screen objects
  • Use instanced meshes for many similar objects
  • Enable shadow maps only when needed
  • Use lower polygon counts for mobile

TypeScript Support

Full TypeScript support:

import type {
  CanvasProps,
  FloatingObjectsProps,
  ParticleFieldProps,
} from '@tuel/three';

Browser Support

  • Chrome/Edge 90+ (WebGL 2.0)
  • Firefox 88+
  • Safari 14+ (WebGL 2.0)
  • Mobile browsers with WebGL support

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT © Omer Akben

Links