-
Notifications
You must be signed in to change notification settings - Fork 0
Add aqi data #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
botmayank
wants to merge
25
commits into
master
Choose a base branch
from
add-aqi-data
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add aqi data #1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
botmayank
commented
Jan 4, 2020
- Adds AQI based particles data using https://waqi.info
- Shows PM2.5 and PM10 based particles
- Refactors and reorganizes the pollution sketches
Add random mouse based follow modes
Set radius, color, topspeed, inertia in ctor for Mover
Gets AQI from waqi.info for a specific city every POLLING_INTERVAL seconds and prints to console.
Just entering city doesn't guarantee a station which has detailed info about each particle type.
Use getAqiVal to return int
Fog using shaders randomly filling up the screen
Clean up text variables a bit too
Since target positions are updated based on no. of particles % skeleton body points, logic breaks for num particles < body points. Easiest fix is to map num particles to atleast be 20 (no of body points).
* Body ellipses get drawn independent of particles now. * PM 2.5 won't overlap on body vertex since randomness of +-width/10 and height/10 in x and y * PM10 also track body with randomness of +- width/4 and height/4 * MIN_PARTICLES_25 and 10 can be set to 3 or any small number. Need not be 20
Also set values for speed and inertia based on a global list for each AQI cat.
Don't just pick up hue, but full HSB values for AQI. PM2.5 and PM10 brightness values offset by 25.
Recalculate random position for each particle instead of using same target point once body leaves while randomizing movers.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.