A Pen created on CodePen.io. Original URL: https://codepen.io/jhnsnc/pen/PmJggb.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function colorInterpolate(t) { | |
| var color1 = 0xffcc00; | |
| var color2 = 0x0066ff; | |
| var r = Math.floor((color2>>16)*t + (color1>>16)*(1-t)); | |
| var g = Math.floor((color2>>8&0xff)*t + (color1>>8&0xff)*(1-t)); | |
| var b = Math.floor((color2&0xff)*t + (color1&0xff)*(1-t)); | |
| return '#' + ((1<<24)+(r<<16)+(g<<8)+b).toString(16).slice(1); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Sineless hash - Dave Hoskins ( https://www.shadertoy.com/view/4djSRW ) | |
| // License: CC BY-SA v4.0 (this function only) | |
| float hash11(float p) | |
| { | |
| const float HASHSCALE1 = .1031; | |
| vec3 p3 = fract(vec3(p) * HASHSCALE1); | |
| p3 += dot(p3, p3.yzx + 19.19); | |
| return fract((p3.x + p3.y) * p3.z); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #------------------------------------------------------------------------------- | |
| # Install NVM | |
| #------------------------------------------------------------------------------- | |
| echo -e "Installing nvm, our Node version manager..." true | |
| NVM_DIR="$HOME/.nvm" | |
| if [[ -e "$NVM_DIR" ]]; then | |
| echo -e "Already installed. Moving on..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Conditionally add/remove classes and render the result to a class list string | |
| * | |
| * @param {...string} initialClasses - initial class names to add | |
| */ | |
| export class ClassNames { | |
| constructor(...initialClasses) { | |
| this.arrClasses_ = initialClasses; | |
| this.breakUpSpaces_(); | |
| return this; |
OlderNewer