The spring damping of the joint per angular axis. Applies to a 6dof joint, on axes with a non-zero angular-stiffness.
The rest angle of the joint's angular springs. Applies to a 6dof joint, in degrees per axis, on axes with a non-zero angular-stiffness.
The rotation limits of the joint about its X axis. Applies to a 6dof joint, as a lower and an upper limit in degrees, when angular-motion-x is limited.
The rotation limits of the joint about its Y axis. Applies to a 6dof joint, as a lower and an upper limit in degrees, when angular-motion-y is limited.
The rotation limits of the joint about its Z axis. Applies to a 6dof joint, as a lower and an upper limit in degrees, when angular-motion-z is limited.
How the joint constrains rotation about its X axis. Applies to a 6dof joint. Can be
locked, limited or free. Defaults to locked.
How the joint constrains rotation about its Y axis. Applies to a 6dof joint. Can be
locked, limited or free. Defaults to locked.
How the joint constrains rotation about its Z axis. Applies to a 6dof joint. Can be
locked, limited or free. Defaults to locked.
The spring stiffness of the joint per angular axis. Applies to a 6dof joint, where 0 disables the spring on that axis.
The impulse above which the joint breaks. It is in newton seconds, and defaults to
Infinity, which makes the joint unbreakable.
Whether collision is enabled between the two constrained bodies.
Whether the limits of the joint are enforced. Applies to a hinge, slider or ball joint.
The reference (a pc-entity, pc-model or pc-node name, or a document-wide #
selector) to the element providing the first constrained body. An exact name resolves
against the nearest enclosing entity first, then outward, then the document. The reference
resolves when it is set, so an entity created later is picked up by setting the attribute
again. A non-empty reference that does not resolve warns, naming which of the two causes it
hit.
The reference (a pc-entity, pc-model or pc-node name, or a document-wide #
selector) to the element providing the second constrained body, or empty for the
world-space case. Empty constrains the first body to a fixed point in world space. An exact
name resolves against the nearest enclosing entity first, then outward, then the document.
The reference resolves when it is set, so an entity created later is picked up by setting
the attribute again. A non-empty reference that does not resolve warns; an empty one is the
documented world-space case and stays silent.
The rotation or travel limits of the joint. They are the lower and upper limit of a hinge joint's rotation in degrees, or of a slider joint's travel in meters, applied when enable-limits is set.
The spring damping of the joint per linear axis. Applies to a 6dof joint, on axes with a non-zero linear-stiffness.
The rest point of the joint's linear springs. Applies to a 6dof joint, in meters per axis, on axes with a non-zero linear-stiffness.
The translation limits of the joint along its X axis. Applies to a 6dof joint, as a lower and an upper limit in meters, when linear-motion-x is limited.
The translation limits of the joint along its Y axis. Applies to a 6dof joint, as a lower and an upper limit in meters, when linear-motion-y is limited.
The translation limits of the joint along its Z axis. Applies to a 6dof joint, as a lower and an upper limit in meters, when linear-motion-z is limited.
How the joint constrains translation along its X axis. Applies to a 6dof joint. Can be
locked, limited or free. Defaults to locked.
How the joint constrains translation along its Y axis. Applies to a 6dof joint. Can be
locked, limited or free. Defaults to locked.
How the joint constrains translation along its Z axis. Applies to a 6dof joint. Can be
locked, limited or free. Defaults to locked.
The spring stiffness of the joint per linear axis. Applies to a 6dof joint, where 0 disables the spring on that axis.
The maximum torque or force of the joint's motor. It is a torque in newton meters for a hinge joint and a force in newtons for a slider joint, where 0 disables the motor.
The target speed of the joint's motor. It is in degrees per second for a hinge joint and meters per second for a slider joint, and is active while max-motor-force is greater than 0.
The maximum swing of the joint's primary axis towards the joint frame's Y axis. Applies to a ball joint, whose primary axis is X, so this is a rotation about Z. It is a half-angle in degrees, applied when enable-limits is set.
The maximum swing of the joint's primary axis towards the joint frame's Z axis. Applies to a ball joint, whose primary axis is X, so this is a rotation about Y. It is a half-angle in degrees, applied when enable-limits is set.
The maximum twist of the joint about its primary axis. Applies to a ball joint, in degrees, when enable-limits is set.
The type of the joint. Can be fixed, ball, hinge, slider or 6dof. Defaults to
fixed.
The nearest ancestor <pc-app> element, or null if this element has no <pc-app>
ancestor. The search starts at the parent, so an element never resolves to itself.
The closest app element, or null.
The nearest ancestor element that fronts an entity — <pc-entity>, <pc-model> or
<pc-node> — or null if this element has no such ancestor. The search starts at the
parent, so an element never resolves to itself.
The closest entity-fronting element, or null.
Gets the underlying PlayCanvas joint component. null until the element is
ready — see ComponentElement.component.
The joint component, or null.
Gets the enabled state of the component.
The enabled state of the component.
Sets the enabled state of the component.
The enabled state of the component.
Protected_Called when the element is fully initialized and ready. Subclasses should call this when
they're ready. Resolves the ready promise and dispatches a bubbling, composed ready
event. Signals at most once per readiness cycle: a repeat call before _resetReady
has re-armed the promise does nothing.
Protected_Returns the ready promise to its pending state. Subclasses should call this when the
resource their readiness announced is torn down (typically from disconnectedCallback),
so that a later re-initialization can signal readiness again. Does nothing while the
promise is still pending — an in-flight waiter carries over to the next readiness cycle
rather than being stranded on a promise nothing will ever resolve.
ProtectedgetReturns the data the component is created with: the value of every attribute in the
subclass's schema. Overridden by subclasses that cache their properties themselves, to
supply those. The element's enabled state is not among them: the base class adds it when
it creates the component.
The initial component data.
ProtectedinitConfigures the newly added component. Overridden by subclasses whose setup goes beyond the initial data — child-element handling, asset resolution and the like.
Returns a promise that resolves with this element when it's ready. This is the low-level primitive underlying whenReady, which is the recommended way to wait for elements.
Readiness tracks the element's current lifecycle: once a ready element is torn down (for example by removing it from the document), this returns a fresh promise that resolves when the element is next ready. A promise obtained earlier stays resolved — call this again after re-inserting an element rather than reusing a promise from before its removal.
A promise that resolves with this element when it's ready.
The JointComponentElement interface provides properties and methods for manipulating
<pc-joint>elements. The JointComponentElement interface also inherits the properties and methods of the HTMLElement interface.The entity holding the joint is not itself constrained. Its world transform defines the joint frame — the anchor point and axes the constraint operates about — with the local X axis as the primary axis: a hinge rotates about it, a slider translates along it and a ball joint twists about it. The constrained bodies are referenced by
entity-aandentity-b, both of which need a rigid body component; leavingentity-bempty constrainsentity-ato a fixed point in world space. A reference can name any entity-fronting element —<pc-entity>,<pc-model>or<pc-node>, so a ragdoll can join a model's own skeleton nodes by name — and a name resolves against the nearest enclosing entity first, then outward through the entity hierarchy, then the document, while a#selector resolves document-wide. A<template>prefab with one entity-fronting root can therefore wire its joints by name and stay self-contained when cloned. The underlying engine component is in alpha, so its API may change.Fires
break - Fired when the impulse on the joint exceeds
break-impulseand the constraint breaks. A broken joint no longer constrains its bodies; callingrefreshFrames()on the underlying component re-attaches it. Bubbles and is composed.Engine component: JointComponent (
joint).