MCPcopy Index your code
hub / github.com/mrdoob/three.js / removeFromParent

Method removeFromParent

src/core/Object3D.js:838–850  ·  view source on GitHub ↗

* Removes this 3D object from its current parent. * * @fires Object3D#removed * @fires Object3D#childremoved * @return {Object3D} A reference to this instance.

()

Source from the content-addressed store, hash-verified

836 * @return {Object3D} A reference to this instance.
837 */
838 removeFromParent() {
839
840 const parent = this.parent;
841
842 if ( parent !== null ) {
843
844 parent.remove( this );
845
846 }
847
848 return this;
849
850 }
851
852 /**
853 * Removes all child objects.

Callers 4

Object3D.tests.jsFile · 0.80
addMethod · 0.80
attachMethod · 0.80
removeBoundingBoxMethod · 0.80

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected