Skip to content

fix: make elastic deformation direction-aware#8

Open
shaominngqing wants to merge 1 commit intoQmDeve:masterfrom
shaominngqing:fix/direction-aware-elastic-deformation
Open

fix: make elastic deformation direction-aware#8
shaominngqing wants to merge 1 commit intoQmDeve:masterfrom
shaominngqing:fix/direction-aware-elastic-deformation

Conversation

@shaominngqing
Copy link

Summary

Fix the elastic deformation effect to follow the drag direction.

Changes

  • Previously, deformation was always X-stretch/Y-compress regardless of movement direction
  • Now stretches along the dominant movement axis (horizontal or vertical)
    • Horizontal drag: X-axis stretches, Y-axis compresses
    • Vertical drag: Y-axis stretches, X-axis compresses
  • Added stretchFactor parameter for easy customization

Before

Dragging in any direction always caused horizontal stretching.

After

Dragging now stretches in the direction of movement, creating a more natural "liquid" feel.

- Previously, deformation was always X-stretch/Y-compress regardless of movement direction
- Now stretches along the dominant movement axis (horizontal or vertical)
- Horizontal drag: X-axis stretches, Y-axis compresses
- Vertical drag: Y-axis stretches, X-axis compresses
- Added stretchFactor parameter for easy customization
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.

2 participants