css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <script src="//code.jquery.com/jquery-1.10.2.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script src="//snapsvg.io/assets/js/snap.svg-min.js"></script>

<div id="templatediv" style="position:fixed;top:15vh;left:0px;width:75%;height:75vh;z-index:0;text-align:left;border:thin solid white;">
  <div id="msgdiv" class="msgdiv">Click the snowboarder!
<br>  walkthrough: <a href="http://wildwebwidget.com/user-drawn-motion-paths-with-snapsvg/" target="_blank">More explanation</a>
<br> Full demo: <a href="http://www.genolve.com/svg/en/christmas.php" target="_blank">Genolve Christmas card<br>
<img src="http://www.genolve.com/svg/imgt/christmas.jpg" width="183" height="152" ></a></div>
<!-- TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE -->
<svg version="1.1" id="templatesvg"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  xmlns:ns1="http://sozi.baierouge.fr" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  width="100%" height="100%"	 viewBox="0 0 261 338"  xml:space="preserve">

<g id="scene" >
<linearGradient id="rect3976_1_" gradientUnits="objectBoundingBox" x1="0%" y1="6%" x2="10%" y2="100%" >
<stop  offset=".3" style="stop-color:#0BA2FF;stop-opacity:0.9922"/>
<stop  offset=".4" style="stop-color:#F8FCFF"/>
<stop  offset="1" style="stop-color:#FFF"/>
</linearGradient>
<rect id="rect3976"  fill="url(#rect3976_1_)" x="-500" y="0" width="10000" height="100%"/>	
<linearGradient id="path3050_1_" gradientUnits="objectBoundingBox" x1="286.4497" y1="628.2783" x2="361.7299" y2="65.4068" >
	<stop  offset="0" style="stop-color:#3D85A5"/>
	<stop  offset="0.7174" style="stop-color:#97D9EF"/>
	<stop  offset="1" style="stop-color:#E8F6FC"/>
</linearGradient>
<path id="path3050" fill="url(#path3050_1_)" d="M-570.202,38.286c-93.629,0.459-173.577,15.228-275.337,37.019v404.447
	L1179.077,590.63V189.604c-245.502,19.271-537.909,132.404-894.917,29.438C-186.222,83.354-400.691,37.422-570.187,38.28
	L-570.202,38.286z"/>

<!-- snowboard -->
<g id="snowboard" transform="matrix(.1 0 0 .1 -85.03 50.47)" >
 <g id="snowboardsubnode"  >
 </g>
</g>

<!-- tree -->
<g id="christmastree" transform="scale(.5)">
<linearGradient id="path17106_1_" gradientUnits="userSpaceOnUse" x1="1641.5313" y1="647.1719" x2="1670.731" y2="647.1719" gradientTransform="matrix(2.9399 -0.1488 -0.1112 -2.1971 -4496.4658 2306.6851)">
	<stop  offset="0" style="stop-color:#493A15"/>
	<stop  offset="1" style="stop-color:#2E2311"/>
</linearGradient>
<path id="path17106" fill="url(#path17106_1_)" d="M247.447,672.632 l8.33-70.273l86.334,0.352l7.254,71.309L247.447,672.632z"/>
<radialGradient id="shady" cx="50%" cy="50%" r="50%"  gradientUnits="objectBoundingBox">
	<stop  offset="0" style="stop-color:#358AA8"/>
	<stop  offset="1" style="stop-color:#A3DCE8"/>
</radialGradient>
<radialGradient id="slimshady" cx="50%" cy="50%" r="50%" gradientUnits="objectBoundingBox">
	<stop  offset="0" style="stop-color:#4B9AD4;stop-opacity:0.9922"/>
	<stop  offset="1" style="stop-color:#F7FCFE"/>
</radialGradient>
<path id="path17219" fill="url(#shady)" stroke="url(#slimshady)" stroke-width="0.9492" d="
	M377.146,553.812c13.059,35.418,65.41,47.266,69.508,82.441c1.125,9.648-4.309,21.895-13.387,26.121
	c-19.914,9.266-39.961,4.875-64.875-13.434c-27.781-20.418-34.852-4.887-50.875-20.035c-10.625-10.043-59.676,6.789-76.004,5.703
	c-22.014-1.461-67.037,42.125-80.568-21.48c-3.006-14.133,89.182-55.996,135.955-99.699L377.146,553.812z"/>
