• Welcome to ForumKorner!
    Join today and become a part of the community.

Tactical Test

Tactical

Onyx user!
Reputation
0
Tactical

Let's see if this works.
Code:
var colorTime = 0,
    waveTheta = 0,
    maxCount = 100,
    colorIncrement = -12,
    waveIncrement = 0.1,
    xPos = [ -2, -1, 0, 1, 2 ],
    yPos = [ -2, -1, 0, 1, 2 ],
    props = {};

var getTextShadow = function( x, y, hue ) {
  return ', ' + x + 'px ' + y + 'px hsl(' + hue + ', 100%, 50%)';
};

var animate = function() {
  var shadows = '0 0 transparent',
      hue0 = colorTime % 360,
      i, j, x, y,
      iLen = xPos.length, 
      jLen = yPos.length;

  // outline
  for ( i = 0; i < iLen; i++ ) {
    x = xPos[i];
    for ( j = 0; j < jLen; j++ ) {
      y = yPos[j];
      shadows += getTextShadow( x, y, hue0 );
    }
  }

  // renders rainbow river
  for ( i = 1; i < maxCount; i++ ) {
    var normI = i / maxCount,
        hue = ( normI * 360 * 2 + colorTime ) % 360;
    x = ~~( ( Math.sin( normI * Math.PI * 2 + waveTheta ) - Math.sin( waveTheta ) )  * 50 );
    y = i * 3;
    shadows += getTextShadow( x, y, hue );
  }

  props.groovy.style.textShadow = shadows;
  colorTime += colorIncrement;
  waveTheta += waveIncrement;
  setTimeout( animate, 30 );
};

var init = function() {

  props.groovy = document.getElementById('groovy');

  setTimeout( animate, 1 );

};

window.addEventListener( 'DOMContentLoaded', init, false);
 

Porsche

Power member.
Reputation
0
i wish there was some sort of spectrum or rainbow font color automatically. or is there?
 

Tactical

Onyx user!
Reputation
0
Porsche said:
i wish there was some sort of spectrum or rainbow font color automatically. or is there?
I'm not sure I'm trying find find a code where the text is scrolling with rainbow text
 

Odin

User is banned.
Reputation
0
I have a plugin for the rainbow username like TheTechGame as I have "Today's Top Poster" and "Top 5 Weekly Posters" plugins.
 

Tactical

Onyx user!
Reputation
0
Polymath said:
I have a plugin for the rainbow username like TheTechGame as I have "Today's Top Poster" and "Top 5 Weekly Posters" plugins.
Dang you have so many plugins! Can I have it or is there a price for it?
 

Odin

User is banned.
Reputation
0
Tactical said:
Dang you have so many plugins! Can I have it or is there a price for it?

What do you need? Just the rainbow username javascript code?
 

Odin

User is banned.
Reputation
0
Tactical said:
I thought you said you had a plugin for it not a code.

There's a PHP installer file and javascript code. It requires both. Both the developer and I classed this as a plugin/add-on.
 

Lake

Member
Reputation
0
Porsche said:
i wish there was some sort of spectrum or rainbow font color automatically. or is there?
I don't think so but that would be really cool.
 
Top