Particles, Particles, Particles -- 3

Developer
Size
2,783 Kb
Views
14,168

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 Previews

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; }
});
Particles, Particles, Particles -- 3 - Script Codes
Particles, Particles, Particles -- 3 - Script Codes
Home Page Home
Developer Keegan Brown
Username keeganbrown
Uploaded October 16, 2022
Rating 3
Size 2,783 Kb
Views 14,168
Do you need developer help for Particles, Particles, Particles -- 3?

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!

Keegan Brown (keeganbrown) 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!