Particles, Particles, Particles -- 3
How do I make an particles, particles, particles -- 3?
What is a particles, particles, particles -- 3? How do you make a particles, particles, particles -- 3? This script and codes were developed by Keegan Brown on 16 October 2022, Sunday.
Particles, Particles, Particles -- 3 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Particles, Particles, Particles -- 3</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="//cdnjs.cloudflare.com/ajax/libs/kineticjs/4.7.2/kinetic.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/gsap/1.11.5/TweenMax.min.js"></script>
<div id="container"></div>
<div id="log"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Particles, Particles, Particles -- 3 - Script Codes CSS Codes
html,body{ margin:0; padding:0; min-height: 1000px; height:100%; width:100%; overflow: hidden;
}
#log { display: none; }
#container, #container canvas { margin:0; padding:0; height:100%; width:100%; display:block;
}
#log { position: absolute; height: 100px; width: 100%; left: 0; bottom: 0; z-index: 1000; border: 1px solid #999;
}
Particles, Particles, Particles -- 3 - Script Codes JS Codes
$(window).load( function () { var mainw = $("#container").width(), mainh = $("#container").height(), mouse = { x: Math.floor(mainw/2), y: Math.floor(mainh/2) }; $("#container").on("mousemove", function (e) { //mousex = e.pageX; //mousey = e.pageY; TweenMax.to( mouse, 1, { x: e.pageX, y: e.pageY } ); }); var stage = new Kinetic.Stage({ container: "container", width: mainw, height: mainh }); var layer = new Kinetic.Layer(); var group = new Kinetic.Group(); var clearing = new Kinetic.Rect({ x:0, y:0, width: mainw, height: mainh, fill: "#ffffff", opacity: 0.5 }); function randomNumber(min, max) { return Math.floor(Math.random() * (1 + max - min) + min); } for (i = 0; i < 300; i++) { var radius = Math.floor(Math.random() * 10)+2; var circle = new Kinetic.Circle({ x: Math.floor(mainw/2), y: Math.floor(mainh/2), radius: 10, fillRGB: { r: randomNumber(0, 140), g: randomNumber(0, 198), b: 63 }, //stroke: "black", //strokeWidth: 1 }); tweenParticle(circle, -1); group.add(circle); } function tweenParticle ( circle, dir ) { dir *= -1; //console.log(circle.getRadius()); if ( dir > 0 ) { var rx = randomNumber(-mainw/4, mainw/4)+mouse.x; var ry = randomNumber(-mainh/4, mainh/4)+mouse.y; var rradius = Math.floor(Math.random() * 10)+2; } else { var rx = mouse.x; var ry = mouse.y; var rradius = 1; } var extent = Math.abs( (ry+rx) - (mainw+mainh) ) / ((mainw+mainh)/2); //$('#log').html(extent); TweenMax.to(circle, 0.2 + extent, { setX: rx, setY: ry, setRadius: rradius, onComplete: tweenParticle, ease: Linear.easeNone, onCompleteParams: [circle, dir], //delay: i * .01, //repeat: -1, //yoyo: true//, roundProps: "setX, setY" }); //console.log( circle ); } layer.add(group); layer.add(clearing);
stage.add(layer); group.setOffset(0, 0); group.setOpacity(.9);
//group.setPosition(Math.floor(mainw/2), Math.floor(mainh/2)); TweenLite.ticker.addEventListener("tick", go); var lastRot = 0; function go() { clearing.draw(); render(group.getRotationDeg()); } function render (rot) { //console.log(rot); //group.setPosition(mouse.x,mouse.y); rot += 2; //group.setRotationDeg(rot); group.draw(); lastRot = 0; }
});
Developer | Keegan Brown |
Username | keeganbrown |
Uploaded | October 16, 2022 |
Rating | 3 |
Size | 2,783 Kb |
Views | 14,168 |
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 |
Grow3.js Starter Pen | 2,344 Kb |
Particles with GSAP and SketchJS | 3,441 Kb |
Trying out GSAP 1.19 | 3,898 Kb |
A Pen by Keegan Brown | 478,008 Kb |
Particles with pixi.js | 2,963 Kb |
Particles, Particles, Particles... | 2,416 Kb |
Text With Mouse Reactive Soft Shadow | 2,692 Kb |
A CSS Trip through outer space | 326,256 Kb |
Parallaxy Background images | 2,947 Kb |
OnHover Flipping Tiles | 2,637 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 |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Get third wednesday | Wojtek1150 | 2,691 Kb |
A Pen by Sooba | Sooba | 2,516 Kb |
About Us | Francescaedits | 1,902 Kb |
Zeichensatz | Moklick | 2,058 Kb |
Simple CSS loader. | Cabrera | 2,574 Kb |
CSS Link Icons with jQuery Titles | Nicwinn | 2,312 Kb |
Pure CSS candle light animation by One element | Ksksoft | 2,193 Kb |
Pure CSS Tooltips | Mobius1 | 2,271 Kb |
Minimal Menu | Achudars | 3,430 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!