Skip to content

feat: add multiturn tracking to rotation constraint; rename scale to ratio - #976

Open
dragoncoder047 wants to merge 14 commits into
kaplayjs:masterfrom
dragoncoder047:fix-constraint-transformation-math
Open

feat: add multiturn tracking to rotation constraint; rename scale to ratio#976
dragoncoder047 wants to merge 14 commits into
kaplayjs:masterfrom
dragoncoder047:fix-constraint-transformation-math

Conversation

@dragoncoder047

Copy link
Copy Markdown
Contributor

title

Summary

  • Changeloged

@pkg-pr-new

pkg-pr-new Bot commented Dec 16, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/kaplayjs/kaplay@976

commit: 71641b1

Comment thread CHANGELOG.md Outdated
@lajbel

lajbel commented Feb 18, 2026

Copy link
Copy Markdown
Member

Please tag me when the merge conflicts are fixed. I'll merge

@dragoncoder047

Copy link
Copy Markdown
Contributor Author

looks like no conflicts i think

@lajbel

lajbel commented Aug 2, 2026

Copy link
Copy Markdown
Member

What is exactly the point of this PR?

@lajbel lajbel added this to the 4000.0.0 LTS milestone Aug 2, 2026
@dragoncoder047

Copy link
Copy Markdown
Contributor Author

The point is to make it so that two objects with rotation constraint between them is able to work when scale ratio is less than 1, normally since the source's angle is 0-360 when it wraps back from 360 to 0 the destination object (the one the constraint is attached to) is going to suddenly jump back to being at its zero position, but this code automatically tracks that boundary jump and compensates so that the destination's rotation is continuous.

Also, since now the constraint actually behaves like gears/pulleys, it just makes sense to rename scale to ratio.

@amyspark-ng

Copy link
Copy Markdown
Contributor

@lajbel

@amyspark-ng
amyspark-ng requested a review from mflerackers August 4, 2026 21:21
@amyspark-ng

Copy link
Copy Markdown
Contributor

@dragoncoder047 make sure this is properly changelogged btw

@amyspark-ng amyspark-ng added types Something related to TypeScript core Related to KAPLAY Core functionality changelog This PR needs changelog labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog This PR needs changelog core Related to KAPLAY Core functionality types Something related to TypeScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants