Bacon Pancakes

Developer
Size
2,266 Kb
Views
42,504

How do I make an bacon pancakes?

Click on Jake to get your unique pancake. This animation is exported from After Effects with Bodymovin. . What is a bacon pancakes? How do you make a bacon pancakes? This script and codes were developed by Kittons on 09 September 2022, Friday.

Bacon Pancakes Previews

Bacon Pancakes - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Bacon Pancakes</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id='container'></div> <script src='https://labs.nearpod.com/bodymovin/demo/pancakes/bodymovin.js'></script> <script src="js/index.js"></script>
</body>
</html>

Bacon Pancakes - Script Codes CSS Codes

body, html{ margin:0; width:100%; height:100%; background-color:#333; overflow: hidden;
}
#container{ width: 100%; height:100%; overflow: hidden; cursor: pointer;
}
div{ font-size:0px;
}

Bacon Pancakes - Script Codes JS Codes

 var count = 0; var container = document.getElementById('container'); var animData = { container: container, renderer: 'svg', loop: true, prerender: false, autoplay: false, autoloadSegments: false, path: 'https://labs.nearpod.com/bodymovin/demo/pancakes/data.json' }; var anim; var isThrowing = false; anim = bodymovin.loadAnimation(animData); anim.addEventListener('DOMLoaded',startAnimation); container.onclick = throwPancake; function throwComplete(){ isThrowing = false; anim.removeEventListener('loopComplete',throwComplete); } function throwPancake(){ if(isThrowing){ return; } isThrowing = true; anim.playSegments([[27,142],[14,26]],true); var baconRand = Math.random()*1420; var butterXpos; if(baconRand < 1420/2){ butterXpos = 500 + 900 + Math.random()*900; } else { butterXpos = 500 + Math.random()*900; } var baconPos = [-100+baconRand,480+Math.random()*370,0]; var butterPos = [butterXpos,470+Math.random()*430,0]; anim.layers[0].ks.p.k[0].e = baconPos; anim.layers[2].ks.p.k[0].e = baconPos; anim.layers[1].ks.p.k[0].e = butterPos; anim.layers[3].ks.p.k[0].e = butterPos; anim.addEventListener('loopComplete',throwComplete); } function startAnimation(){ anim.playSegments([[0,26],[14,26]],true); }
Bacon Pancakes - Script Codes
Bacon Pancakes - Script Codes
Home Page Home
Developer Kittons
Username airnan
Uploaded September 09, 2022
Rating 4.5
Size 2,266 Kb
Views 42,504
Do you need developer help for Bacon Pancakes?

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!

Kittons (airnan) Script Codes
Create amazing web 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!