File tree 2 files changed +1
-7
lines changed
2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,12 @@ svg.logo {
16
16
animation-duration : 1.5s ;
17
17
18
18
g #starfield circle {
19
- // Reference for how to calculate a random x/y from some index goes to https://medium.com/hypersphere-codes/randomness-in-css-b55a0845c8dd
20
- // Specifically these numbers are derived from https://codepen.io/hypersphere/pen/poVwwxK
21
- // They seem to work well, and seem to be 'magic', so I left them.
22
-
23
- // x
24
19
@include primeRandom (" x" );
25
20
cx : calc (var (--x ) * var (--viewbox-width ));
26
21
27
- // y
28
22
@include primeRandom (" y" );
29
23
cy : calc (var (--y ) * var (--viewbox-height ));
30
24
31
- // r
32
25
@include primeRandom (" r" );
33
26
r : calc (var (--r ) * var (--star-max-radius ));
34
27
}
Original file line number Diff line number Diff line change 63
63
inherits : true
64
64
}
65
65
66
+ // Reference for how to calculate a random val from some seed/index goes to https://medium.com/hypersphere-codes/randomness-in-css-b55a0845c8dd
66
67
@mixin primeRandom ($property ) {
67
68
-- #{$property } -floating : calc (var (--random-seed ) * var (--index ) * #{random ()} + var (--index ) * var (--index ) * #{random ()} * var (--random-seed ) * var (--random-seed ));
68
69
-- #{$property } -floor : calc (var (--#{$property}-floating ) - 0.5 );
You can’t perform that action at this time.
0 commit comments