<path id="path4122" fill="url(#shady)" stroke="url(#slimshady)" stroke-width="1.0645" d="
	M410.213,514.616c14.371,40.48,70.117,86.859,64.219,114.66c-2.406,11.359-12.18,32.719-27,22.355
	c-96.625-67.559-105.313-29.094-131.352-6.488c-36.707,31.863-41.471,15.766-53.271-15.867c-5.814-15.578-21.887-13.586-27.73-9.375
	c-38.91,28.035-132.646,35.586-62.758-37.5c42.16-44.086,98.131-63.992,149.596-113.938L410.213,514.616z"/>
<path id="path4124" fill="url(#shady)" stroke="url(#slimshady)" stroke-width="1.0645" d="
	M285.439,382.647c-13.145,41.098-67.637,95.418-93.408,121.148c-29.852,29.809-7.957,55.402,42.326,34.617
	c26.424-10.926,47.512-52.391,78.082-15.867c18.738,22.387,39.695,63.301,67.137,14.426c7.813-13.918,18.762-19.195,36.488-3.609
	c34.273,30.137,41.707,5.105,27.727-18.027c-22.461-37.18-48.715-67.754-68.594-103.844L285.439,382.647z"/>
<path id="path4126" fill="url(#shady)" stroke="url(#slimshady)" stroke-width="1.0645" d="
	M298.564,327.12l-36.521,89.121c-13.746,33.539-1.412,60.004,25.576,42.125c21.555-14.277,31.531-52.996,77.355-21.637
	c35.973,24.621,69.297,24.492,48.16-19.648c-6.582-13.746-21.547-20.926-30.004-33.182c-14.855-21.523-22.93-48.281-35.672-69.762
	L298.564,327.12z"/>
<path id="path4128" fill="url(#shady)" stroke="url(#slimshady)" stroke-width="1.0645" d="
	M316.084,240.585c-11.238,31.379-24.67,63.709-52.541,80.766c-22.611,13.838-18.059,62.525,21.893,20.193
	c5.566-5.898,9.887-13.424,15.324-5.049c13.305,20.48,25.391,23.924,47.434,2.164c9.898-9.771,17.566-2.447,27.73,6.49
	c40.223,35.361,60.328-1.41,19.703-25.24c-18.719-10.977-29.297-22.99-34.297-41.104l-10.945-39.662
	c-4.656-16.865-21.523-34.221-34.297,1.443L316.084,240.585z"/>
<path id="path4130" fill="url(#shady)" stroke="url(#slimshady)" stroke-width="1.0645" d="
	M322.15,124.319c1.391-9.117,5.527-4.727,6.969,0c12.445,40.816,16.961,88.66,44.633,116.006
	c11.922,11.777,26.156,61.451-20.898,22.18c-33.012-27.553-39.898-16.631-48.504-6.119c-24.385,29.789-30.734-3.783-20.898-15.297
	c14.371-16.818,24.73-25.189,30.961-66.035L322.15,124.319z"/>
</g>

<!-- hiddenslot -->
<g id="hiddenslot" transform="matrix(.15 0 0 .15 10 -510)" >
 <g id="hiddenslotsubnode"  >
 


