title: paper js into javascript
body: <p>Below are codes through which I was trying to achieve the hue property on a grid of circles. </p>
  
  <pre><code>var circles = [];
  
  for(var i=20 ; i&lt;=1500 ; i+=100){
    for(var j=40 ; j&lt;=600 ; j+=110){
      var newCircle = new Path.Circle(new Point(i, j), 20);
      newCircle.fillColor = 'red';
      circles.push(newCircle);
    }
  }
  
  function onFrame(event){
    for(var i=0 ; i&lt;circles.length ; i++ ){
      circles[i].fillColor.hue += 1;
    }
  }
  </code></pre>
  
  <p>This is the code. Now I am trying to give different colors to each circle using the random color func I created in a seperate JS file but the variables like "num" aren't accessible in that js file.I am not able to link them.</p>
  
  <p>This is the link to codepen : <a href="https://codepen.io/akashyap/pen/qMgpGQ" rel="nofollow noreferrer">https://codepen.io/akashyap/pen/qMgpGQ</a></p>
  
  <p>I am not able to figure out the " Using paperscript directly with javascript" section of  :</p>
  
  <p><a href="http://paperjs.org/tutorials/getting-started/using-javascript-directly/" rel="nofollow noreferrer">http://paperjs.org/tutorials/getting-started/using-javascript-directly/</a></p>