added new sample code to demonstrate mass#1472
Open
Issykelly wants to merge 2 commits intoAlmasB:devfrom
Open
Conversation
Author
AlmasB
reviewed
Apr 13, 2026
Owner
AlmasB
left a comment
There was a problem hiding this comment.
Thanks for this, it looks good. Just one comment below.
| import javafx.scene.shape.Rectangle; | ||
| import javafx.scene.text.Font; | ||
| import javafx.scene.text.Text; | ||
|
|
Owner
There was a problem hiding this comment.
It seems your IDE is adding an extra new line for each empty line, please can you check. Standard practice is 1 empty line, like at Line 38.
Author
There was a problem hiding this comment.
Thank you for the response! I've gone ahead and fixed this. I'll be mindful to ensure I don't make the same formatting error again :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1433 I've added a new sample to demonstrate how mass affects physics, as well as how to directly make changes to the mass of an object. This demo uses small balls and seesaws to showcase how objects of different masses interact with each other and their environment.
Use the "Q", "E", "O" & "P" buttons to affect the on-screen mass. Then, click the left mouse button to spawn balls with the shown mass. Use these balls to interact with the seesaws and other balls and see how they interact!
As well as this, I've added the
MassDatacode to the module info exports.