title: Threebox how do I get all 3d objects on the map?
body: <p>I need to get an array or object with all 3D models that have been added to the Mapbox map, as it is on the screenshot below. How can I get these objects?</p>
  <p><a href="https://i.stack.imgur.com/yyf2e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yyf2e.png" alt="enter image description here" /></a></p>
  <p>I was trying to do something like this code but it didn't work.</p>
  <pre><code>const buildings3DModels = map.tb.world.children;
  console.log(&quot;buildings3DModels: &quot;, buildings3DModels);
  buildings3DModels.forEach(element =&gt; console.log(element));
  </code></pre>
  <p>I can see log an array with object with:</p>
  <pre><code>console.log(map.tb.world.children);
  </code></pre>
  <p><a href="https://i.stack.imgur.com/edFzn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/edFzn.png" alt="enter image description here" /></a></p>
  <p>But for some reason I cant loop through the array with for example forEach or any other loops, it's just don't return anything.</p>
  <p>So, my question is: How can I get these 3D objects from the map after they were added to the map? and how can I loop through each object?</p>