-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathindex.ts
36 lines (29 loc) · 1.3 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import './styles/index.css'
// Components
export { GlobalCanvas } from './components/GlobalCanvas'
export { type ScrollSceneChildProps, ScrollScene } from './components/ScrollScene'
export { type ViewportScrollSceneChildProps, ViewportScrollScene } from './components/ViewportScrollScene'
export { UseCanvas } from './components/UseCanvas'
// Hooks
export { useScrollRig } from './hooks/useScrollRig'
export { useCanvas } from './hooks/useCanvas'
export { useScrollbar } from './scrollbar/useScrollbar'
export { useTracker } from './hooks/useTracker'
export { useWindowSize } from './hooks/useWindowSize'
// Utils hooks
export { useImageAsTexture } from './hooks/useImageAsTexture'
// Scrollbar
export { default as SmoothScrollbar } from './components/R3FSmoothScrollbar'
// CSS class names for hiding stuff
// Matching css styles can be imported from @14islands/r3f-scrollr-rig/css
export const styles = {
hidden: 'ScrollRig-visibilityHidden',
hiddenWhenSmooth: 'ScrollRig-visibilityHidden ScrollRig-hiddenIfSmooth',
transparentColor: 'ScrollRig-transparentColor',
transparentColorWhenSmooth: 'ScrollRig-transparentColor ScrollRig-hiddenIfSmooth',
}
// Private-ish
// ----------------------------------
export { useCanvasStore } from './store'
// Types
export type { ScrollState } from './hooks/useTrackerTypes'