UNPKG

lingo3d

Version:

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

59 lines 1.88 kB
import { prismaticJointDefaults, prismaticJointSchema } from "../../interface/IPrismaticJoint"; import JointBase from "../core/JointBase"; import { physxPtr } from "../../pointers/physxPtr"; import { configPrismaticJointSystem } from "../../systems/configSystems/configPrismaticJointSystem"; const createPrismatic = (actor0, pose0, actor1, pose1) => { const { physics, Px } = physxPtr[0]; return Px.PrismaticJointCreate(physics, actor0, pose0, actor1, pose1); }; class PrismaticJoint extends JointBase { static componentName = "prismaticJoint"; static defaults = prismaticJointDefaults; static schema = prismaticJointSchema; $createJoint(fromPxTransform, toPxTransform, fromManager, toManager) { configPrismaticJointSystem.add(this); return createPrismatic(fromManager.$actor, fromPxTransform, toManager.$actor, toPxTransform); } _limited; get limited() { return this._limited ?? false; } set limited(val) { this._limited = val; configPrismaticJointSystem.add(this); } _limitLow; get limitLow() { return this._limitLow ?? -100; } set limitLow(val) { this._limitLow = val; configPrismaticJointSystem.add(this); } _limitHigh; get limitHigh() { return this._limitHigh ?? 100; } set limitHigh(val) { this._limitHigh = val; configPrismaticJointSystem.add(this); } _stiffness; get stiffness() { return this._stiffness ?? 0; } set stiffness(val) { this._stiffness = val; configPrismaticJointSystem.add(this); } _damping; get damping() { return this._damping ?? 0; } set damping(val) { this._damping = val; configPrismaticJointSystem.add(this); } } export default PrismaticJoint; //# sourceMappingURL=PrismaticJoint.js.map