<script src="//cdnjs.cloudflare.com/ajax/libs/document-register-element/0.4.5/document-register-element.js"></script>
<script src="https://wzrd.in/standalone/parametric-svg-element@1.2.0"></script>
<parametric-svg>
<!-- REPLACE THIS LINE WITH YOUR DRAWING -->
</parametric-svg>
<!--
Usage for normal folks
----------------------
1. Create a parametric SVG drawing. Check out
https://github.com/parametric-svg/tutorial#/ if you need some help there.
2. Open your SVG drawing in a text editor and copy it to the clipboard.
Everything from the opening `<svg …>` tag all the way down
to the closing `</svg>` tag – including the tags themselves.
3. Paste that between the `<parametric-svg>` and `</parametric-svg>` tags above.
4. Set variables as attributes on the opening `<parametric-svg>` tag.
For example, if you want to set `x` to `45` and `y` to `80`, you’d do
something like:
<parametric-svg x="45"
y="80"
>
<svg…>…</svg>
</parametric-svg>
5. Whenever you want to save the state of your drawing, use the button
“COPY RENDERED SVG” at the top right, paste the contents into a new text file
and save the file with the extension `.parametric.svg`.
Usage for geeks
---------------
1. Place an `<svg></svg>` element between the tags `<parametric-svg>`
and `</parametric-svg>`.
2. Author your drawing by hand – or however else you want.
3. Set variables as attributes on the `<parametric-svg>` element.
4. You can see a live preview of what’s happening. If you switch off
“Auto-run JS”, make sure you hit [CTRL + ENTER] once in a while
to reload the frame.
5. To quickly change variable values without reloading the frame and reparsing
your drawing, use your browser’s developer tools. Edit the attributes
on the `<parametric-svg>` and the drawing will update lightening-fast.
If you change the structure of your SVG, you’ll still need a reload though.
-->
Output
300px
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |