From cb3cabeda16e7f09f4b5fdf068baa77dcef44b50 Mon Sep 17 00:00:00 2001 From: bherbruck Date: Wed, 21 Oct 2026 11:19:40 -0400 Subject: [PATCH] Remove camera animation: every view change and orbit applies at once (#4296) Co-authored-by: Claude Sonnet 5.5 --- assets/locales/cs.json | 3 - assets/locales/da.json | 3 - assets/locales/de.json | 3 - assets/locales/en.json | 3 - assets/locales/es.json | 3 - assets/locales/fr.json | 3 - assets/locales/gl.json | 3 - assets/locales/hu.json | 3 - assets/locales/id.json | 3 - assets/locales/it.json | 3 - assets/locales/ja.json | 3 - assets/locales/ko.json | 3 - assets/locales/ms.json | 3 - assets/locales/nl.json | 3 - assets/locales/pl.json | 3 - assets/locales/pt-BR.json | 3 - assets/locales/ro.json | 3 - assets/locales/ru.json | 3 - assets/locales/sv.json | 3 - assets/locales/tr.json | 3 - assets/locales/uk.json | 3 - assets/locales/vi.json | 3 - assets/locales/zh-TW.json | 3 - assets/locales/zh.json | 3 - crates/render/src/camera.rs | 113 +------------- crates/render/src/lib.rs | 2 +- crates/ui-egui/src/control.rs | 26 ---- crates/ui-egui/src/dialogs.rs | 5 +- crates/ui-egui/src/documents.rs | 1 - crates/ui-egui/src/issue_report.rs | 1 - crates/ui-egui/src/lib.rs | 45 +----- crates/ui-egui/src/look_at_tests.rs | 2 - crates/ui-egui/src/menu_tests.rs | 4 +- crates/ui-egui/src/navigation.rs | 147 ++++-------------- crates/ui-egui/src/navigation_cube.rs | 47 +++--- crates/ui-egui/src/prefs.rs | 18 +-- crates/ui-egui/src/render_workspace_tests.rs | 1 - crates/ui-egui/src/scenario.rs | 47 +----- .../ui-egui/src/sketch_guidance_ui_tests.rs | 1 - crates/ui-egui/src/sketch_side_ui_tests.rs | 2 - crates/ui-egui/src/toolbar.rs | 8 +- crates/ui-egui/src/view_home_tests.rs | 1 - crates/ui-egui/src/viewport.rs | 76 ++------- crates/ui-egui/src/viewport_layout_tests.rs | 3 - crates/ui-egui/src/viewport_overlays_tests.rs | 1 - .../scenarios/s38_view_anim_no_jump.json | 74 --------- .../tests/scenarios/sketch_mirror_dialog.json | 2 +- docs/book/src/guide/ui-tour.md | 5 +- docs/control-protocol.md | 4 +- docs/i18n_catalog_ja.md | 3 - 50 files changed, 94 insertions(+), 617 deletions(-) delete mode 100644 crates/ui-egui/tests/scenarios/s38_view_anim_no_jump.json diff --git a/assets/locales/cs.json b/assets/locales/cs.json index 74e7addac..dfc9aae17 100644 --- a/assets/locales/cs.json +++ b/assets/locales/cs.json @@ -1287,9 +1287,7 @@ "ui.angle": "Úhel", "ui.angle_decimals": "Desetinná místa úhlu", "ui.animateJoint": "Animovat kloub", - "ui.animate_view_changes": "Animovat změny pohledu", "ui.animation": "Animace", - "ui.animation_speed": "Rychlost animace", "ui.anti_aliasing": "Vyhlazování hran", "ui.apply": "Použít", "ui.arc": "Oblouk", @@ -1551,7 +1549,6 @@ "ui.lock": "Zamknout", "ui.loft": "Spojení profilů", "ui.look_at": "Pohled kolmo", - "ui.look_at_anim_desc": "Pohled podél osy, pohled kolmo, výchozí pohled a přizpůsobení", "ui.manipulator_free_alt": "Volné tažení manipulátorem také s Alt/Option", "ui.manipulator_free_alt_tip": "Zapnuto: Alt/Option nebo Ctrl/Cmd na šipkách vysunutí / manipulátoru vypne přichytávání hodnot. Vypnuto: pouze Ctrl/Cmd.", "ui.manufacture": "Výroba", diff --git a/assets/locales/da.json b/assets/locales/da.json index 8bb964ef7..759299242 100644 --- a/assets/locales/da.json +++ b/assets/locales/da.json @@ -1287,9 +1287,7 @@ "ui.angle": "Vinkel", "ui.angle_decimals": "Vinkeldecimaler", "ui.animateJoint": "Animér led", - "ui.animate_view_changes": "Animér visningsskift", "ui.animation": "Animation", - "ui.animation_speed": "Animationshastighed", "ui.anti_aliasing": "Kantudjævning", "ui.apply": "Anvend", "ui.arc": "Bue", @@ -1551,7 +1549,6 @@ "ui.lock": "Lås", "ui.loft": "Loft", "ui.look_at": "Se på", - "ui.look_at_anim_desc": "Aksevisning, Se på, Hjem og Tilpas", "ui.manipulator_free_alt": "Brug også Alt/Option til at trække frit", "ui.manipulator_free_alt_tip": "Slået til: Hold Alt/Option eller Ctrl/Cmd nede, mens du trækker i pilene ved ekstrudering eller flytning, for at undgå faste værditrin. Slået fra: Kun Ctrl/Cmd.", "ui.manufacture": "Fremstilling", diff --git a/assets/locales/de.json b/assets/locales/de.json index 21e75264d..29a4e0516 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -1287,9 +1287,7 @@ "ui.angle": "Winkel", "ui.angle_decimals": "Winkel-Dezimalstellen", "ui.animateJoint": "Gelenk animieren", - "ui.animate_view_changes": "Ansichtsänderungen animieren", "ui.animation": "Animation", - "ui.animation_speed": "Animationsgeschwindigkeit", "ui.anti_aliasing": "Kantenglättung", "ui.apply": "Anwenden", "ui.arc": "Kreisbogen", @@ -1551,7 +1549,6 @@ "ui.lock": "Sperren", "ui.loft": "Loft", "ui.look_at": "Ansehen", - "ui.look_at_anim_desc": "Achsenansicht, Ansehen, Home und Einpassen", "ui.manipulator_free_alt": "Freies Ziehen des Manipulators auch mit Alt/Option", "ui.manipulator_free_alt_tip": "An: Alt/Option oder Strg/Cmd auf Extrusions-/Gizmo-Pfeilen deaktiviert das Einrasten von Werten. Aus: nur Strg/Cmd.", "ui.manufacture": "Fertigung", diff --git a/assets/locales/en.json b/assets/locales/en.json index 842513fc8..0e3cb0ae7 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -1295,9 +1295,7 @@ "ui.angle": "Angle", "ui.angle_decimals": "Angle decimals", "ui.animateJoint": "Animate Joint", - "ui.animate_view_changes": "Animate view changes", "ui.animation": "Animation", - "ui.animation_speed": "Animation speed", "ui.anti_aliasing": "Anti-aliasing", "ui.apply": "Apply", "ui.arc": "Arc", @@ -1559,7 +1557,6 @@ "ui.lock": "Lock", "ui.loft": "Loft", "ui.look_at": "Look At", - "ui.look_at_anim_desc": "Axis view, Look At, Home and Fit", "ui.manipulator_free_alt": "Manipulator free drag also on Alt/Option", "ui.manipulator_free_alt_tip": "On: Alt/Option or Ctrl/Cmd on extrude / gizmo arrows disables value snapping. Off: Ctrl/Cmd only.", "ui.manufacture": "Manufacture", diff --git a/assets/locales/es.json b/assets/locales/es.json index 5149b0122..73b9ef0d5 100644 --- a/assets/locales/es.json +++ b/assets/locales/es.json @@ -1287,9 +1287,7 @@ "ui.angle": "Ángulo", "ui.angle_decimals": "Decimales de ángulo", "ui.animateJoint": "Animar unión", - "ui.animate_view_changes": "Animar cambios de vista", "ui.animation": "Animación", - "ui.animation_speed": "Velocidad de animación", "ui.anti_aliasing": "Suavizado de bordes", "ui.apply": "Aplicar", "ui.arc": "Arco", @@ -1551,7 +1549,6 @@ "ui.lock": "Bloquear", "ui.loft": "Solevación", "ui.look_at": "Mirar hacia", - "ui.look_at_anim_desc": "Vista de eje, Mirar hacia, Inicio y Ajustar", "ui.manipulator_free_alt": "Arrastre libre del manipulador también con Alt/Option", "ui.manipulator_free_alt_tip": "Activado: Alt/Option o Ctrl/Cmd sobre las flechas de extrusión / manipulador desactiva el ajuste de valores. Desactivado: solo Ctrl/Cmd.", "ui.manufacture": "Fabricación", diff --git a/assets/locales/fr.json b/assets/locales/fr.json index 10c1e6d39..27268a854 100644 --- a/assets/locales/fr.json +++ b/assets/locales/fr.json @@ -1293,9 +1293,7 @@ "ui.angle": "Angle", "ui.angle_decimals": "Décimales des angles", "ui.animateJoint": "Animer la liaison", - "ui.animate_view_changes": "Animer les changements de vue", "ui.animation": "Animation", - "ui.animation_speed": "Vitesse d'animation", "ui.anti_aliasing": "Anticrénelage", "ui.apply": "Appliquer", "ui.arc": "Arc", @@ -1557,7 +1555,6 @@ "ui.lock": "Verrouiller", "ui.loft": "Lissage", "ui.look_at": "Vue normale", - "ui.look_at_anim_desc": "Vue d'axe, Vue normale, Accueil et Cadrer", "ui.manipulator_free_alt": "Glissement libre du manipulateur aussi avec Alt/Option", "ui.manipulator_free_alt_tip": "Activé : Alt/Option ou Ctrl/Cmd sur les flèches d’extrusion / du manipulateur désactive l’accrochage aux valeurs. Désactivé : Ctrl/Cmd uniquement.", "ui.manufacture": "Fabrication", diff --git a/assets/locales/gl.json b/assets/locales/gl.json index 18eecaf83..d4f2a1b56 100644 --- a/assets/locales/gl.json +++ b/assets/locales/gl.json @@ -1287,9 +1287,7 @@ "ui.angle": "Ángulo", "ui.angle_decimals": "Decimais dos ángulos", "ui.animateJoint": "Animar a unión", - "ui.animate_view_changes": "Animar os cambios de vista", "ui.animation": "Animación", - "ui.animation_speed": "Velocidade da animación", "ui.anti_aliasing": "Antialiasing", "ui.apply": "Aplicar", "ui.arc": "Arco", @@ -1551,7 +1549,6 @@ "ui.lock": "Bloquear", "ui.loft": "Transición", "ui.look_at": "Mirar cara a", - "ui.look_at_anim_desc": "Vista de eixe, Mirar cara a, Inicio e Axustar", "ui.manipulator_free_alt": "Arrastre libre do manipulador tamén con Alt/Option", "ui.manipulator_free_alt_tip": "Activado: Alt/Option ou Ctrl/Cmd nas frechas de extrusión / do gizmo desactiva o axuste de valores. Desactivado: só Ctrl/Cmd.", "ui.manufacture": "Fabricación", diff --git a/assets/locales/hu.json b/assets/locales/hu.json index 67d125e46..a7889ffc1 100644 --- a/assets/locales/hu.json +++ b/assets/locales/hu.json @@ -1287,9 +1287,7 @@ "ui.angle": "Szög", "ui.angle_decimals": "Szög tizedesjegyei", "ui.animateJoint": "Csukló animálása", - "ui.animate_view_changes": "Nézetváltozások animálása", "ui.animation": "Animáció", - "ui.animation_speed": "Animáció sebessége", "ui.anti_aliasing": "Élsimítás", "ui.apply": "Alkalmaz", "ui.arc": "Ív", @@ -1551,7 +1549,6 @@ "ui.lock": "Zárolás", "ui.loft": "Áthúzás", "ui.look_at": "Ránézés", - "ui.look_at_anim_desc": "Tengelynézet, Ránézés, Kezdőlap és Illesztés", "ui.manipulator_free_alt": "A manipulátor szabad húzása Alt/Option billentyűvel is", "ui.manipulator_free_alt_tip": "Be: az Alt/Option vagy Ctrl/Cmd a kihúzás / gizmo nyilakon letiltja az értékillesztést. Ki: csak a Ctrl/Cmd.", "ui.manufacture": "Gyártás", diff --git a/assets/locales/id.json b/assets/locales/id.json index 8538565b6..18759b05c 100644 --- a/assets/locales/id.json +++ b/assets/locales/id.json @@ -1287,9 +1287,7 @@ "ui.angle": "Sudut", "ui.angle_decimals": "Desimal sudut", "ui.animateJoint": "Animasikan Sambungan", - "ui.animate_view_changes": "Animasikan perubahan tampilan", "ui.animation": "Animasi", - "ui.animation_speed": "Kecepatan animasi", "ui.anti_aliasing": "Anti-aliasing", "ui.apply": "Terapkan", "ui.arc": "Busur", @@ -1551,7 +1549,6 @@ "ui.lock": "Kunci", "ui.loft": "Loft", "ui.look_at": "Look At", - "ui.look_at_anim_desc": "Tampilan sumbu, Look At, Home, dan Fit", "ui.manipulator_free_alt": "Seret bebas manipulator juga dengan Alt/Option", "ui.manipulator_free_alt_tip": "Aktif: Alt/Option atau Ctrl/Cmd pada panah ekstrusi / gizmo menonaktifkan snap nilai. Mati: hanya Ctrl/Cmd.", "ui.manufacture": "Manufaktur", diff --git a/assets/locales/it.json b/assets/locales/it.json index 3e2336f69..b531e0adb 100644 --- a/assets/locales/it.json +++ b/assets/locales/it.json @@ -1287,9 +1287,7 @@ "ui.angle": "Angolo", "ui.angle_decimals": "Decimali degli angoli", "ui.animateJoint": "Anima giunto", - "ui.animate_view_changes": "Anima cambi di vista", "ui.animation": "Animazione", - "ui.animation_speed": "Velocità dell'animazione", "ui.anti_aliasing": "Antialiasing", "ui.apply": "Applica", "ui.arc": "Arco", @@ -1551,7 +1549,6 @@ "ui.lock": "Blocca", "ui.loft": "Loft", "ui.look_at": "Vista normale", - "ui.look_at_anim_desc": "Viste degli assi, Vista normale, Vista iniziale e Adatta", "ui.manipulator_free_alt": "Trascinamento libero del manipolatore anche con Alt/Option", "ui.manipulator_free_alt_tip": "Attivo: Alt/Option o Ctrl/Cmd sulle frecce di estrusione / gizmo disattivano l'aggancio ai valori. Disattivo: solo Ctrl/Cmd.", "ui.manufacture": "Produzione", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index f6e817646..fedd2fb0d 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -1295,9 +1295,7 @@ "ui.angle": "角度", "ui.angle_decimals": "角度の小数点以下の桁数", "ui.animateJoint": "ジョイントをアニメート", - "ui.animate_view_changes": "視点変更をアニメーション表示", "ui.animation": "アニメーション", - "ui.animation_speed": "アニメーション速度", "ui.anti_aliasing": "アンチエイリアス", "ui.apply": "適用", "ui.arc": "円弧", @@ -1559,7 +1557,6 @@ "ui.lock": "ロック", "ui.loft": "ロフト", "ui.look_at": "正面視", - "ui.look_at_anim_desc": "軸ビュー、正面視、ホーム、全体表示", "ui.manipulator_free_alt": "マニピュレータのフリードラッグを Alt/Option でも有効", "ui.manipulator_free_alt_tip": "オン: 押し出し/ギズモ矢印で Alt/Option または Ctrl/Cmd が値スナップを無効にします。オフ: Ctrl/Cmd のみ。", "ui.manufacture": "製造", diff --git a/assets/locales/ko.json b/assets/locales/ko.json index 3daa01e2d..6904996a3 100644 --- a/assets/locales/ko.json +++ b/assets/locales/ko.json @@ -1287,9 +1287,7 @@ "ui.angle": "각도", "ui.angle_decimals": "각도 소수점 자릿수", "ui.animateJoint": "조인트 애니메이션", - "ui.animate_view_changes": "뷰 변경 애니메이션", "ui.animation": "애니메이션", - "ui.animation_speed": "애니메이션 속도", "ui.anti_aliasing": "안티앨리어싱", "ui.apply": "적용", "ui.arc": "호", @@ -1551,7 +1549,6 @@ "ui.lock": "잠금", "ui.loft": "로프트", "ui.look_at": "바라보기", - "ui.look_at_anim_desc": "축 뷰, 보기, 홈 및 맞춤", "ui.manipulator_free_alt": "Alt/Option으로도 매니퓰레이터 자유 드래그", "ui.manipulator_free_alt_tip": "켬: 돌출 / 기즈모 화살표에서 Alt/Option 또는 Ctrl/Cmd를 누르면 값 스냅이 해제됩니다. 끔: Ctrl/Cmd만 해당.", "ui.manufacture": "제조", diff --git a/assets/locales/ms.json b/assets/locales/ms.json index b4e18b2f7..9ccabe2df 100644 --- a/assets/locales/ms.json +++ b/assets/locales/ms.json @@ -1287,9 +1287,7 @@ "ui.angle": "Sudut", "ui.angle_decimals": "Perpuluhan sudut", "ui.animateJoint": "Animasikan Sendi", - "ui.animate_view_changes": "Animasikan perubahan pandangan", "ui.animation": "Animasi", - "ui.animation_speed": "Kelajuan animasi", "ui.anti_aliasing": "Antialias", "ui.apply": "Gunakan", "ui.arc": "Lengkok", @@ -1551,7 +1549,6 @@ "ui.lock": "Kunci", "ui.loft": "Loft", "ui.look_at": "Pandang Tepat", - "ui.look_at_anim_desc": "Pandangan paksi, Pandang Tepat, Utama dan Muatkan", "ui.manipulator_free_alt": "Seret bebas manipulator juga dengan Alt/Option", "ui.manipulator_free_alt_tip": "Hidup: Alt/Option atau Ctrl/Cmd pada anak panah ekstrud / gizmo mematikan pelekapan nilai. Mati: Ctrl/Cmd sahaja.", "ui.manufacture": "Pembuatan", diff --git a/assets/locales/nl.json b/assets/locales/nl.json index aa3ce9fc0..eca13bcb1 100644 --- a/assets/locales/nl.json +++ b/assets/locales/nl.json @@ -1287,9 +1287,7 @@ "ui.angle": "Hoek", "ui.angle_decimals": "Hoekdecimalen", "ui.animateJoint": "Verbinding animeren", - "ui.animate_view_changes": "Weergavewijzigingen animeren", "ui.animation": "Animatie", - "ui.animation_speed": "Animatiesnelheid", "ui.anti_aliasing": "Anti-aliasing", "ui.apply": "Toepassen", "ui.arc": "Boog", @@ -1551,7 +1549,6 @@ "ui.lock": "Vergrendelen", "ui.loft": "Loft", "ui.look_at": "Kijken naar", - "ui.look_at_anim_desc": "Aanzicht op as, Kijken naar, Home en Passend", "ui.manipulator_free_alt": "Manipulator vrij slepen ook met Alt/Option", "ui.manipulator_free_alt_tip": "Aan: Alt/Option of Ctrl/Cmd op extrusie-/gizmopijlen schakelt waardesnap uit. Uit: alleen Ctrl/Cmd.", "ui.manufacture": "Fabricage", diff --git a/assets/locales/pl.json b/assets/locales/pl.json index cfe981d13..cf1d39e25 100644 --- a/assets/locales/pl.json +++ b/assets/locales/pl.json @@ -1287,9 +1287,7 @@ "ui.angle": "Kąt", "ui.angle_decimals": "Miejsca dziesiętne kąta", "ui.animateJoint": "Animuj złącze", - "ui.animate_view_changes": "Animuj zmiany widoku", "ui.animation": "Animacja", - "ui.animation_speed": "Szybkość animacji", "ui.anti_aliasing": "Wygładzanie krawędzi", "ui.apply": "Zastosuj", "ui.arc": "Łuk", @@ -1551,7 +1549,6 @@ "ui.lock": "Zablokuj", "ui.loft": "Wyciągnięcie złożone", "ui.look_at": "Patrz na", - "ui.look_at_anim_desc": "Widok osi, Patrz na, Widok główny i Dopasuj", "ui.manipulator_free_alt": "Swobodne przeciąganie manipulatora także z Alt/Option", "ui.manipulator_free_alt_tip": "Wł.: Alt/Option lub Ctrl/Cmd na strzałkach wyciągnięcia / uchwytu wyłącza przyciąganie wartości. Wył.: tylko Ctrl/Cmd.", "ui.manufacture": "Wytwarzanie", diff --git a/assets/locales/pt-BR.json b/assets/locales/pt-BR.json index 119c22c1f..3307fbbfd 100644 --- a/assets/locales/pt-BR.json +++ b/assets/locales/pt-BR.json @@ -1287,9 +1287,7 @@ "ui.angle": "Ângulo", "ui.angle_decimals": "Casas decimais de ângulo", "ui.animateJoint": "Animar junta", - "ui.animate_view_changes": "Animar mudanças de vista", "ui.animation": "Animação", - "ui.animation_speed": "Velocidade da animação", "ui.anti_aliasing": "Antisserrilhamento", "ui.apply": "Aplicar", "ui.arc": "Arco", @@ -1551,7 +1549,6 @@ "ui.lock": "Bloquear", "ui.loft": "Loft", "ui.look_at": "Olhar para", - "ui.look_at_anim_desc": "Vista do eixo, Olhar para, Início e Ajustar", "ui.manipulator_free_alt": "Arrasto livre do manipulador também com Alt/Option", "ui.manipulator_free_alt_tip": "Ativado: Alt/Option ou Ctrl/Cmd nas setas de extrusão / gizmo desativa o ajuste de valores. Desativado: somente Ctrl/Cmd.", "ui.manufacture": "Fabricação", diff --git a/assets/locales/ro.json b/assets/locales/ro.json index 125808de8..24e40fc1d 100644 --- a/assets/locales/ro.json +++ b/assets/locales/ro.json @@ -1287,9 +1287,7 @@ "ui.angle": "Unghi", "ui.angle_decimals": "Zecimale unghi", "ui.animateJoint": "Animă îmbinarea", - "ui.animate_view_changes": "Animă schimbările de vizualizare", "ui.animation": "Animație", - "ui.animation_speed": "Viteza animației", "ui.anti_aliasing": "Anti-aliasing", "ui.apply": "Aplică", "ui.arc": "Arc", @@ -1551,7 +1549,6 @@ "ui.lock": "Blochează", "ui.loft": "Loft", "ui.look_at": "Privește spre", - "ui.look_at_anim_desc": "Vizualizare pe axă, Privește spre, Acasă și Potrivire", "ui.manipulator_free_alt": "Tragere liberă a manipulatorului și cu Alt/Option", "ui.manipulator_free_alt_tip": "Activat: Alt/Option sau Ctrl/Cmd pe săgețile de extrudare / manipulator dezactivează agățarea la valori. Dezactivat: doar Ctrl/Cmd.", "ui.manufacture": "Fabricație", diff --git a/assets/locales/ru.json b/assets/locales/ru.json index af783abcc..3fc4c2dae 100644 --- a/assets/locales/ru.json +++ b/assets/locales/ru.json @@ -1287,9 +1287,7 @@ "ui.angle": "Угол", "ui.angle_decimals": "Знаков после запятой (углы)", "ui.animateJoint": "Анимировать сопряжение", - "ui.animate_view_changes": "Анимировать смену вида", "ui.animation": "Анимация", - "ui.animation_speed": "Скорость анимации", "ui.anti_aliasing": "Сглаживание", "ui.apply": "Применить", "ui.arc": "Дуга", @@ -1551,7 +1549,6 @@ "ui.lock": "Заблокировать", "ui.loft": "Лофт", "ui.look_at": "Взгляд на", - "ui.look_at_anim_desc": "Осевые виды, «Взгляд на», «Главная» и «Вписать»", "ui.manipulator_free_alt": "Свободное перетаскивание манипулятора также по Alt/Option", "ui.manipulator_free_alt_tip": "Вкл.: Alt/Option или Ctrl/Cmd на стрелках выдавливания / гизмо отключают привязку значений. Выкл.: только Ctrl/Cmd.", "ui.manufacture": "Производство", diff --git a/assets/locales/sv.json b/assets/locales/sv.json index 87cf7b286..ad0a19dc6 100644 --- a/assets/locales/sv.json +++ b/assets/locales/sv.json @@ -1287,9 +1287,7 @@ "ui.angle": "Vinkel", "ui.angle_decimals": "Vinkeldecimaler", "ui.animateJoint": "Animera led", - "ui.animate_view_changes": "Animera vyändringar", "ui.animation": "Animation", - "ui.animation_speed": "Animationshastighet", "ui.anti_aliasing": "Kantutjämning", "ui.apply": "Tillämpa", "ui.arc": "Båge", @@ -1551,7 +1549,6 @@ "ui.lock": "Lås", "ui.loft": "Loftning", "ui.look_at": "Titta på", - "ui.look_at_anim_desc": "Axelvy, Titta på, Hem och Anpassa", "ui.manipulator_free_alt": "Fri manipulatordragning även med Alt/Option", "ui.manipulator_free_alt_tip": "På: Alt/Option eller Ctrl/Cmd på extruderings-/gizmopilar inaktiverar värdesnappning. Av: endast Ctrl/Cmd.", "ui.manufacture": "Tillverkning", diff --git a/assets/locales/tr.json b/assets/locales/tr.json index dd532e6dd..a0e18b92d 100644 --- a/assets/locales/tr.json +++ b/assets/locales/tr.json @@ -1287,9 +1287,7 @@ "ui.angle": "Açı", "ui.angle_decimals": "Açı ondalık basamakları", "ui.animateJoint": "Bağlantıyı canlandır", - "ui.animate_view_changes": "Görünüm değişikliklerini animasyonla göster", "ui.animation": "Animasyon", - "ui.animation_speed": "Animasyon hızı", "ui.anti_aliasing": "Kenar yumuşatma", "ui.apply": "Uygula", "ui.arc": "Yay", @@ -1551,7 +1549,6 @@ "ui.lock": "Kilitle", "ui.loft": "Loft", "ui.look_at": "Bak", - "ui.look_at_anim_desc": "Eksen görünümü, Bak, Başlangıç ve Sığdır", "ui.manipulator_free_alt": "Manipülatör serbest sürükleme Alt/Option ile de", "ui.manipulator_free_alt_tip": "Açık: ekstrüzyon / gizmo oklarında Alt/Option veya Ctrl/Cmd değer yakalamayı devre dışı bırakır. Kapalı: yalnızca Ctrl/Cmd.", "ui.manufacture": "Üretim", diff --git a/assets/locales/uk.json b/assets/locales/uk.json index d046ea054..43a7f6523 100644 --- a/assets/locales/uk.json +++ b/assets/locales/uk.json @@ -1287,9 +1287,7 @@ "ui.angle": "Кут", "ui.angle_decimals": "Знаки після коми для кутів", "ui.animateJoint": "Анімувати з'єднання", - "ui.animate_view_changes": "Анімувати зміни виду", "ui.animation": "Анімація", - "ui.animation_speed": "Швидкість анімації", "ui.anti_aliasing": "Згладжування", "ui.apply": "Застосувати", "ui.arc": "Дуга", @@ -1551,7 +1549,6 @@ "ui.lock": "Заблокувати", "ui.loft": "Лофт", "ui.look_at": "Наведення", - "ui.look_at_anim_desc": "Вид осі, наведення, головний і вписування", "ui.manipulator_free_alt": "Вільне перетягування маніпулятора також з Alt/Option", "ui.manipulator_free_alt_tip": "Увімк.: Alt/Option або Ctrl/Cmd на стрілках видавлювання / гізмо вимикає прив'язку до значень. Вимк.: лише Ctrl/Cmd.", "ui.manufacture": "Виготовлення", diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 970f0da2d..66f2d32d7 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -1287,9 +1287,7 @@ "ui.angle": "Góc", "ui.angle_decimals": "Số chữ số thập phân cho góc", "ui.animateJoint": "Mô phỏng chuyển động khớp nối", - "ui.animate_view_changes": "Hiệu ứng chuyển góc nhìn", "ui.animation": "Hoạt họa", - "ui.animation_speed": "Tốc độ chuyển động", "ui.anti_aliasing": "Khử răng cưa", "ui.apply": "Áp dụng", "ui.arc": "Cung tròn", @@ -1551,7 +1549,6 @@ "ui.lock": "Khóa", "ui.loft": "Vuốt nối biên dạng (Loft)", "ui.look_at": "Nhìn trực diện", - "ui.look_at_anim_desc": "Góc nhìn theo trục, Nhìn thẳng, Chuẩn và Vừa vặn", "ui.manipulator_free_alt": "Kéo tự do bộ thao tác cũng bằng Alt/Option", "ui.manipulator_free_alt_tip": "Bật: Alt/Option hoặc Ctrl/Cmd trên các mũi tên đùn / gizmo sẽ tắt bước nhảy giá trị. Tắt: chỉ Ctrl/Cmd.", "ui.manufacture": "Gia công chế tạo", diff --git a/assets/locales/zh-TW.json b/assets/locales/zh-TW.json index 31844a1d0..8c177f277 100644 --- a/assets/locales/zh-TW.json +++ b/assets/locales/zh-TW.json @@ -1287,9 +1287,7 @@ "ui.angle": "角度", "ui.angle_decimals": "角度小數位數", "ui.animateJoint": "動畫接頭", - "ui.animate_view_changes": "檢視變化動畫", "ui.animation": "動畫", - "ui.animation_speed": "動畫速度", "ui.anti_aliasing": "抗鋸齒", "ui.apply": "套用", "ui.arc": "圓弧", @@ -1551,7 +1549,6 @@ "ui.lock": "鎖定", "ui.loft": "放樣", "ui.look_at": "注視", - "ui.look_at_anim_desc": "軸檢視、注視、主檢視與適合視窗", "ui.manipulator_free_alt": "操縱器自由拖曳也適用於 Alt/Option", "ui.manipulator_free_alt_tip": "開:在擠出/小工具箭頭上按 Alt/Option 或 Ctrl/Cmd 可停用數值鎖點。關:僅 Ctrl/Cmd。", "ui.manufacture": "製造", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index 8bc721deb..b90f05130 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -1295,9 +1295,7 @@ "ui.angle": "角度", "ui.angle_decimals": "角度小数位", "ui.animateJoint": "动画接头", - "ui.animate_view_changes": "视图变化动画", "ui.animation": "动画", - "ui.animation_speed": "动画速度", "ui.anti_aliasing": "抗锯齿", "ui.apply": "应用", "ui.arc": "圆弧", @@ -1559,7 +1557,6 @@ "ui.lock": "锁定", "ui.loft": "放样", "ui.look_at": "朝向", - "ui.look_at_anim_desc": "轴视图、注视、主视图与适合窗口", "ui.manipulator_free_alt": "操纵器自由拖动也适用于 Alt/Option", "ui.manipulator_free_alt_tip": "开:在拉伸/小控件箭头上按 Alt/Option 或 Ctrl/Cmd 可关闭数值捕捉。关:仅 Ctrl/Cmd。", "ui.manufacture": "制造", diff --git a/crates/render/src/camera.rs b/crates/render/src/camera.rs index abef03615..1fffb03c2 100644 --- a/crates/render/src/camera.rs +++ b/crates/render/src/camera.rs @@ -72,13 +72,6 @@ impl StandardView { } } -/// Smooth ease-in-out on [0, 1] (smoothstep: at its fastest, mid-way, 1.5 times the average -/// speed, so long turns stay gentle). -pub fn ease_in_out(t: f64) -> f64 { - let t = if t.is_finite() { t.clamp(0.0, 1.0) } else { 1.0 }; - t * t * (3.0 - 2.0 * t) -} - /// A unit quaternion (w, x, y, z). #[derive(Clone, Copy, Debug, PartialEq)] pub struct Quat { @@ -151,36 +144,6 @@ impl Quat { } } -/// A camera move in progress: from one camera to another over `duration` seconds. -#[derive(Clone, Copy, Debug, PartialEq)] -pub struct CameraAnim { - pub from: Camera, - pub to: Camera, - pub start: f64, - pub duration: f64, -} - -impl CameraAnim { - /// The usual length of a view change, in seconds. - pub const DURATION: f64 = 0.5; - /// A view change: half a second, longer for turns past a quarter turn (so a big turn, such - /// as from the home view to the bottom, never sweeps more than about 9 degrees a frame). - pub fn new(from: Camera, to: Camera, now: f64) -> CameraAnim { - let dy = (to.yaw - from.yaw + std::f64::consts::PI).rem_euclid(std::f64::consts::TAU) - std::f64::consts::PI; - let turn = dy.abs().max((to.pitch - from.pitch).abs()); - let k = if turn.is_finite() { (turn / std::f64::consts::FRAC_PI_2).clamp(1.0, 2.0) } else { 1.0 }; - CameraAnim { from, to, start: now, duration: CameraAnim::DURATION * k } - } - /// The camera at time `now`, and whether the move has finished. - pub fn sample(&self, now: f64) -> (Camera, bool) { - let t = if self.duration > 0.0 { (now - self.start) / self.duration } else { 1.0 }; - if !(t < 1.0) { - return (self.to, true); - } - (Camera::interpolate(&self.from, &self.to, ease_in_out(t)), false) - } -} - /// Which world axis points up in the view (#3): Z (the default) or Y, as most STEP files from /// other systems are modelled. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -517,29 +480,13 @@ mod tests { } #[test] - fn view_animation_interpolates() { + fn orientation_round_trips_and_looks_from_a_corner() { let mut a = Camera { target: Vec3::new(1.0, 2.0, 3.0), distance: 80.0, ..Default::default() }; a.set_view(StandardView::Iso); - let mut b = Camera { target: Vec3::new(-5.0, 0.0, 10.0), distance: 120.0, ..Default::default() }; - b.set_view(StandardView::Top); - let anim = CameraAnim::new(a, b, 10.0); - // Endpoints are exact. - assert_eq!(anim.sample(10.0).0, a); - assert_eq!(anim.sample(10.0 + anim.duration), (b, true)); - assert_eq!(anim.sample(99.0), (b, true)); - // Midpoint: half way in heading, elevation, target and distance. - let (m, done) = anim.sample(10.0 + anim.duration / 2.0); - assert!(!done && m.is_valid()); - let dy = (b.yaw - a.yaw + std::f64::consts::PI).rem_euclid(std::f64::consts::TAU) - std::f64::consts::PI; - assert!((m.yaw - (a.yaw + dy / 2.0)).abs() < 1e-12 && (m.pitch - (a.pitch + b.pitch) / 2.0).abs() < 1e-12); - assert!(m.target.dist(Vec3::new(-2.0, 1.0, 6.5)) < 1e-9 && (m.distance - 100.0).abs() < 1e-9); // Quaternion round trip of a basis. let (r, u, bk) = a.basis(); let (r2, u2, b2) = a.orientation().basis(); assert!(r.dist(r2) < 1e-12 && u.dist(u2) < 1e-12 && bk.dist(b2) < 1e-12); - // Ease: fixed ends, symmetric, monotonic. - assert_eq!((ease_in_out(0.0), ease_in_out(1.0), ease_in_out(0.5)), (0.0, 1.0, 0.5)); - assert!(ease_in_out(0.25) < 0.25 && ease_in_out(0.75) > 0.75); // Looking from a corner direction. let c = a.looking_from(Vec3::new(1.0, -1.0, 1.0)); assert!(c.back().dist(Vec3::new(1.0, -1.0, 1.0).normalized().unwrap()) < 1e-9); @@ -574,64 +521,6 @@ mod tests { assert!(c.is_valid()); } - /// A view change sampled every frame (60 fps) moves smoothly to the very end: no frame - /// turns the view, moves the target or changes the distance by much more than the average - /// step, and the last frame lands exactly on the target camera. - #[test] - fn view_animations_have_no_jumps() { - let base = Camera { target: Vec3::new(5.0, -3.0, 2.0), distance: 150.0, ..Default::default() }; - let views = [ - StandardView::Iso, - StandardView::Top, - StandardView::Front, - StandardView::Right, - StandardView::Bottom, - StandardView::Back, - StandardView::Left, - ]; - let mut cams: Vec = views - .iter() - .map(|v| { - let mut c = base; - c.set_view(*v); - c - }) - .collect(); - // Corners and edges of the axis view, and a fit (new target and distance). - cams.push(base.looking_from(Vec3::new(1.0, -1.0, 1.0))); - cams.push(base.looking_from(Vec3::new(-1.0, 0.0, 1.0))); - cams.push(base.looking_from(Vec3::new(0.0, 0.0, 1.0))); - cams.push(Camera { target: Vec3::new(-40.0, 10.0, 0.0), distance: 60.0, ..base }); - for a in &cams { - for b in &cams { - let anim = CameraAnim::new(*a, *b, 0.0); - let frames = (anim.duration * 60.0).round() as usize; - let mut prev = anim.sample(0.0).0; - let (mut steps, mut done_at) = (Vec::new(), None); - for f in 1..=frames + 2 { - let (c, done) = anim.sample(f as f64 / 60.0); - let turn = c.back().dist(prev.back()) + c.basis().0.dist(prev.basis().0); - let moved = - c.target.dist(prev.target) / a.distance.max(b.distance) + (c.distance - prev.distance).abs() / a.distance.max(b.distance); - steps.push((f, turn, moved)); - prev = c; - if done && done_at.is_none() { - done_at = Some(f); - assert_eq!(c, *b); - } - } - assert!(done_at.is_some_and(|f| f >= frames), "ended early at {done_at:?}"); - let total_turn: f64 = steps.iter().map(|s| s.1).sum(); - let total_move: f64 = steps.iter().map(|s| s.2).sum(); - for (f, turn, moved) in &steps { - // The eased curve's fastest frame is 1.5x the average: allow 2x. - assert!(*turn <= 2.0 * total_turn / frames as f64 + 1e-9, "turn jump at frame {f}: {turn} of {total_turn} ({a:?} -> {b:?})"); - assert!(*moved <= 2.0 * total_move / frames as f64 + 1e-9, "move jump at frame {f}: {moved} of {total_move}"); - } - } - } - } - /// With Y up: the front view looks along −Z (eye on +Z), the top view looks down −Y with X /// to the right, orbiting turns about Y, and the picture's up is the world's up. #[test] diff --git a/crates/render/src/lib.rs b/crates/render/src/lib.rs index 4f9e70be7..640abfccd 100644 --- a/crates/render/src/lib.rs +++ b/crates/render/src/lib.rs @@ -27,7 +27,7 @@ pub use backend::{ RenderMode, RenderOperation, RenderPolicy, RenderProfile, RenderRequest, ResolveError, ResolvedRequest, ScratchLayout, builtin_backend, resolve_request, }; -pub use camera::{Camera, CameraAnim, Mat4, Quat, StandardView, UpAxis, ease_in_out}; +pub use camera::{Camera, Mat4, Quat, StandardView, UpAxis}; pub use curve_display::{PixelCurveView, SampledPath, SamplingBudget, SamplingQuality, sample_segment, sample_segment_unclipped}; pub use gif::gif; pub use product::{FaceAppearance, ProductMesh, ProductScene}; diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs index 2576a5802..f45bb1aab 100644 --- a/crates/ui-egui/src/control.rs +++ b/crates/ui-egui/src/control.rs @@ -386,15 +386,7 @@ fn dispatch(app: &mut SolveApp, ctx: &egui::Context, method: &str, p: &Value) -> } "ui.view" => { let v = s("view").unwrap_or("home"); - app.viewport.orbit_snap = None; app.viewport.orbit_free = None; - if p.get("animate").and_then(Value::as_bool).unwrap_or(false) { - if v != "fit" && v != "home" && StandardView::parse(v).is_none() { - return err(format!("unknown view `{v}`")); - } - app.animate_view(v); - return ok(json!({ "animating": true, "to": app.cam_anim.map(|a| a.to) })); - } app.cancel_view_animation(); match v { "fit" => app.fit_view(), @@ -887,7 +879,6 @@ fn camera(app: &mut SolveApp, p: &Value) -> Result { return serde_json::to_value(app.cam).map_err(|e| e.to_string()); } app.cancel_view_animation(); - app.viewport.orbit_snap = None; app.viewport.orbit_free = None; app.cam = cam; match fit { @@ -1416,23 +1407,6 @@ mod tests { let mut h = crate::scenario::Harness::new(); h.app = SolveApp::new(s, Services::default()); h.frames(2); - let before = h.app.cam; - // Reading during an animated view change leaves it running (no frames run between). - fn raw(h: &mut crate::scenario::Harness, method: &str, params: Value) -> Value { - let (req, _rx) = ControlRequest::new(method, params); - match handle(&mut h.app, &h.ctx, &req) { - Outcome::Done(v) => v, - Outcome::Screenshot { .. } => Value::Null, - } - } - raw(&mut h, "ui.view", json!({"view": "top", "animate": true})); - let r = raw(&mut h, "ui.camera", Value::Null); - assert!(r["ok"] == true && h.app.cam_anim.is_some(), "{r}"); - // Setting it, even to where it is now, ends the animation there. - let yaw = h.app.cam.yaw; - let r = raw(&mut h, "ui.camera", json!({ "yaw": yaw })); - assert!(r["ok"] == true && h.app.cam_anim.is_none(), "{r}"); - h.app.cam = before; let mut cam = |p: Value| { let r = h.call("ui.camera", p); assert_eq!(r["ok"], true, "{r}"); diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 2a10553c8..f331fda05 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -2780,9 +2780,8 @@ pub fn start_sketch(app: &mut SolveApp, sel: &Sel) -> Result<(), String> { look_at_sketch(app); // On a face: look at the picked point, not the plane's origin (a corner of the face), // which left the face filling the view off-centre like a big square. - if let Sel::Face { point, .. } = sel - && let Some(mut to) = app.cam_anim.as_ref().map(|a| a.to) - { + if let Sel::Face { point, .. } = sel { + let mut to = app.cam; to.target = *point; app.animate_to(to); } diff --git a/crates/ui-egui/src/documents.rs b/crates/ui-egui/src/documents.rs index 5e80472c4..ed86c57e5 100644 --- a/crates/ui-egui/src/documents.rs +++ b/crates/ui-egui/src/documents.rs @@ -119,7 +119,6 @@ fn swap_in(app: &mut SolveApp, slot: DocSlot) -> DocSlot { app.design_properties = None; app.bom = None; app.cancel_view_animation(); - app.viewport.orbit_snap = None; app.viewport.orbit_free = None; app.preview.reset(); app.viewport.hover = None; diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index 12bcbccfb..a5834aec5 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -642,7 +642,6 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { app.viewport.boxsel = None; app.viewport.axis_drag = None; app.viewport.orbit_free = None; - app.viewport.orbit_snap = None; crate::dim_view::drag_end(); crate::sketch3d::drag_end(); crate::drag_snap::clear(); diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 54d7f776f..2e2f879d4 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -238,7 +238,7 @@ use std::sync::mpsc::Receiver; use serde::{Deserialize, Serialize}; use serde_json::{Value, json}; use solidcraft_engine::Session; -use solidcraft_engine::render::{Camera, CameraAnim, StandardView}; +use solidcraft_engine::render::{Camera, StandardView}; pub use control::{ControlRequest, ControlResponse}; @@ -353,8 +353,6 @@ pub struct SolveApp { pub ui: UiState, pub(crate) shell: shell::State, pub cam: Camera, - /// A view change in progress (axis view, Home, Fit); any mouse navigation cancels it. - pub cam_anim: Option, /// Seconds since start, as of this frame. pub now: f64, /// The view before the current sketch started (Finish Sketch returns to it). @@ -524,7 +522,6 @@ impl SolveApp { ui: UiState::default(), shell: Default::default(), cam: Camera::default(), - cam_anim: None, now: 0.0, pre_sketch_cam: None, pre_sketch_marker: None, @@ -1205,7 +1202,6 @@ impl SolveApp { /// (home) and frames the model. pub fn set_up_axis(&mut self, up: solidcraft_engine::render::UpAxis) { self.ui.up_axis = up; - self.cam_anim = None; self.cam.up = up; self.cam.set_view(StandardView::Iso); self.fit_view(); @@ -1225,8 +1221,6 @@ impl SolveApp { } return; } - self.cam_anim = None; - self.viewport.orbit_snap = None; self.viewport.orbit_free = None; let bounds = viewport::view_bounds(self); self.pending_fit = Some((self.cam, bounds, false)); @@ -1236,7 +1230,6 @@ impl SolveApp { /// Frame `bounds` at once, keeping the view direction (programmatic use). pub fn fit_bounds(&mut self, bounds: solidcraft_engine::geom::Aabb3) { self.cancel_view_animation(); - self.viewport.orbit_snap = None; self.viewport.orbit_free = None; self.pending_fit = Some((self.cam, bounds, false)); self.cam = self.fitted_bounds(self.cam, &bounds); @@ -1273,32 +1266,19 @@ impl SolveApp { self.animate_to(to); } else { self.cam = to; - self.cam_anim = None; } ctx.request_repaint(); } } - /// Move the camera to `to` over half a second (ease in-out, orientation slerped). + /// Move the camera to `to` at once. Views never animate: nothing is left running that a + /// later mouse orbit, pan or zoom could lag behind. pub fn animate_to(&mut self, to: Camera) { self.pending_fit = None; - self.viewport.orbit_snap = None; self.viewport.orbit_free = None; - if !to.is_valid() { - return; - } - // Preferences › Navigation: animated (at a chosen speed) or immediate. - if !self.preferences.look_at_anim { + if to.is_valid() { self.cam = to; - self.cam_anim = None; - return; } - let mut anim = CameraAnim::new(self.cam, to, self.now); - let speed = f64::from(self.preferences.look_at_speed); - if speed.is_finite() && speed > 0.0 { - anim.duration /= speed; - } - self.cam_anim = Some(anim); } /// Frame everything shown, keeping the orientation (animated; the selection is ignored). @@ -1375,38 +1355,24 @@ impl SolveApp { self.animate_to(to); } else if to.is_valid() { self.cancel_view_animation(); - self.viewport.orbit_snap = None; self.viewport.orbit_free = None; self.cam = to; } } - /// Stop any view animation where it is (the user took over the camera). + /// Drop a pending refit (the user took over the camera). pub fn cancel_view_animation(&mut self) { self.pending_fit = None; - self.cam_anim = None; } /// Hand the view to an external navigation device without a pending mouse orbit or spin /// immediately taking it back on the next frame. pub fn begin_external_navigation(&mut self) { self.cancel_view_animation(); - self.viewport.orbit_snap = None; self.viewport.orbit_free = None; self.viewport.spin = false; } - fn step_view_animation(&mut self, ctx: &egui::Context) { - let Some(anim) = self.cam_anim else { return }; - let (cam, done) = anim.sample(self.now); - self.cam = if cam.is_valid() { cam } else { anim.to }; - if done { - self.cam_anim = None; - } else { - ctx.request_repaint(); - } - } - /// Per-frame logic before layout. pub fn logic(&mut self, ctx: &egui::Context) { frame_watch::begin(self); @@ -1436,7 +1402,6 @@ impl SolveApp { if self.cam.up != self.ui.up_axis { self.set_up_axis(self.ui.up_axis); } - self.step_view_animation(ctx); self.poll_control_jobs(ctx); self.drain_control(ctx); self.follow_view_request(true); diff --git a/crates/ui-egui/src/look_at_tests.rs b/crates/ui-egui/src/look_at_tests.rs index 753f8422c..8a1e11a09 100644 --- a/crates/ui-egui/src/look_at_tests.rs +++ b/crates/ui-egui/src/look_at_tests.rs @@ -11,7 +11,6 @@ use crate::scenario::Harness; fn far_sketch() -> (Harness, u64) { let mut h = Harness::new(); h.app.home.open = false; - h.app.preferences.look_at_anim = false; h.app.run("sketch.create", json!({"plane": "XY", "offset": 8, "name": "Far"})).unwrap(); h.app.run("sketch.rectangle.two_point", json!({"p0": [330, 475], "p1": [350, 505]})).unwrap(); h.app.run("sketch.finish", json!({})).unwrap(); @@ -53,7 +52,6 @@ fn look_at_on_the_active_sketch_keeps_a_wider_zoom() { fn an_empty_sketch_keeps_its_planes_origin() { let mut h = Harness::new(); h.app.home.open = false; - h.app.preferences.look_at_anim = false; h.app.run("sketch.create", json!({"plane": "XY", "offset": 8})).unwrap(); h.app.cam.distance = 123.0; crate::dialogs::look_at_sketch(&mut h.app); diff --git a/crates/ui-egui/src/menu_tests.rs b/crates/ui-egui/src/menu_tests.rs index 9ed255852..d4f7f1d68 100644 --- a/crates/ui-egui/src/menu_tests.rs +++ b/crates/ui-egui/src/menu_tests.rs @@ -575,7 +575,7 @@ fn named_views_save_restore_rename_and_delete() { app.cam.set_view(solidcraft_engine::render::StandardView::Top); let t = Target::NamedView { name: "Named View1".into() }; act(&mut app, &t, "Restore"); - assert_eq!(app.cam_anim.map(|a| a.to), Some(saved), "animates back to the saved camera"); + assert_eq!(app.cam, saved, "goes back to the saved camera at once"); act(&mut app, &t, "Rename"); assert!(context_menu::finish_rename(&mut app, Some("Front detail"), true)); let t = Target::NamedView { name: "Front detail".into() }; @@ -585,7 +585,7 @@ fn named_views_save_restore_rename_and_delete() { let top = context_menu::items(&app, &Target::NamedView { name: "Top".into() }); assert!(!find(&top, "Delete").enabled); context_menu::run_item(&mut app, &find(&top, "Restore"), pos2(0.0, 0.0)); - assert!(app.cam_anim.is_some()); + assert_ne!(app.cam, saved); } #[test] diff --git a/crates/ui-egui/src/navigation.rs b/crates/ui-egui/src/navigation.rs index f56117213..08ce207ca 100644 --- a/crates/ui-egui/src/navigation.rs +++ b/crates/ui-egui/src/navigation.rs @@ -171,7 +171,6 @@ pub(crate) fn modifier_motion( app.viewport.orbit_pivot = None; app.viewport.orbit_from = None; app.viewport.orbit_free = None; - app.viewport.orbit_snap = None; } app.viewport.modifier_nav = next; next.map(|(mode, p)| { @@ -237,10 +236,7 @@ pub(crate) fn view_key(app: &mut SolveApp, ctx: &egui::Context, key: egui::Key, } else if !repeat { let degrees = if mods.shift { 90.0 } else { 15.0 }; app.viewport.key_hold = Some(KeyHold { key, action, shift: mods.shift, since: app.now }); - // Turn from where a step in flight is going, so taps add up and the one animation is - // retargeted rather than a second started. - let from = app.cam_anim.map_or(app.cam, |a| a.to); - let _ = app.run("view.navigate", json!({"camera": from, "action": action, "degrees": degrees})); + let _ = app.run("view.navigate", json!({"camera": app.cam, "action": action, "degrees": degrees})); } true } @@ -270,7 +266,6 @@ pub(crate) fn step_key_hold(app: &mut SolveApp, ctx: &egui::Context) { && cam.is_valid() { app.cancel_view_animation(); - app.viewport.orbit_snap = None; app.viewport.orbit_free = None; app.cam = cam; } @@ -375,7 +370,6 @@ pub(crate) fn handle(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, resp: &e let pinch = ui.input(pinch_factor); let h = rect.height().max(1.0) as f64; if inside && pinch != 1.0 { - app.viewport.orbit_snap = None; app.viewport.orbit_free = None; // Spread zooms in: the camera distance shrinks by the pinch factor. let f = f64::from(pinch).powf(-crate::prefs::zoom_sign(app)); @@ -392,7 +386,6 @@ pub(crate) fn handle(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, resp: &e } } if inside && scroll != 0.0 { - app.viewport.orbit_snap = None; app.viewport.orbit_free = None; let f = (-scroll as f64 * 0.0015 * crate::prefs::zoom_sign(app)).exp(); let anchor = zoom_anchor(app, rect, hover, caps.orbit); @@ -409,7 +402,6 @@ pub(crate) fn handle(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, resp: &e } // Two-finger scroll pans the model with the fingers. if inside && pan != egui::Vec2::ZERO { - app.viewport.orbit_snap = None; app.viewport.orbit_free = None; if app.preferences.nav == crate::prefs::TOUCHPAD_NAV { camera_motion(app, rect, json!({"motion":"pan","delta":[pan.x,pan.y]})); @@ -522,9 +514,6 @@ pub(crate) fn handle(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, resp: &e }; orbit_drag(app, rect, f64::from(delta.x), f64::from(delta.y), press, snap, true); } else { - if matches!(mode, Some(NavMode::Pan | NavMode::Zoom)) { - app.viewport.orbit_snap = None; - } if app.viewport.axis_drag.is_none() { app.viewport.orbit_free = None; } @@ -567,15 +556,9 @@ pub(crate) fn handle(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, resp: &e } if !app.cam.is_valid() { app.viewport.orbit_free = None; - app.viewport.orbit_snap = None; app.cam = Camera::default(); app.fit_view(); } - - step_orbit_snap(app, rect, ui.input(|i| f64::from(i.stable_dt))); - if app.viewport.orbit_snap.is_some() { - ui.ctx().request_repaint(); - } CameraInput { hover, scroll, mods, middle, secondary_down, primary_down, primary_pressed, delta, inside, axes, pinch, pan, primary_nav, mode } } @@ -631,19 +614,13 @@ pub(crate) fn snapped_axis_camera(cam: Camera) -> Camera { to } -pub(crate) struct OrbitSnap { - pub(crate) target: Camera, - pub(crate) yaw_velocity: f64, - pub(crate) pitch_velocity: f64, - /// The pivot and where it lies in the camera's frame ([`Camera::frame_coords`]). - pub(crate) pivot: Option<(Vec3, Vec3)>, -} - -/// Pointer motion accumulates independently of the spring preview, so many small deltas -/// still cross snap boundaries. Keep a small angular margin to avoid boundary flicker. +/// Orbit by a pointer drag. With `snap` the displayed view is the nearest standard or diagonal +/// direction at once; the unsnapped orbit is kept in `orbit_free` so many small deltas still +/// cross snap boundaries. A small angular margin avoids flicker at a boundary. pub(crate) fn orbit_drag(app: &mut SolveApp, rect: Rect, dx: f64, dy: f64, press: Option, snap: bool, around_cursor: bool) { let displayed = app.cam; - if let Some(free) = app.viewport.orbit_free.take() { + let previous_free = app.viewport.orbit_free.take(); + if let Some(free) = previous_free { app.cam = free; } if around_cursor { @@ -653,62 +630,31 @@ pub(crate) fn orbit_drag(app: &mut SolveApp, rect: Rect, dx: f64, dy: f64, press } let free = app.cam; app.viewport.orbit_free = Some(free); - if snap || !around_cursor || app.viewport.orbit_snap.is_some() { - let mut target = if snap { snapped_axis_camera(free) } else { free }; - if snap && let Some(previous) = app.viewport.orbit_snap.as_ref() { - let b = free.back(); - if previous.target.back().dot(b) + 0.025 >= target.back().dot(b) { - target.yaw = previous.target.yaw; - target.pitch = previous.target.pitch; - } + if !snap { + return; + } + let mut target = snapped_axis_camera(free); + // Keep the direction already chosen unless the orbit has clearly left it. + if previous_free.is_some_and(|p| p != displayed) { + let b = free.back(); + if displayed.back().dot(b) + 0.025 >= target.back().dot(b) { + target.yaw = displayed.yaw; + target.pitch = displayed.pitch; } - // The cursor and origin pivots stay still while a snap eases in; the axis gizmo has no - // pivot (it orbits about the view centre, see `axis_view`). - let pivot = if around_cursor { - match app.preferences.orbit_around { - crate::prefs::OrbitAround::Origin => Some(Vec3::ZERO), - _ => app.viewport.orbit_pivot, - } - } else { - None + } + // The cursor and origin pivots stay still; the axis gizmo has no pivot (it orbits about the + // view centre, see `axis_view`). + let pivot = if around_cursor { + match app.preferences.orbit_around { + crate::prefs::OrbitAround::Origin => Some(Vec3::ZERO), + _ => app.viewport.orbit_pivot, } - .map(|p| (p, displayed.frame_coords(p))); - let spring = app.viewport.orbit_snap.get_or_insert(OrbitSnap { target, yaw_velocity: 0.0, pitch_velocity: 0.0, pivot }); - spring.target = target; - spring.pivot = pivot; - app.cam = displayed; - } -} - -/// A lightly damped spring: mostly settled in about a third of a second, with a small -/// elastic finish. Bounded substeps keep the behavior consistent across frame rates. -pub(crate) fn step_orbit_snap(app: &mut SolveApp, _rect: Rect, dt: f64) { - let Some(mut spring) = app.viewport.orbit_snap.take() else { return }; - let dt = if dt.is_finite() { dt.clamp(0.0, 0.05) } else { 1.0 / 60.0 }; - let steps = (dt * 240.0).ceil().max(1.0) as usize; - let h = dt / steps as f64; - let omega = 16.0; - let damping = 0.82; - let yaw_error = |yaw: f64| (spring.target.yaw - yaw + std::f64::consts::PI).rem_euclid(std::f64::consts::TAU) - std::f64::consts::PI; - for _ in 0..steps.min(12) { - spring.yaw_velocity += (omega * omega * yaw_error(app.cam.yaw) - 2.0 * damping * omega * spring.yaw_velocity) * h; - spring.pitch_velocity += (omega * omega * (spring.target.pitch - app.cam.pitch) - 2.0 * damping * omega * spring.pitch_velocity) * h; - app.cam.yaw += spring.yaw_velocity * h; - app.cam.pitch = (app.cam.pitch + spring.pitch_velocity * h).clamp(-std::f64::consts::FRAC_PI_2, std::f64::consts::FRAC_PI_2); - } - app.cam.target = spring.target.target; - let done = yaw_error(app.cam.yaw).abs() < 1e-5 - && (spring.target.pitch - app.cam.pitch).abs() < 1e-5 - && spring.yaw_velocity.abs() < 1e-4 - && spring.pitch_velocity.abs() < 1e-4; - if done { - app.cam = spring.target; - } - if let Some((pivot, coords)) = spring.pivot { - app.cam.place(pivot, coords); - } - if !done { - app.viewport.orbit_snap = Some(spring); + } else { + None + }; + app.cam = target; + if let Some(p) = pivot { + app.cam.place(p, displayed.frame_coords(p)); } } @@ -970,7 +916,6 @@ mod view_key_tests { #[test] fn arrow_keys_turn_and_pan_the_view() { let mut h = Harness::new(); - h.app.preferences.look_at_anim = false; h.app.run("solid.box", json!({"length": 10, "width": 10, "height": 10})).unwrap(); h.step(&json!({"call": "ui.view", "params": {"view": "front"}})).unwrap(); h.frames(3); @@ -1013,22 +958,20 @@ mod view_key_tests { fn front_view() -> Harness { let mut h = Harness::new(); - h.app.preferences.look_at_anim = true; h.app.run("solid.box", json!({"length": 10, "width": 10, "height": 10})).unwrap(); h.step(&json!({"call": "ui.view", "params": {"view": "front"}})).unwrap(); h.settle(); h } - /// Holding an arrow turns the view steadily, by frame time, whatever the key repeat does: - /// one animation at most, never a second one fighting the first. + /// Holding an arrow turns the view steadily, by frame time, whatever the key repeat does. #[test] fn a_held_arrow_turns_the_view_steadily_and_ignores_key_repeat() { let hold = |repeats: bool| { let mut h = front_view(); - let mut last = h.app.cam.yaw; h.app.synthetic.push(arrow(true, false)); h.frame(); + let mut last = h.app.cam.yaw; let log = h.app.session.log.len(); let mut deltas = Vec::new(); for frame in 0..60 { @@ -1039,9 +982,8 @@ mod view_key_tests { deltas.push(turn(last, h.app.cam.yaw)); last = h.app.cam.yaw; } - assert!(h.app.cam_anim.is_none(), "the held turn runs on key state, not on a tween"); assert_eq!(h.app.session.log.len(), log, "turn frames do not flood the command log"); - assert!(deltas.iter().all(|d| *d > 0.0), "the view never stops or reverses while held: {deltas:?}"); + assert!(deltas.iter().all(|d| *d >= 0.0), "the view never reverses while held: {deltas:?}"); let steady = &deltas[20..]; let per_frame = 90f64.to_radians() / 60.0; assert!(steady.iter().all(|d| (d - per_frame).abs() < 1e-3), "{steady:?}"); @@ -1054,34 +996,14 @@ mod view_key_tests { assert!((hold(false) - hold(true)).abs() < 1e-9, "OS key repeat changes nothing"); } - /// A tap is still one animated step of 15°, with one animation. + /// A tap is one step of 15°, applied in the frame of the press, and a second tap adds to it. #[test] - fn a_tap_is_one_animated_step() { + fn a_tap_is_one_instant_step() { let mut h = front_view(); let before = h.app.cam.yaw; tap(&mut h); - h.frames(2); - assert!(h.app.cam_anim.is_some(), "the step animates"); - h.settle(); - assert!(h.app.cam_anim.is_none()); assert!((turn(before, h.app.cam.yaw).abs() - 15f64.to_radians()).abs() < 1e-6); - } - - /// A tap while a step is in flight retargets that animation: the turns add up and only one - /// animation exists, starting where the camera is. - #[test] - fn a_tap_during_a_step_retargets_the_one_animation() { - let mut h = front_view(); - let before = h.app.cam.yaw; tap(&mut h); - h.frames(5); - let mid = h.app.cam; - tap(&mut h); - h.frames(1); - let anim = h.app.cam_anim.expect("one animation"); - assert!((turn(before, anim.to.yaw).abs() - 30f64.to_radians()).abs() < 1e-6, "retargeted past the first step"); - assert!(turn(mid.yaw, anim.from.yaw).abs() < 15f64.to_radians(), "continues from the camera as it is"); - h.settle(); assert!((turn(before, h.app.cam.yaw).abs() - 30f64.to_radians()).abs() < 1e-6); } @@ -1090,7 +1012,6 @@ mod view_key_tests { #[test] fn ctrl_8_again_looks_from_the_other_side() { let mut h = Harness::new(); - h.app.preferences.look_at_anim = false; h.app.run("sketch.create", json!({"plane": "XY"})).unwrap(); h.frames(2); let back_z = |h: &Harness| h.app.cam.back().z; diff --git a/crates/ui-egui/src/navigation_cube.rs b/crates/ui-egui/src/navigation_cube.rs index 22ee42b62..b0d17f067 100644 --- a/crates/ui-egui/src/navigation_cube.rs +++ b/crates/ui-egui/src/navigation_cube.rs @@ -272,7 +272,6 @@ mod tests { let mut h = crate::scenario::Harness::new(); h.call("ui.prefs", json!({"navigator_style":"cube"})); let ctx = crate::fonts::test_context(); - h.app.preferences.look_at_anim = false; for up in ["z", "y"] { h.call("ui.prefs", json!({"up_axis":up})); h.call("ui.view", json!({"view":"front"})); @@ -509,43 +508,33 @@ mod tests { assert_eq!(h.app.cam.distance, cam.distance); } + /// A view-cube click puts the camera at the view at once and leaves nothing running: the + /// mouse orbit that follows moves the camera exactly as far as the pointer, in the same frame. #[test] - fn cube_navigation_eases_through_intermediate_views_and_can_be_interrupted() { + fn a_mouse_orbit_after_a_cube_click_follows_the_pointer_one_to_one() { let mut h = crate::scenario::Harness::new(); h.call("ui.prefs", json!({"navigator_style":"cube"})); - assert!(h.app.preferences.look_at_anim); - for (action, direction) in [(None, Some(Vec3::Z)), (Some("right"), None), (Some("clockwise"), None), (Some("home"), None)] { - let from = h.app.cam; - navigate(&mut h.app, action, direction); - let anim = h.app.cam_anim.expect("cube navigation must animate"); - assert_eq!(h.app.cam, from, "starting a transition must not jump the camera"); - let mut previous = from; - for frame in 1..=60 { - let now = anim.start + anim.duration * f64::from(frame) / 60.0 + if frame == 60 { 1e-9 } else { 0.0 }; - let (cam, done) = anim.sample(now); - let angle = |a: Vec3, b: Vec3| a.dot(b).clamp(-1.0, 1.0).acos().to_degrees(); - assert!(angle(previous.back(), cam.back()).max(angle(previous.basis().0, cam.basis().0)) < 10.0); - assert_eq!(done, frame == 60); - if frame == 30 { - assert_ne!(cam.basis(), from.basis()); - assert_ne!(cam.basis(), anim.to.basis()); - } - previous = cam; - } - h.app.cam = anim.sample(anim.start + anim.duration / 2.0).0; - let intermediate = h.app.cam; - navigate(&mut h.app, Some("left"), None); - assert_eq!(h.app.cam_anim.unwrap().from, intermediate, "another click starts where the camera is"); - h.app.cam = anim.to; - h.app.cancel_view_animation(); - } + h.app.run("solid.box", json!({"length":20,"width":20,"height":20})).unwrap(); + h.frames(4); + let p = crate::scenario::handle_at("navigation_cube:top").unwrap(); + h.call("ui.click", json!({"x":p.x,"y":p.y})); + assert!(h.app.cam.back().dist(Vec3::Z) < 1e-6, "the click shows the top view in its own frame"); + assert!(h.app.viewport.orbit_free.is_none()); + let mut expected = h.app.cam; + let from = h.app.cam; + h.call("ui.drag", json!({"x0":800,"y0":500,"x1":850,"y1":520,"button":"middle","shift":true,"steps":20})); + expected.orbit(50.0, 20.0); + assert_ne!(h.app.cam, from); + assert!((h.app.cam.yaw - expected.yaw).abs() < 1e-9 && (h.app.cam.pitch - expected.pitch).abs() < 1e-9, "{:?}", h.app.cam); + let done = h.app.cam; + h.frames(30); + assert_eq!(h.app.cam, done, "nothing keeps easing after the pointer stops"); } #[test] fn cube_faces_corners_roll_and_home_drive_the_shared_command() { let mut h = crate::scenario::Harness::new(); h.call("ui.prefs", json!({"navigator_style":"cube"})); - h.app.preferences.look_at_anim = false; let before = h.app.session.doc.to_json(); for (name, direction) in [("top", Vec3::Z), ("front", -Vec3::Y), ("right", Vec3::X), ("top_front_right", Vec3::Z - Vec3::Y + Vec3::X)] { h.call("ui.view", json!({"view":"iso"})); diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index 64e4b4043..6cd2233df 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -287,7 +287,7 @@ pub const DEFAULT_BROWSER_WIDTH: f32 = 250.0; // The stored fields, their defaults, page resets and simple form controls share this table. // Omitted pages keep fields such as grid_follows_view and added agents when restoring defaults. -// Accepted control-channel ranges may differ from slider ranges (look_at_speed). +// Accepted control-channel ranges may differ from slider ranges. macro_rules! preference_settings { ($( $(#[$doc:meta])* $field:ident: $ty:ty = $default:expr $(, $page:expr)? $(, accept($accepted:expr))? $(=> $control:ident($($args:tt)*))? ;)*) => { #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -433,9 +433,6 @@ preference_settings! { trackpad_pan: bool = true, 1; /// Horizontal trackpad and thumb-wheel scrolling pans the view the other way (#2007). pan_reverse_x: bool = false, 1 => check("Reverse horizontal pan direction", "Horizontal two-finger scrolling and the thumb wheel pan the other way"); - /// View changes (axis view, Look At, Home) animate; `look_at_speed` scales how fast. - look_at_anim: bool = true, 1 => check("Animate view changes", "Axis view, Look At, Home and Fit"); - look_at_speed: f32 = 1.0, 1, accept(0.25..=4.0) => enabled_slider(look_at_anim, "Animation speed", 0.5..=3.0, 0.25, |v| format!("{v:.2}×")); /// Default modelling orientation: `z` (Z up) or `y` (Y up) (#3). up_axis: String = "z".into(), PAGE_DESIGN; /// After a STEP or IGES file opens, offer to stand a Y-up part up (`stand_up`). @@ -1227,8 +1224,6 @@ fn page(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) { for (m, id, label) in MiddleDoubleClick::ALL { if ui_kit::list_picker(ui, id, crate::i18n::tr_label(label), current == m).clicked() { app.preferences.middle_double_click = id.into(); } } }).on_hover_text(crate::i18n::tr_label("Double-clicking the middle button in the view: Home (the home view, framing what is shown), Fit (frame what is shown, keeping the orientation) or nothing")); }); - setting::look_at_anim(app, ui); - setting::look_at_speed(app, ui); setting::space_mouse_enabled(app, ui); setting::space_mouse_speed(app, ui); for (axis, name) in SPACE_MOUSE_AXES.iter().enumerate() { @@ -1732,8 +1727,8 @@ pub fn set(app: &mut SolveApp, p: &serde_json::Value) -> Result crate::plugins::MAX_DISABLED || new.disabled_plugins.iter().any(|id| !crate::plugins::valid_id(id)) { return Err(format!("`disabled_plugins` must be at most {} ids of lowercase letters, digits and hyphens", crate::plugins::MAX_DISABLED)); } - if !accepted::ui_scale(&new) || !accepted::look_at_speed(&new) { - return Err("`ui_scale` must be 0.5…2.5 and `look_at_speed` 0.25…4".into()); + if !accepted::ui_scale(&new) { + return Err("`ui_scale` must be 0.5…2.5".into()); } if solidcraft_engine::doc::display_quality::DisplayQuality::parse(&new.display_quality).is_none() { return Err("`display_quality` must be coarse, normal, fine or ultra".into()); @@ -2052,7 +2047,7 @@ mod tests { assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Axes); h.call("ui.prefs", json!({"button":"cancel"})); assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Cube); - h.call("ui.prefs", json!({"navigator_style":"axes", "look_at_anim":false})); + h.call("ui.prefs", json!({"navigator_style":"axes"})); h.call("ui.view", json!({"view":"front"})); let axis = crate::scenario::handle_at("axis_view:-y").unwrap(); h.call("ui.click", json!({"x":axis.x,"y":axis.y})); @@ -2280,7 +2275,7 @@ mod tests { assert!(app.ui.dark && app.preferences.theme == "dark" && app.preferences.ui_scale == 1.0 && app.preferences.zoom_to_cursor); assert!(app.keymap.custom.is_empty(), "a rebinding made while the dialog was open is undone too"); - control(&mut app, &json!({"open": "Navigation", "nav": "alias", "look_at_anim": false})).unwrap(); + control(&mut app, &json!({"open": "Navigation", "nav": "alias"})).unwrap(); control(&mut app, &json!({"button": "apply"})).unwrap(); control(&mut app, &json!({"nav": "tinkercad"})).unwrap(); control(&mut app, &json!({"button": "cancel"})).unwrap(); @@ -2291,12 +2286,11 @@ mod tests { c }; app.animate_to(to); - assert!(app.cam_anim.is_none() && app.cam == to, "no animation: the view jumps"); + assert!(app.cam == to, "the view jumps"); control(&mut app, &json!({"open": "Navigation"})).unwrap(); control(&mut app, &json!({"button": "defaults"})).unwrap(); assert_eq!(app.preferences.nav, "fusion"); - assert!(app.preferences.look_at_anim); control(&mut app, &json!({"button": "ok"})).unwrap(); assert!(!app.prefs_window.open); diff --git a/crates/ui-egui/src/render_workspace_tests.rs b/crates/ui-egui/src/render_workspace_tests.rs index 23408069a..f5e62c1f9 100644 --- a/crates/ui-egui/src/render_workspace_tests.rs +++ b/crates/ui-egui/src/render_workspace_tests.rs @@ -588,7 +588,6 @@ fn render_workspace_view_keys_double_middle_click_and_navigators_work() { for style in [crate::prefs::NavigatorStyle::Axes, crate::prefs::NavigatorStyle::Cube] { let mut h = Harness::new(); h.app.preferences.navigator_style = style; - h.app.preferences.look_at_anim = false; h.app.run("solid.box", json!({"length":40,"width":30,"height":20,"body_name":"Product"})).unwrap(); enter(&mut h.app, true).unwrap(); h.frames(3); diff --git a/crates/ui-egui/src/scenario.rs b/crates/ui-egui/src/scenario.rs index 1cbf62278..dbc0af57f 100644 --- a/crates/ui-egui/src/scenario.rs +++ b/crates/ui-egui/src/scenario.rs @@ -22,8 +22,7 @@ //! into `$SOLIDCRAFT_SCENARIO_SHOTS` when that is set; `{"debug": 1}` //! prints the UI state (`"widgets"`: also every widget's text; `"handles"`: every published //! handle, browser rows as `row: