-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
178 changed files
with
2,797 additions
and
1,290 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,188 +1,19 @@ | ||
<!DOCTYPE html> | ||
<title>✨SVG✨</title> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" type="text/css" href="code.css"> | ||
<link rel="stylesheet" type="text/css" href="style.css"> | ||
<body> | ||
|
||
<h3> | ||
Reference Docs | ||
</h3> | ||
|
||
<h1> | ||
SVG Library | ||
</h1> | ||
|
||
<h2>Elements</h2> | ||
|
||
<pre class="title"><code><ft>SVG</ft>()</code></pre> | ||
<div class="sketch-1"></div> | ||
|
||
<pre class="title"><code><ft>line</ft>(<argt>x1</argt>, <argt>y1</argt>, <argt>x2</argt>, <argt>y2</argt>)</code></pre> | ||
<div class="sketch-2"></div> | ||
|
||
<pre class="title"><code><ft>circle</ft>(<argt>x</argt>, <argt>y</argt>, <argt>radius</argt>)</code></pre> | ||
<div class="sketch-3"></div> | ||
|
||
<pre class="title"><code><ft>ellipse</ft>(<argt>x</argt>, <argt>y</argt>, <argt>rx</argt>, <argt>ry</argt>)</code></pre> | ||
<div class="sketch-4"></div> | ||
|
||
<pre class="title"><code><ft>rect</ft>(<argt>x</argt>, <argt>y</argt>, <argt>width</argt>, <argt>height</argt>)</code></pre> | ||
<div class="sketch-5"></div> | ||
|
||
<pre class="title"><code><ft>polygon</ft>(<argt>pointsArray</argt>)</code></pre> | ||
<div class="sketch-6"></div> | ||
|
||
<pre class="title"><code><ft>polyline</ft>(<argt>pointsArray</argt>)</code></pre> | ||
<div class="sketch-7"></div> | ||
|
||
<pre class="title"><code><ft>path</ft>()</code></pre> | ||
<div class="sketch-8"></div> | ||
|
||
<pre class="title"><code><ft>text</ft>(<argt>textString</argt>, <argt>x</argt>, <argt>y</argt>)</code></pre> | ||
<div class="sketch-9"></div> | ||
|
||
<h2>Layers and Masks</h2> | ||
|
||
<pre class="title"><code><ft>g</ft>()</code></pre> | ||
<div class="sketch-10"></div> | ||
|
||
<pre class="title"><code><ft>clipPath</ft>()</code></pre> | ||
<div class="sketch-11"></div> | ||
|
||
<pre class="title"><code><ft>mask</ft>()</code></pre> | ||
<div class="sketch-12"></div> | ||
|
||
<h2>Outside the Specification</h2> | ||
|
||
<pre class="title"><code><ft>regularPolygon</ft>(<argt>sides</argt>, <argt>cX</argt>, <argt>cY</argt>, <argt>radius</argt>)</code></pre> | ||
<div class="sketch-13"></div> | ||
|
||
<pre class="title"><code><ft>parabola</ft>(<argt>x</argt>, <argt>y</argt>, <argt>width</argt>, <argt>height</argt>)</code></pre> | ||
<div class="sketch-14"></div> | ||
|
||
<pre class="title"><code><ft>curve</ft>(<argt>x1</argt>, <argt>y1</argt>, <argt>x2</argt>, <argt>y2</argt>)</code></pre> | ||
<div class="sketch-15"></div> | ||
|
||
<pre class="title"><code><ft>arc</ft>(<argt>x</argt>, <argt>y</argt>, <argt>radius</argt>, <argt>angleA</argt>, <argt>angleB</argt>)</code></pre> | ||
<div class="sketch-16"></div> | ||
|
||
<pre class="title"><code><ft>wedge</ft>(<argt>x</argt>, <argt>y</argt>, <argt>radius</argt>, <argt>angleA</argt>, <argt>angleB</argt>)</code></pre> | ||
<div class="sketch-17"></div> | ||
|
||
<pre class="title"><code><ft>arrow</ft>(<argt>x1</argt>, <argt>y1</argt>, <argt>x2</argt>, <argt>y2</argt>)</code></pre> | ||
<div class="sketch-18"></div> | ||
|
||
<h2>Events</h2> | ||
|
||
<pre class="title"><code><ft>onMove</ft>, <ft>onPress</ft>, <ft>onRelease</ft></code></pre> | ||
<div class="sketch-19"></div> | ||
|
||
<pre class="title"><code><ft>animate</ft></code></pre> | ||
<div class="sketch-20"></div> | ||
|
||
<h2>Methods</h2> | ||
|
||
<pre class="code"><code><f>removeChildren</f>() | ||
<f>appendTo</f>(...) | ||
<f>setAttributes</f>(...) | ||
|
||
<f>translate</f>(...) | ||
<f>rotate</f>(...) | ||
<f>scale</f>(...) | ||
<f>matrix</f>(...) | ||
<f>clearTransform</f>() | ||
|
||
<f>marker</f>(...) | ||
<f>symbol</f>(...) | ||
<f>clipPath</f>(...) | ||
<f>mask</f>(...) | ||
|
||
<f>addClass</f>(...) | ||
<f>removeClass</f>(...) | ||
<f>setClass</f>(...) | ||
<f>setID</f>(...)</code></pre> | ||
|
||
<h3>svg</h3> | ||
|
||
<pre class="code"><code><f>clear</f>() | ||
<f>size</f>(x, y, w, h) | ||
<f>size</f>(w, h) | ||
<f>setViewBox</f>(x, y, w, h) | ||
<f>background</f>(color) | ||
<f>getWidth</f>() | ||
<f>getHeight</f>() | ||
<f>stylesheet</f>(css) | ||
<f>load</f>(file) | ||
<f>save</f>()</code></pre> | ||
|
||
<h3>path</h3> | ||
|
||
<pre class="code"><code><f>clear</f>() | ||
<f>command</f>(command, ...args) | ||
<f>get</f>() | ||
<f>set</f>(...) | ||
<f>add</f>(string) | ||
|
||
<f>move</f>() | ||
<f>line</f>() | ||
<f>vertical</f>() | ||
<f>horizontal</f>() | ||
<f>ellipse</f>() | ||
<f>curve</f>() | ||
<f>smoothCurve</f>() | ||
<f>quadCurve</f>() | ||
<f>smoothQuadCurve</f>() | ||
|
||
<f>Move</f>() | ||
<f>Line</f>() | ||
<f>Vertical</f>() | ||
<f>Horizontal</f>() | ||
<f>Ellipse</f>() | ||
<f>Curve</f>() | ||
<f>SmoothCurve</f>() | ||
<f>QuadCurve</f>() | ||
<f>SmoothQuadCurve</f>() | ||
|
||
<f>close</f>()</code></pre> | ||
|
||
<h3>polygon, polyline</h3> | ||
|
||
<pre class="code"><code><f>setPoints</f>(...) | ||
<f>addPoint</f>(...)</code></pre> | ||
|
||
<h3>marker, symbol, clipPath, mask</h3> | ||
|
||
<pre class="code"><code><f>size</f>(...) | ||
<f>setViewBox</f>(...)</code></pre> | ||
|
||
<h3>line</h3> | ||
|
||
<pre class="code"><code><f>setPoints</f>(...)</code></pre> | ||
|
||
<h3>circle, ellipse</h3> | ||
|
||
<pre class="code"><code><f>radius</f>(...) | ||
<f>setRadius</f>(...) | ||
<f>center</f>(...) | ||
<f>setCenter</f>(...) | ||
<f>position</f>(...) | ||
<f>setPosition</f>(...)</code></pre> | ||
|
||
<h3>Supported Nodes</h3> | ||
|
||
<pre class="code wrap"><code>svg, defs, desc, filter, metadata, style, script, title, view, cdata, g, circle, ellipse, line, path, polygon, polyline, rect, text, marker, symbol, clipPath, mask, linearGradient, radialGradient, pattern, textPath, tspan, stop, feBlend, feColorMatrix, feComponentTransfer, feComposite, feConvolveMatrix, feDiffuseLighting, feDisplacementMap, feDistantLight, feDropShadow, feFlood, feFuncA, feFuncB, feFuncG, feFuncR, feGaussianBlur, feImage, feMerge, feMergeNode, feMorphology, feOffset, fePointLight, feSpecularLighting, feSpotLight, feTile, feTurbulence | ||
</code></pre> | ||
|
||
<h3>Supported Attributes</h3> | ||
|
||
<pre class="code wrap"><code>accumulate, additive, alignment-baseline, attributeName, azimuth, baseFrequency, baseline-shift, begin, bias, by, calcMode, color, color-interpolation, color-interpolation-filters, cursor, diffuseConstant, direction, display, divisor, dominant-baseline, dur, dx, dy, edgeMode, elevation, end, exponent, fill, fill-opacity, fill-rule, filter, filterRes, filterUnits, flood-color, flood-opacity, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight, from, gradientTransform, gradientUnits, image-rendering, in, in2, intercept, k1, k2, k3, k4, kernelMatrix, keyPoints, keySplines, keyTimes, lengthAdjust, letter-spacing, lighting-color, limitingConeAngle, max, method, min, mode, numOctaves, opacity, operator, order, overflow, overline-position, overline-thickness, paint-order, pointer-events, pointsAtX, pointsAtY, pointsAtZ, preserveAlpha, preserveAspectRatio, primitiveUnits, radius, repeatCount, repeatDur, restart, result, rotate, seed, shape-rendering, spacing, specularConstant, specularExponent, spreadMethod, startOffset, stdDeviation, stitchTiles, strikethrough-position, strikethrough-thickness, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, surfaceScale, tabindex, targetX, targetY, text-anchor, text-decoration, text-rendering, textLength, to, transform-origin, type, underline-position, underline-thickness, user-select, values, vector-effect, visibility, word-spacing, writing-mode, xChannelSelector, yChannelSelector</code></pre> | ||
|
||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.7/ace.js"></script> | ||
<!-- <script type="text/javascript" charset="utf-8" src="ace/ace.js" charset="utf-8"></script> --> | ||
<script type="text/javascript" charset="utf-8" src="../svg.js"></script> | ||
<script type="text/javascript" charset="utf-8" src="svg.ace.js"></script> | ||
<script type="text/javascript" charset="utf-8" src="script.js"></script> | ||
|
||
</body> | ||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>rabbit-ear-svg</title><meta name="description" content="Documentation for rabbit-ear-svg"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">rabbit-ear-svg</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>rabbit-ear-svg</h2></div><div class="tsd-panel tsd-typography"><a id="md:svg" class="tsd-anchor"></a><h1><a href="#md:svg">SVG</a></h1><p><a href="https://travis-ci.org/robbykraft/SVG"><img src="https://travis-ci.org/robbykraft/SVG.svg?branch=master" alt="Build Status"></a></p> | ||
<p>creative coding with SVG</p> | ||
<p><em>easy drawing and styling, event handlers, browser or node.js</em></p> | ||
<a id="md:examples" class="tsd-anchor"></a><h2><a href="#md:examples">Examples</a></h2><p><a href="https://robbykraft.github.io/SVG/examples/code/">Code editor</a>, a live code editor which includes examples (roll the dice).</p> | ||
<p><a href="https://github.com/robbykraft/SVG/releases">Download</a>, and there are more examples in the <code>examples/</code> folder.</p> | ||
<a id="md:install" class="tsd-anchor"></a><h2><a href="#md:install">Install</a></h2><p>The compiled library is one file, and works in the browser or in Node.</p> | ||
<pre><code><span class="hl-0">https</span><span class="hl-1">:</span><span class="hl-2">//robbykraft.github.io/SVG/svg.js</span> | ||
</code><button>Copy</button></pre> | ||
<pre><code><span class="hl-3">npm</span><span class="hl-1"> </span><span class="hl-3">i</span><span class="hl-1"> </span><span class="hl-3">rabbit</span><span class="hl-1">-</span><span class="hl-3">ear</span><span class="hl-1">-</span><span class="hl-3">svg</span> | ||
</code><button>Copy</button></pre> | ||
<a id="md:usage" class="tsd-anchor"></a><h2><a href="#md:usage">Usage</a></h2><p>Two sources of documentation:</p> | ||
<p><a href="https://robbykraft.github.io/SVG/docs/">SVG docs</a></p> | ||
<p><a href="https://rabbitear.org/book/svg.html">rabbit ear docs</a></p> | ||
<a id="md:credit" class="tsd-anchor"></a><h2><a href="#md:credit">Credit</a></h2><ul> | ||
<li><a href="https://github.com/vkiryukhin/vkBeautify">vkBeautify</a> pretty-print for SVG export</li> | ||
<li><a href="https://github.com/xmldom/xmldom">XML DOM</a> for a "window" object in Node</li> | ||
</ul> | ||
<a id="md:license" class="tsd-anchor"></a><h2><a href="#md:license">License</a></h2><p>MIT</p> | ||
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:svg"><span>SVG</span></a><ul><li><a href="#md:examples"><span>Examples</span></a></li><li><a href="#md:install"><span>Install</span></a></li><li><a href="#md:usage"><span>Usage</span></a></li><li><a href="#md:credit"><span>Credit</span></a></li><li><a href="#md:license"><span>License</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="assets/icons.svg#icon-1"></use></svg><span>rabbit-ear-svg</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> |
Oops, something went wrong.