# Animated textures

**URL:** <https://discourse.threejs.org/t/animated-textures/22787>\
**Category:** Questions\
**Tags:** animated-texture\
**Created:** [January 25, 2021, 3:15am UTC](https://discourse.threejs.org/t/animated-textures/22787 "2021-01-25T03:15:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/steven/32/19544_2.png) [@steven](https://discourse.threejs.org/u/steven)\
**Post date:** [January 25, 2021, 3:15am UTC](https://discourse.threejs.org/t/animated-textures/22787/1 "2021-01-25T03:15:37Z")

</div>

Once the object3D is created with a mesh and a material , can u change on animate() the map: texture property of the material ?Or change the url from the texture with setTimeout and cleartimeout

---

<div class="post-metadata">

**Author:** ![Lawrence3DPK](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/lawrence3dpk/32/29184_2.png) [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Post date:** [January 25, 2021, 9:00am UTC](https://discourse.threejs.org/t/animated-textures/22787/2 "2021-01-25T09:00:26Z")

</div>

@steven  
Yes you can do that although it’s not really a great way as you will have to call `dipsose()` on the textures to take them out of gpu memory… Here’s an example I made…

https://codepen.io/forerunrun/embed/preview/gOwJQbB?height=300&slug-hash=gOwJQbB&default-tabs=js,result&host=https://codepen.io

There’s a semi official example i think that uses one long image map with all the frames side by side which is made to usdate its uv coordinates

---

<div class="post-metadata">

**Author:** ![steven](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/steven/32/19544_2.png) [@steven](https://discourse.threejs.org/u/steven)\
**Post date:** [January 26, 2021, 2:57am UTC](https://discourse.threejs.org/t/animated-textures/22787/3 "2021-01-26T02:57:30Z")

</div>

yes thank you . I need it to change the images in this vr panoramaviewer [three.js vr - panorama with depth](https://threejs.org/examples/webxr_vr_panorama_depth.html)  
Now there is only 1 image (+ a Zdepth image). .To load another image i have to take my phone out of my viewer and tap 5 times or more to load another similar html with another picture and put the phone back in the stereo viewer to see a new picture in vr .That is too much tapping .I think the images are too big to use the filmstripmethod with the long image map.

---

<div class="post-metadata">

**Author:** ![Lawrence3DPK](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/lawrence3dpk/32/29184_2.png) [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Post date:** [January 26, 2021, 9:51am UTC](https://discourse.threejs.org/t/animated-textures/22787/4 "2021-01-26T09:51:50Z")

</div>

@steven

ah yes i see your use case now! the example i shared will just about do what you need, you may have to update it with a few lines of code, once you load a new image make sure to `.dispose()` old texture, also you will need to create a load function from the new texture so when it has loaded, then material.map = new texture, if that makes sense?

---

<div class="post-metadata">

**Author:** ![steven](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/steven/32/19544_2.png) [@steven](https://discourse.threejs.org/u/steven)\
**Post date:** [January 28, 2021, 9:53am UTC](https://discourse.threejs.org/t/animated-textures/22787/5 "2021-01-28T09:53:20Z")

</div>

yes it works good . the dispose is really necessary ? because the sequence repeats in a loop until the user exits the page so the pictures come back .
