-
-
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.
Adding LeftToRight Effect (Fixes #125)
- Loading branch information
James Brundage
committed
Jul 6, 2023
1 parent
7d3fead
commit d948976
Showing
1 changed file
with
41 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,41 @@ | ||
<# | ||
.SYNOPSIS | ||
Moves an item from left to right | ||
.DESCRIPTION | ||
Moves an item from -50% to 150% width. | ||
#> | ||
param( | ||
# The name of the scene. | ||
[string] | ||
$SceneName, | ||
|
||
# The name | ||
[string] | ||
$SceneItemID, | ||
|
||
# The duration (by default, one second) | ||
[timespan] | ||
$Duration = "00:00:01" | ||
) | ||
|
||
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 | ||
} | ||
} | ||
|
||
$this.Animate(@{x="-50%"}, @{x='150%'}, $Duration, $true) |