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-iges-loader

v2.0.0

Published

three.js IGES loader

Readme

IGESLoader is a modern TypeScript-native IGES file loader for Three.js.

[!WARNING] This package is currently in active development and may not be stable. Use with caution.

[!NOTE] Currently, only a limited number of 'entity' types are parsed (mainly to be able to display points/lines/curves).

Features

TypeScript Native - Written in TypeScript with full type definitions
📦 Modern ESM/CJS - Dual package format with tree-shaking support
🔧 Fully Typed - Complete type safety for all IGES entities
Fast - Optimized build with tsup and modern tooling
🧪 Well Tested - Comprehensive test suite with Vitest

Install

pnpm add three-iges-loader three

Or using npm:

npm install three-iges-loader three

Or using yarn:

yarn add three-iges-loader three

Usage

JavaScript

import * as THREE from "three";
import { IGESLoader } from "three-iges-loader";

const loader = new IGESLoader();

const iges_file_path = "/file.iges";

loader.load(
  // resource URL
  iges_file_path,
  // called when load is complete
  function (object) {
    sceneGeometry.add(object);
  },
  // called when loading is in progress
  function (xhr) {
    console.log((xhr.loaded / xhr.total) * 100 + "% loaded");
  },
  // called when loading has errors
  function (error) {
    console.log("Error: " + error);
  }
);

TypeScript

import * as THREE from "three";
import { IGESLoader } from "three-iges-loader";

const scene = new THREE.Scene();
const loader = new IGESLoader();

loader.load(
  "/path/to/file.iges",
  (geometry: THREE.Group) => {
    scene.add(geometry);
  },
  (xhr: ProgressEvent) => {
    console.log(`${(xhr.loaded / xhr.total) * 100}% loaded`);
  },
  (error: Error | ErrorEvent) => {
    console.error("Error loading IGES file:", error);
  }
);

Advanced Usage

import { IGESLoader, type IGESData } from "three-iges-loader";
import * as THREE from "three";

// With loading manager
const manager = new THREE.LoadingManager();
const loader = new IGESLoader(manager);

// Parse from string
const igesContent = "..."; // IGES file content as string
const geometry = loader.parse(igesContent);
scene.add(geometry);

Development

Prerequisites

  • Node.js >= 18.0.0
  • pnpm (recommended) or npm

Setup

# Install dependencies
pnpm install

# Build the library
pnpm build

# Run tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Type check
pnpm type-check

# Lint and format
pnpm lint
pnpm format

Running the Example

The package includes a modern Vite-based example:

# Start the development server
pnpm dev:example

# Build the example
pnpm build:example

Then open http://localhost:3000 in your browser.

API Reference

IGESLoader

Constructor

new IGESLoader(manager?: THREE.LoadingManager)

Methods

load(url, onLoad, onProgress?, onError?)

Load an IGES file from a URL.

  • url: string - The URL or path to the IGES file
  • onLoad: (geometry: THREE.Group) => void - Callback when loading is complete
  • onProgress?: (event: ProgressEvent) => void - Callback for loading progress
  • onError?: (event: ErrorEvent | Error) => void - Callback when an error occurs

parse(data)

Parse IGES file content.

  • data: string - The IGES file content as string
  • Returns: THREE.Group - A Three.js Group containing the parsed geometry

Type Exports

import type { EntityAttribute, EntityParam, IGESData } from "three-iges-loader";

Supported IGES Entities

Currently supported entity types:

  • ✅ 100 - Circular Arc
  • ✅ 106 - Copious Data / Linear Path / Witness Line / Simple Closed Planar Curve
  • ✅ 110 - Line
  • ✅ 116 - Point
  • ✅ 126 - Rational B-Spline Curve
  • 🚧 102 - Composite Curve (TODO)
  • 🚧 108 - Plane (TODO)
  • 🚧 120 - Surface of Revolution (TODO)
  • 🚧 122 - Tabulated Cylinder (TODO)
  • 🚧 124 - Transformation Matrix (TODO)
  • 🚧 128 - Rational B-Spline Surface (TODO)
  • 🚧 142 - Curve on Parametric Surface (TODO)
  • 🚧 144 - Trimmed Parametric Surface (TODO)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT © Alex Marinov

Acknowledgments

Resources

Author

Alex Marinov - Konsept Design Limited