Skip to content

Commit 431d61f

Browse files
committed
audio ML
1 parent 3f2af6a commit 431d61f

File tree

3 files changed

+34
-54
lines changed

3 files changed

+34
-54
lines changed

src/components/Navbar.css

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,15 @@ button, input { font-family: inherit; }
194194
right: clamp(3.5rem, 8vw, 6.5rem);
195195
width: 2px;
196196
height: 4.6rem;
197-
background: var(--line);
198-
transform-origin: top center;
199-
animation: rope-sway 2.6s ease-in-out infinite;
200197
z-index: 50;
201198
border: 0;
202199
padding: 0;
203-
background-color: var(--line);
200+
background: var(--line);
204201
appearance: none;
205-
cursor: grab;
206-
touch-action: none;
202+
cursor: pointer;
203+
transform-origin: top center;
204+
animation: rope-sway 2.6s ease-in-out infinite;
205+
will-change: transform;
207206
}
208207

209208
.projector-pull {
@@ -219,11 +218,6 @@ button, input { font-family: inherit; }
219218
transform: translate(-50%, -35%);
220219
}
221220

222-
.projector-rope.is-grabbed {
223-
animation-play-state: paused;
224-
cursor: grabbing;
225-
}
226-
227221
.projector-rope::after {
228222
content: "";
229223
position: absolute;
@@ -1448,7 +1442,10 @@ button, input { font-family: inherit; }
14481442
grid-template-columns: repeat(2, minmax(0, 1fr));
14491443
padding-right: 0;
14501444
}
1451-
.projector-rope { right: 2.4rem; height: 3.8rem; }
1445+
.projector-rope {
1446+
right: 2.4rem;
1447+
height: 3.8rem;
1448+
}
14521449
.topbar { grid-template-columns: 1fr; justify-items: start; }
14531450
.top-menu { display: none; }
14541451
.top-actions { width: 100%; justify-content: flex-end; }

src/components/Navbar.tsx

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import "./Navbar.css";
1919

2020
const OPEN_MS = 900;
2121
const CLOSE_MS = 680;
22-
const DRAG_THRESHOLD_PX = 26;
2322
const TOPIC_MORPH_TIME_MS = 820;
2423
const TOPIC_SLIDE_TIME_MS = 560;
2524
const MORPH_BLUR_BASE = 5;
@@ -126,7 +125,6 @@ function Navbar() {
126125
const initialRouteStatus = resolvePathStatus(initialPathname).status;
127126
const [topicTransitionMode] = useState(resolveTopicTransitionMode);
128127
const [screenPhase, setScreenPhase] = useState("closed");
129-
const [isRopeGrabbed, setIsRopeGrabbed] = useState(false);
130128
const [selectedSection, setSelectedSection] = useState(PROJECTOR_SECTIONS[0]);
131129
const [hoveredSection, setHoveredSection] = useState(null);
132130
const [displayedSection, setDisplayedSection] = useState(PROJECTOR_SECTIONS[0]);
@@ -164,7 +162,6 @@ function Navbar() {
164162
const fromTextNodesRef = useRef([]);
165163
const toTextNodesRef = useRef([]);
166164
const screenPhaseRef = useRef("closed");
167-
const ropeDragRef = useRef({ active: false, pointerId: null, startY: 0, acted: false });
168165
const subtopicReturnListenersRef = useRef(new WeakMap());
169166

170167
const parseCssNumber = (value, fallback = 0) => {
@@ -687,30 +684,6 @@ function Navbar() {
687684
openProjectorScreen();
688685
};
689686

690-
const startRopeDrag = (event) => {
691-
if (event.button !== 0) return;
692-
event.currentTarget.setPointerCapture(event.pointerId);
693-
ropeDragRef.current = { active: true, pointerId: event.pointerId, startY: event.clientY, acted: false };
694-
setIsRopeGrabbed(true);
695-
};
696-
697-
const moveRopeDrag = (event) => {
698-
const d = ropeDragRef.current;
699-
if (!d.active || d.pointerId !== event.pointerId) return;
700-
const deltaY = event.clientY - d.startY;
701-
if (deltaY >= DRAG_THRESHOLD_PX && !isOpenLikeNow()) { d.acted = true; d.startY = event.clientY; openProjectorScreen(); return; }
702-
if (deltaY <= -DRAG_THRESHOLD_PX && isOpenLikeNow()) { d.acted = true; d.startY = event.clientY; closeProjectorScreen(); }
703-
};
704-
705-
const endRopeDrag = (event, allowTapToggle) => {
706-
const d = ropeDragRef.current;
707-
if (!d.active || d.pointerId !== event.pointerId) return;
708-
if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);
709-
ropeDragRef.current = { active: false, pointerId: null, startY: 0, acted: false };
710-
setIsRopeGrabbed(false);
711-
if (allowTapToggle && !d.acted && Math.abs(event.clientY - d.startY) < DRAG_THRESHOLD_PX) toggleProjectorScreen();
712-
};
713-
714687
const isSlideMorph = isMorphingTopics && topicTransitionMode === "slide";
715688
const isGooeyMorph = isMorphingTopics && topicTransitionMode === "gooey";
716689
const topicStageStyle = {
@@ -852,13 +825,9 @@ function Navbar() {
852825
</div>
853826

854827
<button
855-
className={`projector-rope${isRopeGrabbed ? " is-grabbed" : ""}`}
828+
className="projector-rope"
856829
type="button"
857-
onPointerDown={startRopeDrag}
858-
onPointerMove={moveRopeDrag}
859-
onPointerUp={(e) => endRopeDrag(e, true)}
860-
onPointerCancel={(e) => endRopeDrag(e, false)}
861-
onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); toggleProjectorScreen(); } }}
830+
onClick={toggleProjectorScreen}
862831
aria-pressed={isOpenLike}
863832
aria-label={isOpenLike ? "Roll up projector screen" : "Pull down projector screen"}
864833
>

