Hi,
I’ve been putting a large amount of code from the clipping planes example project into separate exec text puzzles to get it more organized, controllable, and able to be used more flexibly and dynamically with my larger project.
I know the variables in them are available from within them like function scope, so I’m trying to find ready ways to make them available to others when needed…
One way was to have the first exec text in the stack be an initializer and instead of using “var myVar”, be window.myVar for each one…
I’ve read that if your var names aren’t unique enough, then using window could mess with other browser based variables.
Would this be an issue?
Another way is just hand their values of to VARS[‘myVar’] in one exec puzzle, and then back again in the next.
Or wrap them in procedures with inputs and returns to chain them.
What’s the best way? Is there any other? Thanks!