<p dir="auto">Currently there is support for using the <code class="notranslate">morphTargets</code> property of a <code class="notranslate">Geometry</code> and the <code class="notranslate">morphTargetInfluences</code> property of the corresponding <code class="notranslate">Mesh</code> to animate <code class="notranslate">Mesh</code>es. It would be nice if one were able to use a similar interface to animate <code class="notranslate">Line</code>s - I don't think this is currently possible; at least it doesn't seem to be documented.</p>
<h5 dir="auto">idea</h5>
<p dir="auto">I'm not sure how much performance gain this would have, but it is possible that we can traverse only the subtrees that need updates by keeping track of which objects have been updated.</p>
<p dir="auto">basic impl:</p>
<ul dir="auto">
<li>any time a property is changed (f.e. position or rotation), push the object onto an array of nodes that need update. (either make the properties setters to trigger this automatically, or require users to call <code class="notranslate">object.needsUpdate()</code>, the latter of which is a breaking change)</li>
<li>in the <code class="notranslate">renderer.render</code> call, instead of traversing the scene tree, iterate on this array of nodes that need update.</li>
<li>for each object in array of nodes that need update
<ul dir="auto">
<li>perform <code class="notranslate">object.updateMatrix()</code></li>
<li>if the new matrix result differs from before
<ul dir="auto">
<li>add the object into a <code class="notranslate">Set</code> of subtree roots only if the object does not have an ancestor that is already a subtree root (simplest way is to traverse upward to the root and check if each object is in the <code class="notranslate">Set</code> of subtree roots)</li>
</ul>
</li>
</ul>
</li>
<li>after finished iterating the array of nodes that need update, iterate the <code class="notranslate">Set</code> of subtree roots.</li>
<li>for each root in <code class="notranslate">Set</code> of subtree roots
<ul dir="auto">
<li>perform <code class="notranslate">root.updateMatrixWorld()</code></li>
</ul>
</li>
<li>finally, render the WebGL like before.</li>
</ul>