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

@kagawa0710/three-loader-3dtiles

v2.0.2

Published

A 3D Tiles loader for Three.js (fork of @nytimes/three-loader-3dtiles with updated dependencies)

Readme

@kagawa0710/three-loader-3dtiles

license npm version

A Three.js loader for OGC 3D Tiles.

This is a fork of @nytimes/three-loader-3dtiles with updated dependencies and additional features.

What's Different from the Original

  • Updated Dependencies: Three.js 0.182+, loaders.gl 4.3+
  • 3D Tiles 1.1 Support: Implicit Tiling, EXT_structural_metadata, EXT_mesh_features
  • DRACO/Basis Enabled by Default: No need to configure decoder paths
  • Metadata Access API: getVisibleTiles(), getTileMetadata(), getFeatureProperties()
  • Feature Picking: pick() and pickAll() methods for raycasting

Installation

npm install @kagawa0710/three-loader-3dtiles three

Basic Usage

import { Scene, PerspectiveCamera, WebGLRenderer, Clock } from 'three';
import { Loader3DTiles } from '@kagawa0710/three-loader-3dtiles';

const scene = new Scene();
const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 10000);
const renderer = new WebGLRenderer();
const clock = new Clock();

renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

let runtime = null;

async function init() {
  const result = await Loader3DTiles.load({
    url: 'https://example.com/tileset.json',
    renderer: renderer,
    viewport: {
      width: window.innerWidth,
      height: window.innerHeight,
      devicePixelRatio: window.devicePixelRatio
    }
  });

  scene.add(result.model);
  runtime = result.runtime;
}

function animate() {
  requestAnimationFrame(animate);
  const dt = clock.getDelta();
  
  if (runtime) {
    runtime.update(dt, camera);
  }
  
  renderer.render(scene, camera);
}

init();
animate();

New Features

Feature Picking

renderer.domElement.addEventListener('click', (event) => {
  const result = runtime.pick(event.clientX, event.clientY, camera);
  
  if (result) {
    console.log('Tile ID:', result.tileId);
    console.log('Point:', result.point);
    console.log('Feature ID:', result.featureId);
    console.log('Properties:', result.properties);
  }
});

Metadata Access

const visibleTiles = runtime.getVisibleTiles();

for (const tile of visibleTiles) {
  console.log(tile.id, tile.metadata);
}

const metadata = runtime.getTileMetadata('tile-id');
const properties = runtime.getFeatureProperties('tile-id', featureIndex);

Options

Loader3DTiles.load({
  url: 'tileset.json',
  renderer: renderer,
  viewport: { width, height, devicePixelRatio },
  options: {
    maximumScreenSpaceError: 16,
    maximumMemoryUsage: 400,
    resetTransform: true,
    shading: 2, // FlatTexture
    debug: false,
    // DRACO/Basis paths are set by default (CDN)
    // dracoDecoderPath: 'custom/path',
    // basisTranscoderPath: 'custom/path',
  }
});

Supported Formats

  • Batched 3D Model (b3dm) - glTF-based meshes
  • Point Cloud (pnts)
  • Composite (cmpt)
  • Implicit Tiling (3D Tiles 1.1)

Requirements

  • Three.js >= 0.160.0
  • Modern browser with WebGL support

Credits

Original library by The New York Times R&D.
This fork is maintained by @kagawa0710.

License

Apache-2.0