Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
  <script type="text/javascript" src="https://raw.github.com/paperjs/paper.js/master/dist/paper.js"></script>
  <script type="text/javascript">
    var paperscript = {};
    window.onload = function(){
      paperscript.someFunction();
    }
  </script>
  <script type="text/paperscript" canvas="p">
    this.someFunction = function(){
      rect1.fillColor = new Color('red');
    };
    var rect1 = new Path.Rectangle({
        point: [0, 10],
        size: [100, 100],
        strokeColor: 'black'
        });
    paper.install(window.paperscript);
  </script>
</head>
<body>
  <canvas id="p" resize></canvas>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers