Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added easings to attract and repulse interactions
feat: added factor and maxSpeed to attract and repulse interactions
- Loading branch information
1 parent
767429d
commit 071f515
Showing
17 changed files
with
530 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export enum EasingType { | ||
easeOutBack = "ease-out-back", | ||
easeOutCirc = "ease-out-circ", | ||
easeOutCubic = "ease-out-cubic", | ||
easeOutQuad = "ease-out-quad", | ||
easeOutQuart = "ease-out-quart", | ||
easeOutQuint = "ease-out-quint", | ||
easeOutExpo = "ease-out-expo", | ||
easeOutSine = "ease-out-sine", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
core/main/src/Options/Interfaces/Interactivity/Modes/IAttract.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
/** | ||
* @category Options | ||
*/ | ||
import { EasingType } from "../../../../Enums"; | ||
|
||
export interface IAttract { | ||
distance: number; | ||
duration: number; | ||
easing: EasingType; | ||
factor: number; | ||
maxSpeed: number; | ||
speed: number; | ||
} |
5 changes: 5 additions & 0 deletions
5
core/main/src/Options/Interfaces/Interactivity/Modes/IRepulseBase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
/** | ||
* @category Options | ||
*/ | ||
import type { EasingType } from "../../../../Enums"; | ||
|
||
export interface IRepulseBase { | ||
distance: number; | ||
duration: number; | ||
factor: number; | ||
speed: number; | ||
maxSpeed: number; | ||
easing: EasingType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"fpsLimit": 60, | ||
"particles": { | ||
"number": { | ||
"value": 200, | ||
"density": { | ||
"enable": true, | ||
"area": 800 | ||
} | ||
}, | ||
"color": { | ||
"value": "#ffffff" | ||
}, | ||
"shape": { | ||
"type": "circle" | ||
}, | ||
"opacity": { | ||
"value": 0.5 | ||
}, | ||
"size": { | ||
"value": { | ||
"min": 1, | ||
"max": 3 | ||
} | ||
}, | ||
"move": { | ||
"enable": true, | ||
"speed": 0, | ||
"direction": "none", | ||
"random": false, | ||
"straight": false, | ||
"outModes": { | ||
"default": "out" | ||
} | ||
} | ||
}, | ||
"interactivity": { | ||
"detectsOn": "canvas", | ||
"events": { | ||
"onHover": { | ||
"enable": true, | ||
"mode": "repulse" | ||
}, | ||
"resize": true | ||
}, | ||
"modes": { | ||
"repulse": { | ||
"distance": 200, | ||
"factor": 1, | ||
"speed": 5, | ||
"easing": "ease-out-back" | ||
} | ||
} | ||
}, | ||
"detectRetina": true, | ||
"background": { | ||
"color": "#000000" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"fpsLimit": 60, | ||
"particles": { | ||
"number": { | ||
"value": 200, | ||
"density": { | ||
"enable": true, | ||
"area": 800 | ||
} | ||
}, | ||
"color": { | ||
"value": "#ffffff" | ||
}, | ||
"shape": { | ||
"type": "circle" | ||
}, | ||
"opacity": { | ||
"value": 0.5 | ||
}, | ||
"size": { | ||
"value": { | ||
"min": 1, | ||
"max": 3 | ||
} | ||
}, | ||
"move": { | ||
"enable": true, | ||
"speed": 0, | ||
"direction": "none", | ||
"random": false, | ||
"straight": false, | ||
"outModes": { | ||
"default": "out" | ||
} | ||
} | ||
}, | ||
"interactivity": { | ||
"detectsOn": "canvas", | ||
"events": { | ||
"onHover": { | ||
"enable": true, | ||
"mode": "repulse" | ||
}, | ||
"resize": true | ||
}, | ||
"modes": { | ||
"repulse": { | ||
"distance": 200, | ||
"factor": 1, | ||
"speed": 5, | ||
"easing": "ease-out-circ" | ||
} | ||
} | ||
}, | ||
"detectRetina": true, | ||
"background": { | ||
"color": "#000000" | ||
} | ||
} |
Oops, something went wrong.