@adatechnology/game-animals-three 0.3.6 → 0.3.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.
package/dist/index.js CHANGED
@@ -801,6 +801,7 @@ var lineUpAnimals = (rigs, options = {}) => {
801
801
  };
802
802
 
803
803
  // src/test-area/module.ts
804
+ import { discardObject3D } from "@adatechnology/game-shapes-three";
804
805
  import { lineUpLength as lineUpLength2, visualStateOf as visualStateOf2 } from "@adatechnology/game-animals";
805
806
 
806
807
  // src/test-area/scenarios.ts
@@ -976,7 +977,7 @@ function createAnimalsTestModule(options = {}) {
976
977
  animals?.setVisualState(entry.rig, visualStateOf2(entry.rig.species.outcome, true, state === "dead"));
977
978
  };
978
979
  const clearRings = () => {
979
- for (const ring of rings) ring.parent?.remove(ring);
980
+ discardObject3D(rings);
980
981
  rings = [];
981
982
  };
982
983
  const refreshLayers = () => {
@@ -1017,7 +1018,7 @@ function createAnimalsTestModule(options = {}) {
1017
1018
  }
1018
1019
  };
1019
1020
  const clearSkins = () => {
1020
- skinGroup?.parent?.remove(skinGroup);
1021
+ if (skinGroup) discardObject3D(skinGroup);
1021
1022
  skinGroup = null;
1022
1023
  skins = [];
1023
1024
  };