Open TakodaS opened 5 years ago
@TakodaS All the helper does is give deterministic model IDs for the widgets. As the example notebooks are stored in the repo with the widget data embedded, this prevents churn on the model IDs every time they are regenerated. It is not meant for use outside the example notebooks. If you would want to do a PR where a comment is added to the code to better highlight this, I'd appreciate it !
This may be a trivial issue but I took a bit of time to sort it out and maybe this will save someone else some time.
If you use
use_example_model_ids()
as is done in many of the pythreejs examples, you are limited to only being able to render 1000 objects on the screen because the iterator that creates new ids for each object only goes up to 1000.will fail with a
StopIterationError
however any lower value of upper will work. This is because the 1000 object id limit is hard coded in_example_helper.py
. In order to render more models, simply removep3._example_helper.use_example_model_ids()
Sorry if this is trivial but I wasted a bit of time over it and thought it was good to report. What is the use of example model ids anyway?