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 🙏

© 2024 – Pkg Stats / Ryan Hefner

geometry-processing-js-master

v1.0.0

Published

<a href="http://geometry.cs.cmu.edu/js"> <img src="imgs/logo.png" height="64" width="64" align="right" /> </a>

Downloads

1

Readme

geometry-processing-js

geometry-processing-js is a fast and flexible framework for 3D geometry processing on the web! Easy integration with HTML/WebGL makes it particularly suitable for things like mobile apps, online demos, and course content. For many tasks, performance comes within striking distance of native (C++) code. Plus, since the framework is pure JavaScript, no compilation or installation is necessary: just copy the files and run from any web browser, on any platform (including mobile). Moreover, geometry processing algorithms can be edited in the browser (using for instance the JavaScript Console in Chrome). So open up one of the demos and start editing! geometry-processing-js is developed by and maintained by the Geometry Collective at Carnegie Mellon University.

At a high level, the framework is divided into three parts - a flexible a halfedge mesh data structure, an optimized linear algebra package (based on Eigen), and code for various geometry processing algorithms. Each algorithm comes with its own viewer for rendering.

Detailed documentation and unit tests for each of these parts can be found in the docs and tests directories of this repository.

We're just getting rolling here, so stay tuned for more! :-)

Code Snippet

Since geometry-processing-js already implements many of the fundamental operations needed for geometry processing, it's easy to get up and running very quickly. Here's a short snippet showing how to solve a Poisson equation on a mesh loaded by the GUI, which uses built-in routines for constructing the Laplace and mass matrices:

// assign an index to each vertex of the mesh
let vertexIndex = indexElements(geometry.mesh.vertices);

// build cotan-Laplace and mass matrices
let A = geometry.laplaceMatrix(vertexIndex);
let M = geometry.massMatrix(vertexIndex);
let rhs = M.timesDense(rho);

// solve Poisson equation with a given right-hand side rhs
let llt = A.chol();
let phi = llt.solvePositiveDefinite(rhs);

Getting started

  1. Clone the repository and change into the projects directory
git clone https://github.com/geometrycollective/geometry-processing-js.git
cd geometry-processing-js/projects
  1. Open the index.html file in any of the sub directories in a browser of your choice (Chrome and Firefox usually provide better rendering performance than Safari).

Dependencies (all included)

  1. Linear Algebra - A wrapper around the C++ library Eigen compiled to asm.js with emscripten. Future updates will compile the more optimized sparse matrix library Suitesparse to asm.js. (Note that this wrapper can also be used for other, non-geometric projects which seek to use Eigen on the web; you can find the standalone release here)

  2. Rendering - three.js

  3. Unit Tests - Mocha and Chai

About Javascript

The implementation of geometry-processing-js attempts to minimize the use of obscure Javascript language features. It should not be too difficult for anyone with experience in a dynamic language like Python or familiar with the principles of Object Oriented Programming to get a handle on Javascript syntax by reading through some of the code in this framework. The documentation contains examples specific to this framework which will also be of help. For a more formal introduction to Javascript, checkout this really nice tutorial.

Building the Documentation

See guide here.

Authors

Rohan Sawhney

Email: [email protected]

Mark Gillespie

Email: [email protected]

Design inspiration: Nick Sharp, Keenan Crane

License

MIT