fruitflybrain / neu3d

A javascript 3D visualization engine for neural data in SWC format
7 stars 8 forks source link

Static vs Dynamic Rendering? #9

Closed TK-21st closed 2 years ago

TK-21st commented 5 years ago

Since the scene only contains objects that do not necessarily need to be rendered in an activate animation frame, could we benefit from using static rendering?

The specific changes are:

  1. remove animate() function. Specifically, remove call to requestAnimationFrame().
  2. change TrackBallControl to OrbitControl.

A preliminary test suggests that the performance difference is minimal, but worth a look.

mkturkcan commented 5 years ago

This makes a lot of sense as a power saving optimization, but we have a significant amount of dynamic features planned so it makes sense to make sure that we don't lose any functionality or make things too complicated. Probably we want to exit out of the animate() loop when nothing is happening and restart it upon changes to the scene.

TK-21st commented 2 years ago

Closing as the raycaster requires trackballcontrol and dynamic rendering. Performance improvement in #37 should make this unnecessary.