# Fetching Needle Engine assets from an S3 bucket

**URL:** <https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838>\
**Category:** 🌵 Needle Engine\
**Tags:** question\
**Created:** [May 14, 2026, 7:14am UTC](https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838 "2026-05-14T07:14:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashokkumar\_KR](https://forum.needle.tools/user_avatar/forum.needle.tools/ashokkumar_kr/32/4207_2.png) [@Ashokkumar\_KR](https://forum.needle.tools/u/Ashokkumar_KR)\
**Post date:** [May 14, 2026, 7:14am UTC](https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838/1 "2026-05-14T07:14:27Z")

</div>

Hi, is it feasible to load assets from the cloud instead of bundling them into the build?

What I mean is, I have a React project using Needle Engine. When the user accesses a certain part of the app, we load the Needle Engine scene. The assets (GLB files with SceneSwitcher and other scripts) are stored in an S3 bucket.

Can we fetch and load those assets dynamically based on the user’s selection? For example, if we have around 20–30 models and related assets, including all of them in the build makes the build size huge. So instead, I’d like to load only the assets the user selects.

I know changing the src of the Needle Engine component can achieve this for simple cases, but with SceneSwitcher and multiple scenes, is this approach still feasible? Or is there a better way to handle this?  
Image: this is how the assets look for a single model

 ![image](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/2X/7/766d0f10c1da93d67810733bff20e4e96bd3875d.png)

---

<div class="post-metadata">

**Author:** ![needle-assistant](https://forum.needle.tools/user_avatar/forum.needle.tools/needle-assistant/32/3415_2.png) [@needle-assistant](https://forum.needle.tools/u/needle-assistant)\
**Post date:** [May 14, 2026, 7:14am UTC](https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838/2 "2026-05-14T07:14:27Z")

</div>

Yeah, this is totally feasible. The recommended way is to use the **Needle Cloud Asset** component — it loads assets at runtime so you don’t bundle them in the build. It supports progressive loading, which saves ~90% bandwidth, and works with SceneSwitcher and multiple scenes. Just store your GLBs in S3 and feed the URLs to that component (or use direct links for progressive/optimized variants). You can switch scenes dynamically based on user selection without bloating the initial build. See [context [1]] for more on cloud asset usage and sharing.

Sources: [Needle Engine Docs](https://engine.needle.tools/docs/cloud/#:~:text=Track%20multiple%20versions%20of%20each%20asset%3A%20Upload%20new%20versions%20anytime%20Label%20version) (75%)

_4 replies left_  
_**Reply to this post directly if you need further help (bottom right button)**_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [May 14, 2026, 9:54am UTC](https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838/3 "2026-05-14T09:54:30Z")

</div>

Hello, yes of course. You can either use the builtin `loadAsset` method or `AssetReference` class OR use the SceneSwitcher component to load assets from any CDN or remote URL (all of them accept URLs to load from).

Here is an example in line 42 and below. Just replace the Needle Cloud URLs with your own CDN urls or use Needle Cloud CDN for hosting them

> **[Needle-engine - Vite Template (duplicated) - StackBlitz](https://stackblitz.com/edit/needle-engine-vite-template-xcdvxmgm?file=src%2Fmain.ts)**
>
> Needle Engine Vite Template - https://engine.needle.tools/new

```auto
 // To load or switch additional content it's easy to use a SceneSwitcher 
    const sceneSwitcher = addComponent(scene, SceneSwitcher, {
        autoLoadFirstScene: false,
        createMenuButtons: true,
        clamp: false,
        preloadNext: 1,
        preloadPrevious: 1,
    });
    sceneSwitcher.addScene("https://cloud.needle.tools/-/assets/Z23hmXBZ21QnG-latest-world/file");
    sceneSwitcher.addScene("https://cloud.needle.tools/-/assets/Z23hmXBzvPW9-latest-product/file");
    sceneSwitcher.addScene("https://cloud.needle.tools/-/assets/Z23hmXBZvGGVp-latest-product/file");
    sceneSwitcher.addScene("https://cloud.needle.tools/-/assets/Z23hmXBZ20RjNk-latest-product/file");
    sceneSwitcher.addScene("https://cloud.needle.tools/-/assets/Z23hmXB27L6Db-1QlLnf-world/file");
    sceneSwitcher.addScene("https://cloud.needle.tools/-/assets/Z23hmXBZ2sPRdk-world/file");

```

Does that answer your question?

---

<div class="post-metadata">

**Author:** ![Ashokkumar\_KR](https://forum.needle.tools/user_avatar/forum.needle.tools/ashokkumar_kr/32/4207_2.png) [@Ashokkumar\_KR](https://forum.needle.tools/u/Ashokkumar_KR)\
**Post date:** [May 15, 2026, 2:03pm UTC](https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838/4 "2026-05-15T14:03:31Z")

</div>

Yeah. Thanks a lot

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [May 15, 2026, 2:06pm UTC](https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838/5 "2026-05-15T14:06:05Z")

</div>

I’ve also updated the docs with some more details here:

> **[Load 3D Web Assets at Runtime — Needle Engine](https://engine.needle.tools/docs/how-to-guides/scripting/load-3d-web-assets-at-runtime.html)**
>
> Load GLB, glTF, and VRM files at runtime from any HTTPS URL — Needle Cloud, AWS S3, your own CDN, or any web host. Covers loadAsset, AssetReference, SceneSwitcher, and the needle-engine src attribute. Works with React, Vue, Svelte, vanilla JS, and...

---

<div class="post-metadata">

**Author:** ![system](https://forum.needle.tools/user_avatar/forum.needle.tools/system/32/20_2.png) [@system](https://forum.needle.tools/u/system)\
**Post date:** [May 28, 2026, 2:06pm UTC](https://forum.needle.tools/t/fetching-needle-engine-assets-from-an-s3-bucket/2838/6 "2026-05-28T14:06:27Z")

</div>

Closed on May 28, 2026, 2:06pm UTC

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.