<g id="handwave"  ><!--defs-->
  <g  id="group_hw_1" transform="translate(9,-15), scale(0.35)" ><!--s1-->
  <path  d="m198,100 c-18,0 -34,13 -34,32 a14 14 0 0 0 0,0 l1,200 -17,-44 a14 14 0 0 0 -2,-3 c-7,-9 -15,-15 -25,-16 -9,-2 -17,1 -24,2 -11,3 -17,12 -20,21 -2,8 -2,17 1,26 h-0 l37,128 a14 14 0 0 0 1,3 l62,109 15,50 a14 14 0 0 0 13,10 l142,-1 a14 14 0 0 0 13,-11 l39,-185 a14 14 0 0 0 0,-1 c2,-12 1,-32 1,-53 -0,-10 -1,-21 -1,-29 -0,-8 -0,-15 -0,-14 a14 14 0 0 0 0,-1 v-62 a14 14 0 0 0 -0,-3 c-2,-8 -4,-15 -9,-21 -5,-6 -14,-9 -22,-9 v-0 c-0,0 -1,0 -1,0 -0,0 -1,-0 -1,0 v0 c-6,0 -11,2 -16,5 v-4 c0,-18 -17,-32 -34,-32 h-0 c-10,0 -20,4 -26,12 v-19 c0,-18 -17,-32 -34,-32 -9,0 -17,3 -24,9 v-36 c-0,-18 -16,-32 -34,-32 z  " id="shape_fv6b_1" fill="#CCCCCC" >
  </path> <!--s2-->
  <path  d="m204,89 c-18,0 -34,13 -34,32 a14 14 0 0 0 0,0 l1,200 -17,-44 a14 14 0 0 0 -2,-3 c-7,-9 -15,-15 -25,-16 -9,-2 -17,1 -24,2 -11,3 -17,12 -20,21 -2,8 -2,17 1,26 h-0 l37,128 a14 14 0 0 0 1,3 l62,109 15,50 a14 14 0 0 0 13,10 l142,-1 a14 14 0 0 0 13,-11 l39,-185 a14 14 0 0 0 0,-1 c2,-12 1,-32 1,-53 -0,-10 -1,-21 -1,-29 -0,-8 -0,-15 -0,-14 a14 14 0 0 0 0,-1 v-62 a14 14 0 0 0 -0,-3 c-2,-8 -4,-15 -9,-21 -5,-6 -14,-9 -22,-9 v-0 c-0,0 -1,0 -1,0 -0,0 -1,-0 -1,0 v0 c-6,0 -11,2 -16,5 v-4 c0,-18 -17,-32 -34,-32 h-0 c-10,0 -20,4 -26,12 v-19 c0,-18 -17,-32 -34,-32 -9,0 -17,3 -24,9 v-36 c-0,-18 -16,-32 -34,-32 z  " id="shape_fv6b_2" fill="#999999" >
  </path> 
    <g  id="group_qbhw_2" transform="translate(-5,16)" ><!--s3-->
    <path  d="m220,69 c-17,0 -33,13 -33,31 a14 14 0 0 0 0,0 l1,195 -17,-43 a14 14 0 0 0 -2,-3 c-7,-9 -15,-15 -24,-16 -9,-1 -16,1 -23,2 -11,3 -17,12 -19,20 -2,8 -2,17 1,26 h-0 l36,126 a14 14 0 0 0 1,3 l60,107 15,49 a14 14 0 0 0 13,10 l138,-1 a14 14 0 0 0 13,-11 l38,-181 a14 14 0 0 0 0,-1 c2,-12 1,-32 1,-52 -0,-10 -1,-20 -1,-28 s-0,-15 -0,-14 a14 14 0 0 0 0,-1 v-61 a14 14 0 0 0 -0,-3 c-2,-7 -4,-14 -9,-20 -5,-6 -13,-9 -22,-9 v-0 c-0,0 -1,0 -1,0 -0,0 -1,-0 -1,0 v0 c-6,0 -11,2 -15,5 v-4 c0,-18 -16,-31 -34,-31 h-0 c-10,0 -19,4 -26,11 v-18 c0,-18 -16,-31 -33,-31 -9,0 -17,3 -23,9 v-36 c-0,-18 -16,-31 -33,-31 z  " id="shape_fv6b_3" fill="#000000" stroke="#000000" stroke-width="1" >
    </path> <!--s4-->
    <path  d="m220,82 c-11,0 -20,8 -20,17 l1,227 c-0,8 -13,10 -15,4 l-28,-73 c-10,-14 -19,-12 -33,-9 -9,2 -13,17 -9,29 l36,126 61,109 15,50 138,-1 38,-181 c2,-16 -1,-87 -0,-93 v-61 c-3,-12 -8,-20 -18,-19 -11,0 -17,9 -17,19 v60 c2,8 -15,10 -14,-0 v-91 c0,-10 -9,-17 -20,-17 h-0 c-11,0 -20,8 -20,17 v73 c2,9 -20,11 -19,-0 v-111 c0,-10 -9,-17 -20,-17 s-20,8 -20,17 v116 c1,8 -16,10 -17,-0 v-174 c-0,-10 -9,-17 -20,-17 v-0 0 l-0,0 h0 z  " id="shape_fv6b_4" fill="#FFFFFF" stroke="#000000" stroke-width="1" >
    </path> 
    </g>
	</g><!--s5-->
  <animateTransform  id="anmt_yj_1" attributeName="transform" type="translate"  attributeType="auto" calcMode="linear" values="50,50;250,150;0,300;300,600"  dur="2.0s" repeatCount="indefinite" >
