UNPKG

lingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

19 lines 891 B
import { configPhysicsShapeSystem } from "../configSystems/configPhysicsShapeSystem"; import { configPhysicsTransformSystem } from "../configSystems/configPhysicsTransformSystem"; import { createLoadedEffectSystem } from "../utils/createLoadedEffectSystem"; export const configPhysicsSystem = createLoadedEffectSystem("configPhysicsSystem", { effect: (self) => { if (!("physics" in self)) return; const mode = self.physics || !!self.$jointCount; let modeChanged = mode !== self.userData.physicsMode; if (modeChanged && !mode && !self.userData.physicsMode) modeChanged = false; self.userData.physicsMode = mode; if (modeChanged) configPhysicsShapeSystem.add(self); else if (self.$actor) configPhysicsTransformSystem.add(self); } }); //# sourceMappingURL=configPhysicsSystem.js.map