Skip to content

Commit bd40e5e

Browse files
cjw6kclaude
andcommitted
fix: Improve tutorial UI - larger labels, better positioning
- Increase annotation distanceFactor from 6 to 25 for readable labels - Bump annotation font from text-base to text-lg - Move ch2-alignment camera closer (192→53 units) to see action - Center top-down alignment indicator (was hiding under left sidebar) - Show sun force vectors at ch3-complex step - Move Replay Tutorial button up to avoid overlapping About/Shortcuts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c984217 commit bd40e5e

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

tidal-harmonics/src/components/canvas/ForceField.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export function ForceField() {
2424
const currentStep = getCurrentStep();
2525
const showExplanation = !tutorialActive || currentStep?.step.id === 'ch1-differential';
2626

27-
// Show Sun forces in chapter 2 (spring/neap) or outside tutorial
28-
const showSunForces = !tutorialActive || currentStep?.chapter.id === 'ch2-sun';
27+
// Show Sun forces in chapter 2 (spring/neap), ch3-complex, or outside tutorial
28+
const showSunForces = !tutorialActive || currentStep?.chapter.id === 'ch2-sun' || currentStep?.step.id === 'ch3-complex';
2929

3030
const { moonArrows, sunArrows, sunMoonAngle } = useMemo(() => {
3131
const earthR = scale.EARTH_RADIUS;
@@ -205,7 +205,8 @@ export function ForceField() {
205205
style={{
206206
position: 'fixed',
207207
top: '80px',
208-
right: '380px',
208+
left: '50%',
209+
transform: 'translateX(-50%)',
209210
pointerEvents: 'none',
210211
}}
211212
zIndexRange={[1, 10]}

tidal-harmonics/src/components/tutorial/AnnotationLayer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export function AnnotationLayer() {
1717
key={annotation.id}
1818
position={annotation.position}
1919
center
20-
distanceFactor={6}
20+
distanceFactor={25}
2121
occlude={false}
2222
style={{
2323
pointerEvents: 'none',
2424
userSelect: 'none',
2525
}}
2626
>
2727
<div
28-
className={`px-3 py-2 rounded-lg text-base whitespace-nowrap
28+
className={`px-3 py-2 rounded-lg text-lg whitespace-nowrap
2929
${
3030
annotation.style === 'highlight'
3131
? 'bg-blue-600 text-white font-medium'

tidal-harmonics/src/components/tutorial/TutorialButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function TutorialButton() {
2929
return (
3030
<button
3131
onClick={startTutorial}
32-
className="fixed bottom-4 left-4 z-40 px-3 py-1.5
32+
className="fixed bottom-12 left-4 z-40 px-3 py-1.5
3333
bg-slate-700/80 text-slate-300 rounded-lg
3434
hover:bg-slate-600 hover:text-white
3535
shadow-md transition-all text-xs font-medium

tidal-harmonics/src/data/tutorialContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const TUTORIAL_CHAPTERS: TutorialChapter[] = [
100100
title: 'When They Align',
101101
content: "At new and full Moon, Sun and Moon pull together. Their forces ADD up.",
102102
duration: 7,
103-
camera: { position: [0, 150, 120], target: [0, 0, 0], duration: 2 },
103+
camera: { position: [0, 40, 35], target: [0, 0, 0], duration: 2 },
104104
showTidalBulge: true,
105105
tidalExaggeration: 90000,
106106
highlightSun: true,

0 commit comments

Comments
 (0)