Fix graphical artifacts in Chrome
parent
e619f22217
commit
f15913a383
|
@ -8,7 +8,7 @@
|
|||
<body>
|
||||
<div id="background-animation"></div>
|
||||
<div id="foreground-contents">
|
||||
<a href="https://98.js.org/" target="_blank">
|
||||
<a href="https://98.js.org/" target="_blank" id="os-logo-link">
|
||||
<img src="../images/98.js.org.svg" alt="98.js.org" id="os-logo" height="100">
|
||||
</a>
|
||||
<br>
|
||||
|
|
|
@ -32,6 +32,9 @@ body {
|
|||
margin-top: 10px;
|
||||
overflow: auto;
|
||||
}
|
||||
#os-logo-link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #0000CC;
|
||||
|
|
|
@ -44,7 +44,11 @@ var animate = function () {
|
|||
if(something_img.complete && something_img.naturalWidth > 1){
|
||||
let t = now / 5000;
|
||||
ctx.globalAlpha = 0.3 + Math.max(0, Math.sin(-t) * 1);
|
||||
ctx.drawImage(something_img, Math.sin(-t) * canvas.width * 0.7, Math.cos(-t) * 70);
|
||||
ctx.drawImage(
|
||||
something_img,
|
||||
~~(Math.sin(-t) * canvas.width * 0.7),
|
||||
~~(Math.cos(-t) * 70)
|
||||
);
|
||||
ctx.globalAlpha = 1;
|
||||
}
|
||||
ctx.globalCompositeOperation = "screen";
|
||||
|
|
Loading…
Reference in New Issue