-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStars.PSSVG.ps1
More file actions
44 lines (33 loc) · 2.52 KB
/
Stars.PSSVG.ps1
File metadata and controls
44 lines (33 loc) · 2.52 KB
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
#requires -Module PSSVG
foreach ($n in 5..12) {
svg -ViewBox 2,2 @(
svg.Star -PointCount $n -Fill 'transparent' -Stroke '#4488ff' -StrokeWidth 0.01
) -OutputPath (Join-Path $PSScriptRoot .\Stars$n.svg)
}
$RotateEvery = [timespan]'00:00:02'
svg -ViewBox 100, 100 @(
svg.defs @(
svg.marker @(
svg.Star -CenterX 5 -CenterY 5 -Radius 5 -PointCount 12 -fill '#4488ff' @(
svg.animatetransform -AttributeName transform -From "360 5 5" -To "0 5 5" -dur "$($RotateEvery.TotalSeconds * 4)s" -RepeatCount indefinite -AttributeType xml -type rotate
)
) -MarkerHeight 5 -MarkerWidth 5 -ViewBox 10,10 -RefX 5 -RefY 5 -Id marker1
svg.marker @(
svg.Star -CenterX 5 -CenterY 5 -Radius 5 -PointCount 10 -fill '#4488ff' @(
svg.animatetransform -AttributeName transform -From "0 5 5" -To "360 5 5" -dur "$($RotateEvery.TotalSeconds * 4)s" -RepeatCount indefinite -AttributeType xml -type rotate
)
) -MarkerHeight 2.5 -MarkerWidth 2.5 -ViewBox 10,10 -RefX 5 -RefY 5 -Id marker2
)
svg.Star -PointCount 11 -Stroke '#4488ff' -StrokeWidth 1.1 -Content @(
svg.animatetransform -AttributeName transform -From "0 50 50" -To "360 50 50" -dur "$($RotateEvery.TotalSeconds * 4)s" -RepeatCount indefinite -AttributeType xml -type rotate
) -Radius 50 -CenterX 50 -CenterY 50 -Fill transparent -MarkerStart 'url(#marker1)' -MarkerEnd 'url(#marker1)' -MarkerMid 'url(#marker1)'
svg.Star -PointCount 9 -Stroke '#4488ff' -StrokeWidth 1 -Content @(
svg.animatetransform -AttributeName transform -From "360 50 50" -To "0 50 50" -dur "$($RotateEvery.TotalSeconds * 2)s" -RepeatCount indefinite -AttributeType xml -type rotate
) -Radius 30 -CenterX 50 -CenterY 50 -Fill transparent -MarkerStart 'url(#marker2)' -MarkerEnd 'url(#marker2)' -MarkerMid 'url(#marker2)'
svg.Star -PointCount 7 -Stroke '#4488ff' -StrokeWidth .5 -Content @(
svg.animatetransform -AttributeName transform -From "0 50 50" -To "360 50 50" -dur "$($RotateEvery.TotalSeconds)s" -RepeatCount indefinite -AttributeType xml -type rotate
) -Radius 10 -CenterX 50 -CenterY 50 -Fill transparent
svg.Star -PointCount 5 -Stroke '#4488ff' -StrokeWidth .25 -Content @(
svg.animatetransform -AttributeName transform -From "360 50 50" -To "0 50 50" -dur "$($RotateEvery.TotalSeconds / 2)s" -RepeatCount indefinite -AttributeType xml -type rotate
) -Radius 5 -CenterX 50 -CenterY 50 -Fill transparent
) -OutputPath (Join-Path $PSScriptRoot .\Stars.svg)