The pigs
How do I make an the pigs?
What is a the pigs? How do you make a the pigs? This script and codes were developed by Christian Östman on 11 September 2022, Sunday.
The pigs - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>The pigs</title>
</head>
<body> <!DOCTYPE HTML>
<html> <head> <style> body { margin: 0px; padding: 0px; } </style> </head> <body> <canvas id="myCanvas" width="1000" height="500" style="background-color:black;"></canvas> </body>
</html> <script src="js/index.js"></script>
</body>
</html>
The pigs - Script Codes JS Codes
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var imageObj = new Image();
imageObj.src = 'http://static2.wikia.nocookie.net/__cb20120812082361/adventuretimewithfinnandjake/images/0/06/Pig_trans.png';
var pigs = [];
for(var i = 0; i < 200; i++)
{ pigs.push({scale:Math.random()*100,y:Math.random()*450,x:Math.random()*1000});
}
pigs.sort(function(a, b) { return a.scale - b.scale;
});
function update()
{ context.clearRect(0,0,1000,500); for(var i=0;i<pigs.length;i++) { context.restore(); pigs[i].x += .1 * pigs[i].scale; context.drawImage(imageObj, (pigs[i].x%1300) - 300, pigs[i].y + Math.sin(pigs[i].x/100) * 15,pigs[i].scale,pigs[i].scale); }
}
setInterval(update,1000/60);
Developer | Christian Östman |
Username | chribbe |
Uploaded | September 11, 2022 |
Rating | 3.5 |
Size | 1,845 Kb |
Views | 28,336 |
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 |
The Rope | 2,886 Kb |
The Fish | 1,919 Kb |
Water Ripples - HtmlGL | 1,945 Kb |
Workshop Start | 1,517 Kb |
Lounge Weather | 3,357 Kb |
Random 3D Landscape - camping trip | 4,805 Kb |
A Small Island | 6,555 Kb |
The Rope with Youtubevideo | 3,242 Kb |
Apartment life | 4,228 Kb |
Create JS Template | 2,018 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 |
Page Transitions in Backbone | Mikefowler | 3,691 Kb |
Fluid Grid 12 | Alexoliverwd | 2,309 Kb |
Nav Test -- cats 1 | Payls | 4,735 Kb |
Front in Aracaju Logo Pure CSS | Shankarcabus | 2,581 Kb |
Brown by pure CSS, no image, no javascript | Aaronchuo | 2,652 Kb |
3D Text in Sass | Bookcasey | 2,766 Kb |
Scifi-style Interative Form | Aaronchuo | 4,566 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
Weather App | Kw7oe | 3,162 Kb |
Fading Navigation Bar | J-w-v | 2,805 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!