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/paperscript" canvas="p">
    var circleArray = [];
    circleArray.push(new Path.Circle({
        center: [20, 20],
        radius: 10,
        strokeColor: 'red'
        }));
    circleArray.push(new Path.Circle({
        center: [30, 30],
        radius: 10,
        strokeColor: 'green'
        }));
    circleArray.push(new Path.Circle({
        center: [40, 40],
        radius: 10,
        strokeColor: 'blue'
        }));
    var idOfItemToRemove = 1;
    var numberOfItemsToRemove = 1;
    var removeItems = circleArray.splice(idOfItemToRemove, numberOfItemsToRemove);
    for (i = 0; i < removeItems.length; i++) {
        removeItems[i].remove();
    }
  </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