t.position.set(x, 0, z);
  scene.add(root);

  return root;
}</pre>
        <p>然后我们会创建一个循环，生成树网络。</p>
        <pre class="prettyprint showlinemods notranslate lang-js" translate="no">
for (let z = -50; z &lt;= 50; z += 10) {
  for (let x = -50; x &lt;= 50; x += 10) {
    makeTree(x, z);
  }
}</pre>
        <p>让我们再增加一个地平面。</p>
        <pre class="prettyprint showlinemods notranslate lang-js" translate="no">
// 添加地面
{
  const size = 400;
  co