# Class JointData

- Defined in dynamics/impulse_joint.d.ts:173

#####
Index

### Constructors

constructor

### Properties

anchor1
anchor2
axesMask
axis
damping
frame1
frame2
jointType
length
limits
limitsEnabled
stiffness

### Methods

intoRaw
fixed
generic
prismatic
revolute
rope
spherical
spring

## Constructors

### `Private` constructor

- new JointData(): JointData

- #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:186

## Properties

### anchor1

anchor1: Vector

- Defined in dynamics/impulse_joint.d.ts:174

### anchor2

anchor2: Vector

- Defined in dynamics/impulse_joint.d.ts:175

### axesMask

axesMask: JointAxesMask

- Defined in dynamics/impulse_joint.d.ts:182

### axis

axis: Vector

- Defined in dynamics/impulse_joint.d.ts:176

### damping

damping: number

- Defined in dynamics/impulse_joint.d.ts:184

### frame1

frame1: Rotation

- Defined in dynamics/impulse_joint.d.ts:177

### frame2

frame2: Rotation

- Defined in dynamics/impulse_joint.d.ts:178

### jointType

jointType: JointType

- Defined in dynamics/impulse_joint.d.ts:179

### length

length: number

- Defined in dynamics/impulse_joint.d.ts:185

### limits

limits: number[]

- Defined in dynamics/impulse_joint.d.ts:181

### limitsEnabled

limitsEnabled: boolean

- Defined in dynamics/impulse_joint.d.ts:180

### stiffness

stiffness: number

- Defined in dynamics/impulse_joint.d.ts:183

## Methods

### intoRaw

- intoRaw(): RawGenericJoint

- #### Returns RawGenericJoint

  - Defined in dynamics/impulse_joint.d.ts:258

### `Static` fixed

- fixed(anchor1, frame1, anchor2, frame2): JointData

- Creates a new joint descriptor that builds a Fixed joint.

  A fixed joint removes all the degrees of freedom between the affected bodies, ensuring their anchor and local frames coincide in world-space.

  #### Parameters

  - anchor1: Vector

    Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - frame1: Rotation

    The reference orientation of the joint wrt. the first rigid-body.

  - anchor2: Vector

    Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - frame2: Rotation

    The reference orientation of the joint wrt. the second rigid-body.

  #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:200

### `Static` generic

- generic(anchor1, anchor2, axis, axesMask): JointData

- Create a new joint descriptor that builds generic joints.

  A generic joint allows customizing its degrees of freedom by supplying a mask of the joint axes that should remain locked.

  #### Parameters

  - anchor1: Vector

    Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - anchor2: Vector

    Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - axis: Vector

    The X axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.

  - axesMask: JointAxesMask

    Mask representing the locked axes of the joint. You can use logical OR to select these from the JointAxesMask enum. For example, passing (JointAxesMask.AngX || JointAxesMask.AngY) will create a joint locked in the X and Y rotational axes.

  #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:218

### `Static` prismatic

- prismatic(anchor1, anchor2, axis): JointData

- Creates a new joint descriptor that builds a Prismatic joint.

  A prismatic joint removes all the degrees of freedom between the affected bodies, except for the translation along one axis.

  #### Parameters

  - anchor1: Vector

    Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - anchor2: Vector

    Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - axis: Vector

    Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.

  #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:244

### `Static` revolute

- revolute(anchor1, anchor2, axis): JointData

- Create a new joint descriptor that builds Revolute joints.

  A revolute joint removes all degrees of freedom between the affected bodies except for the rotation along one axis.

  #### Parameters

  - anchor1: Vector

    Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - anchor2: Vector

    Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - axis: Vector

    Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.

  #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:257

### `Static` rope

- rope(length, anchor1, anchor2): JointData

- #### Parameters

  - length: number
  - anchor1: Vector
  - anchor2: Vector

  #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:202

### `Static` spherical

- spherical(anchor1, anchor2): JointData

- Create a new joint descriptor that builds spherical joints.

  A spherical joint allows three relative rotational degrees of freedom by preventing any relative translation between the anchors of the two attached rigid-bodies.

  #### Parameters

  - anchor1: Vector

    Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  - anchor2: Vector

    Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

  #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:231

### `Static` spring

- spring(rest_length, stiffness, damping, anchor1, anchor2): JointData

- #### Parameters

  - rest_length: number
  - stiffness: number
  - damping: number
  - anchor1: Vector
  - anchor2: Vector

  #### Returns JointData

  - Defined in dynamics/impulse_joint.d.ts:201