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

icosahedron

v0.0.5

Published

read/write point, face and sector data for icosehedrons.

Downloads

8

Readme

IsoSphere reads and writes data from a THREE.js Icosahedron into and out of Mongo and JSON files. It saves the point, face and sector data into independent records and unifies them into JSON collections.

It also breaks data for Icosahedron into 20 sectors based on the original faces and associates points into these sectors.

point.index, point.order and point.real_order

These three seemingly identical measurements are not --- and its kind of funny why.

When Icosahedrons are created they are often created with duplicate points as they are subdivided. Before identical points are removed, they are indexed, and this index is therefore saved to the point record, but is NOT the same as its index in the vertices array.

Thankfully, this is not the value that face.a, face.b, face.c uses. The true index of a point is saved by this module as a seperate field, order.

As for the real_order .... Points in higher resolution Ico's are NOT identical to the same points in a given order. that is, point order=20 of a res 3 Icosahedron is not the same as point order=20 of a res 2 polyhedron. (the first 12 "seed" points seem the same but the rest are a crap shoot. )

This module's link_identical_points script sets a real_order field that ensures that every point of a given index in any resolution Ico is the same. Of course not all Ico will have a point for a given index, but if it does, it should have the same coordinates.

Schema

The Schema for the registry information is stored in lib/model/*.json files.

Point Schema

Point data has the following schema:

_id {String}

the id of the point based on its original order and level of detail. see the point_id static method of the Point class:

    'point_detail_<%= detail %>_order<%= order %>'

detail {posint}

the level of detail

order {posint}

the order the point is found in (see above).

real_order {Number}

the consistent identity of the point across all resolutions (see above).

parent {String}

the _id of the point one level higher in resolution. Not all points have parents.

child {String}

the _id of the point one level lower in resolution. Not all points have children ... because at some point you are at the highest resolution stored.

coords.x, coords.y, coords.z {float}

the 3D coordinates of the point; in -1...1.

uv.x, uv.y {float}

the 2D (UV) coordinates of the point in 0..1.

neighbors[].order, .real_order, _id

data on the points connected to the point

sectors [{posint}]

a number 0..19 indicating what sector (see below) the point belongs to. Note that the first 12 (original) points will have five neighbors. All other points will have two (if on a border) or one sector.