Skip to content

Commit 4d8d335

Browse files
willeastcottclaude
andcommitted
refactor(joint): drop underscore from getFixedBody
The underscore claims class privacy, but getFixedBody is part of the component/system contract (called from JointComponent). Name it plainly and rely on @ignore to keep it off the public docs/API surface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent fec00e1 commit 4d8d335

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/framework/components/joint/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ class JointComponent extends Component {
14011401
const bodyA = rigidbodyA.body;
14021402

14031403
// world-pinned joints attach to a shared static body with an identity transform
1404-
const bodyB = rigidbodyB ? rigidbodyB.body : this.system._getFixedBody();
1404+
const bodyB = rigidbodyB ? rigidbodyB.body : this.system.getFixedBody();
14051405

14061406
Debug.call(() => {
14071407
if (rigidbodyA.type !== BODYTYPE_DYNAMIC && (!rigidbodyB || rigidbodyB.type !== BODYTYPE_DYNAMIC)) {

src/framework/components/joint/system.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class JointComponentSystem extends ComponentSystem {
4343
_breakable = new Set();
4444

4545
/**
46-
* Shared static Ammo body that world-pinned joints attach to - see {@link _getFixedBody}.
46+
* Shared static Ammo body that world-pinned joints attach to - see {@link getFixedBody}.
4747
*
4848
* @type {object|null}
4949
* @private
@@ -82,7 +82,7 @@ class JointComponentSystem extends ComponentSystem {
8282
* @returns {object} The shared static Ammo body.
8383
* @ignore
8484
*/
85-
_getFixedBody() {
85+
getFixedBody() {
8686
if (!this._fixedBody) {
8787
const transform = new Ammo.btTransform();
8888
transform.setIdentity();

0 commit comments

Comments
 (0)