Skip to content

Play/Pause object motion - #20

Open
nbbosco wants to merge 21 commits into
mainfrom
play/pause
Open

Play/Pause object motion#20
nbbosco wants to merge 21 commits into
mainfrom
play/pause

Conversation

@nbbosco

@nbbosco nbbosco commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

This pull request adds the ability to play and pause object motion in the 3D viewer, providing both a toolbar button and a keyboard shortcut (spacebar) for user control. It introduces state management for object motion, updates the UI to reflect motion status, and ensures proper communication with the backend when the motion state changes.

New Object Motion Controls:

  • Added a ToggleMovementButton to the display toolbar, allowing users to play or pause object motion directly from the UI. The button visually reflects the current motion state and is only shown when motion is available. [1] [2] [3] [4]
  • Implemented a spacebar keyboard shortcut to toggle object motion, updating both the UI and the backend accordingly. [1] [2]

State Management and Backend Communication:

  • Introduced a motionState object in the store to track whether object motion is paused and whether motion is available.
  • Created the objectMotionManager and related functions to handle object motion availability, state toggling, and backend notification.
  • Updated message dispatch logic to respect the paused state, preventing object updates when motion is paused, and to handle new motion-related messages from the backend. [1] [2] [3] [4]
image

@nbbosco
nbbosco requested a review from ericgozzi April 27, 2026 08:05
@nbbosco nbbosco self-assigned this Apr 27, 2026
@nbbosco nbbosco added the enhancement New feature or request label Apr 27, 2026
Comment thread frontend/compas_threejs/src/components/tools/display/ToggleMovementButton.vue Outdated
@nbbosco
nbbosco requested a review from ericgozzi May 7, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants