particles-on-map v0.9.2
Particles On Map
Code Overview
The codebase is split into areas of responsibility. We have:
external
: externally facing (to the app) functions, except for the component.jobs
: peridocally ran jobs set off by timers (or requestAnimationFrame).redux
: redux actions and events triggered from the UI. Also includes the driver of the particles (events/time.js
- which should really be split out).ui
: the React components & containers.
Exported functions
filterFunc
: Filter the particles being rendered. This MUST be fast as it gets called as fast as possible (on requestAnimationFrame).
Input data format
Data inputted needs to be an array of objects with shape: { startTime: Integer (seconds since epoch) endTime: Integer (seconds since epoch) orig: Array(2) lat, lng (lat & lng of origin) dest: Array(2) lat, lng (lat & lng of destination) key: String - random key to identify particle. Returned when a particle is clicked. colour: rgb(Integer, Integer, Integer): Colour for the particle origKey destKey touchedNodes: keys }
Input props
showStatic
: Show the particles when static (ie 0 distance) (default=true).variableSpeed={initialSpeed}
: Add a speed slider and set the initial speed toinitialSpeed
node
: (keys) => Component. Define how the node labels should be rendered.
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago