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.


Auto Save

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.


                <!DOCTYPE html>
<html lang='en'>

  <meta charset='utf-8'>
  <meta name='author' content='Lucky'>
  <meta name="viewport" content="width=device-width, initial-scale=1">


  <canvas id="elCanvas" width="500" height="500"></canvas>





                function el_animation(el){
  var flameColors = [ '#fc1f1f','#fc971f', '#fffccc'];
  var flame_data=[
    'M311.2,36.3c0,0,170.3,238.3,182,309.4  c-19.3,60.3-65.4,172-186.9,218c-41.1-14.2-161-80.9-199.5-217.3c39.3-83.7,83.9-171.1,83.9-171.1l26,85.4L311.2,36.3z',
    'M306.3,563.7c119.5-45.3,166.1-154.1,186-215l-109.9,75.2l-139.8-20.1l-95.4-59.4L186,184.4   c-12.4,24.5-47.5,94.4-79.2,162C145.3,482.9,265.2,549.5,306.3,563.7z',
  var gr_a = el.ctx.createLinearGradient(0,800, 0,  00);
      gr_a.addColorStop(0.27, '#FA7E04');
      gr_a.addColorStop(0.63, '#F6540B');
      gr_a.addColorStop(1, '#F03011');
  var gr_b = el.ctx.createLinearGradient(0,350, 0,  00);
      gr_b.addColorStop(0, '#CD4605');
      gr_b.addColorStop(1, '#BC0819');
  var gr_c = el.ctx.createLinearGradient(0,700, 0,  00);
      gr_c.addColorStop(0, '#E6A70A');
      gr_c.addColorStop(0.25, '#ED8701');
      gr_c.addColorStop(0.40, '#B91E05');
      gr_c.addColorStop(1, '#000000');
  var flame = el.rect({x:0,y:-50,scaleX:0.5,scaleY:0.5,width:400,height:540,debug:0,null:true,transformOrigin:'50% 90%'})
  var flame_out = el.svg({x:-100,y:-30,parent:flame,points:flame_data[0], style:{fillStyle:gr_a}}),
      flame_dark = el.svg({x:-100,y:-30,parent:flame,points:flame_data[3],style:{fillStyle:gr_b}}),
      flame_bit = el.svg({x:-100,y:-30,parent:flame,points:flame_data[2], style:{fillStyle:'#fde31d'}}),
      flame_front = el.svg({x:-100,y:-30,parent:flame,points:flame_data[1],opacity:0.39, style:{fillStyle:gr_c}})

  var lineData = flame_data[0]
  var vector_visual = el.svg({x:-100,y:-25,parent:flame,points:lineData,style:{fillStyle:"",lineCap:'round',strokeStyle:'black',lineWidth:10,setLineDash:'18.399, 590.703'}})

function makeFakeSVG(){
  var svg = document.createElementNS("",'svg');'500px'
  var tempSVG =document.createElementNS("", 'path');
  tempSVG.setAttributeNS(null, 'd', lineData);
  tempSVG.setAttributeNS(null, 'stroke', 'red');
  return tempSVG;
var myFakeSVG = new makeFakeSVG();

  function getStroke(target){ =[px]/g,''); = parseInt(;
  var bot_message_tl= new TimelineMax({onUpdate:el.update})
  .fromTo(myFakeSVG, 3, {drawSVG:"100%"}, {drawSVG:"0% 00%",onUpdate:getStroke ,ease:Power2.easeInOut,yoyo:true,repeat:-1}, 0.1)

  return bot_message_tl;
canvas_container = document.getElementById('elCanvas');

  // setup canvas information
  /* create a el_canvas reference, which has the same properties as a canvas
  but allows chaining and has extra properties to help speed up drawing */
  this.el = new elCanvas(canvas_container);
  var test_tl = new el_animation(this.el);