src/engine/Lessons.tsx

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ export const PROJECTOR_SECTIONS = [
1111
export const PROJECTOR_TOPICS = {
1212
Fundamentals: [
1313
{
14-
topic: "Orientation",
14+
topic: "Intelligent Systems",
1515
subtopics: [
16-
"What Really Is Machine Learning?",
17-
"AI vs ML vs DL",
16+
"What Is Machine Learning",
17+
"AI vs ML vs Deep Learning",
1818
"Types of Learning Problems",
19-
"Where Machine Learning Is Used Today",
19+
"How Models Learn",
20+
"The ML Workflow",
21+
"Where ML Is Used Today",
2022
],
2123
},
2224
{
@@ -365,11 +367,13 @@ export const PROJECTOR_TOPICS = {
365367
],
366368
},
367369
{
368-
topic: "Multimodal & Vision-Language",
370+
topic: "Multimodal Learning",
369371
subtopics: [
370-
"VLM Backbones",
371-
"Fusion Methods",
372-
"Crossmodal Tasks",
372+
"Vision-Language Backbones",
373+
"Audio Representations",
374+
"Cross-Modal Fusion",
375+
"Cross-Modal Alignment",
376+
"Multimodal Generation",
373377
],
374378
},
375379
{
@@ -399,7 +403,7 @@ export const PROJECTOR_TOPICS = {
399403
],
400404
},
401405
{
402-
topic: "Frameworks & Tools",
406+
topic: "ML Frameworks & Tools",
403407
subtopics: [
404408
"PyTorch Stack",
405409
"TensorFlow & JAX",
@@ -493,6 +497,16 @@ export const PROJECTOR_TOPICS = {
493497
"Inference Tasks & Metrics",
494498
],
495499
},
500+
{
501+
topic: "Speech & Audio",
502+
subtopics: [
503+
"Audio Representations & Spectrograms",
504+
"Speech Recognition",
505+
"Text-to-Speech & Neural Vocoders",
506+
"Audio Generation",
507+
"Audio Understanding",
508+
],
509+
},
496510
{
497511
topic: "Time Series Learning",
498512
subtopics: [

0 commit comments

Comments
 (0)