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

@che.js/che.js

v1.2.3

Published

[![NPM Package][npm]][npm-url] [![NPM Downloads][npm-downloads]][npmtrends-url]

Readme

NPM Package NPM Downloads

What is che.js?

che.js is an implementation of the Compact Half-Edge(CHE) data structure for triangular meshes in Javascript. It is an upgrade on the half-edge data structure, which representes each edge as two twin-edges, each part of a triangle.

Why use che.js?

The main goal of che.js is to provide a scalable structure for meshes, so you can scale your memory usage according to your needs.

che.js is split in 4 levels, each of them increasing the amount of information you have.

Levels

  1. The first level of che.js is the minimal representation of a triangle, all it storages is the geometry informations about the vertices, and which vertices form each triangles. It does that by storing references to vertices in a table called _tableVertices, each triangle of the mesh is represented by 3 vertice references on this table.

  2. The second level of che.js stores the opposites of each half-edge in the mesh, which allows for fast computation of adjacency between triangles.

  3. The third level of the structure chooses an half-edge to represent each vertex and edge. It allows for fast discovery of adjacency with vertices, and a simple way to draw independent edges if needed.

  4. The fourth level adds information about the boundary curves of a mesh, representing each boundary curve with a half-edge.

Getting Started

npm install @che.js/che.js

⚠⚠⚠

Warning: Since che.js uses es6 modules, you have to either name your file with .mjs or explicitly state in your package.json that your project type is "module".

⚠⚠⚠

Loading a mesh

Currently che.js only have loaders available for objects in .ply format with x,y,z coordinates, you can find a few examples at the ply folder available on the root of this repository. In this example, we will use sphere.ply.

import Che from '@che.js/che.js';
import fs from 'fs'

//Load ply file

let plyFile = fs.readFileSync('sphere.ply', 'utf-8');

let cheMesh = new Che()

cheMesh.loadPly(plyFile).then(() => {
  //do whatever you want
})

Finding the vertex star of an vertex

cheMesh.loadPly(plyFile).then(() => {
  let start = performance.now()
  let vertexStarOfVertex3 = cheMesh.relation00(3);
  let end = performance.now()
  console.log(`L0 R00: ${end - start}`)
  console.log(vertexStarOfVertex3);

  cheMesh.loadCheL1();
  start = performance.now()
  vertexStarOfVertex3 = cheMesh.relation00(3);
  end = performance.now()
  console.log(`L1 R00: ${end - start}`)
  console.log(vertexStarOfVertex3);


  cheMesh.loadCheL2();
  start = performance.now()
  vertexStarOfVertex3 = cheMesh.relation00(3);
  end = performance.now()
  console.log(`L2 R00: ${end - start}`)
  console.log(vertexStarOfVertex3);
})

Wiki

You can find documentation and examples at our wiki

Demo

You can see che.js in action on this demo

More info

You can find more info about the data structure on the following links

Change log

Releases