lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
67 lines • 2.07 kB
JavaScript
import { revoluteJointDefaults, revoluteJointSchema } from "../../interface/IRevoluteJoint";
import JointBase from "../core/JointBase";
import { physxPtr } from "../../pointers/physxPtr";
import { configRevoluteJointSystem } from "../../systems/configSystems/configRevoluteJointSystem";
const createRevolute = (actor0, pose0, actor1, pose1) => {
const { physics, Px } = physxPtr[0];
return Px.RevoluteJointCreate(physics, actor0, pose0, actor1, pose1);
};
class RevoluteJoint extends JointBase {
static componentName = "revoluteJoint";
static defaults = revoluteJointDefaults;
static schema = revoluteJointSchema;
$createJoint(fromPxTransform, toPxTransform, fromManager, toManager) {
configRevoluteJointSystem.add(this);
return createRevolute(fromManager.$actor, fromPxTransform, toManager.$actor, toPxTransform);
}
_limited;
get limited() {
return this._limited ?? false;
}
set limited(val) {
this._limited = val;
configRevoluteJointSystem.add(this);
}
_limitLow;
get limitLow() {
return this._limitLow ?? -360;
}
set limitLow(val) {
this._limitLow = val;
configRevoluteJointSystem.add(this);
}
_limitHigh;
get limitHigh() {
return this._limitHigh ?? 360;
}
set limitHigh(val) {
this._limitHigh = val;
configRevoluteJointSystem.add(this);
}
_stiffness;
get stiffness() {
return this._stiffness ?? 0;
}
set stiffness(val) {
this._stiffness = val;
configRevoluteJointSystem.add(this);
}
_damping;
get damping() {
return this._damping ?? 0;
}
set damping(val) {
this._damping = val;
configRevoluteJointSystem.add(this);
}
_driveVelocity;
get driveVelocity() {
return this._driveVelocity ?? 0;
}
set driveVelocity(val) {
this._driveVelocity = val;
configRevoluteJointSystem.add(this);
}
}
export default RevoluteJoint;
//# sourceMappingURL=RevoluteJoint.js.map