Lately, I've been exploring various WebGL showcases and came across three.js, a widely popular framework that even has its own dedicated book by Toni Parsli. Upon examining the source code of three.js, I was surprised not to find any traditional scene tree structures like BSP or k-d-trees.
Instead, I discovered the "Flattened List" which appears to hold all the objects:
This revelation left me quite puzzled. Why use a flat data structure for storing the scene when trees would seem like a more optimal solution?
I wonder if I overlooked a tree structure within the source code or perhaps there's something about scene graph optimization that eludes me.
Additionally, I pondered whether the Flattened List serves as an intermediary object after pruning the scene graph. However, I couldn't find confirmation of this in the source code, despite indications on .