Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

What happens to tokens stored outside of the page boundaries?

I've been using a work-around for the API's current lack of support for creating animated tokens where I've been producing a 'pool' of them by hand ahead of time on the GM Layer and out of the way then just moving them into place when they're needed via a custom API script. During testing, some have accidentally ended up outside the dimensions of the page (and required a new feature of the API to retrieve.) But it got me thinking: Is it 'safe' to keep things out there or is there some periodical garbage collection that will nix them eventually? Do they still 'render' out there or could I net  some performance benefit to storing them outside off the page?  I know from experience that those that produce light (with UDL) will still shine even if off the page. Thanks in advance for any insight you can provide!
1620020167
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
As far as I know, they stay out there indefinitely. Not sure about rendering, but I would guess they wouldn't, based on the behavior of other things that are out of frame.
1620057950
The Aaron
Roll20 Production Team
API Scripter
The graphic will stay there indefinitely.  It won't be visible, but there probably isn't much performance benefit to having it there.  If you're swapping out images fairly rapidly, it would be better than having to create the graphic each time, particularly if the image had not been cached by local clients.  However, I don't really think that would make so much difference as to warrant changing the way you do things as it is.
Okay, thanks for the info. I might give it a shot. Yeah, they won't be shifting around often, just when the players want to move to the next unloaded room. Doing a kind of Rogue-like dungeon where each room is decided by rolls. I save and remove older rooms and their tokens, while centering newer ones. So that seems to keep the page size small and the lag to a minimum. My one hiccup (which I was referring to in the OP) is the animated lights. I'd be fine with a static token that the API could create except they are more than just decorative and play a role in the overall narrative. So I'm okay moving them around since most rooms can just reuse the same ones, maybe randomized a bit for variety.