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

three.pipeline-aide

v1.1.0

Published

> **"Let pipelines grow like magic in the 3D world!"** ๐Ÿช„๐Ÿ’ซ

Readme

๐ŸŒˆ three.pipeline-aide - Pipeline Rendering Magic Wand โœจ

"Let pipelines grow like magic in the 3D world!" ๐Ÿช„๐Ÿ’ซ

๐Ÿ“– Project Introduction

Hello hello~ Welcome to the wonderful world of three.pipeline-aide! (โ—•โ€ฟโ—•โœฟ)

This is a super dynamic pipeline rendering library based on Three.js, specifically designed to create smooth and fluid pipeline effects in 3D space! Whether you want to create a sci-fi energy transmission tube ๐ŸŒŸ, a water pipe system in a game ๐Ÿ”ง, or even flowing light lines in an art installation ๐ŸŽจ, this project can handle it all with ease!

โœจ Core Features

  • ๐ŸŽฏ Intelligent Corner Handling - Automatically identifies and smooths pipe bends, eliminating sharp right angles!
  • ๐Ÿ“ Dynamic Progress Control - Let the pipeline grow slowly like a snake, super ceremonial! ๐Ÿ
  • ๐ŸŽจ UV Texture Scrolling - Make textures flow on the pipe surface, as if the pipeline has come to life! ๐Ÿ’ง
  • ๐Ÿ”ง Real-time Parameter Adjustment - Radius, segments, corner radius... all parameters can be dynamically adjusted at runtime!
  • ๐Ÿ’ช Full TypeScript Support - Type safety for an enhanced development experience! No more typos in property names!
  • ๐Ÿš€ High-performance Rendering - Based on BufferGeometry underlying optimization, smooth operation without pressure!

๐ŸŽฎ What can you do with it?

๐ŸŒŠ Sci-fi energy pipelines          ๐Ÿ’ง Fluid transport pipeline visualization
๐Ÿ”ฎ Light trajectories in magic circles          ๐ŸŽต Music visualization waveform pipelines
๐ŸŽ† Particle effect path guidance          ๐Ÿ—๏ธ Industrial pipeline digital twins

๐Ÿš€ Quick Start

Install Dependencies

pnpm install  # or npm install / yarn install

Run Demo

# Start the development server and experience the magic! โœจ
npm run dev
pnpm dev

Basic Usage

import * as THREE from 'three';
import { PipelinePointAide, Pipeline3Geometry } from './src/core';

// 1๏ธโƒฃ Create path point aide
const pathPointList = new PipelinePointAide();
pathPointList.set([
    new THREE.Vector3(0, 0, 0),
    new THREE.Vector3(5, 3, 0),
    new THREE.Vector3(10, 0, 5)
], 0.3, 10); // corner radius 0.3, corner segments 10

// 2๏ธโƒฃ Create pipeline geometry
const geometry = new Pipeline3Geometry({
    pathPointList: pathPointList,
    options: { 
        radius: 0.2,        // pipeline radius
        radialSegments: 8   // radial segments
    }
});

// 3๏ธโƒฃ Create material and mesh
const material = new THREE.MeshPhysicalMaterial({
    color: 0x58DEDE,
    metalness: 0.8,
    roughness: 0.2
});

const tube = new THREE.Mesh(geometry, material);
scene.add(tube);

// 4๏ธโƒฃ Want dynamic effects? Easy!
geometry.update(pathPointList, { progress: 0.5 }); // Pipeline grows to half length!

๐ŸŽ›๏ธ API Documentation

PipelinePointAide - Path Point Aide

Core class for managing pipeline paths, responsible for converting discrete key points into smooth curved paths~

const pathPointList = new PipelinePointAide();

/**
 * Set path points
 * @param points - Key points array (Vector3[])
 * @param cornerRadius - Corner radius (default: 0.1)
 * @param cornerSplit - Corner segments (default: 10)
 * @param up - Forced up direction, null for auto-calculation (default: null)
 * @param close - Whether to close the path (default: false)
 */
pathPointList.set(points, cornerRadius, cornerSplit, up, close);

// Get total path length
const totalDistance = pathPointList.distance();

Pipeline3Geometry - Pipeline Geometry

Geometry class that generates 3D pipeline meshes based on path point lists!

// Initialization method 1: Using configuration object
const geometry = new Pipeline3Geometry({
    pathPointList: pathPointList,
    options: {
        radius: 0.2,          // pipeline radius
        radialSegments: 8,    // radial segments (more for smoother)
        startRad: 0,          // start angle
        progress: 1           // rendering progress (0-1)
    },
    usage: THREE.StaticDrawUsage
});

// Initialization method 2: Pre-allocate maximum vertices
const geometry = new Pipeline3Geometry(1000, false);

// Dynamically update geometry
geometry.update(pathPointList, {
    radius: 0.3,
    radialSegments: 12,
    progress: 0.8
});

Pipeline2Geometry - Path Geometry (Flat Ribbon)

Similar to Pipeline3Geometry, but generates flat ribbon geometry, suitable for roads, rivers, etc.~

const geometry = new Pipeline2Geometry({
    pathPointList: pathPointList,
    options: {
        width: 0.5,           // ribbon width
        progress: 1,          // rendering progress
        arrow: true,          // whether to show arrow
        side: 'both'          // 'left' | 'right' | 'both'
    }
});

๐ŸŽจ Demo Instructions

