* Add child entity. * * @param {Element} el - Child entity.
(el)
| 188 | * @param {Element} el - Child entity. |
| 189 | */ |
| 190 | add (el) { |
| 191 | if (!el.object3D) { |
| 192 | throw new Error("Trying to add an element that doesn't have an `object3D`"); |
| 193 | } |
| 194 | this.object3D.add(el.object3D); |
| 195 | this.emit('child-attached', {el: el}); |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Tell parentNode to add this entity to itself. |
no test coverage detected