This repository has been archived by the owner on Apr 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
custom.d.ts
76 lines (71 loc) · 2.21 KB
/
custom.d.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* @Author: LF112 (futiwolf) <[email protected]>
* @License: GNU Affero General Public License v3.0
*
* Copyright (c) 2022 LF112 (futiwolf), All Rights Reserved.
* 请注意,本项目使用 AGPL v3 开源协议开源,请严格依照开源协议进行不限于编辑、分发等操作。详见 https://www.chinasona.org/gnu/agpl-3.0-cn.html
*/
declare module '*.svg' {
import React = require('react')
export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>
const src: string
export default src
}
declare module 'parallax-js' {
export default class Parallax {
private inputElement?: string | HTMLElement | null
private calibrateX?: boolean
private calibrateY?: boolean
private invertX?: boolean
private invertY?: boolean
private limitX?: number | false
private limitY?: number | false
private scalarX?: number
private scalarY?: number
private frictionX?: number
private frictionY?: number
private originX?: number
private originY?: number
public precision?: number
public relativeInput?: boolean
public clipRelativeInput?: boolean
public pointerEvents?: boolean
public hoverOnly?: boolean
public selector?: string | null
public onReady?: () => void
constructor(element: HTMLElement, options?: IParallaxOptions)
public enable(): void
public disable(): void
public destroy(): void
public version(): void
public setInputElement(element: string | HTMLElement | null): void
public calibrate(x: boolean, y: boolean): void
public invert(x: boolean, y: boolean): void
public limit(x: number | false, y: number | false): void
public scalar(x: number, y: number): void
public friction(x: number, y: number): void
public origin(x: number, y: number): void
}
export interface IParallaxOptions {
precision?: number
relativeInput?: boolean
clipRelativeInput?: boolean
hoverOnly?: boolean
inputElement?: string | HTMLElement | null
pointerEvents?: boolean
calibrateX?: boolean
calibrateY?: boolean
invertX?: boolean
invertY?: boolean
limitX?: number | false
limitY?: number | false
scalarX?: number
scalarY?: number
frictionX?: number
frictionY?: number
originX?: number
originY?: number
selector?: string | null
onReady?: () => void
}
}