angular-three 3.2.3 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1784,7 +1784,11 @@ class NgtRenderer {
1784
1784
  return;
1785
1785
  this.appendChild(parent, newChild);
1786
1786
  }
1787
- removeChild(parent, oldChild, isHostElement) {
1787
+ removeChild(parent, oldChild, isHostElement, calledByNgt = false) {
1788
+ if (!calledByNgt && parent == null) {
1789
+ parent = this.parentNode(oldChild);
1790
+ return this.removeChild(parent, oldChild, isHostElement, true);
1791
+ }
1788
1792
  if (parent == null) {
1789
1793
  parent = (untracked(() => getLocalState(oldChild)?.parent?.()) ||
1790
1794
  oldChild.__ngt_renderer__?.[1 /* NgtRendererClassId.parent */]);
@@ -1794,12 +1798,12 @@ class NgtRenderer {
1794
1798
  // we'll just remove the child and destroy it
1795
1799
  if (parent == null) {
1796
1800
  if (cRS) {
1797
- if (cRS[0 /* NgtRendererClassId.type */] === 'three') {
1798
- removeThreeChild(oldChild, undefined, true);
1799
- }
1800
1801
  // if the child is the root scene, we don't want to destroy it
1801
1802
  if (is.scene(oldChild) && oldChild.name === '__ngt_root_scene__')
1802
1803
  return;
1804
+ if (cRS[0 /* NgtRendererClassId.type */] === 'three') {
1805
+ removeThreeChild(oldChild, undefined, true);
1806
+ }
1803
1807
  // otherwise, we'll destroy it
1804
1808
  this.destroyInternal(oldChild, undefined);
1805
1809
  }