Dev #2
+3
-3
@@ -2,6 +2,6 @@ Center Delay
|
|||||||
count velocity x y theta_i theta_f color start end decayrate
|
count velocity x y theta_i theta_f color start end decayrate
|
||||||
===================================================
|
===================================================
|
||||||
s
|
s
|
||||||
20000 68 0.5 0.5 0 360 cyan 1 0 0
|
18000 79 0.5 0.5 0 360 cyan 1 0 0
|
||||||
20000 68 0.5 0.5 0 360 magenta 2.075 0 0
|
18000 79 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 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
|
x y
|
||||||
==================
|
==================
|
||||||
r
|
f
|
||||||
0.5 0.0
|
960.0 1.303
|
||||||
0.78125 0.5
|
1426.525 270.652
|
||||||
0.5 1.0
|
1426.525 809.348
|
||||||
0.21875 0.5
|
960.0 1078.697
|
||||||
0.5 0.0
|
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];
|
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 screenWidth = 1920;
|
||||||
const int screenHeight = 1080;
|
const int screenHeight = 1080;
|
||||||
int rotFrame = 0;
|
int rotFrame = 0;
|
||||||
float rotSpeed = -0.1f;
|
float rotSpeed = -0.11f;
|
||||||
float rotAngle = 0.0f;
|
float rotAngle = 0.0f;
|
||||||
float d_interval_pct = 0.00001f;
|
float d_interval_pct = 0.00001f;
|
||||||
bool rotate = false;
|
bool rotate = false;
|
||||||
@@ -24,6 +24,9 @@ int main(int argc, char* argv[]) {
|
|||||||
bool drawFPS = false;
|
bool drawFPS = false;
|
||||||
bool useShader = true;
|
bool useShader = true;
|
||||||
bool paused = false;
|
bool paused = false;
|
||||||
|
bool gentleTurn = false;
|
||||||
|
bool turning = false;
|
||||||
|
|
||||||
// bool counterclockwise = false;
|
// bool counterclockwise = false;
|
||||||
//
|
//
|
||||||
for (int i = 0; i < argc; i++) {
|
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_B)) useShader = !useShader;
|
||||||
if (IsKeyPressed(KEY_SPACE)) paused = !paused;
|
if (IsKeyPressed(KEY_SPACE)) paused = !paused;
|
||||||
if (IsKeyPressed(KEY_T)) sim.reverseInterval();
|
if (IsKeyPressed(KEY_T)) sim.reverseInterval();
|
||||||
|
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
sim.updateFields(window.GetTime());
|
sim.updateFields(window.GetTime());
|
||||||
if (rotate) {
|
if (rotate) {
|
||||||
if (rotSpeed > 0) {
|
|
||||||
rotFrame++;
|
|
||||||
} else if (rotSpeed < 0 ) {
|
|
||||||
rotFrame--;
|
|
||||||
}
|
|
||||||
|
|
||||||
rotAngle += rotSpeed * window.GetFrameTime();
|
rotAngle += rotSpeed * window.GetFrameTime();
|
||||||
rotAngle = std::fmod(rotAngle, 2.0f * PI);
|
rotAngle = std::fmod(rotAngle, 2.0f * PI);
|
||||||
}
|
}
|
||||||
@@ -112,7 +110,7 @@ int main(int argc, char* argv[]) {
|
|||||||
rlBegin(RL_LINES);
|
rlBegin(RL_LINES);
|
||||||
rlColor4ub(color[0], color[1], color[2], color[3]);
|
rlColor4ub(color[0], color[1], color[2], color[3]);
|
||||||
for (const auto& p : field.getPositions()) {
|
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);
|
rlVertex2f(p[0]+1.0f,p[1]+1.0f);
|
||||||
}
|
}
|
||||||
rlEnd();
|
rlEnd();
|
||||||
|
|||||||
Reference in New Issue
Block a user