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

pi-emergence

v1.0.36

Published

Various emergent phenomena

Downloads

21

Readme

JavaScript Emergence Engine

A collection of libraries demonstrating emergence of some sort. I tried to stay away from major frameworks, but that isn't always very reasonable.

Running

Best way is to use http-server

... But you can simply double click any of the index.html files individually. Just know that navigation may be a bit funky.

3rd Party Libraries

  • JQuery - Mainly for UI/UX outside the canvas UX (React was more trouble than it was worth)
  • p5.js - For drawing/rendering and Vector math
  • axios - Not really used as of now, but will be used to save/load snapshots (among other cool stuff that you should be real excited about)
  • http-server - Not included, and optional. Used to run the project. To install, cd into the root directory and run it. Installation steps below:

Install http-server Utility

http-server is a convenient utility that spins up a server instance on your local box Check the http-server npm page for more info.

> npm install -g http-server

Run http-server Utility

cd into the root of this project and run it. Steps are:

> cd pi-particles
> http-server

Architecture

Each of the modules will (eventually) have the same general arhitecture and pattern. It consists of three swappable abstraction layers (not to be confused with Neural Network Layers - So we will also refer to the abstraction layers as "segments" in this repo), plus the "non-swappable" Presentation Layer, which is a web page/DOM

Data Layer

Business Logic

This is where most, if not all, of the guts are. Inside the /lib directory, there are subfolders respectively named after each module, plus a /lib/common directory that holds all the reusable component JavaScript files. Each of the modules get more specialized/specific, the deeper you go into the project's folder structure

Rendering Layer

Basically, the layer that draws onto the canvas or other medium. Canvas is the most common, but others like CSS/DOM,

Presentation Layer

Normal web page/DOM. JQuery is used here, but you can use React, Veu, etc.

Modules

Currently, there are three base modules: Neural Networks, Particles, and Tentacles.

Toast.

Neural Network (/lib/neuro)

The furthest along. Currently a Feed Forward network using matrix math, and a NeuroApp visualizer which uses p5 for both vector math and drawing to the canvas. You can swap out the math module and the drawing module. See the readme file. Neuro Readme.md.

Particle Life

This "works" but probably consider this "as is." The UI/UX is funky, and I'm not 100% on the close-quarters repulsive force function Particles Readme.md.

Tentacle Physics (/lib/tentacles)

I need to put some time into this one still. The demo is good for a tentacle following the mouse, but I need to implement pendulum/gravity physics and state changing, as this will eventually be a game element (NPC or otherwise) Tentacles Readme.md.