Fix portrait orientation and reduce gesture sensitivity
- Rotate texture coordinates 90° for portrait mode display (camera sensors are landscape-oriented by default) - Add sensitivity dampening constants for all gesture types: - Position drag: 0.3x - Rotation: 0.4x - Size pinch: 0.5x - Zoom pinch: 0.6x - Track accumulated drag for smoother position changes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
cc367bc713
commit
3bbf4f9d14
2 changed files with 26 additions and 9 deletions
|
|
@ -44,12 +44,13 @@ class TiltShiftRenderer(
|
|||
1f, 1f // Top right
|
||||
)
|
||||
|
||||
// Texture coordinates (flip Y for camera)
|
||||
// Texture coordinates rotated 90° for portrait mode
|
||||
// (Camera sensors are landscape-oriented, we rotate to portrait)
|
||||
private val texCoords = floatArrayOf(
|
||||
0f, 1f, // Bottom left
|
||||
1f, 1f, // Bottom right
|
||||
0f, 0f, // Top left
|
||||
1f, 0f // Top right
|
||||
1f, 1f, // Bottom left of screen -> bottom right of texture
|
||||
1f, 0f, // Bottom right of screen -> top right of texture
|
||||
0f, 1f, // Top left of screen -> bottom left of texture
|
||||
0f, 0f // Top right of screen -> top left of texture
|
||||
)
|
||||
|
||||
override fun onSurfaceCreated(gl: GL10?, config: EGLConfig?) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue