Dev #2
+3
-3
@@ -2,6 +2,6 @@ Center Delay
|
||||
count velocity x y theta_i theta_f color start end decayrate
|
||||
===================================================
|
||||
s
|
||||
20000 68 0.5 0.5 0 360 cyan 1 0 0
|
||||
20000 68 0.5 0.5 0 360 magenta 2.075 0 0
|
||||
20000 68 0.5 0.5 0 360 yellow 4.931 0 0
|
||||
18000 79 0.5 0.5 0 360 cyan 1 0 0
|
||||
18000 79 0.5 0.5 0 360 magenta 2.075 0 0
|
||||
18000 79 0.5 0.5 0 360 yellow 4.931 0 0
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Big Hexagon (fixed 1080)
|
||||
x y
|
||||
==================
|
||||
f
|
||||
960.0 1.303
|
||||
1426.525 270.652
|
||||
1426.525 809.348
|
||||
960.0 1078.697
|
||||
493.475 809.348
|
||||
493.475 270.652
|
||||
960.0 1.303
|
||||
+9
-7
@@ -1,9 +1,11 @@
|
||||
Big Diamond (relative)
|
||||
Big Hexagon (fixed 1080)
|
||||
x y
|
||||
==================
|
||||
r
|
||||
0.5 0.0
|
||||
0.78125 0.5
|
||||
0.5 1.0
|
||||
0.21875 0.5
|
||||
0.5 0.0
|
||||
f
|
||||
960.0 1.303
|
||||
1426.525 270.652
|
||||
1426.525 809.348
|
||||
960.0 1078.697
|
||||
493.475 809.348
|
||||
493.475 270.652
|
||||
960.0 1.303
|
||||
|
||||
+1
-1
@@ -27,5 +27,5 @@ void main()
|
||||
color += texture(texture0, fragTexCoord - offset) * weight[i];
|
||||
}
|
||||
|
||||
finalColor = color * colDiffuse * fragColor * 1.9;
|
||||
finalColor = color * colDiffuse * fragColor * 1.8;
|
||||
}
|
||||
|
||||
+6
-8
@@ -16,7 +16,7 @@ int main(int argc, char* argv[]) {
|
||||
const int screenWidth = 1920;
|
||||
const int screenHeight = 1080;
|
||||
int rotFrame = 0;
|
||||
float rotSpeed = -0.1f;
|
||||
float rotSpeed = -0.11f;
|
||||
float rotAngle = 0.0f;
|
||||
float d_interval_pct = 0.00001f;
|
||||
bool rotate = false;
|
||||
@@ -24,6 +24,9 @@ int main(int argc, char* argv[]) {
|
||||
bool drawFPS = false;
|
||||
bool useShader = true;
|
||||
bool paused = false;
|
||||
bool gentleTurn = false;
|
||||
bool turning = false;
|
||||
|
||||
// bool counterclockwise = false;
|
||||
//
|
||||
for (int i = 0; i < argc; i++) {
|
||||
@@ -84,15 +87,10 @@ int main(int argc, char* argv[]) {
|
||||
if (IsKeyPressed(KEY_B)) useShader = !useShader;
|
||||
if (IsKeyPressed(KEY_SPACE)) paused = !paused;
|
||||
if (IsKeyPressed(KEY_T)) sim.reverseInterval();
|
||||
|
||||
if (!paused) {
|
||||
sim.updateFields(window.GetTime());
|
||||
if (rotate) {
|
||||
if (rotSpeed > 0) {
|
||||
rotFrame++;
|
||||
} else if (rotSpeed < 0 ) {
|
||||
rotFrame--;
|
||||
}
|
||||
|
||||
rotAngle += rotSpeed * window.GetFrameTime();
|
||||
rotAngle = std::fmod(rotAngle, 2.0f * PI);
|
||||
}
|
||||
@@ -112,7 +110,7 @@ int main(int argc, char* argv[]) {
|
||||
rlBegin(RL_LINES);
|
||||
rlColor4ub(color[0], color[1], color[2], color[3]);
|
||||
for (const auto& p : field.getPositions()) {
|
||||
rlVertex2f(p[0],p[1]);
|
||||
rlVertex2f(p[0]-1.0f,p[1]-1.0f);
|
||||
rlVertex2f(p[0]+1.0f,p[1]+1.0f);
|
||||
}
|
||||
rlEnd();
|
||||
|
||||
Reference in New Issue
Block a user