Skip to content

Instantly share code, notes, and snippets.

@Grawl
Created October 31, 2022 05:07

Revisions

  1. Grawl created this gist Oct 31, 2022.
    25 changes: 25 additions & 0 deletions input.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    @for $i from 1 through 300 {
    $z: (random(360) * 1deg); // random angle to rotateZ
    $y: (random(360) * 1deg); // random to rotateX
    $hue: ((40/300 * $i) + 0); // set hue
    $orb-size: 100px;
    $time: 1s;

    circle:nth-child(#{$i}){ // grab the nth particle
    animation: orbit#{$i} $time infinite;
    animation-delay: ($i * .01s);
    fill: hsla($hue, 100%, 50%, 1);
    }

    @keyframes orbit#{$i}{
    10% {
    transform: rotateZ(-$z) rotateY($y) translateX($orb-size) rotateZ($z);
    }
    80% {
    transform: rotateZ(-$z) rotateY($y) translateX($orb-size) rotateZ($z);
    }
    100% {
    transform: rotateZ(-$z) rotateY($y) translateX( ($orb-size) ) rotateZ($z);
    }
    }
    }
    5,100 changes: 5,100 additions & 0 deletions output.css
    5,100 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    9 changes: 9 additions & 0 deletions settings.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    {
    "sass": {
    "compiler": "dart-sass/1.32.12",
    "extensions": {},
    "syntax": "SCSS",
    "outputStyle": "expanded"
    },
    "autoprefixer": true
    }