Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <link href="|Maven+Pro:900|Source+Sans+Pro:900" rel="stylesheet">
<link href="|Montserrat:900" rel="stylesheet">
 <script src=""></script>
 <script src=""></script>
<video playsinline autoplay loop muted  poster="" id="bgvid">
    <source src="" type="video/mp4">
  <div id="container" class="svg-container"></div>



html {
  box-sizing: border-box;
*, *:before, *:after {
  box-sizing: inherit;

body {
  color: #FFA847;
/*   font-family: 'Montserrat', sans-serif; */
/*   font-family: 'Modak', cursive; */
  font-family: 'Maven Pro', sans-serif;
  font-size: 90px;
  width: 100vw;
  margin: auto;

video#bgvid { 
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    -ms-transform: translateX(-50%) translateY(-50%);
    -moz-transform: translateX(-50%) translateY(-50%);
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    background: url(polina.jpg) no-repeat;
    background-size: cover; 

#container {
/*      position: relative; */
   width: 100vw;
  height: 75vh;
  margin-top: 0;

.svg-container {
   background-color: rgba(79, 0, 16, .1);
    display: inline-block;
/*     position: relative; */
    width: 100%;
    vertical-align: top;
    overflow: hidden;



                var vid = document.getElementById("bgvid");
vid.playbackRate = 0.5;
// console.log(vid.duration)
let margin = {top: 0, bottom: 0, left: 0, right:50}

let width = 960-margin.left-margin.right;
let height =;

let offset = [width*.33, width*.66]
let circleSize = 150;

// let lineData = [
//   { "x": 0,"y": height/2+circleSize},
//   { "x": offset[1]-offset[0] ,  "y": height/2+(circleSize*2)},
//   { "x": width,  "y": height/2+circleSize}
// ]

let lineData = [
  { "x": 0,"y":900},
  { "x": offset[0] ,  "y": 600},
  { "x": offset[1],  "y": 600},
  { "x": width,  "y": 900}

var xScale = d3.scaleLinear().range([25, width-25])

var yScale = d3.scaleLinear().range([height-50,50])

  xScale.domain(d3.extent(lineData, function(d) { return d.x; }));
  yScale.domain([0, d3.max(lineData, function(d,i) { return d.y*i; })]);

// var tau = 2 * Math.PI; //

var lineFunction = d3.line()
.x(function(d) { return d.x; })
.y(function(d, i) { return d.y; })
// .curve(d3.curveBasisClosed)

// var arc = d3.arc()
//     .innerRadius(280)
//     .outerRadius(240)
//     .startAngle(90);

var graph ="div#container")
  .attr("preserveAspectRatio", "xMinYMin meet")
  .attr("viewBox", "0 0 960 800")
  .classed("playground", true)

let path = graph.append("path")
  .attr("d", lineFunction(lineData))
  .attr("stroke", "rgba(165, 102, 139, 0)")
  .attr("stroke-width", 4)
 .attr("id", "wavy") //Unique id of the path
  .attr("fill", "none");

	.style("stroke", "rgba(225, 227, 224, .1)")
  .style("fill", "transparent")
  .style("font-size", "250px")
  .attr("dy", ".5em")
  .attr("dx", ".15em")
  // .attr("transform", "translate(100,-10) rotate(-29)")
  .attr("transform", "translate(-10, -150)")
  .attr("x", width/2)
 .append("textPath") //append a textPath to the text element
    .attr("xlink:href", "#wavy") //place the ID of the path here
    .style("text-anchor","middle") //place the text halfway on the arc
  // .attr("transform", "translate(400,150) rotate(0)")
   .style("filter", "url(#drop-shadow)")

var defs = graph.append("defs");

// create filter with id #drop-shadow
// height=130% so that the shadow is not clipped
var filter = defs.append("filter")
    .attr("id", "drop-shadow")
    .attr("height", "130%");

// SourceAlpha refers to opacity of graphic that this filter will be applied to
// convolve that with a Gaussian with standard deviation 3 and store result
// in blur
    .attr("in", "SourceAlpha")
    .attr("stdDeviation", 5)
    .attr("result", "blur");

// translate output of Gaussian blur to the right and downwards with 2px
// store result in offsetBlur
    .attr("in", "blur")
    .attr("dx", 5)
    .attr("dy", 5)
    .attr("result", "offsetBlur");

// overlay original SourceGraphic over translated blurred opacity by using
// feMerge filter. Order of specifying inputs is important!
var feMerge = filter.append("feMerge");

    .attr("in", "offsetBlur")
    .attr("in", "SourceGraphic");

function repeat(){
  var p = d3.transition()
  // .ease(d3.easePolyInOut);

  // .style("font-size", "340px")
  .styleTween("fill", function() {
  return d3.interpolateRgb("rgba(225, 227, 224, .001)", "rgba(245, 247, 241, .06)"  );
  // .attr("transform", "translate(20,-400) ")
  // .attr("textLength","1200")
  .attr("transform", "translate(120, -550) rotate(9) ")
  // .attr("transform", "translate(100, -500) rotate(9)")
      .attr("opacity", 0)
      // .attr("transform", "translate(-200,400) rotate(-9)")
      .attr("transform", "translate(-200,550)")
      // .style("font-size", "300px")
	// .style("fill", "rgba(225, 227, 224, .1)")
      .attr("opacity", 1)
   .on("end", repeat);