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 🙏

© 2025 – Pkg Stats / Ryan Hefner

three-wideline

v0.7.0

Published

A Three.js library for rendering wide lines with customizable attributes in React Three Fiber

Readme

three-wideline

A powerful Three.js library for rendering wide lines with customizable attributes, joins, caps, and advanced features. Built for React Three Fiber, it provides an easy-to-use component for creating high-quality 2D lines in 3D space.

Features

  • Customizable Attributes: Set color, width, and opacity per segment
  • Line Joins: Choose from Round, Bevel, Miter, or custom joins
  • Caps: Start and end caps with options like Butt, Round, Square, Top
  • Transparency: Optimized shaders for transparent lines
  • Custom Geometry: Beta support for user-defined custom elements
  • Raycasting: Optional raycasting for interaction
  • React Integration: Seamless integration with React Three Fiber
  • TypeScript: Full TypeScript support with strict typing

Install

npm install three-wideline

Quick Start

import { Canvas } from "@react-three/fiber"
import { Wideline } from "three-wideline"

function MyLine() {
   return (
      <Wideline
         points={[-1, -1, 0, 1, 1, -1]}
         attr={{ color: "red", width: 0.2 }}
         join="Round"
         capsStart="Round"
         capsEnd="Square"
      />
   )
}

function App() {
   return (
      <Canvas>
         <MyLine />
      </Canvas>
   )
}

Documentation

The core concept is based on instanced line rendering, well-documented in:

This library adapts these ideas into a reusable Three.js component with enhanced features.

API Reference

Examples

Live demo: Wideline Example

CodeSandbox samples:

Repository

GitHub: three-wideline

Development

Prerequisites

  • Node.js >= 18
  • pnpm

Setup

pnpm install

Development Commands

# Start development server with samples
pnpm start

# Run tests
pnpm test

# Build for production
pnpm build

# Lint code
pnpm lint

# Format code
pnpm format

Recommended VS Code Extensions

This project includes recommended VS Code extensions in .vscode/extensions.json. Install them for the best development experience:

Core Development:

Testing:

  • Vitest - Test explorer for Vitest

Three.js & React:

Git & Productivity:

File Support:

Theme & Icons:

Testing

This project uses Vitest for testing. Tests are located in src/**/*.test.tsx files.

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test -- --watch

# Run specific test file
pnpm test src/Wideline/Wideline.test.tsx

Building

# Build samples for development
pnpm build

# Build library for distribution
pnpm dist

Architecture

  • TypeScript/React with strict typing
  • Three.js for 3D rendering
  • Vite for fast development and building
  • Vitest for testing
  • ESLint + Prettier for code quality
  • Husky for git hooks
  • API Extractor for documentation generation