# Passing World Tracking data between scenes

**URL:** <https://forum.8thwall.com/t/passing-world-tracking-data-between-scenes/3995>\
**Category:** Technical Support\
**Created:** [December 16, 2024, 8:51pm UTC](https://forum.8thwall.com/t/passing-world-tracking-data-between-scenes/3995 "2024-12-16T20:51:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Napolillo](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@Matthew\_Napolillo](https://forum.8thwall.com/u/Matthew_Napolillo)\
**Post date:** [December 16, 2024, 8:51pm UTC](https://forum.8thwall.com/t/passing-world-tracking-data-between-scenes/3995/1 "2024-12-16T20:51:20Z")

</div>

Hi,

I’m working on an aframe cloud editor based project with some relatively complex and asset heavy content targets. In order to keep things optimized, we’ve planned the infrastructure to utilize multiple scenes (one for each section of the experience). We’re trying to smooth out the transition as much as possible between scenes, and are looking to see if it’s possible at all to share world tracking data between the AR scenes so we can save the world position once initially placed, and reliably use that position for auto-placement of newly loaded scenes.

Thanks

---

<div class="post-metadata">

**Author:** ![Evan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/evan/32/431_2.png) [@Evan](https://forum.8thwall.com/u/Evan)\
**Post date:** [December 16, 2024, 10:48pm UTC](https://forum.8thwall.com/t/passing-world-tracking-data-between-scenes/3995/2 "2024-12-16T22:48:13Z")

</div>

The only way would be to reuse the same `<a-scene>`. Every time the `xrweb` component is removed/added to the scene or DOM, the AR engine will reinitialize.

Depending on the complexity of your project, you might be able to group scenes and toggle visibility:

```html
<a-scene xrweb>
  <a-entity id="scene1">
    ...
  </a-entity>
  <a-entity id="scene2" visible="false">
    ...
  </a-entity>
</a-scene>

```

Or you could do something similar, but dynamically remove/add entities using JavaScript instead of toggling the visibility.

---

<div class="post-metadata">

**Author:** ![Matthew\_Napolillo](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@Matthew\_Napolillo](https://forum.8thwall.com/u/Matthew_Napolillo)\
**Post date:** [December 17, 2024, 3:56pm UTC](https://forum.8thwall.com/t/passing-world-tracking-data-between-scenes/3995/3 "2024-12-17T15:56:32Z")

</div>

Hmm, I think if we could remove/add entities that’d probably be the ideal scenario in order to keep the entity count down. Is there a specific method you’d recommend for adding entities with components in bulk? Like for example, would InsertAdjacentHTML with an HTML template work, or would it need to be more like creating the entities and adding components/values entirely in JS (createEntity(), then setAttribute() for all the components, etc)?
