Skip to content

Instantly share code, notes, and snippets.

@mcanthony
Created October 25, 2015 01:20
Show Gist options
  • Save mcanthony/35e8ac63571cbd5208f4 to your computer and use it in GitHub Desktop.
Save mcanthony/35e8ac63571cbd5208f4 to your computer and use it in GitHub Desktop.

Revisions

  1. Michael Anthony created this gist Oct 25, 2015.
    7 changes: 7 additions & 0 deletions Rosette Generator.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    Rosette Generator
    -----------------
    ReactJS + SVG === fun. At least for me anyway.

    A [Pen](http://codepen.io/SethDavenport/pen/bdyNEB) by [Seth Davenport](http://codepen.io/SethDavenport) on [CodePen](http://codepen.io/).

    [License](http://codepen.io/SethDavenport/pen/bdyNEB/license).
    1 change: 1 addition & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    <div id="rosette"></div>
    7 changes: 7 additions & 0 deletions script.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    // Cheating a bit: it's all a big blob of JS and CSS in S3 right now because that's how I set it up before I joined codepen.

    // Each SVG (path or circle) has a class name generated from it's position relative to the others, which is what enables the SASS code to work.

    // Go here to see the actual code: https://github.com/SethDavenport/visualizations

    // Thanks to https://github.com/mattmischuk for his help with the slidey menu.
    1 change: 1 addition & 0 deletions scripts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    <script src="https://s3.amazonaws.com/generative-art/rosette-generator-bundle.js"></script>
    10 changes: 10 additions & 0 deletions style.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    .rosette__cell {
    &:nth-of-type(even) {
    fill: Lavender;
    transition: cx 2s, cy 2s, opacity 0.5s ease-in-out;
    }

    &:hover {
    opacity: 0.2;
    }
    }