How antonbobrov/vevet works
Vevet.js is a client-side interaction library: an application imports its API, initializes or uses the shared core, then composes components to turn browser events, viewport state, and media resources into animations and interactive DOM/canvas behavior. The README documents the full component catalog; sampled source confirms core setup and internal wiring for Cursor, Snap, Swipe, and Scrollbar. Other component relationships are intentionally limited to documented responsibilities because their implementations were not sampled.
Main entry points: src/index.ts Public exports · core/index.ts Core instance · Swipe/index.ts Swipe and inertia · Snap/index.ts Snap carousel
Components 25
Public API and core
- Public exports
src/index.ts - Core instance
src/core/index.ts - Core initializer
src/global/initVevet.ts - Viewport handler
src/core/handlers/createViewport/index.ts - Page-load handler
src/core/handlers/createPageLoad/index.ts
Shared foundations
- Module and callbacks
src/base/Module/index.ts - Responsive base
src/base/Responsive/index.ts - Shared utilities
src/utils/index.ts
Input and navigation
- Pointer tracking
src/components/Pointers/index.ts - Swipe and inertia
src/components/Swipe/index.ts - Snap carousel
src/components/Snap/index.ts - Custom scrollbar
src/components/Scrollbar/index.ts - Scroll progress
src/components/ScrollProgress/index.ts
Visual components
- Canvas rendering
src/components/Canvas/index.ts - Canvas media
src/components/CanvasMedia/index.ts - Custom cursor
src/components/Cursor/index.ts - Marquee
src/components/Marquee/index.ts - Split text
src/components/SplitText/index.ts - Viewport visibility
src/components/InView/index.ts
Animation and loading
- Preloader
src/components/Preloader/index.ts - Progress preloader
src/components/ProgressPreloader/index.ts - Animation frame loop
src/components/Raf/index.ts - Animation timeline
src/components/Timeline/index.ts
Other components
- Application code
- Browser runtime
Connections 41
- Application code → Public exports: imports
- Public exports → Core initializer: initializes
- Public exports → Core instance: exports
- Public exports → Pointer tracking: exports
- Public exports → Swipe and inertia: exports
- Public exports → Snap carousel: exports
- Public exports → Custom scrollbar: exports
- Public exports → Scroll progress: exports
- Public exports → Canvas rendering: exports
- Public exports → Canvas media: exports
- Public exports → Custom cursor: exports
- Public exports → Marquee: exports
- Public exports → Split text: exports
- Public exports → Viewport visibility: exports
- Public exports → Preloader: exports
- Public exports → Progress preloader: exports
- Public exports → Animation frame loop: exports
- Public exports → Animation timeline: exports
- Core initializer → Core instance: creates
- Core instance → Viewport handler: creates
- Core instance → Page-load handler: creates
- Browser runtime → Core instance: provides runtime data
- Core instance → Viewport handler: updates from
- Custom cursor → Core initializer: reads prefix
- Custom cursor → Animation frame loop: animates with
- Snap carousel → Module and callbacks: extends
- Snap carousel → Shared utilities: uses
- Snap carousel → Custom scrollbar: emits resize state
- Custom scrollbar → Swipe and inertia: creates
- Custom scrollbar → Snap carousel: reads scroll state
- Swipe and inertia → Pointer tracking: tracks pointers
- Swipe and inertia → Animation timeline: animates bounce
- Swipe and inertia → Module and callbacks: extends
- Custom cursor → Module and callbacks: extends
- Custom scrollbar → Module and callbacks: extends
- Canvas media → Canvas rendering: renders media on
- Progress preloader → Browser runtime: preloads resources
- Preloader → Browser runtime: controls loading UI
- Animation frame loop → Browser runtime: schedules frames
- Viewport visibility → Browser runtime: observes visibility
- Scroll progress → Browser runtime: reads scroll position