Pixel Anim Test
How do I make an pixel anim test?
What is a pixel anim test? How do you make a pixel anim test? This script and codes were developed by Xavier Martínez on 19 September 2022, Monday.
Pixel Anim Test - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pixel Anim Test</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <img id="cat" src="http://xmpdesign.com/projects/nyan-anim/nyan.gif" />
<canvas></canvas>
<audio id="nyancat-song" autoplay> <source src="https://ia800501.us.archive.org/33/items/nyannyannyan/NyanCatoriginal.mp3">
</audio>
<script>
var music = document.getElementById("nyancat-song");
music.volume = 0.1;
</script> <script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/TweenMax-latest-beta.js?v=1'></script>
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/ModifiersPlugin-latest-beta.js'></script>
<script src='https://cdn.rawgit.com/bit101/grid/40adacfed99b449400d30d60691d81de9d19bfe5/grid.js'></script> <script src="js/index.js"></script>
</body>
</html>
Pixel Anim Test - Script Codes CSS Codes
html, body { height: 100%;
}
body { overflow: hidden; /* background-image: url("http://xmpdesign.com/projects/nyan-anim/nyan-sky.jpg");*/
}
canvas { position: absolute; top: 0; left: 0
}
#cat { position: absolute; top: 0; left: 0; visibility: hidden;
}
Pixel Anim Test - Script Codes JS Codes
var vw = window.innerWidth;
var vh = window.innerHeight;
var pixels = 6, count = 0;
window.addEventListener("resize", createGrid);
createGrid();
function init() { var x = Math.round((vw - 96) / pixels) * pixels; var y = Math.ceil((vh - 96) / pixels) * pixels; TweenLite.set("#cat", { autoAlpha: 1, x: 0, y: y }); TweenMax.to("#cat", vw / 700, { x: x, repeat: -1, yoyo: true, onRepeat:onRepeat, ease: Power0.easeNone, });
}
function onRepeat() { count++, TweenLite.set("body", {backgroundColor:"hsl(" + Math.random() * 255 + ", 90%, 60%)"}); TweenLite.set("#cat", {rotationY: 180 * count}); }
function createGrid() { var canvas = document.querySelector("canvas"); var context = canvas.getContext("2d"); vw = canvas.width = window.innerWidth; vh = canvas.height = window.innerHeight; grid.majorStrokeStyle = "#000000"; grid.square(context, 0, 0, vw, vh, pixels); init();
}
Developer | Xavier Martínez |
Username | xmjol |
Uploaded | September 19, 2022 |
Rating | 3 |
Size | 2,415 Kb |
Views | 38,456 |
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 |
ResaFav Customizer | 3,669 Kb |
Open Card Animation | 4,603 Kb |
React UI - 03 - CardList | 8,219 Kb |
Flex2x2 | 1,883 Kb |
Flex Side-content | 2,952 Kb |
Cat4President | 3,251 Kb |
React UI - 07 - Random Image Generator Giphy API | 4,193 Kb |
React UI - 04 Steps Form | 4,906 Kb |
ReactJS Tutorial Testing | 3,236 Kb |
Let | 2,699 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 |
A Pen by Markku Lehmonen | SharpDal | 7,804 Kb |
Wave Lines | Mikehobizal | 4,023 Kb |
Mostly Fluid | Mccreath | 3,308 Kb |
Simple content swap | Snografx | 1,859 Kb |
CSS background-size - GSAP | Jonathan | 2,209 Kb |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
A Pen by Eka Risyana | Risyana | 3,705 Kb |
Background-blend-mode Test | 0x04 | 4,744 Kb |
BabyStore | Pablo-Ai | 3,807 Kb |
Multi-step GSAP animation | Acacheung | 2,668 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!