Particles, Particles, Particles...

Developer
Size
2,416 Kb
Views
12,144

How do I make an particles, particles, particles...?

What is a particles, particles, particles...? How do you make a particles, particles, particles...? This script and codes were developed by Keegan Brown on 16 October 2022, Sunday.

Particles, Particles, Particles... Previews

Particles, Particles, Particles... - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Particles, Particles, Particles...</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://d3lp1msu2r81bx.cloudfront.net/kjs/js/lib/kinetic-v4.5.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.5/TweenMax.min.js"></script>
<div id="container"></div> <script src="js/index.js"></script>
</body>
</html>

Particles, Particles, Particles... - Script Codes CSS Codes

html,body{ margin:0; padding:0; min-height: 1000px; height:100%; width:100%;
}
#container, #container canvas { margin:0; padding:0; height:100%; width:100%; display:block;
}

Particles, Particles, Particles... - Script Codes JS Codes

$(window).load( function () { var mainw = $("#container").width(), mainh = $("#container").height(), mousex = Math.floor(mainw/2), mousey = Math.floor(mainh/2); $("#container").on("mousemove", function (e) { mousex = e.pageX; mousey = 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.3 });	function randomNumber(min, max) { //good return Math.floor(Math.random() * (1 + max - min) + min);	}	for (i = 0; i < 500; i++) { var radius = Math.floor(Math.random() * 7); var circle = new Kinetic.Circle({ x: randomNumber(-500, 500), y: randomNumber(-450, 500), radius: radius, fillRGB: { r: randomNumber(0, 140), g: randomNumber(133, 198), b: 63 }, //stroke: "black", strokeWidth: 0 }); TweenMax.to(circle, 2 + Math.random(), { setX: 0, setY: 0, //setRadius: 2, delay: i * .01, repeat: -1, yoyo: true//, //roundProps: "setX, setY" }); group.add(circle);	}	stage.add(layer);	layer.add(group);	layer.add(clearing);	group.setOffset(0, 0);	group.setOpacity(.3);	TweenLite.ticker.addEventListener("tick", go);	var lastRot = 0;	function go() { clearing.draw(); render(group.getRotationDeg());	} function render (rot) { group.setPosition(mousex,mousey); rot += 1; group.setRotationDeg(rot); group.draw(); lastRot = 0; }
});
Particles, Particles, Particles... - Script Codes
Particles, Particles, Particles... - Script Codes
Home Page Home
Developer Keegan Brown
Username keeganbrown
Uploaded October 16, 2022
Rating 3.5
Size 2,416 Kb
Views 12,144
Do you need developer help for Particles, Particles, Particles...?

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 Facebook ads 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!