Flickering ANSI logo

Size
3,869 Kb
Views
36,432

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 Previews

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;
}
Flickering ANSI logo - Script Codes
Flickering ANSI logo - Script Codes
Home Page Home
Developer Moses Holmström
Username thykka
Uploaded August 21, 2022
Rating 4
Size 3,869 Kb
Views 36,432
Do you need developer help for Flickering ANSI logo?

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!

Moses Holmström (thykka) Script Codes
Create amazing SEO content with AI!

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!