Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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.


                <div class="animation-object" id="js-animation-object"></div>

<svg version="1.1" id="Layer_1" xmlns="" xmlns:xlink="" x="0px" y="0px"
	 width="1000px" height="1000px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">

<path id="js-animation-path" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" d="M55.5,190c-8.836-76.768,46.232-146.164,123-155


  width: 0px;
  height: 0px;
  border: 10px solid transparent;
  border-left-color: #4ECDC4;
  position: absolute;
  margin-top: -10px;
  margin-left: -10px;
  background-image: 	linear-gradient(transparent 50%, rgba(255,255,255,.55) 50%);
	background-size:  10px;
	background-position: 0 10px



// get the animation path node
var $path = $('#js-animation-path'), path = $path[0];
// get the animation object node
var $obj = $('#js-animation-object');

// get path's length
var pathLength = path.getTotalLength();

// create new tween by initializing TWEEN.Tween object from 0 
var tween = new TWEEN.Tween({ length: 0  })
    // to path length
    // in 2000 milliseconds
    .to({ length: pathLength }, 4000)
    // on update callback fires on every tick
      // get current point
      var point = path.getPointAtLength(this.length);
      // get previous point
      var pointPrevious = path.getPointAtLength(this.length-1);
      // get x1
      var x1 = point.y - pointPrevious.y;
      // get x2
      var x2 = point.x - pointPrevious.x;
      //get angle in radians and convert it to degrees
      var angle = Math.atan(x1/x2)*(180/Math.PI);
      // fix to normalize object angle
      if (point.x-pointPrevious.x < 0){
        angle = 180 + angle;
        'transform': 'translate('+ point.x + 'px,'+ point.y +'px) rotate('+angle+'deg)'

// animate loop
animate = function(){
//start the animation loop