Flickering ANSI logo
How do I make an flickering ansi logo?
What is a flickering ansi logo? How do you make a flickering ansi logo? This script and codes were developed by Moses Holmström on 21 August 2022, Sunday.
Flickering ANSI logo - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flickering ANSI logo</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="content"> <div class="modal"> <div id="logo" class="big ansi box"></div> </div>
</div> <script src="js/index.js"></script>
</body>
</html>
Flickering ANSI logo - Script Codes CSS Codes
html, body { margin: 0; padding: 0;
}
html { background: #FFF; color: #111; font-size: 16px; line-height: 1.15em; overflow-x: hidden;
}
html.night { background: #000; color: #FFF;
}
body { position: absolute; top: 0; left: 0; bottom: 0; right: 0;
}
.content { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; box-sizing: border-box; display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-flow: row nowrap; flex-flow: row nowrap; height: 100%; -ms-flex-pack: distribute; justify-content: space-around; margin: 0 auto; max-width: 100%; position: relative; border: 1rem solid #EEE;
}
.night .content { border: 1rem solid #08060A;
}
.modal { -webkit-box-align: center; -ms-flex-align: center; align-items: center; display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-flow: column wrap; flex-flow: column wrap; -ms-flex-pack: distribute; justify-content: space-around;
}
.box { display: inline-block; min-height: 4rem; position: relative; max-width: 100%; min-width: 9rem; padding: 0 1rem;
}
.ansi { border-radius: 0.3em; box-sizing: border-box; color: #35b6c9; cursor: default; font-family: "Courier New", "Consolas" ,monospace; font-size: 8vmin; letter-spacing: 0; line-height: 1em; text-align: left; -webkit-transition: color 2.5s ease-out, font-size 2.5s ease-out, letter-spacing 2.5s ease-out, line-height 2.5s ease-in; transition: color 2.5s ease-out, font-size 2.5s ease-out, letter-spacing 2.5s ease-out, line-height 2.5s ease-in; white-space: pre;
}
.night .ansi { color: #FFF; background-color: #35b6c9;
}
.ansi.big { color: rgba(53, 182, 201, 0); font-size: 30vw; letter-spacing: -0.5em; line-height: 0;
}
.night .ansi.big { color: #FFF;
}
Flickering ANSI logo - Script Codes JS Codes
var ansimations={r:[[" ","┌──┐","├─┬┘","· └─"],[" ","┌──┐","·─┬┘"," └─"],[" "," ·─┐"," ·┬┘"," └─"],[" "," ·┐"," ┬┘"," └─"],[" "," ·"," ┌┘"," └─"],[" "," "," ┌·"," └─"],[" "," "," · "," └─"],[" "," "," "," ·─"],[" "," "," "," "],[" "," "," "," "]],o:[[" ","┌──┐","│ │","└──┘"],[" ","┌─·┐","│ │","└──┘"],[" ","· ┐","│ │","└──┘"],[" "," ┐"," │","·──┘"],[" "," ┐"," │"," ·┘"],[" "," ┐"," │"," ·"],[" "," ┐"," ·"," "],[" "," ·"," "," "],[" "," "," "," "],[" "," "," "," "]],i:[["·","┐","│","└"],["■","┐","│","└"],[" ","┐","│","└"],[" ","·","│","└"],[" "," ","·","└"],[" "," "," ","·"],[" "," "," "," "],[" "," "," "," "],[" "," "," "," "],[" "," "," "," "]],d:[[" ╖","╔══╣","║ ║","╚══╝"],[" ┐","╔══╡","║ ║","╚══╝"],[" ┐","╔══╡","║ │","╚══╛"],[" ·","╔══╡","║ │","╙──┘"],[" ","┌══·","│ │","└──┘"],[" ","┌─═ ","│ ·","└──┘"],[" ","┌── ","│ ","└─· "],[" ","┌── ","│ ","· "],[" ","·── "," "," "],[" "," · "," "," "]],u:[[" ","╖ ╖","║ ║","╚══╝"],[" ","╖ ┐","║ │","╚══╝"],[" ","╖ ┐","║ │","╚═─┘"],[" ","╖ ·","║ │","└──┘"],[" ","╖ ","│ ·","└──┘"],[" ","┐ ","│ ","└──·"],[" ","┐ ","│ ","└· "],[" ","┐ ","· "," "],[" ","· "," "," "],[" "," "," "," "]]};
document.addEventListener('DOMContentLoaded', function(){ var a = new Animation(ansimations, document.querySelector("#logo")); a.init(); a.animate(); a.element.classList.remove("big"); document.addEventListener("mousedown", function(evt) { document.querySelector("html").classList.toggle("night"); //evt.preventDefault(); //a.animate(); //return false; });
});
function Animation (ansiData, element) { var that = this; this.animations = ansiData; this.letters = "roidu"; this.height = 4; this.element = element; this.speed = 15; this.jitter = 2; this.updateRate = 50; this.init = function () { that.time = 0; } this.timeToFrame = function (time) { var derp = (Math.cos(that.time / that.speed) / 2 + 0.5) * 10 - Math.floor(Math.random()*that.jitter) >> 0; var derp = Math.max(Math.min(derp, 9),0); //if(derp == 0) { that.stop = true; } return derp; } this.compose = function (time) { var output = ""; for(var i = 0, imax = that.height; i < imax; i++) { var line = ""; for(var l = 0, lmax = that.letters.length; l < lmax; l++) { line += that.getLineInLetterAtFrame(i, that.letters[l], that.timeToFrame(time)); } output += line + "\n"; } return output; } this.getLineInLetterAtFrame = function (line, letter, frame) { return that.animations[letter][frame][line]; }; this.animate = function () { that.element.innerHTML = that.compose(that.time); if(!that.stop) setTimeout(that.animate, that.updateRate); that.time++; }; return this;
}
Developer | Moses Holmström |
Username | thykka |
Uploaded | August 21, 2022 |
Rating | 4 |
Size | 3,869 Kb |
Views | 36,432 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Thing | 3,802 Kb |
Esmes Vice Anim00ted SVG | 3,838 Kb |
Fallout Slides | 5,381 Kb |
Eclipse | 209,811 Kb |
I long for quaternions.... | 2,998 Kb |
HSL color picker | 3,957 Kb |
Brainbow Menu | 3,767 Kb |
Freaky Shadow Effect | 2,946 Kb |
Loader - Connect the dots | 2,811 Kb |
Orbit Loader | 2,682 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Z-index demo | Kblh | 1,534 Kb |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
Kut D3 | Jellevrswk | 3,687 Kb |
Slide out Menu | Rbiggs | 4,936 Kb |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
Horizontal Navigation with Floats | Gymratpacks | 5,403 Kb |
Vue Transition | Chenming142 | 4,561 Kb |
Bubble animation | Ftabor | 6,565 Kb |
Svg penguin | _massimo | 2,990 Kb |
Box-sizing | Elad2412 | 1,572 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!