I’m simulating a live chat app using a file as the text source for the “chat bubbles”. These chat bubbles each consist of a rectangle TOP fed into a text TOP. I then use a timer CHOP who’s onDone callback updates the text in the bubbles and manages text wrapping, sizing, positioning etc according to the new text. The callback also reseeds the timer with a random value every cycle so the replies feel more natural. So far so good with only two bubbles.
My first difficulty has to do with the fact that I obviously will need more than 2 bubbles to display the multiple replies in a long thread. I thought of programatically creating or copying the required OPs to generate the bubbles in a Python loop as new replies are required but this feels a bit tedious. Is there a simpler way of progressively “stamping” new parts onto an image?
My second difficulty is that the virtual chat display must automatically scroll once the replies reach the bottom so that earlier replies disappear at the top to make place for new ones at the bottom. I would know how to do this dynamically in pretty much any regular programming environment but am not sure what the proper TouchDesigner approach to achieving this would be. Currently I’m tempted to MovieOut a series of tiff images containing all the prerendered bubbles once when the app starts. Then I would Over TOP these onto a transparent rectangle until it reaches the bottom edge of the virtual display. From that point each time I add a new bubble I also move up the transparent rectangle a bit. This also feels a bit tedious…
Any simpler suggestions?