-
Notifications
You must be signed in to change notification settings - Fork 0
Home
LU JI edited this page Dec 18, 2018
·
6 revisions
Welcome to the project wiki!
- init buffers and local cache
- Program::eventhandler -> detect mouse drag
- Mouse.cpp
- handleMouseDown()
- getMousePos()
- setup shaders
- particle auto-update with mouse info
- render
- update
DEBUG
- testing particles data are auto-updated for each frame on CPU side
- pass camera matrix as uniform
- test data is actually passed to GPU
- test gl draw procedure is correct.
- fix click is off when cam is not centered
- color
- slow down resistance
- why it went crazy on long click?
Particle movement is caused by gravitational force, the stronger the force the darker the color of its appearance.
- Click generates a force onto surrounding particles and leaving those particles with an initial speed the same as mouse moving speed;
- Particle color is determined by the acceleration speed.
- Acceleration is caused by gravitational force to the mouse. i.e. The closer a particle to the mouse(when clicked down) position, the bigger its acceleration.
- If the click holds, each particle's the acceleration vector (in terms of both direction and magnitude) keeps changing towards the the pointer for every frame;
(e.g. new_acceleration = current_acceleration + new_gravitational_acceleration) - If mouse releases, the particle will slow down, due to a constant resistence force, to stationary.
- If the click holds, each particle's the acceleration vector (in terms of both direction and magnitude) keeps changing towards the the pointer for every frame;
| Control | Description |
|---|---|
| Scroll Wheel | Zoom In/Out |
| Click | Applys gratational force to surrounding particles |
| Control | Description |
|---|---|
| Left⇧ | Zoom In |
| Left⌃ | Zoom Out |
| ←, ↑, →, ↓ | Move Around |
| Particle |
|---|
| vec2 acceleration |
| vec2 speed |
| vec2 pos |
| MouseDown |
|---|
| vec2 pos |
All constants are in constants.h file.
Design Proposal
Programming Guidelines
Report Video Ideas
Useful Resources