The project includes a complete interactive Demo (demo/demo01.ts) that showcases all core features:

  • ๐ŸŽ›๏ธ GUI Control Panel - Real-time adjustment of all parameters
  • ๐ŸŽฌ Progress Animation - Press P to play pipeline growth animation
  • ๐ŸŒŠ UV Scrolling - Texture flowing effect on the pipeline surface
  • ๐ŸŽจ Color Adjustment - Real-time pipeline color changes
  • ๐Ÿ“ Geometry Parameters - Adjust radius, segments, corner handling, etc.

๐Ÿ› ๏ธ Tech Stack

  • Three.js - 3D rendering engine
  • TypeScript - Type-safe JavaScript superset
  • lil-gui - Lightweight GUI control panel
  • Vite - Fast frontend build tool

๐Ÿ“ Project Structure

three.pipeline-aide/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ annotate/               # Documentation annotations
โ”‚   โ”‚   โ”œโ”€โ”€ Pipeline2Geometry.md
โ”‚   โ”‚   โ”œโ”€โ”€ Pipeline3Geometry.md
โ”‚   โ”‚   โ”œโ”€โ”€ PipelinePoint.md
โ”‚   โ”‚   โ””โ”€โ”€ PipelinePointAide.md
โ”‚   โ”œโ”€โ”€ core/                    # Core library code
โ”‚   โ”‚   โ”œโ”€โ”€ PipelinePoint.ts     # Path point class
โ”‚   โ”‚   โ”œโ”€โ”€ PipelinePointAide.ts # Path point aide class
โ”‚   โ”‚   โ”œโ”€โ”€ Pipeline2Geometry.ts # Path geometry (flat ribbon)
โ”‚   โ”‚   โ”œโ”€โ”€ Pipeline3Geometry.ts # Pipeline geometry (round tube)
โ”‚   โ”‚   โ””โ”€โ”€ index.ts             # Export entry
โ”œโ”€โ”€ demo/                        # Demo code
โ”‚   โ””โ”€โ”€ demo01.ts                # Interactive demo
โ”œโ”€โ”€ index.html                   # HTML entry
โ”œโ”€โ”€ main.ts                      # TypeScript entry
โ””โ”€โ”€ package.json

๐ŸŒŸ Advanced Tips

๐Ÿ’ก Performance Optimization Tips

// 1. Pre-allocate geometry size to avoid runtime reallocation
const geometry = new Pipeline3Geometry(10000); // Supports up to 10000 vertices

// 2. Use segments appropriately
// Don't blindly pursue high subdivision, adjust according to actual needs
const options = {
    radialSegments: 8,    // 8 segments are usually smooth enough
    cornerSplit: 10       // 10 segments at corners are smooth enough
};

// 3. Use requestAnimationFrame for progress animations
function animate() {
    requestAnimationFrame(animate);
    geometry.update(pathPointList, { progress: currentProgress });
    renderer.render(scene, camera);
}

๐ŸŽฏ Creating Closed Pipelines

const points = [
    new THREE.Vector3(0, 0, 0),
    new THREE.Vector3(5, 0, 0),
    new THREE.Vector3(5, 5, 0),
    new THREE.Vector3(0, 5, 0)
];

pathPointList.set(points, 0.3, 10, null, true); // Last parameter true = closed!

๐ŸŒˆ Custom Material Effects

// Glowing pipeline effect โœจ
const material = new THREE.MeshPhysicalMaterial({
    color: 0x00ffff,
    emissive: 0x0088ff,      // self-illumination
    emissiveIntensity: 0.5,
    metalness: 0.9,
    roughness: 0.1,
    transparent: true,
    opacity: 0.9
});

// Translucent pipeline effect ๐Ÿ’ง
const material = new THREE.MeshPhysicalMaterial({
    color: 0x58DEDE,
    transparent: true,
    opacity: 0.6,
    side: THREE.DoubleSide,
    depthWrite: false
});

๐Ÿ› Common Issues

Q: Why is the pipeline not smooth?
A: Increase the radialSegments parameter! Default is 8, try 16 or higher~

Q: What to do if there are wrinkles at corners?
A: Adjust cornerRadius and cornerSplit, increasing these values will make corners smoother!

Q: How to make the pipeline grow slowly from one end?
A: Use the progress parameter! Gradually increase from 0 to 1, combine with animation loop and you're good to go!

Q: Texture display issues?
A: Ensure texture wrapS and wrapT are set to THREE.RepeatWrapping, and adjust repeat and offset as needed~

๐Ÿค Contribution Guide

Welcome to submit Issues and Pull Requests! Whether it's bug reports, feature suggestions, or code contributions, we greatly appreciate it! (โ—•โ€ฟโ—•)

๐Ÿ“ Changelog

v1.0.0 (2024)

  • โœจ Full TypeScript type support
  • ๐ŸŽฏ Core pipeline rendering algorithm
  • ๐ŸŽจ Dynamic parameter adjustment
  • ๐ŸŒŠ UV scrolling effect
  • ๐ŸŽฌ Progress animation system

Acknowledgements

This project is a derivative work based on the outstanding research and code from the following projects:

  • [three.path] by [shawn0326].
    We are deeply grateful to the original authors for their foundational work.
    Without their open-source release of the [specific algorithm] under the [MIT], this project would not exist.

Our work focuses on [your unique contribution], which includes:

  • [TypeScript update]

For some original source codes, please visit: [https://github.com/shawn0326/three.path]

License

This project is licensed under the [MIT] โ€“ see the LICENSE file for details.

Note: This project is not affiliated with the original authors of [three.path].