<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.7/raphael.min.js"></script>
</head>
<body>
</body>
</html>
// DEFINIZIONE FOGLIO
p = Raphael(0, 0, 500, 500);
//Disegnare come prima la scacchiera all'interno di questo rettangolo (lato quadratino 50)
p.rect(50,50,400,400); // BORDI TASTIERA
p.rect(100,50,50,50).attr("fill","gray"); // UN QUADRATINO
// avete un modello di pedone come path:
// - PATH (NON ha attributi x,y, width, height,
// ma ha fill e transform
var pedone = p.path("M12.826087,5.19672131 C12.826087,6.1304918 13.1286957,6.99081967 13.64,7.69377049 C11.6052174,8.86885246 10.2173913,11.0616393 10.2173913,13.5901639 C10.2173913,15.72 11.1982609,17.6190164 12.7321739,18.867541 C9.60173913,19.9796721 1,24.6904918 1,33 L33,33 C33,24.6904918 24.3982609,19.9796721 21.2678261,18.867541 C22.8017391,17.6190164 23.7826087,15.72 23.7826087,13.5901639 C23.7826087,11.0616393 22.3947826,8.86885246 20.36,7.69377049 C20.8713043,6.99081967 21.173913,6.1304918 21.173913,5.19672131 C21.173913,2.87803279 19.306087,1 17,1 C14.693913,1 12.826087,2.87803279 12.826087,5.19672131 Z").attr({stroke: '#000000',"stroke-width": '1.5',fill: '#DDDDDD',"fill-rule": 'evenodd','stroke-opacity': '1'});
// posizionare sulla scacchiera tutti i pedoni bianchi e neri
// far muovere i pedoni una casella in avanti
// quando ci si clicca sopra
// eseguire una animazione predefinita coinvolgente alcune mosse in sequenza
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. |