Repository navigation
Commit bac9e5a
committed
Rec Viewer: implement rotations on arbitrary axes (issue #233)...
... while at it implement 'ping-pong' tilt animations and fix the dreaded and pole-crossing snap
Add RotationAxis and AnimationMode enum (Z/X/Y) / (FULL_ROTATION/PING_PONG)
Animations use Rodrigues' rotation formula to trace great-circle paths without changing the view's
upVector, avoiding orientation jumps when animation stops.
New features:
- Auto-detect best rotation axis from current viewpoint (heuristic picks the axis
most aligned with the camera viewing direction)
- Ping-pong mode: oscillating back-and-forth animation over a configurable arc,
w/ toggle in the Utilities menu
- Shift+double-click forces legacy Z-axis rotation; plain double-click uses
auto-detection
- "Record Animation..." dialos shows axis choices and reflects the current
animation mode (full rotation vs ping-pong)
Bug fixes:
- setViewMode("side") no longer silently blocks animations by locking jzy3d
into PROFILE mode. Constrained view modes are automatically released
- Pole-crossing fix in AView: camera smoothly wraps across elevation poles
(±90°) instead of snapping to a mirrored viewpoint, by tracking pole flips
and negating the up vector on odd crossings as discussed in
jzy3d/jzy3d-api#2141 parent c3abaf4 commit bac9e5a
2 files changed
Lines changed: 523 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
| 149 | + | |
141 | 150 | | |
142 | 151 | | |
143 | 152 | | |
| |||
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
| 160 | + | |
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
| |||
0 commit comments