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

make sure the letters are clearly legible and the words are moving even slower and make sure that each word is independent from the other words

Browse files
Files changed (1) hide show
  1. index.html +33 -25
index.html CHANGED
@@ -107,12 +107,13 @@
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);
@@ -750,11 +751,12 @@
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,54 +764,58 @@
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
 
@@ -818,10 +824,12 @@
818
  columns = Math.floor(p.width / fontSize);
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
  }
 
107
  width: 100%;
108
  height: 100%;
109
  z-index: -1;
110
+ opacity: 0.35;
111
  }
112
  .matrix-text {
113
  color: #6366f1;
114
+ font-family: 'Inter', monospace;
115
+ font-weight: 600;
116
+ text-shadow: 0 0 15px rgba(99, 102, 241, 0.9);
117
  }
118
  .dark-glass {
119
  background: rgba(17, 24, 39, 0.8);
 
751
  'eligibility_trace'
752
  ];
753
  let matrixSketch = function(p) {
754
+ let fontSize = 20;
755
  let columns;
756
  let drops = [];
757
  let chars = [];
758
+ let dropSpeed = 0.15; // Much slower speed
759
+ let individualSpeeds = []; // Independent speeds for each column
760
 
761
  p.setup = function() {
762
  let canvas = p.createCanvas(p.windowWidth, p.windowHeight);
 
764
  columns = Math.floor(p.width / fontSize);
765
 
766
  for (let i = 0; i < columns; i++) {
767
+ drops[i] = Math.floor(p.random(-100, 0)); // Start higher up
768
  chars[i] = [];
769
+ individualSpeeds[i] = p.random(0.1, 0.25); // Different speed for each column
770
+ for (let j = 0; j < 20; j++) {
771
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
772
  }
773
  }
774
  };
775
 
776
  p.draw = function() {
777
+ p.background(17, 24, 39, 15); // Even slower fade for clearer trails
778
 
779
  for (let i = 0; i < drops.length; i++) {
780
  let currentY = drops[i] * fontSize;
781
  let text = chars[i][Math.floor(drops[i]) % chars[i].length];
782
 
783
+ // Main text with enhanced readability
784
  p.push();
785
+ p.drawingContext.shadowBlur = 25;
786
+ p.drawingContext.shadowColor = 'rgba(99, 102, 241, 0.9)';
787
+ p.fill(99, 102, 241, 255); // Full opacity for main text
788
  p.textSize(fontSize);
789
+ p.textStyle(p.BOLD);
790
  p.text(text, i * fontSize, currentY);
791
  p.pop();
792
 
793
+ // Enhanced trail with better visibility
794
  p.push();
795
+ p.drawingContext.shadowBlur = 20;
796
+ p.drawingContext.shadowColor = 'rgba(129, 140, 248, 0.7)';
797
+ for (let j = 1; j < 6; j++) { // Longer trail
798
  if (currentY - j * fontSize > 0) {
799
  let trailY = currentY - j * fontSize;
800
+ let trailOpacity = 255 - (j * 35); // Slower fade
801
+ p.fill(129, 140, 248, Math.max(trailOpacity, 50));
802
+ p.textSize(fontSize - (j * 0.3)); // Slower size reduction
803
+ p.textStyle(p.NORMAL);
804
  let trailText = chars[i][(Math.floor(drops[i]) - j) % chars[i].length];
805
  p.text(trailText, i * fontSize, trailY);
806
  }
807
  }
808
  p.pop();
809
 
810
+ // Random reset with even slower frequency
811
+ if (currentY > p.height && Math.random() > 0.995) {
812
+ drops[i] = Math.floor(p.random(-50, 0));
813
+ individualSpeeds[i] = p.random(0.1, 0.25); // Reset and randomize speed
814
  for (let j = 0; j < chars[i].length; j++) {
815
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
816
  }
817
  }
818
+ drops[i] += individualSpeeds[i]; // Use individual speed for each column
819
  }
820
  };
821
 
 
824
  columns = Math.floor(p.width / fontSize);
825
  drops = [];
826
  chars = [];
827
+ individualSpeeds = [];
828
  for (let i = 0; i < columns; i++) {
829
+ drops[i] = Math.floor(p.random(-100, 0));
830
  chars[i] = [];
831
+ individualSpeeds[i] = p.random(0.1, 0.25);
832
+ for (let j = 0; j < 20; j++) {
833
  chars[i][j] = matrixPhrases[Math.floor(p.random(matrixPhrases.length))];
834
  }
835
  }