Toggle navigation
Sign Up
Log In
Explore
Works
Folders
Tools
Collections
Artists
Groups
Groups
Topics
Tasks
Tasks
Jobs
Teams
Jobs
Recommendation
More Effects...
JS
var $c = $(".c"), $wrap = $(".wrap"), w = window.innerWidth, h = window.innerHeight; function random(min, max){ return (Math.random() * (max - min)) + min; } $c.each(function(i){ var x = random(0, w), y = random(0, h), z = random(-1000, -200), color = "hsla("+i * 1.8+", 50%, 50%, 1)", size = random(2, 30), c = $(this); c.css({ background: color, height: size, width: size, borderRadius: "50%", boxShadow: "0 0 "+size+"px " + color }) TweenMax.fromTo(c, 3, { opacity: 0, x: x, y: y, z: z }, { opacity: 1, z: 500, repeat: -1, delay: i * -.015 }); }); function touches(e){ var x = e.touches ? e.touches[0].clientX : e.clientX, y = e.touches ? e.touches[0].clientY : e.clientY; TweenMax.to($wrap, 1, { webkitPerspectiveOrigin: x + "px " + y +"px", perspectiveOrigin: x + "px " + y +"px" }); } window.addEventListener("mousemove", touches); window.addEventListener("touchstart", touches); window.addEventListener("touchmove", touches);
CSS
html, body { height: 100%; } body { background: black; overflow: hidden; } .wrap { height: 100%; perspective: 200px; transform-style: preserve-3d; } .c { position: absolute; }
HTML
Join Effecthub.com
Working with Global Gaming Artists and Developers!
Login
Sign Up
Or Login with Your Email Address:
Email
Password
Remember
Or Sign Up with Your Email Address:
Your Email
This field must contain a valid email
Set Password
Password should be at least 1 character
Stay informed via email