</animateTransform> 
</g>

 </g>
</g>



<!-- greeting -->
<g id="greeting" transform="matrix(.8 0 0 .8 89.4 -8.6)">
	<g id="greetingsubnode" >
<text  xml:space="preserve" x="6" y="44" id="shape_fpcs_2" fill="#FCC" opacity=".9"   font-family="Shadows Into Light,Bickham Script Pro,cursive" font-size="29" font-weight="600" ><tspan>Happy Holidays!</tspan>
</text> 
	</g>
</g>

	 </g>
</svg>




</div>
<!-- END  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE  TEMPLATE -->


<div id="snowboarddiv" class="xmldiv" name="wrapper" data-indy="{'id':'0x20141210180435825AC7B767B80D1119','age':1,'clicks':1,'TheDate':20141210180523,'p1':'0x20141209185101909F9B464DA8009119','p2':'0x20141209185101909F9B464DA8009119'}" style="display:absolute;float:right;-webkit-transform: translate3d(0,0,0);padding:2px;width:200px;height:200px">
<svg width="100%" height="100%" viewBox="0 0 200 200" preserveAspectRatio="xMinYMin meet" version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<desc>evolved at www.genolve.com</desc>
<style type="text/css"></style><defs></defs>
<g> 
<linearGradient x1="0%" y1="50%" x2="96%" y2="50%" id="gradient_krax_1" gradientUnits="objectBoundingBox">
<stop offset=".46" stop-color="#061" stop-opacity="0.9"></stop>
<stop offset=".9" stop-color="#000" stop-opacity="1.0"></stop>
</linearGradient>
<g id="group_qxob_1"> 
<path d="m175,36 c0,-4 -2,-6 -2,-6 s1,-2 -2,-5 c-3,-2 -13,-2 -13,-2 l-5,-5 s1,-2 0,-2 c-1,0 -1,0 -1,0 l-4,-3 -3,1 s-2,-2 -5,-3 c-3,-1 -5,-1 -5,-1 s-4,-2 -7,-3 c-3,-1 -7,-1 -7,-1 s-2,-3 -5,-4 c-3,-1 -7,0 -7,0 l-7,1 s-4,2 -4,3 v3 l3,0 s1,2 2,2 c1,0 4,1 4,1 s2,4 3,4 c1,0 8,0 8,0 s3,1 4,1 c1,0 1,4 3,5 2,1 5,2 5,2 l0,2 -1,0 -1,1 s-1,-1 -2,-1 c-1,0 -9,1 -9,1 l-1,0 -7,-2 h-12 s-5,-2 -6,-2 c-1,0 -5,1 -5,1 s-5,-1 -6,-1 c-1,0 -4,1 -4,1 l-11,4 s-3,0 -4,1 c-1,1 -6,4 -6,5 -1,1 -4,8 -4,8 l-8,0 s-1,2 0,2 c1,0 2,1 2,1 l0,1 -3,1 c-1,0 -5,0 -5,0 l0,3 0,1 -2,0 s-16,-8 -21,-12 c-5,-4 -5,-4 -5,-5 -1,-1 -5,-6 -5,-6 h-2 l0,2 s7,10 13,13 c6,3 15,8 25,14 10,5 40,23 45,26 6,3 27,16 34,18 7,2 13,1 13,1 l0,0 s0,1 4,1 l4,0 0,-2 5,-6 1,-3 s2,-1 2,-2 c0,-1 1,-5 1,-5 l2,-1 s2,0 4,-1 c2,-1 5,-5 5,-8 1,-2 1,-3 1,-3 l1,-2 s7,-6 7,-7 c0,-1 0,-5 0,-5 s1,-3 1,-5 c0,-2 1,-3 1,-3 s4,-6 4,-7 c0,-1 2,-3 2,-6 z  m-80,25 l-1,3 s-3,2 -3,3 c0,1 -1,3 -1,3 l0,5 -3,1 -1,3 -35,-19 s4,-5 5,-5 c1,0 3,-2 3,-2 l8,-8 8,0 3,-3 s2,0 8,0 c6,0 13,1 13,1 s1,1 2,2 c1,0 2,1 2,1 l1,1 s-1,1 -1,3 c0,2 -1,3 -1,3 l-2,1 -2,4 -3,2 z  m51,4 l-2,3 s-1,3 -2,4 c-1,1 -2,6 -2,6 l-2,1 -1,2 s-4,7 -5,8 c-1,1 -1,11 -1,11 s-3,0 -5,0 c-2,-1 -6,-1 -11,-4 -5,-2 -16,-8 -16,-8 l1,-2 1,-2 3,0 s1,1 2,1 c1,0 0,-3 0,-3 v-4 s2,-1 3,-1 c0,-1 1,-3 1,-3 l2,-1 2,-4 s2,-1 3,-2 c0,-1 1,-2 1,-2 h1 l1,1 3,1 3,0 0,2 -1,1 1,1 s1,0 1,0 c1,0 1,-4 1,-4 l1,-1 h11 s3,-3 4,-3 c1,0 3,0 3,0 v2 z  " id="shape_foey_1" fill="url(#gradient_krax_1)">

