<h5 dir="auto">Description of the problem</h5>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/files/3907078/riven.zip">riven.zip</a><br>
The mesh loads and everything, and the animation's tracks doesn't and its duration is 0, this happens on some models</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r111</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Hello,</p>
<p dir="auto">The following is a <strong>solution</strong> to a problem I have just faced with the <strong>animations</strong> parsed by the new ColladaLoader.</p>
<p dir="auto">I use Autodesk Maya 2017, and when exporting the 3D model containing animations, an extra <code class="notranslate">&lt;animation&gt;</code> tag has been added under the "real" <code class="notranslate">&lt;animation&gt;</code> tag.</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;animation id=​&quot;xxx-anim&quot; name=​&quot;xxx&quot;&gt;
    ​&lt;animation&gt;
        ​&lt;source id=​&quot;xxx-Matrix-animation-input&quot;&gt;​&lt;/source&gt;​
        &lt;source id=​&quot;xxx-Matrix-animation-output-transform&quot;&gt;&lt;/source&gt;
        ​&lt;source id=​&quot;xxx-Interpolations&quot;&gt;​​&lt;/source&gt;​
        &lt;sampler id=​&quot;xxx-Matrix-animation-transform&quot;&gt;​&lt;/sampler&gt;
        ​&lt;channel source=​&quot;#xxx-Matrix-animation-transform&quot; target=​&quot;xxx/​matrix&quot;&gt;​&lt;/channel&gt;​
    &lt;/animation&gt;
​&lt;/animation&gt;"><pre class="notranslate">&lt;<span class="pl-ent">animation</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-anim<span class="pl-pds">"</span></span> <span class="pl-e">name</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx<span class="pl-pds">"</span></span>&gt;
    ​&lt;<span class="pl-ent">animation</span>&gt;
        ​&lt;<span class="pl-ent">source</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Matrix-animation-input<span class="pl-pds">"</span></span>&gt;​&lt;/<span class="pl-ent">source</span>&gt;​
        &lt;<span class="pl-ent">source</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Matrix-animation-output-transform<span class="pl-pds">"</span></span>&gt;&lt;/<span class="pl-ent">source</span>&gt;
        ​&lt;<span class="pl-ent">source</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Interpolations<span class="pl-pds">"</span></span>&gt;​​&lt;/<span class="pl-ent">source</span>&gt;​
        &lt;<span class="pl-ent">sampler</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Matrix-animation-transform<span class="pl-pds">"</span></span>&gt;​&lt;/<span class="pl-ent">sampler</span>&gt;
        ​&lt;<span class="pl-ent">channel</span> <span class="pl-e">source</span>=​<span class="pl-s"><span class="pl-pds">"</span>#xxx-Matrix-animation-transform<span class="pl-pds">"</span></span> <span class="pl-e">target</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx/​matrix<span class="pl-pds">"</span></span>&gt;​&lt;/<span class="pl-ent">channel</span>&gt;​
    &lt;/<span class="pl-ent">animation</span>&gt;
​&lt;/<span class="pl-ent">animation</span>&gt;</pre></div>
<p dir="auto">I digged into the source code of the <code class="notranslate">ColladaLoader</code> and I added the following lines into the <code class="notranslate">parseAnimation( xml )</code> function in order to handle this extra tag:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="switch ( child.nodeName )
{
    /* Handling 'source', 'sampler' and 'channel' */

    case 'animation':
        child.setAttribute( 'id', xml.getAttribute( 'id' ) );
        child.setAttribute( 'name', xml.getAttribute( 'name' ) );
        parseAnimation( child );
        return;
}"><pre class="notranslate"><span class="pl-k">switch</span> <span class="pl-kos">(</span> <span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">nodeName</span> <span class="pl-kos">)</span>
<span class="pl-kos">{</span>
    <span class="pl-c">/* Handling 'source', 'sampler' and 'channel' */</span>

    <span class="pl-k">case</span> <span class="pl-s">'animation'</span>:
        <span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-en">setAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'id'</span><span class="pl-kos">,</span> <span class="pl-s1">xml</span><span class="pl-kos">.</span><span class="pl-en">getAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'id'</span> <span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-en">setAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'name'</span><span class="pl-kos">,</span> <span class="pl-s1">xml</span><span class="pl-kos">.</span><span class="pl-en">getAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'name'</span> <span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-en">parseAnimation</span><span class="pl-kos">(</span> <span class="pl-s1">child</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-k">return</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r92</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>