Skip to content

refactor!: used setters and getters for motorSpeed - #58

Merged
spydon merged 5 commits into
flame-engine:mainfrom
alestiago:refactor/motor-speed-set-get
May 14, 2022
Merged

refactor!: used setters and getters for motorSpeed#58
spydon merged 5 commits into
flame-engine:mainfrom
alestiago:refactor/motor-speed-set-get

Conversation

@alestiago

@alestiago alestiago commented May 13, 2022

Copy link
Copy Markdown
Collaborator

Description

Removes setMotorSpeed and getMotorSpeed from RevoluteJoint, PrismaticJoint and WheelJoint in favour of dart's setters and getters.

The following snippet illustrates the API change.

joint.setMotorSpeed(2); // OLD
joint.motorSpeed = 2; // NEW

joint.getMotorSpeed(); // OLD
joint.motorSpeed; // NEW

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

@alestiago

Copy link
Copy Markdown
Collaborator Author

@spydon , CI/CD seems to be failing. Updated #47 to fix this.

@spydon
spydon self-requested a review May 13, 2022 13:23

@spydon spydon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! A test that checks that the body is awake after setting the speed would be good too (for possible future regressions).

@spydon
spydon merged commit 96103f1 into flame-engine:main May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants