1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

red godrays

This commit is contained in:
muerwre 2019-06-14 06:16:35 +07:00
parent 237d16c722
commit 6bcdac830b
3 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
//background: url('../../../sprites/splotchy.svg'); //background: url('../../../sprites/splotchy.svg');
background-size: cover; // background-size: cover;
//@include outer_shadow(); //@include outer_shadow();
} }

View file

@ -40,22 +40,22 @@ export class GodRays extends React.Component<IGodRaysProps> {
rays.map(({ angle, iterator, weight, speed, pulsar, opacity }, index) => { rays.map(({ angle, iterator, weight, speed, pulsar, opacity }, index) => {
const gradient = ctx.createLinearGradient(0, 0, 0, height * 1.3); const gradient = ctx.createLinearGradient(0, 0, 0, height * 1.3);
gradient.addColorStop(0.2, `rgba(255, 255, 255, ${opacity * 0.1})`); gradient.addColorStop(0.2, `rgba(255, 60, 40, ${opacity * 0.1})`);
gradient.addColorStop(1, `rgba(255, 255, 255, 0)`); gradient.addColorStop(1, `rgba(255, 60, 40, 0)`);
const gradient2 = ctx.createLinearGradient(0, 0, 0, height * 1.3); const gradient2 = ctx.createLinearGradient(0, 0, 0, height * 1.3);
gradient2.addColorStop(0.2, `rgba(255, 255, 255, ${opacity * 0.2})`); gradient2.addColorStop(0.2, `rgba(255, 40, 100, ${opacity * 0.2})`);
gradient2.addColorStop(1, "rgba(255, 255, 255, 0)"); gradient2.addColorStop(1, "rgba(255, 40, 100, 0)");
ctx.save(); ctx.save();
ctx.translate(width / 2, -600); ctx.translate(width / 2, -900);
ctx.rotate(angle); ctx.rotate(angle);
ctx.translate(-width / 2, 600); ctx.translate(-width / 2, 900);
ctx.beginPath(); ctx.beginPath();
ctx.fillStyle = gradient; ctx.fillStyle = gradient;
ctx.moveTo(((width / 2) - (weight / 2)), -600); ctx.moveTo(((width / 2) - (weight / 2)), -900);
ctx.lineTo(((width / 2) + (weight / 2)), -600); ctx.lineTo(((width / 2) + (weight / 2)), -900);
ctx.lineTo(((width / 2) + (weight / 2 + 300)), height * 1.4); ctx.lineTo(((width / 2) + (weight / 2 + 300)), height * 1.4);
ctx.lineTo(((width / 2) - (weight / 2 + 300)), height * 1.4); ctx.lineTo(((width / 2) - (weight / 2 + 300)), height * 1.4);
ctx.fill(); ctx.fill();
@ -63,8 +63,8 @@ export class GodRays extends React.Component<IGodRaysProps> {
ctx.beginPath(); ctx.beginPath();
ctx.fillStyle = gradient2; ctx.fillStyle = gradient2;
ctx.moveTo(((width / 2) - (weight / 6)), -600); ctx.moveTo(((width / 2) - (weight / 6)), -900);
ctx.lineTo(((width / 2) + (weight / 6)), -600); ctx.lineTo(((width / 2) + (weight / 6)), -900);
ctx.lineTo(((width / 2) + (weight / 6 + 50)), height * 1.4); ctx.lineTo(((width / 2) + (weight / 6 + 50)), height * 1.4);
ctx.lineTo(((width / 2) - (weight / 6 + 250)), height * 1.4); ctx.lineTo(((width / 2) - (weight / 6 + 250)), height * 1.4);
ctx.fill(); ctx.fill();

View file

@ -24,7 +24,7 @@
display: flex; display: flex;
align-items: stretch; align-items: stretch;
justify-content: stretch; justify-content: stretch;
background: rgba(0,0,0,0.1); // background: rgba(0,0,0,0.1);
@include outer_shadow(); // @include outer_shadow();
} }