Gr8-CLR commited on
Commit
9c3692d
·
verified ·
1 Parent(s): 78750f8

make sure the matrix rain drops slower and the words are slighty bigger and blue & emitting indigo light

Browse files
Files changed (1) hide show
  1. index.html +39 -24
index.html CHANGED
@@ -100,7 +100,6 @@
100
  height: 100%;
101
  z-index: -2;
102
  }
103
-
104
  #matrix-canvas {
105
  position: fixed;
106
  top: 0;
@@ -108,12 +107,12 @@
108
  width: 100%;
109
  height: 100%;
110
  z-index: -1;
111
- opacity: 0.15;
112
  }
113
-
114
  .matrix-text {
115
- color: #00ff41;
116
  font-family: 'Courier New', monospace;
 
117
  }
118
  .dark-glass {
119
  background: rgba(17, 24, 39, 0.8);
@@ -750,12 +749,12 @@
750
  'advantage_function',
751
  'eligibility_trace'
752
  ];
753
-
754
  let matrixSketch = function(p) {
755
- let fontSize = 14;
756
  let columns;
757
  let drops = [];
758
  let chars = [];
 
759
 
760
  p.setup = function() {
761
  let canvas = p.createCanvas(p.windowWidth, p.windowHeight);
@@ -763,37 +762,54 @@
763
  columns = Math.floor(p.width / fontSize);
764
 
765
  for (let i = 0; i < columns; i++) {
766
- drops[i] = Math.floor(p.random(-100, 0));
767
  chars[i] = [];
768
- for (let j = 0; j < 20; j++) {
769
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
770
  }
771
  }
772
  };
773
 
774
  p.draw = function() {
775
- p.background(17, 24, 39, 25);
776
 
777
  for (let i = 0; i < drops.length; i++) {
778
- let text = chars[i][drops[i] % chars[i].length];
779
- p.fill(0, 255, 65, 200);
780
- p.text(text, i * fontSize, drops[i] * fontSize);
781
 
782
- p.fill(0, 255, 65, 50);
783
- for (let j = 1; j < 3; j++) {
784
- if (drops[i] - j >= 0) {
785
- let trailText = chars[i][(drops[i] - j) % chars[i].length];
786
- p.text(trailText, i * fontSize, (drops[i] - j) * fontSize);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
787
  }
788
  }
 
789
 
790
- if (drops[i] * fontSize > p.height && Math.random() > 0.975) {
791
- drops[i] = 0;
 
792
  for (let j = 0; j < chars[i].length; j++) {
793
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
794
  }
795
  }
796
- drops[i]++;
797
  }
798
  };
799
 
@@ -803,16 +819,15 @@
803
  drops = [];
804
  chars = [];
805
  for (let i = 0; i < columns; i++) {
806
- drops[i] = Math.floor(p.random(-100, 0));
807
  chars[i] = [];
808
- for (let j = 0; j < 20; j++) {
809
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
810
  }
811
  }
812
  };
813
  };
814
-
815
- new p5(matrixSketch);
816
 
817
  // Initialize Feather Icons
818
  feather.replace();
 
100
  height: 100%;
101
  z-index: -2;
102
  }
 
103
  #matrix-canvas {
104
  position: fixed;
105
  top: 0;
 
107
  width: 100%;
108
  height: 100%;
109
  z-index: -1;
110
+ opacity: 0.25;
111
  }
 
112
  .matrix-text {
113
+ color: #6366f1;
114
  font-family: 'Courier New', monospace;
115
+ text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
116
  }
117
  .dark-glass {
118
  background: rgba(17, 24, 39, 0.8);
 
749
  'advantage_function',
750
  'eligibility_trace'
751
  ];
 
752
  let matrixSketch = function(p) {
753
+ let fontSize = 18;
754
  let columns;
755
  let drops = [];
756
  let chars = [];
757
+ let dropSpeed = 0.3;
758
 
759
  p.setup = function() {
760
  let canvas = p.createCanvas(p.windowWidth, p.windowHeight);
 
762
  columns = Math.floor(p.width / fontSize);
763
 
764
  for (let i = 0; i < columns; i++) {
765
+ drops[i] = Math.floor(p.random(-50, 0));
766
  chars[i] = [];
767
+ for (let j = 0; j < 15; j++) {
768
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
769
  }
770
  }
771
  };
772
 
773
  p.draw = function() {
774
+ p.background(17, 24, 39, 20);
775
 
776
  for (let i = 0; i < drops.length; i++) {
777
+ let currentY = drops[i] * fontSize;
778
+ let text = chars[i][Math.floor(drops[i]) % chars[i].length];
 
779
 
780
+ // Main text with blue color and glow effect
781
+ p.push();
782
+ p.drawingContext.shadowBlur = 20;
783
+ p.drawingContext.shadowColor = 'rgba(99, 102, 241, 0.8)';
784
+ p.fill(99, 102, 241, 220);
785
+ p.textSize(fontSize);
786
+ p.text(text, i * fontSize, currentY);
787
+ p.pop();
788
+
789
+ // Trail with indigo glow
790
+ p.push();
791
+ p.drawingContext.shadowBlur = 15;
792
+ p.drawingContext.shadowColor = 'rgba(129, 140, 248, 0.6)';
793
+ for (let j = 1; j < 4; j++) {
794
+ if (currentY - j * fontSize > 0) {
795
+ let trailY = currentY - j * fontSize;
796
+ let trailOpacity = 180 - (j * 40);
797
+ p.fill(129, 140, 248, trailOpacity);
798
+ p.textSize(fontSize - (j * 0.5));
799
+ let trailText = chars[i][(Math.floor(drops[i]) - j) % chars[i].length];
800
+ p.text(trailText, i * fontSize, trailY);
801
  }
802
  }
803
+ p.pop();
804
 
805
+ // Random reset with slower frequency
806
+ if (currentY > p.height && Math.random() > 0.985) {
807
+ drops[i] = Math.floor(p.random(-30, 0));
808
  for (let j = 0; j < chars[i].length; j++) {
809
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
810
  }
811
  }
812
+ drops[i] += dropSpeed;
813
  }
814
  };
815
 
 
819
  drops = [];
820
  chars = [];
821
  for (let i = 0; i < columns; i++) {
822
+ drops[i] = Math.floor(p.random(-50, 0));
823
  chars[i] = [];
824
+ for (let j = 0; j < 15; j++) {
825
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
826
  }
827
  }
828
  };
829
  };
830
+ new p5(matrixSketch);
 
831
 
832
  // Initialize Feather Icons
833
  feather.replace();