Skip to content

Commit

Permalink
upgraded to lil-gui
Browse files Browse the repository at this point in the history
  • Loading branch information
IPdotSetAF committed Apr 4, 2024
1 parent f4634aa commit c41bf3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="author" content="IP.AF">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="./index.css" media="screen" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lil-gui@0.19"></script>
<script type="text/javascript" src="./index.js"></script>
</head>

Expand Down
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ window.onload = function () {
ui_other_codesCommaSeparated: "THE MATRIX",
codes: makeCodes("THE MATRIX"),
ui_color_colorMode: "2",
ui_color_matrixColor: [0, 255, 0],
matrixColor: rgbToHue([0, 255, 0]),
ui_color_matrixColor: [0, 1, 0],
matrixColor: rgbToHue([0, 1, 0]),
ui_color_colorAnimationSpeed: 0.5,
colorAnimationSpeed: calculateColorAnimationSpeed(0.5),
ui_color_highlightFirstCharacter: true,
Expand All @@ -40,9 +40,8 @@ window.onload = function () {
drawGui();

function drawGui() {
gui = new dat.GUI({ autoPlace: false })
gui.width = 400;

gui = new lil.GUI({ autoPlace: false });

const rainFolder = gui.addFolder('Rain');
rainFolder.add(options, 'ui_rain_matrixSpeed').min(1).max(60).step(1).name('Matrix Speed').onChange(() => {
options.fpsInterval = calculateFpsInterval(options.ui_rain_matrixSpeed);
Expand Down

0 comments on commit c41bf3b

Please sign in to comment.