angular-three 1.6.3 → 1.6.5

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.
@@ -1238,7 +1238,7 @@ function createEvents(store) {
1238
1238
  case 'lostpointercapture':
1239
1239
  return (event) => {
1240
1240
  const { internal } = store.get();
1241
- if ('pointerId' in event && !internal.capturedMap.has(event.pointerId)) {
1241
+ if ('pointerId' in event && internal.capturedMap.has(event.pointerId)) {
1242
1242
  // If the object event interface had onLostPointerCapture, we'd call it here on every
1243
1243
  // object that's getting removed.
1244
1244
  internal.capturedMap.delete(event.pointerId);
@@ -2061,6 +2061,10 @@ class NgtRenderer {
2061
2061
  // if both are three instances, straightforward case
2062
2062
  if (parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'three' &&
2063
2063
  newChild.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'three') {
2064
+ // if child already attached to a parent, skip
2065
+ if (getLocalState(newChild).parent)
2066
+ return;
2067
+ // attach THREE child
2064
2068
  attachThreeChild(parent, newChild);
2065
2069
  // here, we handle the special case of if the parent has a compoundParent, which means this child is part of a compound parent template
2066
2070
  if (!newChild.__ngt_renderer__[4 /* NgtRendererClassId.compound */])