title: How can I make each point move up and down in Three.js?
body: <p><a href="https://i.stack.imgur.com/PqyKt.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PqyKt.gif" alt="points_gif" /></a></p>
  <p>I want each point in the points to move up and down.</p>
  <p>However, when the following code is added, all points move together as a set as shown in the gif file.</p>
  <p>I used new THREE.Points to make this mesh.</p>
  <p>How can I make each point move up and down?</p>
  <pre class="lang-js prettyprint-override"><code>let amount = 1;
  mesh.points.position.y += amount;
  
  if (mesh.points.position.y &gt; 10) {
   amount = -1;
  }
  
  if (mesh.points.position.y &lt; -10) {
   amount = 1;
  }
  </code></pre>