Skip to content

Commit

Permalink
🟦 [Nodes] Added a Content Size param to Mirror Repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Nov 7, 2024
1 parent 9a72838 commit 5ad561e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Nodes/50 2D Modifier/Mirror Repeat.clbnode
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// To learn how to write nodes, see https://coollab-art.com/Tutorials/Writing%20Nodes/Intro

INPUT vec2 'Cell Size';
INPUT float 'Content Size';

UV main(UV _2D_Object)
{
return (1. - 2. * (abs(mod(_2D_Object / 'Cell Size' * 0.5 + 0.5, 2.) - 1.))) * 'Cell Size';
return (1. - 2. * (abs(mod(_2D_Object / 'Cell Size' * 0.5 + 0.5, 2.) - 1.))) * 'Cell Size' / 'Content Size';
}
22 changes: 20 additions & 2 deletions Nodes/50 2D Modifier/Mirror Repeat.clbnode.presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,31 @@
},
"Metadata": {
"Bounds": {
"Has min bound": false,
"Has min bound": true,
"Min": 0.0,
"Has max bound": false,
"Max": 1.0,
"Drag speed": 0.009999999776482582,
"Use slider": false,
"Is logarithmic": false
"Is logarithmic": true
}
}
}
},
{
"index": 2,
"data": {
"Name": "Content Size",
"Value": 1.0,
"Metadata": {
"Bounds": {
"Has min bound": true,
"Min": 0.0,
"Has max bound": false,
"Max": 1.0,
"Drag speed": 0.009999999776482582,
"Use slider": false,
"Is logarithmic": true
}
}
}
Expand Down

0 comments on commit 5ad561e

Please sign in to comment.