Skip to content

Commit

Permalink
added more fall animations
Browse files Browse the repository at this point in the history
changed fallAnimation control type to combo
updated readme
  • Loading branch information
IPdotSetAF committed Apr 11, 2024
1 parent 7c8b21f commit c507786
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ This is a highly customizable animated Matrix wallpaper for Wallpaper Engine (We
- Rain Customization
- Matrix Speed
- Trail Length
- Enable/Disable Initial Fall Animation
- Initial Fall Animation
- None
- Fall
- Scatter
- Color Customization
- Color Mode
- Static Color
Expand All @@ -65,6 +68,7 @@ This is a highly customizable animated Matrix wallpaper for Wallpaper Engine (We
- Silence Timeout
- Logo Customization
- Logo
- None
- 23 presets

<p align="left">
Expand Down Expand Up @@ -98,13 +102,18 @@ This is a highly customizable animated Matrix wallpaper for Wallpaper Engine (We
- Scale
- Position
- Clock
- Horizontal/Vertical
- Clock
- None
- Horizontal
- Vertical
- 12/24 Hour Format
- Day-light Saving
- Scale
- Position
- Message
- Horizontal
- Message
- None
- Horizontal
- Text
- Scale
- Position
Expand Down
26 changes: 21 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ window.onload = function () {
fpsInterval: calculateFpsInterval(24),
ui_rain_trailLength: 0.86,
trailLength: calculateTrailLength(0.86),
ui_rain_initialAnimation: true,
ui_rain_initialAnimation: "1",
ui_characters_charset: "4",
ui_characters_customCharset: "0123456789ABCDEF",
ui_font_font: "3",
Expand Down Expand Up @@ -97,7 +97,7 @@ window.onload = function () {
options.trailLength = calculateTrailLength(options.ui_rain_trailLength);
updateMask();
});
rainFolder.add(options, "ui_rain_initialAnimation").name("Initial Animation");
rainFolder.add(options, "ui_rain_initialAnimation", optionsToDict(config.general.properties.ui_rain_initialanimation.options)).name("Initial Animation").onChange(fallAnimation);

const colorFolder = gui.addFolder("Color");
colorFolder.add(options, 'ui_color_colorMode', optionsToDict(config.general.properties.ui_color_colormode.options)).name('Color Mode');
Expand Down Expand Up @@ -177,8 +177,10 @@ window.onload = function () {
options.trailLength = calculateTrailLength(properties.ui_rain_traillength.value);
updateMask();
}
if (properties.ui_rain_initialanimation)
if (properties.ui_rain_initialanimation) {
options.ui_rain_initialAnimation = properties.ui_rain_initialanimation.value;
fallAnimation();
}

if (properties.ui_color_colormode)
options.ui_color_colorMode = properties.ui_color_colormode.value;
Expand Down Expand Up @@ -459,15 +461,29 @@ window.onload = function () {
function fallAnimation() {
drops = [];
drop_chars = [];
if (options.ui_rain_initialAnimation)

switch (options.ui_rain_initialAnimation) {
case "0": {
for (var i = 0; i < columns; i++) {
drops[i] = [rows + 1, 0, 0];
drop_chars[i] = ["", false];
}
break;
}
case "1": {
for (var i = 0; i < columns; i++) {
drops[i] = [1, 0, 0];
drop_chars[i] = ["", false];
}
else
break;
}
case "2": {
for (var i = 0; i < columns; i++) {
drops[i] = [Math.floor(Math.random() * rows), 0, 0];
drop_chars[i] = ["", false];
}
break;
}
}
}

Expand Down
19 changes: 17 additions & 2 deletions project.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,25 @@
"ui_rain_initialanimation" :
{
"index" : 3,
"options" :
[
{
"label" : "None",
"value" : "0"
},
{
"label" : "Fall",
"value" : "1"
},
{
"label" : "Scatter",
"value" : "2"
}
],
"order" : 103,
"text" : "Initial Animation",
"type" : "bool",
"value" : true
"type" : "combo",
"value" : "1"
},
"ui_rain_matrixspeed" :
{
Expand Down

0 comments on commit c507786

Please sign in to comment.