Enhance multi-screen playback and improve panel source logic#8
Open
shima004 wants to merge 4 commits into
Open
Enhance multi-screen playback and improve panel source logic#8shima004 wants to merge 4 commits into
shima004 wants to merge 4 commits into
Conversation
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.
This pull request introduces significant improvements to camera synchronization and animation in the
SimMap.sveltecomponent, and adds a new interpolation utility for smooth entity movement. The main focus is on enabling precise camera state sharing and external control, as well as improving the smoothness of entity transitions.Camera synchronization and control enhancements:
SimCameratype to encapsulate camera state (targetandzoom), and added utility functions for extracting and applying camera state fromOrthographicViewState. This enables consistent camera state management and sharing. [1] [2]broadcastCamera,__simscope_getCamera, and__simscope_setCamerato allow external scripts or parent windows to get/set the camera state and receive camera updates, supporting both direct function calls and postMessage API. [1] [2]Camera state consistency improvements:
currentTargetandcurrentZoomare always updated when the camera is moved (including during follow mode and focus changes), so the camera state remains accurate and in sync with the view. [1] [2] [3]Entity interpolation utility:
interpolateEntitiesfunction ininterpolation.tsthat uses Catmull-Rom spline interpolation (with ease-in-out timing) for smooth movement of entities along their position history, falling back to linear interpolation when history is insufficient. This function returns a new set of entities with interpolated positions for smooth animation between simulation steps.