title: Attaching animations to a single entity using entity generator - A-Frame
body: <p>I'm creating a bunch of entities using <code>&lt;a-entity generator&gt;</code>, but I also want each to animate when an event happens (in this case, a collision). I'm using <code>&lt;a-mixin&gt;</code> to define the properties of the entity that I'm making.</p>
  
  <p>Here's the mixin:</p>
  
  <pre><code>&lt;a-mixin id="octa" geometry="primitive: octahedron; radius:4" material="src:#asteroid"&gt;&lt;/a-mixin&gt;
  </code></pre>
  
  <p>And here's the entity generation:</p>
  
  <pre><code>&lt;a-entity entity-generator="mixin: octa position; num: 50;"&gt;&lt;/a-entity&gt;
  </code></pre>
  
  <p>If I put the <code>&lt;a-animation&gt;</code> behavior in the <code>&lt;a-entity-generator&gt;</code>, every one of the entities animates rather than just a single entity (I get why that happens though). But if I put the animation behavior between <code>&lt;a-mixin&gt;</code> tags, nothing happens. Any advice on how to approach this?</p>