# Looping a texture on 3D Shape that Reacts to Slider Adjustments

**URL:** https://discourse.processing.org/t/looping-a-texture-on-3d-shape-that-reacts-to-slider-adjustments/20528
**Category:** Coding Questions
**Tags:** homework
**Created:** [May 6, 2020, 4:20am UTC](https://discourse.processing.org/t/looping-a-texture-on-3d-shape-that-reacts-to-slider-adjustments/20528 "2020-05-06T04:20:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mzerby](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mzerby](https://discourse.processing.org/u/mzerby)
#### Post date: [May 6, 2020, 4:20am UTC](https://discourse.processing.org/t/looping-a-texture-on-3d-shape-that-reacts-to-slider-adjustments/20528/1 "2020-05-06T04:20:19Z")

</div>

Hello! I am trying to figure out how to create a looping texture on a 3D that will restart after it has filled the shape to reflect the adjustment made with the slider. I currently have a texture that is a spiral pattern of a letter radiating out from the center. My slider changes the size of the letter. If I make the text larger halfway through the pattern drawing itself, it will make the text bigger. How do I make the texture restart once it has filled the shape so it will write over the pattern with new big letters? (without having to refresh the code)

I tried putting:  
for (i===0){  
i=0  
}  
but it just crashed my code because I have around 14 of these different 3D shapes in the main file.

Here is a link to my code of one shape to isolate the issue! I am posting the entire code in case you want to see the whole sketch am pretty new to coding so I appreciate your help! Thank you!

Isolated issue:  
[https://editor.p5js.org/mzerby/sketches/Ce\_ihgyEc](https://editor.p5js.org/mzerby/sketches/Ce_ihgyEc)

Entire sketch (AKA larger main file):  
[https://editor.p5js.org/mzerby/sketches/BYUyqPTRP](https://editor.p5js.org/mzerby/sketches/BYUyqPTRP)
