-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Regenerating and adding Zoom In / Out Effect ( Fixes #164 )
- Loading branch information
James Brundage
committed
Jan 22, 2024
1 parent
e92bdb8
commit d423345
Showing
1 changed file
with
57 additions
and
0 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,57 @@ | ||
<# | ||
.SYNOPSIS | ||
Zooms In and Out again | ||
.DESCRIPTION | ||
Zooms an Input In and Out. | ||
#> | ||
param( | ||
# The name of the scene. | ||
[string] | ||
$SceneName, | ||
|
||
# The name | ||
[string] | ||
$SceneItemID, | ||
|
||
# The duration (by default, one a half second) | ||
[timespan] | ||
$Duration = "00:00:00.5", | ||
|
||
# The pause between (by default, one a half second) | ||
[Timespan] | ||
$PauseBetween = '00:00:00.5' | ||
) | ||
|
||
if (-not $SceneName -and $this -and $this.SceneName) { | ||
$SceneName = $this.SceneName | ||
} | ||
|
||
if (-not $SceneItemID -and $this -and $this.SceneItemID) { | ||
$SceneItemID = $this.SceneItemID | ||
} | ||
|
||
if (-not $SceneItemID -and $SceneName) { return } | ||
|
||
$sceneItem = if ($this.SceneName -and $this.SceneItemID) { | ||
$this | ||
} elseif ($SceneItemID) { | ||
Get-OBSSceneItem -SceneName $this.SceneName | | ||
Where-Object { | ||
$_.SceneItemID -eq $SceneItemID -or | ||
$_.SourceName -eq $SceneItemID | ||
} | ||
} | ||
# Fit it to the screen once, so we're centered correctly. | ||
$sceneItem.FitToScreen() | ||
|
||
# | ||
$sceneItem.Scale( | ||
"0%", | ||
"150%", | ||
$Duration, | ||
$PauseBetween, | ||
$Duration, | ||
"0%", | ||
$true | ||
) | ||
|