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

@newkrok/three-utils

v2.0.1

Published

Three.js-based utility library providing essential tools for THREE.js applications including assets loading, audio management, geometry utilities, and more.

Readme

THREE Utils

Run Tests NPM Version NPM Downloads Bundle Size

Three.js-based utility library providing essential tools for THREE.js applications including assets loading, audio management, geometry utilities, and more.

Features

Asset Management - Streamlined loading and management of 3D models, textures, and other assets • Audio Integration - Easy-to-use audio management for 3D environments • Geometry Utilities - Helper functions for geometric calculations and operations • Object Utilities - Deep object manipulation, merging, and comparison tools • Time Utilities - Time formatting and management functions • Vector3 Utilities - Enhanced Vector3 operations and calculations • Callback Utilities - Advanced callback management and throttling • Dispose Utilities - Memory management and cleanup helpers • Token Utilities - Unique ID generation and token management • TypeScript Support - Full TypeScript definitions included • Modular Exports - Import only what you need for optimal bundle size

Live Demo & Examples

🚀 Coming Soon - Interactive examples and live demonstrations

Installation

NPM

npm install @newkrok/three-utils

CDN (Browser)

Include the script directly in your HTML:

<script src="https://cdn.jsdelivr.net/npm/@newkrok/three-utils@latest/dist/three-utils.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/@newkrok/three-utils@latest/dist/three-utils.min.js"></script>

Usage

Basic Import

import { 
  CallbackUtils, 
  DisposeUtils, 
  ObjectUtils, 
  TimeUtils, 
  TokenUtils, 
  Vector3Utils, 
  GeomUtils 
} from '@newkrok/three-utils';

// Generate a unique ID
const uniqueId = TokenUtils.getUniqueId();

// Format time display
const formattedTime = TimeUtils.formatTime(65432); // "01:05"

// Deep merge objects
const merged = ObjectUtils.deepMerge(obj1, obj2);

// Vector3 operations
const absVector = Vector3Utils.absVector3(someVector);

Modular Import

// Import specific modules only
import { CallbackUtils } from '@newkrok/three-utils';
import { GeomUtils } from '@newkrok/three-utils';

// Use callback throttling
CallbackUtils.callWithReducer('myKey', myFunction, 16); // ~60fps

// Check if point is in triangle
const isInside = GeomUtils.isPointInATriangle(point, triangle);

Asset Loading

import { Assets } from '@newkrok/three-utils/assets';

// Load 3D models, textures, and other assets
// (See API documentation for detailed usage)

Audio Management

import { Audio } from '@newkrok/three-utils/audio';

// Manage 3D audio in your Three.js scenes
// (See API documentation for detailed usage)

Used In

This utility library is actively used in various Three.js projects:

Documentation

Automatically generated TypeDoc: https://newkrok.github.io/three-utils/

Contributing

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

License

MIT © Istvan Krisztian Somoracz