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

parsegraph-viewport

v2.9.27

Published

viewport

Downloads

215

Readme

viewport

TODO's

  • TODO Add gridX and gridY camera listeners, with support for loading from an infinite grid of cells.

  • TODO Add camera-movement listener, to let nodes watch for camera movement, and thus let nodes detect when they are approaching critical screen boundaries:

enteringScreen leavingScreen

Node distance is radially calculated (using the viewport's diagonal) from the camera's center, adjusted by some constant.

hysteresis factor gives the +/- from some preset large distance (probably some hundreds of bud radiuses). Ignoring hysteresis, then when the camera moves, the node's relative position may be changed. This distance is recalculated, and if it is above some threshold plus hysteresis constant, and the node's state was 'near', then the node's leavingScreen is called, and the node's state is set to 'far'.

Likewise, if the distance is lower than the same threshold minus hysteresis constant, and the node's state was 'far', then the node's enteringScreen is called, and the node's state is set to 'near'.

This distance is checked when the node is painted and also when the camera is moved.

  • TODO Figure out how changing the grid size might change things.

Grid updates based only on camera movement. Updates are reported in terms of cells made visible in either direction. The number of potentially visible grid cells is determined for each axis using the camera's axis size adjusted by some constant.