Money Over Everything
How do I make an money over everything?
Move the mouse to let them follow their desire! (paper.js experiment). What is a money over everything? How do you make a money over everything? This script and codes were developed by Moklick on 20 November 2022, Sunday.
Money Over Everything - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Money Over Everything</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ *{ margin:0; padding:0;
}
body{ cursor:none; background: #f2f9fe; background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#f2f9fe), color-stop(100%,#d6f0fd)); background: -webkit-radial-gradient(center, ellipse cover, #f2f9fe 0%,#d6f0fd 100%); background: radial-gradient(ellipse at center, #f2f9fe 0%,#d6f0fd 100%);
}
canvas{ display:block;
}
#money{ position:absolute; font-size:60px; font-family:sans-serif; font-weight:bold; color:gold; left:50%; top:40%; text-shadow:0 5px 3px rgba(0,0,0,0.5); animation:breeze 1s infinite ease;
}
@keyframes breeze{ 0% { font-size:60px;} 50% { font-size:70px;} 100% { font-size:60px;}
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <canvas id="canvas" resize></canvas>
<div id="money">$</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.22/paper.js'></script> <script src="js/index.js"></script>
</body>
</html>
Money Over Everything - Script Codes CSS Codes
*{ margin:0; padding:0;
}
body{ cursor:none; background: #f2f9fe; background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#f2f9fe), color-stop(100%,#d6f0fd)); background: -webkit-radial-gradient(center, ellipse cover, #f2f9fe 0%,#d6f0fd 100%); background: radial-gradient(ellipse at center, #f2f9fe 0%,#d6f0fd 100%);
}
canvas{ display:block;
}
#money{ position:absolute; font-size:60px; font-family:sans-serif; font-weight:bold; color:gold; left:50%; top:40%; text-shadow:0 5px 3px rgba(0,0,0,0.5); animation:breeze 1s infinite ease;
}
@keyframes breeze{ 0% { font-size:60px;} 50% { font-size:70px;} 100% { font-size:60px;}
}
Money Over Everything - Script Codes JS Codes
paper.install(window); window.onload = function() { var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); var left_hand = new Image(); left_hand.src = 'http://projects.moritzklack.com/img/m-o-e/left_hand.png'; var right_hand = new Image(); right_hand.src = 'http://projects.moritzklack.com/img/m-o-e/right_hand.png'; var money; var moneySign = document.getElementById('money'); Hand = Raster; Hand.prototype.velocity = new Point(0,0); Hand.prototype.acceleration = new Point(0,0); Hand.prototype.mass; Hand.prototype.limit; Hand.prototype.angle = 0; Hand.prototype.applyPowerOfMoney = function(money_power){ var money_power = new Point(money_power.x/this.mass, money_power.y/this.mass); this.acceleration = this.acceleration.add(money_power); } Hand.prototype.update = function(money,delta){ this.velocity = this.velocity.add(this.acceleration); if(magnitude(this.velocity) > this.limit) { this.velocity = this.velocity.normalize(); this.velocity = this.velocity.multiply(this.limit); } this.position = this.position.add(this.velocity); this.position = this.position.add(new Point(random(.2, 1), random(.2, 1))); this.acceleration = this.acceleration.multiply(0); this.image = this.position.x < money.x ? this.image = left_hand : this.image = right_hand; var deltaX = this.position.x - money.x; var deltaY = this.position.y - money.y; var angleDegrees = Math.atan2(deltaY, deltaX) * 180 / Math.PI; angleDegrees = this.position.x < money.x ? angleDegrees - 180 : angleDegrees; this.rotate(-this.angle); this.angle = angleDegrees; this.rotate(this.angle); } Money = Point; Money.prototype.mass = 40; Money.prototype.getItNow = function(hand){ var force = new Point(this.x,this.y); force = force.subtract(hand.position); var distance = magnitude(force); distance = scale(distance,10,20); force = force.normalize(); var strength = (2 * this.mass * hand.mass) / (distance * distance); force = force.multiply(strength); return force; } paper.setup(canvas); var money = new Money(canvas.width*.5,canvas.height*.5); document.onmousemove = function(e){ money.x = e.pageX; money.y = e.pageY; moneySign.style.top = money.y - 30 + 'px'; moneySign.style.left = money.x - 5 + 'px'; } left_hand.onload = function(){ for(var i = 0; i < 50; i++){ var hand = new Hand(left_hand); hand.position = new Point(Math.random()*canvas.width,Math.random()*canvas.height); hand.scale(random(.3,.8)); hand.limit = random(5,6); hand.mass = random(10,12); } view.onFrame = function(event) { var hands = project.activeLayer.children; for(var j = 0; j < hands.length; j++){ hands[j].update(money,event.delta); var money_power = money.getItNow(hands[j]); hands[j].applyPowerOfMoney(money_power); } } } random = function(a,b){ return Math.random() * (b - a) + a; } magnitude = function(vector){ return Math.sqrt(vector.x * vector.x + vector.y * vector.y); } scale = function(value,min,max){ if(value < min){ value = min; } if(value > max){ value = max; } return value; }
}
![Money Over Everything - Script Codes](http://shots.codepen.io/moklick/pen/tDmcs-512.jpg)
Developer | Moklick |
Username | moklick |
Uploaded | November 20, 2022 |
Rating | 4 |
Size | 3,392 Kb |
Views | 20,240 |
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 |
CCTV Everywhere | 3,723 Kb |
Random Skyline | 2,353 Kb |
Hitman Loading Sequence pure css3 | 3,402 Kb |
Codepen Inception | 1,384 Kb |
CSS Text-FX | 2,096 Kb |
Damn Particlez | 2,805 Kb |
Berlin Building Map | 2,477 Kb |
Zeichensatz | 2,058 Kb |
CSS Map FX | 2,335 Kb |
... is watching you | 2,423 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 |
Learning FlexBox | Alex_rodrigues | 2,821 Kb |
A Pen by Huan Nghiem | Nightshade | 10,646 Kb |
WRENCH - STAFF | Lolita-adams | 1,608 Kb |
Placeholder support for contentEditable elements, without JavaScript | Flesler | 1,863 Kb |
Gulpfile | Aimhigherwebdesign-amy | 1,765 Kb |
Smoke Shader - Frame Buffer | Omarshe7ta | 2,672 Kb |
Nav Test -- cats 1 | Payls | 4,735 Kb |
JQuery Validate checkbox group | Lunaman | 2,466 Kb |
RRC wrapSwitch | Pshrmn | 2,922 Kb |
RWD Conversion Practice | Jxqr97 | 2,743 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!