angular-three 4.0.6 → 4.0.8

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.
@@ -1922,7 +1922,7 @@ function removeThreeChild(child, parent, dispose) {
1922
1922
  removeInteractivity(store, child);
1923
1923
  }
1924
1924
  // dispose
1925
- const isPrimitive = cIS?.type && cIS.type !== 'ngt-primitive';
1925
+ const isPrimitive = cIS?.type && cIS.type === 'ngt-primitive';
1926
1926
  if (!isPrimitive && child['dispose'] && !is.three(child, 'isScene')) {
1927
1927
  queueMicrotask(() => child['dispose']());
1928
1928
  }
@@ -2127,11 +2127,10 @@ class NgtRenderer2 {
2127
2127
  if (!injectedArgs[0])
2128
2128
  throw new Error(`[NGT] ngt-primitive without args is invalid`);
2129
2129
  const object = injectedArgs[0];
2130
- let instanceState = getInstanceState(object);
2131
- if (!instanceState || instanceState.type !== 'ngt-primitive') {
2132
- // if an object isn't already "prepared", we'll prepare it
2133
- prepare(object, 'ngt-primitive', instanceState);
2130
+ if (getInstanceState(object)) {
2131
+ delete object['__ngt__'];
2134
2132
  }
2133
+ prepare(object, 'ngt-primitive');
2135
2134
  const primitiveRendererNode = createRendererNode('three', object, this.document);
2136
2135
  if (injectedParent) {
2137
2136
  primitiveRendererNode.__ngt_renderer__[5 /* NgtRendererClassId.parent */] =