</path>  

</g>
</g>
</svg>
</div> 
            
          
!
            
              a:link, a:visited {
	color:#CC6600;
	text-decoration:none;
	text-shadow: 0 1px 0 rgba(200,200,200, 0.45); 
}
a:hover {
	color:#999;
	text-decoration:none;
}
.msgdiv {
	width:40%;
	bottom:0px;
	font-size:14px;
	position:absolute;
	display:inline-block;
	float:left;
	padding:15px;
	z-index:0; 
	font-family: Arial, Helvetica, sans-serif;
 }
.xmldiv {
	position: relative; 
	background-color: #FFF;
	display:inline-block;
	margin: 1px;
	border:1px;
	border-color:#333;
	border-style:solid;
	width:100%;
	height:100%; 
	overflow:hidden;
	cursor: pointer;
}
            
          
!
            
              function vprint(selector,wtp) {
			console.log(wtp);
	}

var eloop = {
	activeslot:'snowboard',
	templatediv:'templatediv',
	removethis:[]
	};
$(document).ready(function(){ 
	$('#snowboarddiv').on('click',makePaintBrush);
	});



function makePaintBrush(){
	if(true){ //     +        +        +           +        snap SVG     +        +        +           +       snap SVG
		vprint("eloop",">>>>> makePaintBrush snap SVG MODE, looking for slot:"+'#'+eloop.templatediv+' #'+eloop.activeslot);
		var drawParent = Snap.select('#'+eloop.templatediv+' #'+eloop.activeslot);  // get the empty slot '#templatediv #snowboard'
		var clicked = Snap.select('#snowboarddiv g');
		origclicked = clicked;
		var helpinghand = Snap.select("#handwave");
		//                           [draw] draw it in  [draw]  
		vprint("eloop",">>>>> START makePaintBrush");
		//                                                           MAKE PAINT BRUSH
		var brush1 = drawParent.circle(0,0,55).attr({ fill: "blue" });  
		recordpoints = true;
		var pointsA=[];
		if(helpinghand !=null){// add drag help pointer
			helpinghand = helpinghand.clone();
			drawParent.add(helpinghand);
			eloop.removethis.push(helpinghand);
			}
		//                                                           ACTIVATE PAINT BRUSH
		brush1.drag(doDrag, 	 startDrag,			 endDrag);
			} // end makePaintBrush core
	
		//       H    E    L    P    E    R         makePaintBrush helper functions
		function doDrag(dx,dy,xx,yy,e){ // deltas, current pos, DOM event
				thisguy = brush1;
				lmatrix = thisguy.transform().localMatrix;
				gmatrix = thisguy.transform().globalMatrix;
				mparts = gmatrix.split();
				// reduce by whatever the global matrix scale is
				newx=(dx-prevdx)/mparts.scalex;
				newy=(dy-prevdy)/mparts.scaley;
				addon  = new Snap.Matrix().translate(newx,newy);
				if(recordpoints){
						point ={ cx: newx , cy: newy };
						pointsA.push(point);
						//vprint("eloop","recorded point["+newx+","+newy+"]");
						}
				// dx/dy appear to be cumulative for the drag, want the dx from *last* func call
				prevdx=dx;
				prevdy=dy;
				//vprint("eloop",">>>>> dragmove current matrix:"+lmatrix.toTransformString()+" adding:"+addon.toTransformString());
				lmatrix.add(addon);
				thisguy.transform(lmatrix); // move the brush
				}
		function startDrag(xx,yy,e){ 
				vprint("eloop","======================= START NEW DRAG =================="+brush1.id);
				prevdx=0;prevdy=0;
				if(eloop.removethis!=null ) // remove the helping hand and anything else in list
					for(ii=0; ii<eloop.removethis.length; ii++)
						eloop.removethis[ii].remove();
				// not working clicked.attr({style:"cursor=pointer;"});
				} // end drag start
		function endDrag(xx,yy,e){ 
				vprint("eloop","======================= END DRAG =================="+brush1.id);
				if(recordpoints){// plot the points
					p1=pointsA[0];
					pS={ cx: 0 , cy: 0 };
					dd="m"+p1.cx+","+p1.cy+" ";  // start of the [PATH]
					for(ii=1; ii<pointsA.length; ii++){
						p2=pointsA[ii];
						pS.cx +=p2.cx; 
						pS.cy +=p2.cy;
						dist=Math.sqrt(Math.pow(pS.cx-p1.cx,2) +Math.pow(pS.cy-p1.cy,2));
						if(dist>25){ // add it on
							p1=pS;
							dd+=p1.cx+","+p1.cy+" ";   // add to the [PATH]
							pS={ cx: 0 , cy: 0 };
							}
						else { 
							;// ignore for path smoothing/point reduction
							}
						}// end for all points
					vprint("eloop","DRAWING PATH:"+dd);
				 	//                [  MOTION  ]     [  MOTION  ]
					drawParent.add(origclicked);            // put the snowboard in the slot
					// draw the hidden path
					var p = drawParent.path(dd).attr({      // put [PATH] in slot
											id:"thepath",
											fill: "none",
											stroke: "none",
											strokeWidth: 3
									});
							
svg_frag ='<animateMotion id="ani1" 	calcMode="spline"   keyTimes="0;.5;1"			keySplines="0.5 0 1 1;0 0  0.5 1"   keyPoints="0;.5;1"     fill="freeze"       dur="5s"  repeatCount="indefinite"    >';
svg_frag+='    <mpath xlink:href="#thepath"></mpath>';
svg_frag+='</animateMotion>';
svg_frag+=' <animateTransform        attributeName="transform"	         type="scale"  calcMode="spline"      values="1,1;4,4"   keySplines="0.8 0 1 1"  keyTimes="0;1"	   dur="5s"   repeatCount="indefinite"   ></animateTransform>';
					var f = Snap.parse(svg_frag);     // create the animation                                      
					origclicked.append(f);            // add animateMotion to origclicked g element
					eloop.removethis=[origclicked,p]; // flag fro remove on any repeat
					brush1.remove();                  //all done, remove brush
					}// end recordpoints
					vprint("eloop"," = = end drag done = = =");
				} // end X drag end X
		// end makePaintBrush helper functions
	} // end makePaintBrush
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console