Plugin API: Updating surface color without "hideBioEntity"
Motivation: In our current project we are working with agent-based modeling, for which I am trying to find a visualization on Minerva. I have used an SBML file with a 50x50 grid of elements whose activity is updated incrementally and displayed as a color value (see video below).
Problem: I just need to update the color of the elements, but I still need to call the "hideBioEntity" and "showBioEntity" functions to first remove the color and then add it back.
I've already optimized the code as much as possible, i.e., precalculating the hex colors for each step, reducing the color gradient to 20 values, and only updating elements that actually change color. But both "hideBioEntity" and "showBioEntity" still take up to 500ms, which makes the animation not very smooth.
This is the performance of the functions. "Generating Entities" refers to creating the lists that are passed to "hideBioEntity" and "showBioEntity".
It works fine as it is, though, but maybe there is an "easy" solution to increase performance by not requiring to remove elements that are being updated.