UNPKG

lingo3d

Version:

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

20 lines 946 B
import { physxPtr } from "../../pointers/physxPtr"; import { CM2M } from "../../globals"; import createInternalSystem from "../utils/createInternalSystem"; export const configPrismaticJointSystem = createInternalSystem("configPrismaticJointSystem", { effect: (self) => { const { $pxJoint, limited, limitLow, limitHigh, stiffness, damping } = self; if (!$pxJoint) return; const { PxJointLinearLimitPair, PxPrismaticJointFlagEnum, destroy } = physxPtr[0]; if (limited) { const linearLimit = new PxJointLinearLimitPair(limitLow * CM2M, limitHigh * CM2M); linearLimit.stiffness = stiffness; linearLimit.damping = damping; $pxJoint.setLimit(linearLimit); destroy(linearLimit); } $pxJoint.setPrismaticJointFlag(PxPrismaticJointFlagEnum.eLIMIT_ENABLED(), limited); } }); //# sourceMappingURL=configPrismaticJointSystem.js.map