MCPcopy
hub / github.com/aframevr/aframe / add

Method add

src/core/a-entity.js:190–196  ·  view source on GitHub ↗

* Add child entity. * * @param {Element} el - Child entity.

(el)

Source from the content-addressed store, hash-verified

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.

Callers 15

raycaster.jsFile · 0.80
anchored.jsFile · 0.80
wasd-controls.jsFile · 0.80
sound.jsFile · 0.80
look-controls.jsFile · 0.80
enableGrabCursorFunction · 0.80
obb-collider.jsFile · 0.80
cursor.jsFile · 0.80
pool.jsFile · 0.80
screenshot.jsFile · 0.80

Calls 1

emitMethod · 0.80

Tested by

no test coverage detected