diff --git a/demos/tutorial/1.html b/demos/tutorial/1.html
new file mode 100644
index 0000000..31a534c
--- /dev/null
+++ b/demos/tutorial/1.html
@@ -0,0 +1,180 @@
+
+
+
+
+ Tutorial
+
+
+
+
+
+
+
+
+
+- // Simple dashed pattern on circle
+var s = Snap("#svg");
+- // This will be our shape. It could be anything.
+var bigCircle = s.circle(150, 150, 100);
+- bigCircle.attr({
+ stroke: "#000",
+ strokeWidth: 5
+});
+- // Now let's create pattern
+var p = s.path("M110,95,95,110M115,100,100,115").attr({
+ fill: "none",
+ stroke: "#bada55",
+ strokeWidth: 4
+ });
+
+- //This is where our pattern cut will happen:
+var cut = s.rect(100, 100, 10, 10).attr({fill: "#fff", opacity: .5})
+- cut.remove();
+- //make it a pattern
+var ptrn = p.pattern(100, 100, 10, 10);
+//ptrn is an invisible <pattern> element.
+- // Then use it as a fill on the big circle
+bigCircle.attr({
+ fill: ptrn
+});
+- //We still have access to original path for the pattern, lets animate it a bit:
+- p.animate({strokeWidth: 1, stroke: "#FF4136"}, 1e3);
+//Note that pattern could have as many elements as you want
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demos/tutorial/2.html b/demos/tutorial/2.html
new file mode 100644
index 0000000..a0c1ed4
--- /dev/null
+++ b/demos/tutorial/2.html
@@ -0,0 +1,194 @@
+
+
+
+
+ Tutorial
+
+
+
+
+
+
+
+
+
+- // Simple dashed pattern on circle with mask
+var s = Snap("#svg");
+var bigCircle = s.circle(150, 150, 100).attr({
+ fill: "#bada55",
+ stroke: "#000",
+ strokeWidth: 6
+});
+var p = s.path("M110,95,95,110M115,100,100,115").attr({
+ fill: "none",
+ stroke: "#bada55",
+ strokeWidth: 4
+ });
+var ptrn = p.pattern(100, 100, 10, 10);
+bigCircle.attr({
+ fill: ptrn
+});
+//Here is our circle from the first Snap-bit.
+
+- //Lets create a masking circle
+- var ring = s.circle(150, 150, 92).attr({
+ fill: "none",
+ stroke: "#fff",
+ strokeWidth: 10
+});
+- //This looks correct, but only because our background is white
+- s.rect(0, 150, 300, 30).attr({fill: "#85144B"}).insertBefore(bigCircle);
+//Uh-oh, lets try to apply this ring as a mask:
+- bigCircle.attr({
+ mask: ring
+});
+- //Not exactly what we want. We need to invert the mask
+- var mask = s.mask();
+- // Background rect:
+mask.add(s.rect(0, 0, "100%", "100%").attr({fill: "#fff"}));
+- // and our ring, but black
+mask.add(ring.attr({stroke: "#000"}));
+- bigCircle.attr({
+ mask: mask
+});
+- //Now, let’s animate the ring:
+- ring.animate({r: 10}, 1e3);
+
+
+
+
+
+
+
\ No newline at end of file