Skip to content

Enhance Physics API and Fix Loading Screen Stacking#175

Open
brettfxio wants to merge 1 commit into
mainfrom
physics-and-ux-improvements-13312066207241550192
Open

Enhance Physics API and Fix Loading Screen Stacking#175
brettfxio wants to merge 1 commit into
mainfrom
physics-and-ux-improvements-13312066207241550192

Conversation

@brettfxio

Copy link
Copy Markdown
Contributor

This PR introduces several enhancements to the physics API and fixes a UX bug related to the loading screen.

Physics Enhancements

  • Velocity Control: Added setLinearVelocity and setAngularVelocity to the BabylonSceneManager, allowing developers to directly set the velocity of physics-enabled objects. Corresponding Blockly blocks have been added to the 'Game' category.
  • Collision Management: Added a clearCollisionCache method and block. This is useful for scenarios where a collision needs to be detected multiple times between the same pair of objects (e.g., a repeating bounce effect).

UX Bug Fixes

  • Loading Screen Stacking: Fixed an issue where multiple calls to displayLoadingUI (either from code or rapid user interaction) would result in multiple div elements being appended to the DOM. A guard check now ensures only one loading screen exists at a time.

Testing

  • Added tests/loading_screen.spec.js to specifically verify the loading screen fix.
  • Verified all other critical and feature tests pass.
  • Visually verified the new blocks and the loading screen behavior using Playwright screenshots.

PR created automatically by Jules for task 13312066207241550192 started by @brettfxio

- Add setLinearVelocity and setAngularVelocity methods to BabylonSceneManager.
- Add corresponding Blockly blocks and generators for velocity control.
- Implement clearCollisionCache to allow re-triggering collisions.
- Fix bug where multiple loading screens could stack in the DOM.
- Add Playwright test to verify the loading screen fix.

Co-authored-by: brettfxio <105930054+brettfxio@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant