1.0.36 • Published 1 year ago

pi-emergence v1.0.36

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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.

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago