diff --git a/LICENSE b/LICENSE index f288702..e72bfdd 100644 --- a/LICENSE +++ b/LICENSE @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. \ No newline at end of file diff --git a/README.md b/README.md index bf232dc..839823c 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,11 @@ This is a highly customizable animated Matrix wallpaper for Wallpaper Engine (We Click on each preview to watch live

- +

-

@@ -37,6 +36,11 @@ Click on each preview to watch live ## +## Compatibility +- ✔️ Wallpaper Engine +- ✔️ Sucrose Wallpaper Engine +- ✔️ WEB Browser + ## Features - Rain Customization - Matrix Speed @@ -63,7 +67,7 @@ Click on each preview to watch live - Font - 3 Presets - CUSTOM -- Audio Customization (inspired by [Colorful Matrix](https://steamcommunity.com/sharedfiles/filedetails/?id=1103493745)) +- Audio Customization (inspired by [Colorful Matrix](https://steamcommunity.com/sharedfiles/filedetails/?id=1103493745)) (WallpaperEngine & Sucrose Only) - Audio Response - Sensetivity - Silence Animation @@ -149,13 +153,11 @@ Click on each preview to watch live - Position - Other Customizations - Codes (these will be shown as decrypted Messages) - -### ✔️ Web Browser Compatible - - Preset - - Share (URL) - - Save - - Load - - Reset +- Preset (Web Browser Only) + - Share (URL) + - Save + - Load + - Reset ## Are you ready to be free? diff --git a/SucroseCompatible.json b/SucroseCompatible.json new file mode 100644 index 0000000..4212a82 --- /dev/null +++ b/SucroseCompatible.json @@ -0,0 +1,3 @@ +{ + "SystemAudio": "SucroseAudioData({0});" +} \ No newline at end of file diff --git a/SucroseInfo.json b/SucroseInfo.json new file mode 100644 index 0000000..7bc5d54 --- /dev/null +++ b/SucroseInfo.json @@ -0,0 +1,20 @@ +{ + "AppVersion": "24.5.17.0", + "Version": "7.1.0", + "Title": "Neo Matrix", + "Thumbnail": "images/thumbnail.jpg", + "Preview": "images/preview.gif", + "Description": "This is a highly customizable animated Matrix wallpaper", + "Author": "Mohammad Mahdi Nazari", + "License": "LICENSE", + "Contact": "https://github.com/IPdotSetAF", + "Type": 2, + "Source": "index.html", + "Tags": [ + "Sci-Fi", + "Hacker", + "Music", + "Matrix" + ], + "Arguments": null +} \ No newline at end of file diff --git a/SucroseProperties.json b/SucroseProperties.json new file mode 100644 index 0000000..a495e75 --- /dev/null +++ b/SucroseProperties.json @@ -0,0 +1,464 @@ +{ + "PropertyListener": "SucrosePropertyListener('{0}', {1});", + "PropertyList": { + "folder_rain": { + "type": "label", + "value": "Rain" + }, + "ui_rain_matrixspeed": { + "max": 60, + "min": 10, + "step": 1, + "text": "Matrix Speed", + "type": "slider", + "value": 24 + }, + "ui_rain_traillength": { + "max": 100, + "min": 0, + "step": 1, + "text": "Trail Length", + "type": "slider", + "value": 86 + }, + "ui_rain_dropcount": { + "max": 5, + "min": 1, + "step": 1, + "text": "Drop Count/Column", + "type": "slider", + "value": 1 + }, + "ui_rain_initialanimation": { + "type": "dropdown", + "text": "Initial Animation", + "value": 1, + "items": [ + "None", + "Fall", + "Scatter" + ] + }, + "folder_color": { + "type": "label", + "value": "Color" + }, + "ui_color_colormode": { + "type": "dropdown", + "text": "Color Mode", + "value": 2, + "items": [ + "Single", + "RGB Cycle", + "Vertical Rainbow", + "Horizontal Rainbow" + ] + }, + "ui_color_matrixcolor": { + "text": "Matrix Color", + "type": "colorpicker", + "value": "#FF00FF00" + }, + "ui_color_coloranimationspeed": { + "max": 10, + "min": -10, + "step": 1, + "text": "Color Animation Speed", + "type": "slider", + "value": 5 + }, + "ui_color_highlightfirstcharacter": { + "text": "Highlight First Character", + "type": "checkbox", + "value": true + }, + "folder_characters": { + "type": "label", + "value": "Characters" + }, + "ui_characters_charset": { + "type": "dropdown", + "text": "Char Set", + "value": 3, + "items": [ + "Custom", + "English Lttrs", + "Lttrs+Nums", + "Lttrs+Nums+Chars", + "Original Matrix", + "Binary", + "Hex", + "Morse Code" + ] + }, + "ui_characters_customcharset": { + "text": "Custom Char Set", + "help": "Enter custom char set", + "type": "textbox", + "value": "0123456789ABCDEF" + }, + "folder_font": { + "type": "label", + "value": "Font" + }, + "ui_font_size": { + "max": 30, + "min": 5, + "step": 1, + "text": "Font Size", + "type": "slider", + "value": 15 + }, + "ui_font_font": { + "type": "dropdown", + "text": "Font Family", + "value": 3, + "items": [ + "Custom", + "MonoSpace", + "Consolas", + "Courier Bold" + ] + }, + "ui_font_customfont": { + "text": "Custom Font Family", + "help": "Enter custom font family", + "type": "textbox", + "value": "monospace" + }, + "folder_audio": { + "type": "label", + "value": "Audio" + }, + "ui_audio_audioresponsive": { + "text": "Audio Responsive", + "type": "checkbox", + "value": false + }, + "ui_audio_audiosensetivity": { + "max": 100, + "min": 0, + "step": 1, + "text": "Audio Sensetivity", + "type": "slider", + "value": 50 + }, + "ui_audio_silenceanimation": { + "text": "Silence Animation", + "type": "checkbox", + "value": true + }, + "ui_audio_silencetimeoutseconds": { + "max": 15, + "min": 1, + "step": 1, + "text": "Silence Timeout (Seconds)", + "type": "slider", + "value": 3 + }, + "folder_logo": { + "type": "label", + "value": "Logo" + }, + "ui_logo_logo": { + "type": "dropdown", + "text": "Logo", + "value": 0, + "items": [ + "None", + "Custom", + "IP.AF", + "Kali 1", + "Kali 2", + "Ubuntu 1", + "Ubuntu 2", + "Windows 11", + "Windows 10/8", + "Windows 7", + "Visual Studio", + "VS Code", + "Unity 1", + "Unity 2", + "Unreal", + "Python", + "Blazor", + "Docker", + "Flutter", + "Git", + "Blender", + "Angular", + "C#", + "C++", + "QT" + ] + }, + "ui_logo_customlogo": { + "text": "Custom Logo URL (SVG/PNG)", + "help": "Enter custom logo url (svg/png)", + "type": "textbox", + "value": "" + }, + "ui_logo_preservecolor": { + "text": "Preserve Logo Color", + "type": "checkbox", + "value": false + }, + "ui_logo_scale": { + "max": 100, + "min": 0, + "step": 1, + "text": "Logo Scale", + "type": "slider", + "value": 10 + }, + "ui_logo_positionx": { + "max": 2500, + "min": -2500, + "step": 1, + "text": "Logo Position X", + "type": "slider", + "value": 0 + }, + "ui_logo_positiony": { + "max": 2500, + "min": -2500, + "step": 1, + "text": "Logo Position Y", + "type": "slider", + "value": 0 + }, + "folder_clock": { + "type": "label", + "value": "Clock" + }, + "ui_clock_clock": { + "type": "dropdown", + "text": "Clock Position", + "value": 0, + "items": [ + "None", + "Horizontal", + "Vertical" + ] + }, + "ui_clock_24hourformat": { + "text": "24 Hour Format", + "type": "checkbox", + "value": true + }, + "ui_clock_daylightsaving": { + "max": 1, + "min": -1, + "step": 1, + "text": "Day-Light Saving", + "type": "slider", + "value": 0 + }, + "ui_clock_scale": { + "max": 10, + "min": 0, + "step": 1, + "text": "Clock Scale", + "type": "slider", + "value": 1 + }, + "ui_clock_positionx": { + "max": 100, + "min": -100, + "step": 1, + "text": "Clock Position X", + "type": "slider", + "value": 0 + }, + "ui_clock_positiony": { + "max": 100, + "min": -100, + "step": 1, + "text": "Clock Position Y", + "type": "slider", + "value": 0 + }, + "folder_day": { + "type": "label", + "value": "Day" + }, + "ui_day_day": { + "type": "dropdown", + "text": "Day State", + "value": 0, + "items": [ + "None", + "Full", + "Short" + ] + }, + "ui_day_allcaps": { + "text": "All CAPS", + "type": "checkbox", + "value": false + }, + "ui_day_orientation": { + "text": "Vertical Orientation", + "type": "checkbox", + "value": false + }, + "ui_day_scale": { + "max": 10, + "min": 0, + "step": 1, + "text": "Day Scale", + "type": "slider", + "value": 1 + }, + "ui_day_positionx": { + "max": 100, + "min": -100, + "step": 1, + "text": "Day Position X", + "type": "slider", + "value": 0 + }, + "ui_day_positiony": { + "max": 100, + "min": -100, + "step": 1, + "text": "Day Position Y", + "type": "slider", + "value": 0 + }, + "folder_date": { + "type": "label", + "value": "Date" + }, + "ui_date_date": { + "type": "dropdown", + "text": "Day State", + "value": 0, + "items": [ + "None", + "Gregorian", + "Persian", + "Hijri" + ] + }, + "ui_date_year": { + "type": "dropdown", + "text": "Year", + "value": 2, + "items": [ + "None", + "Short", + "Full" + ] + }, + "ui_date_order": { + "type": "dropdown", + "text": "Order", + "value": 0, + "items": [ + "MM/DD", + "DD/MM" + ] + }, + "ui_date_monthname": { + "text": "Month Name", + "type": "checkbox", + "value": false + }, + "ui_date_allcaps": { + "text": "All CAPS", + "type": "checkbox", + "value": false + }, + "ui_date_delimiter": { + "type": "dropdown", + "text": "Date Delimiter", + "value": 0, + "items": [ + "None", + "Space", + "-", + ".", + "/" + ] + }, + "ui_date_orientation": { + "text": "Vertical Orientation", + "type": "checkbox", + "value": false + }, + "ui_date_scale": { + "max": 10, + "min": 0, + "step": 1, + "text": "Date Scale", + "type": "slider", + "value": 1 + }, + "ui_date_positionx": { + "max": 100, + "min": -100, + "step": 1, + "text": "Date Position X", + "type": "slider", + "value": 0 + }, + "ui_date_positiony": { + "max": 100, + "min": -100, + "step": 1, + "text": "Date Position Y", + "type": "slider", + "value": 0 + }, + "folder_message": { + "type": "label", + "value": "Message" + }, + "ui_message_message": { + "text": "Message State", + "type": "checkbox", + "value": false + }, + "ui_message_text": { + "text": "Message Text", + "help": "Enter message text", + "type": "textbox", + "value": "THE MATRIX" + }, + "ui_message_scale": { + "max": 10, + "min": 0, + "step": 1, + "text": "Message Scale", + "type": "slider", + "value": 1 + }, + "ui_message_positionx": { + "max": 100, + "min": -100, + "step": 1, + "text": "Message Position X", + "type": "slider", + "value": 0 + }, + "ui_message_positiony": { + "max": 100, + "min": -100, + "step": 1, + "text": "Message Position Y", + "type": "slider", + "value": 0 + }, + "folder_other": { + "type": "label", + "value": "Other" + }, + "ui_other_codescommaseparated": { + "text": "Codes (Comma Separated)", + "help": "Enter codes (comma separated)", + "type": "textbox", + "value": "IP.AF,THE MATRIX" + } + } +} \ No newline at end of file diff --git a/index.css b/css/index.css similarity index 88% rename from index.css rename to css/index.css index dd01120..8fbb5c4 100644 Binary files a/index.css and b/css/index.css differ diff --git a/images/preview.gif b/images/preview.gif new file mode 100644 index 0000000..148b625 Binary files /dev/null and b/images/preview.gif differ diff --git a/images/thumbnail.jpg b/images/thumbnail.jpg new file mode 100644 index 0000000..3590976 Binary files /dev/null and b/images/thumbnail.jpg differ diff --git a/index.html b/index.html index 3123d9a..9555d5a 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,9 @@ Wallpaper - NeoMatrix - - - + + + diff --git a/index.js b/js/index.js similarity index 84% rename from index.js rename to js/index.js index a734b51..9d72daf 100644 --- a/index.js +++ b/js/index.js @@ -106,6 +106,10 @@ window.onload = function () { window.wallpaperRegisterAudioListener((audioArray) => { return frequencyArray = audioArray; }); + else if (navigator.userAgent.startsWith("Sucrose")) + window.SucroseAudioData = function (audioArray) { + frequencyArray = audioArray.Data; + }; else drawGui(); @@ -387,6 +391,221 @@ window.onload = function () { } }; + //MARK: Sucrose Wallpaper Engine + window.SucrosePropertyListener = function (name, val) { + switch (name) { + case "ui_rain_matrixspeed": + options.fpsInterval = calculateFpsInterval(val.value); + break; + case "ui_rain_traillength": + options.trailLength = calculateTrailLength(val.value / 100); + updateMask(); + break; + case "ui_rain_initialanimation": + options.ui_rain_initialAnimation = val.value.toString(); + initialAnimation(); + break; + case "ui_rain_dropcount": + options.ui_rain_dropCount = val.value; + initialAnimation(); + break; + + case "ui_color_colormode": + options.ui_color_colorMode = val.value.toString(); + break; + case "ui_color_matrixcolor": + const tmp = hexToRgb(val.value); + options.matrixColor = rgbToHue([tmp.r, tmp.g, tmp.b]) + break; + case "ui_color_coloranimationspeed": + options.colorAnimationSpeed = calculateColorAnimationSpeed(val.value / 10); + break; + case "ui_color_highlightfirstcharacter": + options.ui_color_highlightFirstCharacter = val.value; + break; + + case "ui_characters_charset": + options.ui_characters_charset = val.value.toString(); + updateCharSet(); + break; + case "ui_characters_customcharset": + options.ui_characters_customCharset = val.value; + updateCharSet(); + break; + + case "ui_font_font": + options.ui_font_font = val.value.toString(); + updateFont(); + break; + case "ui_font_customfont": + options.ui_font_customFont = val.value; + updateFont(); + break; + case "ui_font_size": + options.ui_font_size = val.value; + updateFont(); + break; + + case "ui_audio_audioresponsive": + options.ui_audio_audioResponsive = val.value; + break; + case "ui_audio_audiosensetivity": + options.ui_audio_audioSensetivity = val.value; + break; + case "ui_audio_silenceanimation": + options.ui_audio_silenceAnimation = val.value; + break; + case "ui_audio_silencetimeoutseconds": + options.ui_audio_silenceTimeoutSeconds = val.value; + break; + + case "ui_logo_logo": + options.ui_logo_logo = val.value.toString(); + updateLogo(); + break; + case "ui_logo_customlogo": + options.ui_logo_customLogo = val.value; + updateLogo(); + break; + case "ui_logo_preservecolor": + options.ui_logo_preserveColor = val.value; + updateLogo(); + break; + case "ui_logo_scale": + options.ui_logo_scale = val.value / 10; + updateLogo(); + break; + case "ui_logo_positionx": + options.ui_logo_positionX = val.value; + updateLogo(); + break; + case "ui_logo_positiony": + options.ui_logo_positionY = val.value; + updateLogo(); + break; + + case "ui_clock_clock": + options.ui_clock_clock = val.value.toString(); + updateMask(); + break; + case "ui_clock_24hourformat": + options.ui_clock_24HourFormat = val.value; + updateTime(); + updateMask(); + break; + case "ui_clock_daylightsaving": + options.ui_clock_dayLightSaving = val.value; + updateTime(); + updateMask(); + break; + case "ui_clock_scale": + options.ui_clock_scale = val.value; + updateMask(); + break; + case "ui_clock_positionx": + options.ui_clock_positionX = val.value; + updateMask(); + break; + case "ui_clock_positiony": + options.ui_clock_positionY = val.value; + updateMask(); + break; + + case "ui_day_day": + options.ui_day_day = val.value.toString(); + updateMask(); + break; + case "ui_day_allcaps": + options.ui_day_allCaps = val.value; + updateMask(); + break; + case "ui_day_orientation": + options.ui_day_orientation = val.value; + updateMask(); + break; + case "ui_day_scale": + options.ui_day_scale = val.value; + updateMask(); + break; + case "ui_day_positionx": + options.ui_day_positionX = val.value; + updateMask(); + break; + case "ui_day_positiony": + options.ui_day_positionY = val.value; + updateMask(); + break; + + case "ui_date_date": + options.ui_date_date = val.value.toString(); + updateTime(); + updateMask(); + break; + case "ui_date_orientation": + options.ui_date_orientation = val.value; + updateMask(); + break; + case "ui_date_year": + options.ui_date_year = val.value.toString(); + updateMask(); + break; + case "ui_date_order": + options.ui_date_order = val.value.toString(); + updateMask(); + break; + case "ui_date_monthname": + options.ui_date_monthName = val.value; + updateMask(); + break; + case "ui_date_allcaps": + options.ui_date_allCaps = val.value; + updateMask(); + break; + case "ui_date_delimiter": + options.ui_date_delimiter = val.value.toString(); + updateMask(); + break; + case "ui_date_scale": + options.ui_date_scale = val.value; + updateMask(); + break; + case "ui_date_positionx": + options.ui_date_positionX = val.value; + updateMask(); + break; + case "ui_date_positiony": + options.ui_date_positionY = val.value; + updateMask(); + break; + + case "ui_message_message": + options.ui_message_message = val.value; + updateMask(); + break; + case "ui_message_text": + options.ui_message_text = val.value; + updateMask(); + break; + case "ui_message_scale": + options.ui_message_scale = val.value; + updateMask(); + break; + case "ui_message_positionx": + options.ui_message_positionX = val.value; + updateMask(); + break; + case "ui_message_positiony": + options.ui_message_positionY = val.value; + updateMask(); + break; + + case "ui_other_codescommaseparated": + options.codes = makeCodes(val.value); + initialAnimation(); + break; + } + }; + window.addEventListener('resize', function () { updateCanvasSize(); updateGrid(); @@ -929,6 +1148,15 @@ window.onload = function () { return rgbToHsl(...tmp)[0] * 360; } + function hexToRgb(hex) { + let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[2], 16), + g: parseInt(result[3], 16), + b: parseInt(result[4], 16) + } : null; + } + function rgbToHsl(r, g, b) { r /= 255, g /= 255, b /= 255; diff --git a/js/lil-gui-0.19.js b/js/lil-gui-0.19.js new file mode 100644 index 0000000..e94e959 --- /dev/null +++ b/js/lil-gui-0.19.js @@ -0,0 +1,8 @@ +/** + * lil-gui + * https://lil-gui.georgealways.com + * @version 0.19.2 + * @author George Michael Brower + * @license MIT + */ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t=t||self).lil={})}(this,(function(t){"use strict";class i{constructor(t,e,s,n,l="div"){this.parent=t,this.object=e,this.property=s,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),i.nextNameID=i.nextNameID||0,this.$name.id="lil-gui-name-"+ ++i.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",t=>t.stopPropagation()),this.domElement.addEventListener("keyup",t=>t.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(s)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){const i=this.parent.add(this.object,this.property,t);return i.name(this._name),this.destroy(),i}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class e extends i{constructor(t,i,e){super(t,i,e,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function s(t){let i,e;return(i=t.match(/(#|0x)?([a-f0-9]{6})/i))?e=i[2]:(i=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?e=parseInt(i[1]).toString(16).padStart(2,0)+parseInt(i[2]).toString(16).padStart(2,0)+parseInt(i[3]).toString(16).padStart(2,0):(i=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(e=i[1]+i[1]+i[2]+i[2]+i[3]+i[3]),!!e&&"#"+e}const n={isPrimitive:!0,match:t=>"number"==typeof t,fromHexString:t=>parseInt(t.substring(1),16),toHexString:t=>"#"+t.toString(16).padStart(6,0)},l={isPrimitive:!1,match:t=>Array.isArray(t),fromHexString(t,i,e=1){const s=n.fromHexString(t);i[0]=(s>>16&255)/255*e,i[1]=(s>>8&255)/255*e,i[2]=(255&s)/255*e},toHexString:([t,i,e],s=1)=>n.toHexString(t*(s=255/s)<<16^i*s<<8^e*s<<0)},r={isPrimitive:!1,match:t=>Object(t)===t,fromHexString(t,i,e=1){const s=n.fromHexString(t);i.r=(s>>16&255)/255*e,i.g=(s>>8&255)/255*e,i.b=(255&s)/255*e},toHexString:({r:t,g:i,b:e},s=1)=>n.toHexString(t*(s=255/s)<<16^i*s<<8^e*s<<0)},o=[{isPrimitive:!0,match:t=>"string"==typeof t,fromHexString:s,toHexString:s},n,l,r];class a extends i{constructor(t,i,e,n){var l;super(t,i,e,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(l=this.initialValue,o.find(t=>t.match(l))),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const t=s(this.$text.value);t&&this._setValueFromHexString(t)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){const i=this._format.fromHexString(t);this.setValue(i)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class h extends i{constructor(t,i,e){super(t,i,e,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",t=>{t.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class d extends i{constructor(t,i,e,s,n,l){super(t,i,e,"number"),this._initInput(),this.min(s),this.max(n);const r=void 0!==l;this.step(r?l:this._getImplicitStep(),r),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,i=!0){return this._step=t,this._stepExplicit=i,this}updateDisplay(){const t=this.getValue();if(this._hasSlider){let i=(t-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=100*i+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=t=>{const i=parseFloat(this.$input.value);isNaN(i)||(this._snapClampSetValue(i+t),this.$input.value=this.getValue())};let i,e,s,n,l,r=!1;const o=t=>{if(r){const s=t.clientX-i,n=t.clientY-e;Math.abs(n)>5?(t.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(s)>5&&a()}if(!r){const i=t.clientY-s;l-=i*this._step*this._arrowKeyMultiplier(t),n+l>this._max?l=this._max-n:n+l{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",a)};this.$input.addEventListener("input",()=>{let t=parseFloat(this.$input.value);isNaN(t)||(this._stepExplicit&&(t=this._snap(t)),this.setValue(this._clamp(t)))}),this.$input.addEventListener("keydown",i=>{"Enter"===i.key&&this.$input.blur(),"ArrowUp"===i.code&&(i.preventDefault(),t(this._step*this._arrowKeyMultiplier(i))),"ArrowDown"===i.code&&(i.preventDefault(),t(this._step*this._arrowKeyMultiplier(i)*-1))}),this.$input.addEventListener("wheel",i=>{this._inputFocused&&(i.preventDefault(),t(this._step*this._normalizeMouseWheel(i)))},{passive:!1}),this.$input.addEventListener("mousedown",t=>{i=t.clientX,e=s=t.clientY,r=!0,n=this.getValue(),l=0,window.addEventListener("mousemove",o),window.addEventListener("mouseup",a)}),this.$input.addEventListener("focus",()=>{this._inputFocused=!0}),this.$input.addEventListener("blur",()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()})}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=t=>{const i=this.$slider.getBoundingClientRect();let e=(s=t,n=i.left,l=i.right,r=this._min,o=this._max,(s-n)/(l-n)*(o-r)+r);var s,n,l,r,o;this._snapClampSetValue(e)},i=i=>{t(i.clientX)},e=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",e)};let s,n,l=!1;const r=i=>{i.preventDefault(),this._setDraggingStyle(!0),t(i.touches[0].clientX),l=!1},o=i=>{if(l){const t=i.touches[0].clientX-s,e=i.touches[0].clientY-n;Math.abs(t)>Math.abs(e)?r(i):(window.removeEventListener("touchmove",o),window.removeEventListener("touchend",a))}else i.preventDefault(),t(i.touches[0].clientX)},a=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",o),window.removeEventListener("touchend",a)},h=this._callOnFinishChange.bind(this);let d;this.$slider.addEventListener("mousedown",s=>{this._setDraggingStyle(!0),t(s.clientX),window.addEventListener("mousemove",i),window.addEventListener("mouseup",e)}),this.$slider.addEventListener("touchstart",t=>{t.touches.length>1||(this._hasScrollBar?(s=t.touches[0].clientX,n=t.touches[0].clientY,l=!0):r(t),window.addEventListener("touchmove",o,{passive:!1}),window.addEventListener("touchend",a))},{passive:!1}),this.$slider.addEventListener("wheel",t=>{if(Math.abs(t.deltaX)this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){const t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class c extends i{constructor(t,i,e,s){super(t,i,e,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(s)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach(t=>{const i=document.createElement("option");i.textContent=t,this.$select.appendChild(i)}),this.updateDisplay(),this}updateDisplay(){const t=this.getValue(),i=this._values.indexOf(t);return this.$select.selectedIndex=i,this.$display.textContent=-1===i?t:this._names[i],this}}class u extends i{constructor(t,i,e){super(t,i,e,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",t=>{"Enter"===t.code&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let p=!1;class g{constructor({parent:t,autoPlace:i=void 0===t,container:e,width:s,title:n="Controls",closeFolders:l=!1,injectStyles:r=!0,touchStyles:o=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",t=>{"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(n),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),o&&this.domElement.classList.add("allow-touch-styles"),!p&&r&&(!function(t){const i=document.createElement("style");i.innerHTML=t;const e=document.querySelector("head link[rel=stylesheet], head style");e?document.head.insertBefore(i,e):document.head.appendChild(i)}('.lil-gui{--background-color:#1f1f1f;--text-color:#ebebeb;--title-background-color:#111;--title-text-color:#ebebeb;--widget-color:#424242;--hover-color:#4f4f4f;--focus-color:#595959;--number-color:#2cc9ff;--string-color:#a2db3c;--font-size:11px;--input-font-size:11px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;--font-family-mono:Menlo,Monaco,Consolas,"Droid Sans Mono",monospace;--padding:4px;--spacing:4px;--widget-height:20px;--title-height:calc(var(--widget-height) + var(--spacing)*1.25);--name-width:45%;--slider-knob-width:2px;--slider-input-width:27%;--color-input-width:27%;--slider-input-min-width:45px;--color-input-min-width:45px;--folder-indent:7px;--widget-padding:0 0 0 3px;--widget-border-radius:2px;--checkbox-size:calc(var(--widget-height)*0.75);--scrollbar-width:5px;color:var(--text-color);font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-weight:400;line-height:1;text-align:left;touch-action:manipulation;user-select:none;-webkit-user-select:none}.lil-gui,.lil-gui *{box-sizing:border-box;margin:0;padding:0}.lil-gui.root{background:var(--background-color);display:flex;flex-direction:column;width:var(--width,245px)}.lil-gui.root>.title{background:var(--title-background-color);color:var(--title-text-color)}.lil-gui.root>.children{overflow-x:hidden;overflow-y:auto}.lil-gui.root>.children::-webkit-scrollbar{background:var(--background-color);height:var(--scrollbar-width);width:var(--scrollbar-width)}.lil-gui.root>.children::-webkit-scrollbar-thumb{background:var(--focus-color);border-radius:var(--scrollbar-width)}.lil-gui.force-touch-styles,.lil-gui.force-touch-styles .lil-gui{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}.lil-gui.autoPlace{max-height:100%;position:fixed;right:15px;top:0;z-index:1001}.lil-gui .controller{align-items:center;display:flex;margin:var(--spacing) 0;padding:0 var(--padding)}.lil-gui .controller.disabled{opacity:.5}.lil-gui .controller.disabled,.lil-gui .controller.disabled *{pointer-events:none!important}.lil-gui .controller>.name{flex-shrink:0;line-height:var(--widget-height);min-width:var(--name-width);padding-right:var(--spacing);white-space:pre}.lil-gui .controller .widget{align-items:center;display:flex;min-height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.string input{color:var(--string-color)}.lil-gui .controller.boolean{cursor:pointer}.lil-gui .controller.color .display{border-radius:var(--widget-border-radius);height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.color input[type=color]{cursor:pointer;height:100%;opacity:0;width:100%}.lil-gui .controller.color input[type=text]{flex-shrink:0;font-family:var(--font-family-mono);margin-left:var(--spacing);min-width:var(--color-input-min-width);width:var(--color-input-width)}.lil-gui .controller.option select{max-width:100%;opacity:0;position:absolute;width:100%}.lil-gui .controller.option .display{background:var(--widget-color);border-radius:var(--widget-border-radius);height:var(--widget-height);line-height:var(--widget-height);max-width:100%;overflow:hidden;padding-left:.55em;padding-right:1.75em;pointer-events:none;position:relative;word-break:break-all}.lil-gui .controller.option .display.active{background:var(--focus-color)}.lil-gui .controller.option .display:after{bottom:0;content:"↕";font-family:lil-gui;padding-right:.375em;position:absolute;right:0;top:0}.lil-gui .controller.option .widget,.lil-gui .controller.option select{cursor:pointer}.lil-gui .controller.number input{color:var(--number-color)}.lil-gui .controller.number.hasSlider input{flex-shrink:0;margin-left:var(--spacing);min-width:var(--slider-input-min-width);width:var(--slider-input-width)}.lil-gui .controller.number .slider{background:var(--widget-color);border-radius:var(--widget-border-radius);cursor:ew-resize;height:var(--widget-height);overflow:hidden;padding-right:var(--slider-knob-width);touch-action:pan-y;width:100%}.lil-gui .controller.number .slider.active{background:var(--focus-color)}.lil-gui .controller.number .slider.active .fill{opacity:.95}.lil-gui .controller.number .fill{border-right:var(--slider-knob-width) solid var(--number-color);box-sizing:content-box;height:100%}.lil-gui-dragging .lil-gui{--hover-color:var(--widget-color)}.lil-gui-dragging *{cursor:ew-resize!important}.lil-gui-dragging.lil-gui-vertical *{cursor:ns-resize!important}.lil-gui .title{-webkit-tap-highlight-color:transparent;text-decoration-skip:objects;cursor:pointer;font-weight:600;height:var(--title-height);line-height:calc(var(--title-height) - 4px);outline:none;padding:0 var(--padding)}.lil-gui .title:before{content:"▾";display:inline-block;font-family:lil-gui;padding-right:2px}.lil-gui .title:active{background:var(--title-background-color);opacity:.75}.lil-gui.root>.title:focus{text-decoration:none!important}.lil-gui.closed>.title:before{content:"▸"}.lil-gui.closed>.children{opacity:0;transform:translateY(-7px)}.lil-gui.closed:not(.transition)>.children{display:none}.lil-gui.transition>.children{overflow:hidden;pointer-events:none;transition-duration:.3s;transition-property:height,opacity,transform;transition-timing-function:cubic-bezier(.2,.6,.35,1)}.lil-gui .children:empty:before{content:"Empty";display:block;font-style:italic;height:var(--widget-height);line-height:var(--widget-height);margin:var(--spacing) 0;opacity:.5;padding:0 var(--padding)}.lil-gui.root>.children>.lil-gui>.title{border-width:0;border-bottom:1px solid var(--widget-color);border-left:0 solid var(--widget-color);border-right:0 solid var(--widget-color);border-top:1px solid var(--widget-color);transition:border-color .3s}.lil-gui.root>.children>.lil-gui.closed>.title{border-bottom-color:transparent}.lil-gui+.controller{border-top:1px solid var(--widget-color);margin-top:0;padding-top:var(--spacing)}.lil-gui .lil-gui .lil-gui>.title{border:none}.lil-gui .lil-gui .lil-gui>.children{border:none;border-left:2px solid var(--widget-color);margin-left:var(--folder-indent)}.lil-gui .lil-gui .controller{border:none}.lil-gui button,.lil-gui input,.lil-gui label{-webkit-tap-highlight-color:transparent}.lil-gui input{background:var(--widget-color);border:0;border-radius:var(--widget-border-radius);color:var(--text-color);font-family:var(--font-family);font-size:var(--input-font-size);height:var(--widget-height);outline:none;width:100%}.lil-gui input:disabled{opacity:1}.lil-gui input[type=number],.lil-gui input[type=text]{-moz-appearance:textfield;padding:var(--widget-padding)}.lil-gui input[type=number]:focus,.lil-gui input[type=text]:focus{background:var(--focus-color)}.lil-gui input[type=checkbox]{appearance:none;border-radius:var(--widget-border-radius);cursor:pointer;height:var(--checkbox-size);text-align:center;width:var(--checkbox-size)}.lil-gui input[type=checkbox]:checked:before{content:"✓";font-family:lil-gui;font-size:var(--checkbox-size);line-height:var(--checkbox-size)}.lil-gui button{background:var(--widget-color);border:none;border-radius:var(--widget-border-radius);color:var(--text-color);cursor:pointer;font-family:var(--font-family);font-size:var(--font-size);height:var(--widget-height);outline:none;text-transform:none;width:100%}.lil-gui button:active{background:var(--focus-color)}@font-face{font-family:lil-gui;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff")}@media (pointer:coarse){.lil-gui.allow-touch-styles,.lil-gui.allow-touch-styles .lil-gui{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}}@media (hover:hover){.lil-gui .controller.color .display:hover:before{border:1px solid #fff9;border-radius:var(--widget-border-radius);bottom:0;content:" ";display:block;left:0;position:absolute;right:0;top:0}.lil-gui .controller.option .display.focus{background:var(--focus-color)}.lil-gui .controller.number .slider:hover,.lil-gui .controller.option .widget:hover .display{background:var(--hover-color)}body:not(.lil-gui-dragging) .lil-gui .title:hover{background:var(--title-background-color);opacity:.85}.lil-gui .title:focus{text-decoration:underline var(--focus-color)}.lil-gui input:hover{background:var(--hover-color)}.lil-gui input:active{background:var(--focus-color)}.lil-gui input[type=checkbox]:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}.lil-gui button:hover{background:var(--hover-color)}.lil-gui button:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}}'),p=!0),e?e.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this._closeFolders=l}add(t,i,s,n,l){if(Object(s)===s)return new c(this,t,i,s);const r=t[i];switch(typeof r){case"number":return new d(this,t,i,s,n,l);case"boolean":return new e(this,t,i);case"string":return new u(this,t,i);case"function":return new h(this,t,i)}console.error("gui.add failed\n\tproperty:",i,"\n\tobject:",t,"\n\tvalue:",r)}addColor(t,i,e=1){return new a(this,t,i,e)}addFolder(t){const i=new g({parent:this,title:t});return this.root._closeFolders&&i.close(),i}load(t,i=!0){return t.controllers&&this.controllers.forEach(i=>{i instanceof h||i._name in t.controllers&&i.load(t.controllers[i._name])}),i&&t.folders&&this.folders.forEach(i=>{i._title in t.folders&&i.load(t.folders[i._title])}),this}save(t=!0){const i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof h)){if(t._name in i.controllers)throw new Error(`Cannot save GUI with duplicate property "${t._name}"`);i.controllers[t._name]=t.save()}}),t&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error(`Cannot save GUI with duplicate folder "${t._title}"`);i.folders[t._title]=t.save()}),i}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");const e=t=>{t.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",e))};this.$children.addEventListener("transitionend",e);const s=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame(()=>{this.$children.style.height=s+"px"})}),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),void 0!==this._onOpenClose&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(t=>t.destroy())}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach(i=>{t=t.concat(i.controllersRecursive())}),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach(i=>{t=t.concat(i.foldersRecursive())}),t}}t.BooleanController=e,t.ColorController=a,t.Controller=i,t.FunctionController=h,t.GUI=g,t.NumberController=d,t.OptionController=c,t.StringController=u,t.default=g,Object.defineProperty(t,"__esModule",{value:!0})})); \ No newline at end of file diff --git a/preview.gif b/preview.gif deleted file mode 100644 index 77e4c6b..0000000 Binary files a/preview.gif and /dev/null differ diff --git a/project.json b/project.json index 0927fe0..970eb48 100644 --- a/project.json +++ b/project.json @@ -447,8 +447,8 @@ "max" : 10, "min" : 0, "order" : 126, - "precision" : 1.1, - "step" : 0.79432823, + "precision" : 2, + "step" : 0.1, "text" : "Logo Scale", "type" : "slider", "value" : 1 @@ -898,10 +898,10 @@ "supportsaudioprocessing" : true }, "monetization" : false, - "preview" : "preview.gif", + "preview" : "images/preview.gif", "snapshotformat" : 1, "snapshotoverlay" : "", - "tags" : [ "Sci-Fi", "Technology", "Multi-monitor optimized" ], + "tags" : [ "Sci-Fi", "Hacker", "Matrix", "Music" ], "title" : "Neo Matrix", "type" : "web", "version" : 0,