"perticle animation"
Bootstrap 4.1.1 Snippet by ALIMUL AL RAZY

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<script>
//Init Function
var paper = function () {
var vwtWidth = window.innerWidth;
var vwtHeight = window.innerHeight;
var cns = document.createElement("canvas");
cns.width = vwtWidth;
cns.height = vwtHeight;
document.body.appendChild(cns);
var ctx = cns.getContext("2d");
var angle = 0;
var direction = "clockwise";
window.onmousemove = function (ev) {
if (ev.clientX < vwtWidth / 5) {
direction = "clockwise";
} else if (ev.clientX > vwtWidth / 5) {
direction = "anticlockwise";
}
};
var gesture = function () {
if (direction == "clockwise") {
angle++;
} else if (direction == "anticlockwise") {
angle--;
}
};
//Particles Constructor
var particles = new Array();
var Particle = function (pathRadius, particleRadius) {
this.pathRadius = Math.round(Math.random() * 500);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
body{
margin: 0;
padding: 0;
overflow: hidden;
}
canvas {
width: 100%;
height: 100vh;
overflow: hidden;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: