Created
May 29, 2019 11:52
-
-
Save Ciantic/fe29487b6b98d7eaf44113b8467e2488 to your computer and use it in GitHub Desktop.
Just some grid ball animation thing I threw away
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
<?php | |
$w = 20; | |
$h = 3; | |
$spacing = 7; | |
$padding = 2; | |
?> | |
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
viewBox="<?php echo -$padding; ?> <?php echo -$padding; ?> <?php echo $w * $spacing + $padding * 2; ?> <?php echo $h * $spacing + $padding * 2; ?>" | |
version="1.1"> | |
<?php foreach (range(0, $w) as $x): ?> | |
<?php foreach (range(0, $h) as $y): ?> | |
<circle | |
cx="<?php echo $x * $spacing; ?>" | |
cy="<?php echo $y * $spacing; ?>" | |
r="0.4" | |
> | |
<animate attributeName="r" begin="0s" dur="3s" repeatCount="indefinite" | |
values="0.4;0.7;0.4" | |
keyTimes="0;0.5;1" | |
repeatCount="indefinite" /> | |
</circle> | |
<?php endforeach; ?> | |
<?php endforeach; ?> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment