-
-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove window references from TiltShiftFilter
- Loading branch information
1 parent
57f4822
commit 6b39839
Showing
5 changed files
with
97 additions
and
87 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 |
---|---|---|
@@ -1,8 +1,19 @@ | ||
export default function () | ||
{ | ||
this.addFilter('TiltShiftFilter', function (folder) | ||
{ | ||
folder.add(this, 'blur', 0, 200); | ||
folder.add(this, 'gradientBlur', 0, 1000); | ||
const app = this; | ||
const height = app.initHeight; | ||
const width = app.initWidth; | ||
|
||
this.addFilter('TiltShiftFilter', { | ||
args: { start: { x: 0, y: height / 2 }, end: { x: width, y: height / 2 } }, | ||
oncreate(folder) | ||
{ | ||
folder.add(this, 'blur', 0, 200); | ||
folder.add(this, 'gradientBlur', 0, 1000); | ||
folder.add(this, 'startX', 0, width); | ||
folder.add(this, 'startY', 0, height); | ||
folder.add(this, 'endX', 0, width); | ||
folder.add(this, 'endY', 0, height); | ||
} | ||
}); | ||
} |
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