├── .gitattributes ├── .gitignore ├── JS13k ├── OS13k.zip ├── build.bat ├── externs.js ├── index.html ├── index.js └── index.min.html ├── JS13k2020 ├── OS13k.zip ├── index.html └── index.min.html ├── JS13k2021 ├── OS13k.zip ├── build.bat ├── externs.js ├── index.html ├── index.js └── index.min.html ├── LICENSE ├── OS13k ├── OS13k.js ├── OS13kDesktopIcon.js ├── OS13kInput.js ├── OS13kProgram.js ├── OS13kProgramMenu.js ├── OS13kTaskbarIcon.js ├── OS13kTrayIcon.js ├── OS13kWindow.js └── OS13kZzFX.js ├── README.md ├── apps ├── camera.html ├── console.html ├── graphingCalculator.html ├── spriteGenerator.html ├── timer.html └── webBrowser.html ├── dweets ├── automaticBreakout.dweet.js ├── blackHole.dweet.js ├── bloodstream.dweet.js ├── buddhabrot.dweet.js ├── cityOfShadows.dweet.js ├── cityTraffic.dweet.js ├── colorZoom.dweet.js ├── heatWaves.dweet.js ├── lavaCave.dweet.js ├── notebook.dweet.js ├── oceanCity.dweet.js ├── palmTreeSunset.dweet.js ├── runningMan.dweet.js ├── simbiotic.dweet.js ├── touchWater.dweet.js ├── trainSet.dweet.js ├── triFractal.dweet.js └── underwaterCavern.dweet.js ├── favicon.ico ├── games ├── 4x4.html ├── aquaPop.html ├── batafuraiko.html ├── bogusRoadsMini.dweet.js ├── bogusSlopes.dweet.js ├── bounceBack.html ├── bounceBack.png ├── digitDilemma.html ├── dontFall.dweet.js ├── freeCell.html ├── hueJumper.html ├── lavaRush.html ├── marathon.dweet.js ├── myHeartJumped.dweet.js ├── queensGambit.html ├── sandbox.dweet.js ├── sheddingSnake.dweet.js ├── spaceHuggers.html └── swatch.html ├── help.html ├── index.html ├── music ├── bach.dweet.js ├── byteBeatPlayer.html ├── minBytes.html ├── musicPlayer.html ├── piano.html ├── pianoMini.html ├── sequencer.html ├── smallSeeds.html ├── songs │ ├── captaincallisto.js │ ├── cuddly.js │ ├── depp.js │ ├── iamback.js │ ├── packabunchas.js │ └── sanxion.js ├── soundSeeds.html ├── visualizer.dweet.js └── zzfxSoundBoard.html ├── programs.js ├── shaders ├── infiniteYinYangs.shader.txt ├── infinityMatrix.shader.txt ├── sierpinskiTowers.shader.txt ├── timeGate.shader.txt ├── vogelSpiral.shader.txt └── zzartLandscape.shader.txt └── system ├── clock.dweet.js ├── inputTest.dweet.js ├── settings.html ├── stickyNote.html ├── systemTest.html └── trophyCase.html /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-language=Javascript 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /JS13k/OS13k.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KilledByAPixel/OS13k/671972146c3dd20479e783d6992367bd861bf614/JS13k/OS13k.zip -------------------------------------------------------------------------------- /JS13k/build.bat: -------------------------------------------------------------------------------- 1 | rem SIMPLE BUILD SCRIPT FOR JS13k by FRANK FORCE 2 | rem minfies and combines index.html and index.js and zips the result 3 | 4 | set name=OS13k 5 | 6 | rem install closure and advzip globally if necessary 7 | rem npm install -g google-closure-compiler 8 | rem npm install -g terser 9 | rem npm install -g advzip-bin 10 | rem npm install -g roadroller 11 | 12 | rem remove old files 13 | del index.zip 14 | del index.min.html 15 | rmdir /s /q build 16 | 17 | call google-closure-compiler --js index.js --externs externs.js --js_output_file build\index.js --compilation_level ADVANCED --language_out ECMASCRIPT_2019 --warning_level VERBOSE --jscomp_off * 18 | if %ERRORLEVEL% NEQ 0 ( 19 | pause 20 | exit /b %errorlevel% 21 | ) 22 | 23 | rem get rid of strict mode by adding a 0 at the top 24 | copy build\index.js build\indexStrict.js 25 | del build\index.js 26 | echo 0 > build\index.js 27 | type build\indexStrict.js >> build\index.js 28 | 29 | rem more minification with terser 30 | call terser -o build\index.js --compress --mangle -- build\index.js 31 | if %ERRORLEVEL% NEQ 0 ( 32 | pause 33 | exit /b %errorlevel% 34 | ) 35 | 36 | rem roadroaller compresses the code better then zip 37 | call roadroller build\index.js -o build\index.js 38 | if %ERRORLEVEL% NEQ 0 ( 39 | pause 40 | exit /b %errorlevel% 41 | ) 42 | 43 | rem make the html 44 | echo ^^ >> build\index.html 45 | type build\index.js >> build\index.html 46 | echo ^ >> build\index.html 47 | 48 | rem zip the result 49 | cd build 50 | call advzip -a -4 -i 99 index.zip index.html 51 | if %ERRORLEVEL% NEQ 0 ( 52 | pause 53 | exit /b %errorlevel% 54 | ) 55 | 56 | rem copy zip and remove build folder 57 | copy index.zip ..\%name%.zip 58 | copy index.html ..\index.min.html 59 | cd .. 60 | rmdir /s /q build 61 | 62 | rem pause to see result -------------------------------------------------------------------------------- /JS13k/externs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview Public API of OS13k.js 3 | * @externs 4 | */ 5 | 6 | OS13k; 7 | iframeContent; 8 | iframeContent.OS13k; 9 | iframeContent.OS13kWindow; 10 | iframeContent.zzfx; 11 | 12 | window.document.OS13kInput; 13 | window.document.OS13kInput.x; 14 | window.document.OS13kInput.y; 15 | window.document.OS13kInput.keypress; 16 | window.document.OS13kInput.mousepress; 17 | window.document.OS13kInput.keydown; 18 | window.document.OS13kInput.mousedown; 19 | window.document.OS13kInput.mousex; 20 | window.document.OS13kInput.mousey; 21 | 22 | settings.v; // volume 23 | settings.m; // music volume 24 | settings.s; // speech 25 | settings.p; // popups 26 | settings.o; // system sounds 27 | settings.c; // color 1 28 | settings.d; // color 2 29 | settings.t; // text 30 | 31 | zzfx; 32 | zzfxG; 33 | zzfxM; 34 | 35 | localStorage.OS13k 36 | localStorage.OS13kVersion; 37 | source.gain; 38 | 39 | _OS13k = class 40 | { 41 | Clamp(a, max=1, min=0) {} 42 | Percent(v, a, b) {} 43 | Lerp(p, a, b) {} 44 | Hash(s) {} 45 | Random(max=1, min=0) {} 46 | Trophy(icon, game, name, message) {} 47 | GetTrophy(game, name) {} 48 | Trophies() {} 49 | PlaySeed(seed, lengthScale=1, volume=1, randomness=.05, frequency, isMusic) {} 50 | SeedSamples(...parameters) {} 51 | SeedParameters(seed, lengthScale=1, volume=1, randomness=.05, frequency) {} 52 | PlaySamples(samples, isMusic, sampleRate=defaultSampleRate) {} 53 | PlaySamplesArray(samplesArray, isMusic, sampleRate=defaultSampleRate) {} 54 | PlayMusic(song) {} 55 | GetAnalyser() {} 56 | GetAnalyserData(e) {} 57 | StringToMusic(string, validate) {} 58 | Note(semitoneOffset=0, rootNoteFrequency=440) {} 59 | Speak(text, language='en', stopSpeech, volume=1, rate=1, pitch=1) {} 60 | StripHTML(string, maxLength) {} 61 | Popup(html, speak, language) {} 62 | Input(inputWindow) {} 63 | Save() {} 64 | SaveSettings(volume, musicVolume, speech, popups, systemSounds, color1, color2, text) {} 65 | Settings() {} 66 | }; -------------------------------------------------------------------------------- /JS13k/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS13k2020/OS13k.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KilledByAPixel/OS13k/671972146c3dd20479e783d6992367bd861bf614/JS13k2020/OS13k.zip -------------------------------------------------------------------------------- /JS13k2021/OS13k.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KilledByAPixel/OS13k/671972146c3dd20479e783d6992367bd861bf614/JS13k2021/OS13k.zip -------------------------------------------------------------------------------- /JS13k2021/build.bat: -------------------------------------------------------------------------------- 1 | rem SIMPLE BUILD SCRIPT FOR JS13k by FRANK FORCE 2 | rem minfies and combines index.html and index.js and zips the result 3 | 4 | set name=OS13k 5 | 6 | rem install closure and advzip globally if necessary 7 | rem npm install -g google-closure-compiler 8 | rem npm install -g terser 9 | rem npm install -g advzip-bin 10 | rem npm install -g roadroller 11 | 12 | rem remove old files 13 | del index.zip 14 | del index.min.html 15 | rmdir /s /q build 16 | 17 | call google-closure-compiler --js index.js --externs externs.js --js_output_file build\index.js --compilation_level ADVANCED --language_out ECMASCRIPT_2019 --warning_level VERBOSE --jscomp_off * 18 | if %ERRORLEVEL% NEQ 0 ( 19 | pause 20 | exit /b %errorlevel% 21 | ) 22 | 23 | rem get rid of strict mode by adding a 0 at the top 24 | copy build\index.js build\indexStrict.js 25 | del build\index.js 26 | echo 0 > build\index.js 27 | type build\indexStrict.js >> build\index.js 28 | 29 | rem more minification with terser 30 | call terser -o build\index.js --compress --mangle -- build\index.js 31 | if %ERRORLEVEL% NEQ 0 ( 32 | pause 33 | exit /b %errorlevel% 34 | ) 35 | 36 | rem roadroaller compresses the code better then zip 37 | call roadroller build\index.js -o build\index.js 38 | if %ERRORLEVEL% NEQ 0 ( 39 | pause 40 | exit /b %errorlevel% 41 | ) 42 | 43 | rem make the html 44 | echo ^^ >> build\index.html 45 | type build\index.js >> build\index.html 46 | echo ^ >> build\index.html 47 | 48 | rem zip the result 49 | cd build 50 | call advzip -a -4 -i 99 index.zip index.html 51 | if %ERRORLEVEL% NEQ 0 ( 52 | pause 53 | exit /b %errorlevel% 54 | ) 55 | 56 | rem copy zip and remove build folder 57 | copy index.zip ..\%name%.zip 58 | copy index.html ..\index.min.html 59 | cd .. 60 | rmdir /s /q build 61 | 62 | rem pause to see result -------------------------------------------------------------------------------- /JS13k2021/externs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview Public API of OS13k.js 3 | * @externs 4 | */ 5 | 6 | OS13k; 7 | iframeContent; 8 | iframeContent.OS13k; 9 | iframeContent.OS13kWindow; 10 | iframeContent.zzfx; 11 | 12 | window.document.OS13kInput; 13 | window.document.OS13kInput.x; 14 | window.document.OS13kInput.y; 15 | window.document.OS13kInput.keypress; 16 | window.document.OS13kInput.mousepress; 17 | window.document.OS13kInput.keydown; 18 | window.document.OS13kInput.mousedown; 19 | window.document.OS13kInput.mousex; 20 | window.document.OS13kInput.mousey; 21 | 22 | settings.v; // volume 23 | settings.m; // music volume 24 | settings.s; // speech 25 | settings.p; // popups 26 | settings.o; // system sounds 27 | settings.c; // color 1 28 | settings.d; // color 2 29 | settings.t; // text 30 | 31 | zzfx; 32 | zzfxG; 33 | zzfxM; 34 | 35 | localStorage.OS13k 36 | localStorage.OS13kVersion; 37 | source.gain; 38 | 39 | _OS13k = class 40 | { 41 | Clamp(a, max=1, min=0) {} 42 | Percent(v, a, b) {} 43 | Lerp(p, a, b) {} 44 | Hash(s) {} 45 | Random(max=1, min=0) {} 46 | Trophy(icon, game, name, message) {} 47 | GetTrophy(game, name) {} 48 | Trophies() {} 49 | PlaySeed(seed, lengthScale=1, volume=1, randomness=.05, frequency, isMusic) {} 50 | SeedSamples(...parameters) {} 51 | SeedParameters(seed, lengthScale=1, volume=1, randomness=.05, frequency) {} 52 | PlaySamples(samples, isMusic, sampleRate=defaultSampleRate) {} 53 | PlaySamplesArray(samplesArray, isMusic, sampleRate=defaultSampleRate) {} 54 | PlayMusic(song) {} 55 | GetAnalyser() {} 56 | GetAnalyserData(e) {} 57 | StringToMusic(string, validate) {} 58 | Note(semitoneOffset=0, rootNoteFrequency=440) {} 59 | Speak(text, language='en', stopSpeech, volume=1, rate=1, pitch=1) {} 60 | StripHTML(string, maxLength) {} 61 | Popup(html, speak, language) {} 62 | Input(inputWindow) {} 63 | Save() {} 64 | SaveSettings(volume, musicVolume, speech, popups, systemSounds, color1, color2, text) {} 65 | Settings() {} 66 | }; -------------------------------------------------------------------------------- /JS13k2021/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OS13k/OS13kDesktopIcon.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // OS13kDesktopIcon - a shortcut icon to appear on the desktop 5 | 6 | class OS13kDesktopIcon extends HTMLElement 7 | { 8 | constructor(program, window) 9 | { 10 | super(); 11 | 12 | // create tray icon and add it 13 | this.program = program; 14 | this.window = window; 15 | this.className = 'desktopIcon'; 16 | this.innerHTML = '
' + (program.folder ? '📁' : program.icon); 17 | this.innerHTML += this.title = program.name; 18 | } 19 | 20 | Open() { this.window && this.window.SetActive(); this.program.Open(); } 21 | } // OS13kDesktopIcon 22 | customElements.define('d-', OS13kDesktopIcon); -------------------------------------------------------------------------------- /OS13k/OS13kInput.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // Mouse Input 5 | 6 | const OS13k_onMouseDown = e=> 7 | { 8 | if (e.button == 1) 9 | { 10 | e.preventDefault(); // prevent middle mouse zoom 11 | return true; 12 | } 13 | 14 | // get orignal target 15 | const originalTarget = e && e.composedPath ? e.composedPath()[0] : e.target; 16 | 17 | // check if load icon is target while programs menu was visible 18 | if (e.target == loadIcon && e.target.windowOrMenu.style.visibility) 19 | { 20 | // close menus because they were open 21 | CloseMenus(); 22 | 23 | // reactivate active window 24 | activeWindow && activeWindow.SetActive(); 25 | 26 | // prevent main document from taking focus 27 | return false; 28 | } 29 | 30 | // close menus and reset program menu position, and set there has been input 31 | CloseMenus(programsMenu.style.left = 0, programsMenu.style.top = taskbarHeight, hadInput = 1); 32 | 33 | // prevent stuck grab (from tabbing to another window while grabbing) 34 | if (grabWindow) return onmouseup(e); 35 | 36 | // check if not left mouse button 37 | if (e.button) 38 | { 39 | // dont allow right click on buttons 40 | if (originalTarget.localName == 'button') 41 | return false; 42 | 43 | // check for right mouse button 44 | if (e.button & 2 && e.target != menu) 45 | { 46 | // set target active, use load icon if no valid target 47 | (e.target.SetActive ? e.target : loadIcon).SetActive(1, 1, 0); 48 | 49 | // get which menu to open 50 | let targetMenu = e.target.menu ? (SystemSound(soundMenu, .1), menu) : programsMenu; 51 | 52 | // show context menu 53 | targetMenu.style.left = e.x; 54 | targetMenu.style.top = e.y; 55 | e.target != loadIcon && (targetMenu.style.visibility = 'visible'); 56 | } 57 | } 58 | else 59 | { 60 | // open or reactivate window if no valid target 61 | //e.target.Open ? e.target.Open(originalTarget, e.x, e.y) : activeWindow && activeWindow.SetActive(); 62 | e.target.Open ? e.target.Open(originalTarget, e.x, e.y) : activeWindow && activeWindow.SetActive(); 63 | 64 | // allow event to contiue only if input 65 | return !e.cancelable || e.target == loadIcon || /input|textarea/.test(originalTarget.localName); 66 | } 67 | } 68 | 69 | const OS13k_onMouseUp = e=> 70 | { 71 | const originalTarget = e && e.composedPath ? e.composedPath()[0] : e.target; 72 | originalTarget.parentElement == popups && originalTarget.remove(SystemSound(soundClose)); 73 | 74 | // set grab window active, no clamp, and set cursor to default, unset grab 75 | grabWindow && (grabWindow.program.Save(), 76 | SystemSound(soundGrabEnd), 77 | grabWindow.SetActive(1, 0), 78 | document.body.style.cursor = desktop.style.pointerEvents = grabWindow = ''); 79 | } 80 | 81 | const OS13k_onMouseMove = e=> 82 | { 83 | // update grab position 84 | grabWindow ? grabWindow.style.left = e.x - grabOffsetX : 0; 85 | grabWindow ? grabWindow.style.top = e.y - grabOffsetY : 0; 86 | 87 | // handle mouse move 88 | e.target.Move && e.target.Move(); 89 | } 90 | 91 | onmouseup = e=> OS13k_onMouseUp(e); 92 | onmousedown = e=> OS13k_onMouseDown(e); 93 | onmousemove = e=> OS13k_onMouseMove(e); 94 | 95 | // prevent default right click context menu 96 | oncontextmenu = e=> false; 97 | 98 | /////////////////////////////////////////////////////////////////////////////// 99 | // Drag and Drop 100 | 101 | // allow drag and drop code into editor 102 | ondrop = e=> 103 | { 104 | let reader = new FileReader(); 105 | reader.onload = f=> e.target.SetActive(1, 0, e.target.SetCode(f.target.result, 1)); 106 | 107 | // read file, set code, and set active 108 | e.dataTransfer.files.length && e.target.program && e.target.program.userProgram && 109 | reader.readAsText(e.dataTransfer.files[0]); 110 | return false; 111 | } 112 | 113 | // prevent default drop events 114 | ondragover = ()=> false; 115 | 116 | /////////////////////////////////////////////////////////////////////////////// 117 | // Mobile Support OPTIONAL 118 | 119 | // save if user was touching 120 | let wasTouching; 121 | 122 | if (window.ontouchstart !== undefined) 123 | { 124 | // remove hovers, they get stuck on mobile 125 | let RemoveHovers = e=> 126 | { 127 | [...e.styleSheets].map(sheet=> { 128 | for(let i = sheet.rules.length; i--; ) 129 | sheet.rules[i].selectorText && 130 | sheet.rules[i].selectorText.match('hover') && 131 | sheet.deleteRule(i)}); 132 | } 133 | RemoveHovers(document); 134 | 135 | // set touch events 136 | ontouchstart = e => 137 | { 138 | if (e.touches[0]) 139 | { 140 | e.x = e.touches[0].clientX; 141 | e.y = e.touches[0].clientY; 142 | } 143 | 144 | OS13k_onMouseMove(e); 145 | !e.target.folder && // allow browsing in folder list 146 | OS13k_onMouseDown(e); 147 | 148 | // remove hovers from active window 149 | activeWindow && RemoveHovers(activeWindow.shadowRoot); 150 | 151 | // prevent default if not edit area 152 | let originalTarget = e.originalTarget || e.path[0]; 153 | 154 | // allow event to contiue only if input 155 | return !e.cancelable || /button/.test(originalTarget.localName); 156 | 157 | } 158 | ontouchmove = e => 159 | { 160 | if (e.touches[0]) 161 | { 162 | e.x = e.touches[0].clientX; 163 | e.y = e.touches[0].clientY; 164 | } 165 | return OS13k_onMouseMove(e); 166 | } 167 | 168 | ontouchend = ontouchcancel = e => 169 | { 170 | // pass event to mouse down 171 | if (e.touches[0]) 172 | { 173 | e.x = e.touches[0].clientX; 174 | e.y = e.touches[0].clientY; 175 | } 176 | OS13k_onMouseUp(e); 177 | } 178 | 179 | onmousedown = e=>{} 180 | onmouseup = e=>{} 181 | onmousemove = e=>{} 182 | } -------------------------------------------------------------------------------- /OS13k/OS13kProgram.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // program flags 4 | const // change to const for final build 5 | sticky = 2**0, // always save position and if open 6 | reload = 2**1, // show reload button 7 | awake = 2**2, // prevent sleep and dim when not active 8 | full = 2**3, // show full screen button 9 | resize = 2**4, // show resize buttons (apect ratio maintained) 10 | code = 2**5, // show code button (cant show code if help is set) 11 | shortcut = 2**6, // show shortcut icon on the desktop 12 | 13 | // system flags 14 | closeAll = 2**7, // close all open windows 15 | newUserProgram = 2**8, // create new user program 16 | deleteUserPrograms = 2**9, // remove all user programs 17 | 18 | // defaults 19 | defaultFlags = full|reload|resize, 20 | defaultWidth = 720, defaultHeight = 405; // 16:9 aspect 21 | 22 | /////////////////////////////////////////////////////////////////////////////// 23 | // OS13kProgram - stores program info and handles loading from folders 24 | 25 | class OS13kProgram extends HTMLElement 26 | { 27 | constructor(icon='💠', src='', width=defaultWidth, height=defaultHeight, flags, name='', help='', folder, userProgramId, userFolder) 28 | { 29 | super(); 30 | 31 | // split source by . to get extension 32 | let srcParts = src.split('.'); 33 | 34 | // split source by / to get filename to convert camel case to nice name 35 | let srcCleanName = srcParts[0].split('/').pop().replace(/([a-z](?=[A-Z]))/g, '$1 '); 36 | name = name || srcCleanName && (srcCleanName[0].toUpperCase() + srcCleanName.slice(1)); 37 | 38 | // check for special extensions 39 | this.isDweet = srcParts[1] == 'dweet'; 40 | this.isShader = srcParts[1] == 'shader'; 41 | this.isExternal = src.startsWith('http'); 42 | 43 | // set code only if help not shown or if has extension and not disabled 44 | this.code = !(this.help = help) && (flags & code || ((this.isDweet | this.isShader) && flags == undefined)); 45 | 46 | // set all folders to be resizable 47 | flags |= folder && resize; 48 | 49 | // set icon data 50 | this.className = 'program'; 51 | this.src = src; 52 | this.width = width; 53 | this.height = height; 54 | this.folder = folder; 55 | this.id = userProgramId || name; 56 | this.userFolder = userFolder; 57 | this.flags = flags = flags || defaultFlags; 58 | 59 | // set the program name and id 60 | this.SetName(icon, name); 61 | 62 | // load saved program data 63 | this.Load(); 64 | 65 | // save special programs 66 | name == 'Music Player' && musicTrayIcon.SetProgram(this); 67 | name == 'Trophy Case' && trophyTrayIcon.SetProgram(this); 68 | name == 'Settings' && settingsTrayIcon.SetProgram(this); 69 | name == 'Sticky Note' && stickyNoteTrayIcon.SetProgram(this); 70 | name == 'Clock' && clockTrayIcon.SetProgram(this); 71 | 72 | // open help if it has not been opened yet 73 | name == 'Help' & this.info.open == undefined && (startProgram = this); 74 | 75 | // check if sticky open or start program 76 | this.flags & sticky ? this.info.open && this.Open() : this.id == startProgramId && (startProgram = this); 77 | 78 | // create desktop shortcut icon 79 | this.flags & shortcut && desktopIcons.appendChild(new OS13kDesktopIcon(this)); 80 | } 81 | 82 | SetName(icon, name) 83 | { 84 | // icon 85 | this.icon = icon; 86 | this.innerHTML = '' + icon; 87 | 88 | // name and folder 89 | this.innerHTML += `
${ 90 | this.name = OS13k.StripHTML(name) || 'User Program ' + this.id 91 | }
` + (this.folder? '▶' : ''); 92 | } 93 | 94 | Move() 95 | { 96 | // set container program menu active 97 | this.programMenu.SetActive(); 98 | 99 | // set active 100 | this.className = 'program programActive'; 101 | activeProgram !=this && SystemSound(soundProgram, 0); 102 | activeProgram = this; 103 | } 104 | 105 | Open() 106 | { 107 | // hack: prevent user folders from opening in window 108 | if (this.folder && this.folder[0] && this.folder[0][4] & newUserProgram) 109 | return; 110 | 111 | if (this.window) 112 | { 113 | // set window to be active and clamp 114 | this.window.SetActive(1, 1); 115 | } 116 | else if (this.flags & newUserProgram) 117 | { 118 | // create user program with default code 119 | this.programMenu.NewUserProgram(undefined, this.userFolder); 120 | } 121 | else if (this.flags & deleteUserPrograms && confirm(this.name + '?')) 122 | { 123 | // close windows with matching folder 124 | [...desktop.children].map(child=> child.Close && (this.userFolder ? 125 | child.program.info.userFolder == this.userFolder : child.program.info.code != undefined) && child.Close()); 126 | 127 | // remove user program infos 128 | programInfos = programInfos.filter(info=> info.code == undefined || this.userFolder && info.userFolder != this.userFolder); 129 | 130 | // rebuild menu and play sound 131 | RebuildMenu(OS13k.Save(SystemSound(soundClose, 4))); 132 | } 133 | else if (this.flags & closeAll) 134 | { 135 | // close all windows if no src or folder and play sound 136 | [...desktop.children].map(child=> child.Close && child.Close(1)); 137 | SystemSound(soundClose); 138 | 139 | // reset window open position 140 | windowOpenX = startOpenOffset; 141 | windowOpenY = startOpenOffset + taskbarHeight; 142 | 143 | OS13k.Trophy('☕','OS13k','Coffee Is For Closers','Closed All'); 144 | } 145 | else if (this.src || this.userProgram || this.folder) 146 | { 147 | // get saved window position 148 | let x = this.info.x, y = this.info.y; 149 | 150 | // update window open positions if no position was set 151 | x || ( 152 | x = windowOpenX, 153 | y = windowOpenY, 154 | (windowOpenX += titlebarHeight) > 400 && (windowOpenX = windowOpenY = startOpenOffset), 155 | (windowOpenY += titlebarHeight) > 300 && (windowOpenY = windowOpenY = startOpenOffset + taskbarHeight)); 156 | 157 | // open window 158 | this.window = new OS13kWindow(this, x, y); 159 | 160 | // update info and save 161 | this.Save(); 162 | } 163 | } 164 | 165 | SetActive() { this.Open(); } 166 | 167 | Toggle() { activeWindow && activeWindow == this.window ? this.window.Close() : this.Open(); } 168 | 169 | Load() 170 | { 171 | if (this.folder) 172 | this.info = {}; 173 | else 174 | { 175 | // load saved program info from local storage 176 | let i = programInfos.findIndex(e=> e.id == this.id); 177 | this.info = i < 0 ? {} : programInfos[i]; 178 | 179 | // check for user code 180 | this.userProgram = this.info.code != undefined; 181 | } 182 | } 183 | 184 | // save program info and reset settings when closed if non sticky 185 | Save(open = 1) 186 | { 187 | // build save info 188 | this.info = 189 | { 190 | open, 191 | id: this.id, 192 | x: open | this.flags & sticky ? parseInt(this.window.style.left) : 0, 193 | y: parseInt(this.window.style.top), 194 | scale: open | this.flags & sticky ? this.window.scale : 1, 195 | 196 | // user program info 197 | name: this.name, 198 | icon: this.icon, 199 | width: this.width, 200 | height: this.height, 201 | code: this.info.code, 202 | allowSleep: this.userProgram? this.window.allowSleep.checked : 1, 203 | liveEdit: this.window.liveEdit.checked, 204 | userFolder: this.userFolder 205 | } 206 | 207 | // add to programs info and save 208 | let i = programInfos.findIndex(e=> e.id == this.id); 209 | OS13k.Save(i < 0 ? programInfos.push(this.info) : programInfos[i] = this.info); 210 | } 211 | 212 | } // OS13kProgram 213 | customElements.define('p-', OS13kProgram); -------------------------------------------------------------------------------- /OS13k/OS13kProgramMenu.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // OS13kProgramMenu - holds a list of programs 5 | 6 | class OS13kProgramMenu extends HTMLElement 7 | { 8 | constructor(stubs, parentMenu) 9 | { 10 | super(); 11 | 12 | // add to programs menu 13 | this.className = 'programMenu'; 14 | this.parentMenu = parentMenu; 15 | this.programStubs = stubs; 16 | } 17 | 18 | Rebuild(y = 0) 19 | { 20 | // add programs to menu 21 | for(let stub of this.programStubs) 22 | { 23 | // create program and menu 24 | let program = stub[-1] = stub[-1] || new OS13kProgram(...stub); 25 | program.programMenu = program.folder ? new OS13kProgramMenu(program.folder, this) : this; 26 | } 27 | 28 | // clear programs menu 29 | this.innerHTML = ''; 30 | programsMenu.appendChild(this); 31 | 32 | // add programs to menu 33 | this.programStubs.map(stub=> this.appendChild(stub[-1])); 34 | 35 | // set position 36 | this.style.top = y; 37 | this.style.left = this.parentMenu && this.parentMenu.getBoundingClientRect().right; 38 | 39 | // add folders after programs so width is correct 40 | this.programStubs.map(stub=> 41 | { 42 | // rebuild child program menus 43 | stub[-1].programMenu != this && stub[-1].programMenu.Rebuild(y); 44 | 45 | // add program height as we move down list 46 | y += programHeight; 47 | }); 48 | } 49 | 50 | SetActive() 51 | { 52 | // close menus so they can reopen with this active 53 | CloseMenus(); 54 | 55 | // set parent active 56 | this.parentMenu && this.parentMenu.SetActive(); 57 | 58 | // make visible 59 | this.style.visibility = 'visible'; 60 | } 61 | 62 | NewUserProgram(copyProgram, userFolder) 63 | { 64 | // create new program 65 | let stub = copyProgram ? 66 | [copyProgram.icon,, copyProgram.width, copyProgram.height, defaultFlags|code, 67 | copyProgram.name + '+', , ,++nextUserProgramId, copyProgram.userFolder] : 68 | ['✋',,,,defaultFlags|code,,,,++nextUserProgramId, userFolder], 69 | program = stub[-1] = new OS13kProgram(...stub); 70 | 71 | // add to menu program infos 72 | this.programStubs.push(stub); 73 | 74 | // set code, copy if passed in, use default if none found 75 | program.info.code = copyProgram ? ( 76 | program.info.scale = copyProgram.info.scale, 77 | windowOpenX = copyProgram.info.x, 78 | windowOpenY = copyProgram.info.y + titlebarHeight, 79 | copyProgram.info.code) 80 | : 81 | '// Auto detects HTML, Dweet, or Shadertoy! You can drop files here too. ✌️😄\n' + 82 | 'for(x.fillRect(0,0,i=s=2e3,s);i--;x.globalAlpha=.1)\n' + 83 | 'x.clearRect((S(i)*1e9-t*i/9)%s,i*9%s,i%9,i%9)'; 84 | 85 | // mark code as safe, open, and show code, prevent iframe focus so code can be focused 86 | program.Open(program.userProgram = allCodeIsSafe = 1); 87 | program.window.ShowCode(1); 88 | program.window.codeText.focus(); 89 | 90 | // set menu and rebuild menus 91 | RebuildMenu(program.programMenu = this); 92 | return program; 93 | } 94 | 95 | } // OS13kProgramMenu 96 | customElements.define('m-', OS13kProgramMenu); -------------------------------------------------------------------------------- /OS13k/OS13kTaskbarIcon.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // OS13kTaskbarIcon - icon on taskbar for opened programs 5 | 6 | class OS13kTaskbarIcon extends HTMLElement 7 | { 8 | constructor(program, windowOrMenu) 9 | { 10 | super(); 11 | 12 | // create icon 13 | this.className = 'taskbarIcon'; 14 | this.menu = this.windowOrMenu = windowOrMenu; 15 | this.SetName(this.program = program); 16 | 17 | // add to taskbar 18 | taskbarSpace.before(this); 19 | } 20 | 21 | SetName() 22 | { 23 | this.innerHTML = '
' + (this.program.icon || '💠'); 24 | this.title = this.program.name; 25 | } 26 | 27 | Open() { this.SetActive(); } 28 | 29 | SetActive(active=1, clamp=1, focus=1) 30 | { 31 | // set window active and clamp 32 | active && this.windowOrMenu.SetActive(1, clamp, focus); 33 | 34 | // load icon cant be active taskbar item 35 | if (this == loadIcon) 36 | return SystemSound(soundMenu, .3); 37 | 38 | // set active style 39 | this.className = 'taskbarIcon ' + (active ? 'taskbarIconActive' : ''); 40 | 41 | // if active, unselect old taskbar icon and set this active 42 | active && activeTaskbarIcon != this && (activeTaskbarIcon && activeTaskbarIcon.SetActive(0), activeTaskbarIcon = this); 43 | } 44 | 45 | } // OS13kTaskbarIcon 46 | customElements.define('i-', OS13kTaskbarIcon); -------------------------------------------------------------------------------- /OS13k/OS13kTrayIcon.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // OS13kTrayIcon - icon on taskbar tray for OS shortcuts 5 | 6 | class OS13kTrayIcon extends HTMLElement 7 | { 8 | constructor() 9 | { 10 | super(); 11 | 12 | // create tray icon and add it 13 | this.className = 'trayIcon'; 14 | tray.appendChild(this); 15 | } 16 | 17 | SetProgram(program) 18 | { 19 | // set program, title, and icon 20 | this.program = program; 21 | this.title = program.name; 22 | this.innerHTML = program.icon; 23 | } 24 | 25 | Open() { this.program.Toggle(); } 26 | } // OS13kTrayIcon 27 | customElements.define('t-', OS13kTrayIcon); -------------------------------------------------------------------------------- /OS13k/OS13kZzFX.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // ZzFXMicro - Zuper Zmall Zound Zynth 5 | 6 | // play a zzfx sound 7 | var zzfx = (...parameters)=> OS13k.PlaySamples(zzfxG(...parameters)), 8 | 9 | // generate zzfx samples 10 | zzfxG = (volume = 1, randomness = .05, frequency = 220, attack = 0, sustain = 0, release = .1, shape = 0, shapeCurve = 1, slide = 0, deltaSlide = 0, pitchJump = 0, pitchJumpTime = 0, repeatTime = 0, noise = 0, modulation = 0, bitCrush = 0, delay = 0, sustainVolume = 1, decay = 0, tremolo = 0, buffer = [])=> 11 | { 12 | attack = 99 + attack * defaultSampleRate; 13 | release = release * defaultSampleRate; 14 | sustain *= defaultSampleRate; 15 | decay *= defaultSampleRate; 16 | delay *= defaultSampleRate; 17 | 18 | // init parameters and helper functions 19 | let PI2 = Math.PI*2, 20 | sign = v=> v>0? 1 : -1, 21 | length = OS13k.randomSeed = OS13k.Clamp(attack + decay + sustain + release + delay, 9*defaultSampleRate) | 0, 22 | startSlide = slide *= 500 * PI2 / defaultSampleRate**2, 23 | startFrequency = frequency *= (1 + randomness*2*Math.random() - randomness) * PI2 / defaultSampleRate, 24 | modPhase = sign(modulation) * PI2/4, 25 | t=0, tm=0, i=0, j=1, r=0, c=0, s=0, f; 26 | 27 | repeatTime = repeatTime * defaultSampleRate | 0; 28 | pitchJumpTime *= defaultSampleRate; 29 | pitchJump *= PI2 / defaultSampleRate; 30 | deltaSlide *= 500 * PI2 / defaultSampleRate**3; 31 | for(modulation *= PI2 / defaultSampleRate; 32 | 33 | // loop and generate waveform, combine with buffer if passed in 34 | i < length; buffer[i] = (buffer[i++] || 0) + s) 35 | { 36 | if (!(++c%(bitCrush*100|0))) // bit crush 37 | { 38 | s = shape? shape>1? shape>2? shape>3? // wave shape 39 | Math.sin((t%PI2)**3) : // 4 noise 40 | Math.max(Math.min(Math.tan(t),1),-1): // 3 tan 41 | 1-(2*t/PI2%2+2)%2: // 2 saw 42 | 1-4*Math.abs(Math.round(t/PI2)-t/PI2): // 1 triangle 43 | Math.sin(t); // 0 sin 44 | 45 | s = (repeatTime ? 46 | 1 - tremolo + tremolo*Math.sin(2*Math.PI*i/repeatTime) // tremolo 47 | : 1) * 48 | sign(s)*(Math.abs(s)**shapeCurve) * // curve 0=square, 2=pointy 49 | volume * ( // envelope 50 | i < attack ? i/attack : // attack 51 | i < attack + decay ? // decay 52 | 1-((i-attack)/decay)*(1-sustainVolume) : // decay falloff 53 | i < attack + decay + sustain ? // sustain 54 | sustainVolume : // sustain volume 55 | i < length - delay ? // release 56 | (length - i - delay)/release * // release falloff 57 | sustainVolume : // release volume 58 | 0); // post release 59 | 60 | s = delay ? // delay 61 | s/2 + (delay > i ? 0 : 62 | (i pitchJumpTime) // pitch jump 73 | { 74 | frequency += pitchJump; // apply pitch jump 75 | startFrequency += pitchJump; // also apply to start 76 | j = 0; // reset pitch jump time 77 | } 78 | 79 | if (repeatTime && !(++r % repeatTime)) // repeat 80 | { 81 | frequency = startFrequency; // reset frequency 82 | slide = startSlide; // reset slide 83 | j = j || 1; // reset pitch jump time 84 | } 85 | } 86 | 87 | return buffer; 88 | }, 89 | 90 | /////////////////////////////////////////////////////////////////////////////// 91 | //! ZzFXM (v2.0.2) | (C) Keith Clark & Frank Force | MIT | https://github.com/keithclark/ZzFXM 92 | 93 | zzfxM = (instruments, patterns, sequence, BPM = 125, validate) => 94 | { 95 | let instrumentParameters, i, j, k, sample, patternChannel, isSequenceEnd, 96 | notFirstBeat, stop, instrument, pitch, attenuation, pan = 0, 97 | outSampleOffset, sampleOffset, nextSampleOffset, sampleBuffer = [], 98 | channelIndex = 0, hasMore = 1, channelBuffers = [[],[]], 99 | sampleCache = {}, beatLength = defaultSampleRate / BPM * 60 >> 2; 100 | 101 | // for each channel in order until there are no more 102 | for(; hasMore; channelIndex++) 103 | { 104 | // reset current values 105 | sampleBuffer = [hasMore = notFirstBeat = outSampleOffset = 0]; 106 | 107 | // for each pattern in sequence 108 | sequence.map((patternIndex, sequenceIndex) => 109 | { 110 | // get pattern for current channel, use empty 1 note pattern if none found 111 | patternChannel = patterns[patternIndex][channelIndex] || [0, 0, 0]; 112 | 113 | // check if there are more channels 114 | hasMore |= !!patterns[patternIndex][channelIndex]; 115 | 116 | // get next offset, use the length of first channel 117 | nextSampleOffset = outSampleOffset + (patterns[patternIndex][0].length - 2 - !notFirstBeat) * beatLength; 118 | 119 | // for each beat in pattern, plus one extra if end of sequence 120 | isSequenceEnd = sequenceIndex == sequence.length - 1; 121 | for (i = 2, k = outSampleOffset; i < patternChannel.length + isSequenceEnd; notFirstBeat = ++i) 122 | { 123 | // stop if end, different instrument, or new note 124 | stop = i == patternChannel.length + isSequenceEnd - 1 && isSequenceEnd || 125 | instrument != (patternChannel[0] || 0) | patternChannel[i] | 0; 126 | 127 | // fill buffer with samples for previous beat, most cpu intensive part 128 | if (!validate) 129 | for(j = 0; j < beatLength && notFirstBeat; 130 | 131 | // fade off attenuation at end of beat if stopping note, prevents clicking 132 | j++ > beatLength - 99 && stop ? attenuation += (attenuation < 1) / 99 : 0 133 | ) 134 | { 135 | // copy sample to stereo buffers with panning 136 | sample = (1-attenuation) * sampleBuffer[sampleOffset++] / 2 || 0; 137 | channelBuffers[0][k] = (channelBuffers[0][k] || 0) - sample * pan + sample; 138 | channelBuffers[1][k] = (channelBuffers[1][k++] || 0) + sample * pan + sample; 139 | } 140 | 141 | // set up for next note 142 | if (patternChannel[i]) 143 | { 144 | // set attenuation and pan 145 | attenuation = patternChannel[i] % 1; 146 | pan = patternChannel[1] || 0; 147 | 148 | if (patternChannel[i] | 0) 149 | { 150 | // get cached sample 151 | sampleBuffer = sampleCache 152 | [[ 153 | instrument = patternChannel[sampleOffset = 0] || 0, 154 | pitch = patternChannel[i] | 0 155 | ]] = 156 | sampleCache[[instrument, pitch]] || 157 | ( 158 | // add sample to cache 159 | instrumentParameters = [...instruments[instrument]], 160 | instrumentParameters[2] *= 2 ** ((pitch - 12) / 12), 161 | pitch > 0 ? zzfxG(...instrumentParameters) : [] 162 | ); 163 | } 164 | } 165 | } 166 | 167 | // update the sample offset 168 | outSampleOffset = nextSampleOffset; 169 | }); 170 | } 171 | 172 | return channelBuffers; 173 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to OS13k! 2 | OS13k is a tiny operating system that fits in a 13 kb zip file. 3 | 4 | It includes native support for Shadertoys, Dweets, ZzFX sounds, music, trophies, touch input, and much more. 5 | 6 | # [Live Demo](https://killedbyapixel.github.io/OS13k) - [JS13k Submission](https://js13kgames.com/entries/os13k) - [Discord](https://discord.gg/n8vxUcZ) 7 | 8 | ## What is OS13k? 9 | - OS13k is a tiny web based pseudo OS and game engine designed for creative coding purposes 10 | - The core of OS13k is around 10k zipped including all the system apps 11 | - OS13k can connect with other JS13k games via local storage to add music and trophies 12 | - Users can extend OS13k by addinng their own programs and shaders 13 | 14 | ## Features 15 | - ZzFX sound effects with support for sound seeds 16 | - ZzFXM music system, player, and visualizer 17 | - Trophy system and viewer 18 | - Centralized input system 19 | - Custom user programs 20 | - Dwitter, ShaderToy, and WebGL support 21 | - GUI with window manger, taskbar, tray and settings 22 | - Mobile/touch support 23 | 24 | ## Programming Info 25 | - OS13k stores it's list of programs in programs.js 26 | - For fast iteration when developing, most recent active window is opened on startup 27 | 28 | Add an icon config to programs.js to register your program, examples... 29 | - [icon, src, width, height, flags, name, help, folder] 30 | - ['?','help.html'] 31 | - ['✌️😄','system/systemTest.html',,,full|resize|code|sticky] 32 | - ['🌊','dweets/underwaterCavern.dweet.js'] 33 | - ['☯','toys/infiniteYinYangs.shader.txt',500,500,full,'Put instructions here.'] 34 | 35 | ### Programs 36 | - OS13k can open any html file and it will work the same as if opened directly 37 | - Chrome is recommended, but Firefox is also supported 38 | - [Viewing OS13k locally may not work if it treats local files as cross-origin](https://discourse.mozilla.org/t/firefox-68-local-files-now-treated-as-cross-origin-1558299/42493/9) 39 | - Prefix all local storage keys with OS13kYourProgramName to prevent collisions during JS13k (use at least 2 letters) 40 | - When the reload button is clicked, OS13kReload is called if it exists instead of reloading the iframe 41 | - For development we recommend [VSCode](https://code.visualstudio.com/) with the [Live Server Plugin](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) 42 | - You can also create a custom program to edit code directly in OS13k 43 | 44 | ### Trophies 45 | - Trophies are perhaps the most important part of OS13k and have many uses 46 | - Apps can register trophies for their games, the OS tracks which are unlocked 47 | - To unlock trophies use OS13k.Trophy(icon, gameName, trophyName, message) 48 | - You can pass in a value as the message, like a high score for example 49 | - *HTML tags and commas can not be used in trophy data* 50 | - When a new trophy is unlocked or the message is changed a popup will automatically appear 51 | - Total trophy count is shown in the taskbar and the trophy case shows all unlocked trophies 52 | - *You can use tophies to store data!* Use OS13k.GetTrophy to get a trophy message 53 | 54 | ### Trophy Functions 55 | - OS13k.Trophy(game='', icon='', name='', message='') - Unlock a trophy 56 | - OS13k.GetTrophy(game, name) - Get most recent matching trophy, 0 if no trophy 57 | - OS13k.Trophies() - Get full list of trophy objects 58 | 59 | ### Sound 60 | - ZzFx sounds are supported by default and several other audio functions are provided 61 | - ZzFX is open source sound effect generator with an easy to use sound designer https://zzfx.3d2k.com/ 62 | - A seeded ZzFX sound player is available to save space with much smaller sound calls 63 | - OS13k.PlaySeed(seed, lengthScale=1, volume=1, randomness=.05, frequency) - Play a zzfx sound from seed 64 | - OS13k.PlaySamples(samples, sampleRate=44100) - Play audio samples 65 | - OS13k.Note(semitoneOffset=0, rootNoteFrequency=440) - Get frequency of a note on a musical scale 66 | - OS13k.Speak(text, language='en', stopSpeech, volume=1, rate=1, pitch=1) - Play speech of the text 67 | - Seeds can also be strings (will be hashed) or full ZzFX sounds 68 | - A custom gain node is created for every sound, use sound.gain.gain.value to change 69 | 70 | ### Music 71 | - [ZzFXM by Keith Clark](https://github.com/keithclark/ZzFXM) is the music player 72 | - OS13k.PlayMusic(song) - plays the song with zzfxm 73 | - OS13k.GetAnalyser() - returns a 32x32 music analyser canvas 74 | - OS13k.GetAnalyserData(i) - returns index into a 32 length array of frequency volumes normalized between 0-1 75 | - OS13k.StringToMusic(string, validate) - Converts a string to a music array and checks if valid 76 | 77 | ### System Calls 78 | - The OS13k object is set in your program after load, if you need it on load use parent.OS13k 79 | - zzfx also becomes available after your program loads and can be called directly 80 | - OS13k.CreateShader(canvas, shaderCode) - Create a shadertoy compatible webgl shader 81 | - OS13k.RenderShader(canvas, shaderProgram, time=0, frame=0) - Render a shader 82 | - OS13k.StripHTML(string) - Removes all HTML tags in a string 83 | - OS13k.Hash(string) - Returns numeric hash code for a string 84 | - OS13k.Popup(html, speak) - Shows a popup with html body and optional speech and sound 85 | 86 | ### Math Library 87 | - OS13k.Random(max=1, min=0) - Get a seeded random value clamped between min and max 88 | - OS13k.randomSeed - You must set the seed before calling OS13k.Random 89 | - OS13k.Clamp(a, max=1, min=0) - Clamp value between max and min 90 | - OS13k.Percent(v, a, b) - Get clamped percent between a and b 91 | - OS13k.Lerp(p, a, b) - Lerp clamped percent between a and b 92 | 93 | ### Dweets and Shadertoys 94 | - Programs with the extension .dweet.js or .shader.txt or will automatically load as Dweets or Shadertoys! 95 | - Dweets and Shadertoys are automatically paused when they don't have focus (after a 1 second warmup) 96 | - They also automatically have the show code option by default unless explictly disabled 97 | - Dweets can do anything that other programs can do including calling OS13k functions and ZzFX 98 | - Dweets and Shadertoys are automatically paused when not focused (unless awake is set) 99 | - Shaders support iTime, iFrame, iMouse, iResolution, and iChannel0 100 | - iChannel0 is an image of the previous frame, this can be used to make effects or store game logic 101 | 102 | ### Input System 103 | - OS13k provides an easy to use input system to help eliminate redundant code 104 | - Call OS13k.Input(window) to get the input object 105 | - the object format is {x, y, keypress, keydown, mousex, mousey, mousepress, mousedown} 106 | - x and y is a -1 to 1 direction from WASD or direction buttons 107 | - mousex and mousey is the mouse position 108 | - wheel is the mouse wheel delta 109 | - keypress and mousepress are arrays, an element is 1 if that key is pressed 110 | - keydown and mousedown are arrays, an element is 1 if that key is down 111 | - *See System/Test/InputTest for an example* 112 | 113 | ### Program Settings and Defaults 114 | - name - Display name (if absent will build nice name from camel case src filename) 115 | - src - Source filename 116 | - icon - Can contain html tags, fits about 2 emojis 117 | - don't close html tags, they will automatically be closed 118 | - width (720) and height (405) - Size of window (default is 16:9 aspect) 119 | - help (optional) - Help message, shows an icon on the window's titlebar (try to keep it short) 120 | - author (optional) - Name of creator 121 | - sticky (0) - Will automatically open of program on restart if it was open 122 | - reload (1) - Shows the reload option 123 | - awake (1) - Prevents window dim and and pausing dweets/shaders when not focused 124 | - full (1) - Enables full screen option 125 | - code (0) - Shows code option, defaults to true for dweets/shaders, help is shown instead if it exists 126 | - rezize (1) - Allows resizing the window 127 | - shortcut (0) - Shows shortcut icon on the desktop 128 | 129 | ### User Programs 130 | - You can create and access custom programs in the user programs folder 131 | - *User programs have the same capabilities as any other program!* 132 | - It auto detects HTML (starts with <), Shadertoy (has void mainImage), or Dweet 133 | - This can be used to iterate on dweets or small shaders, or to load a full program. 134 | - Drag and drop a file into the text box to load it 135 | - The screenshot button is available for Dweets and Shadertoys 136 | - User Dweets has loop protection to help prevent freeze ups, though it can still occur 137 | - Press Alt+Enter to reload when live edit is disabled 138 | - User programs will not run until clicked to prevent executing bad code 139 | 140 | ### Any JS13k game can add trophies and music, even if not part of OS13k! 141 | - *To add a trophy or music track, just save a special key to localStorage!* 142 | - The smallest way to add a single trophy (like for winning) is localStorage['OS13kTrophy,Icon,GameName'] = '' 143 | - For more control use localStorage['OS13kTrophy,Icon,Game Name,Trophy Name'] = Message 144 | - You can change the message to update the trophy, like a highscore for example 145 | - Music works the same way, use localStorage['OS13kMusic,Song Name'] = JSON.stringify(song) 146 | - OS13k automatically checks localStorage and display popups for new trophies and songs from other games 147 | - This is possible because all JS13k games share the same local storage! Pretty cool right? 148 | - You can test locally by pasting your trophy code into the OS13k's console app 149 | 150 | ## Contribuitors 151 | 152 | Most of the OS was created by myself, but there were many other people helping out. Thank you to everyone for their efforts, I could not have done it alone! 153 | 154 | - Keith Clark - ZzFXM 155 | - Tomxor - Don't Fall 156 | - Niklas Berg - Shedding Snake 157 | - Pavel - Visualizer and 404 158 | - Rodrigo Siqueira - Sticky Note 159 | - Kang Seonghoon - Roadroller 160 | 161 | Additional help by... 162 | 163 | - Katkip, Jaburns, Xem, Rebecca König, Cantelope, DaSpider, Lionleaf, Yurume, Magna, Thomas Brierley, Nicholas Ortenzio, Yuanchuan, Jani Ylikangas, Martinn Kleppe, Erik Sombroek 164 | 165 | ![OS13k Image](/favicon.ico) 166 | -------------------------------------------------------------------------------- /apps/camera.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |
-------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | OS13k - A Tiny JavaScript OS 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 | 150 |
151 | 245 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | -------------------------------------------------------------------------------- /music/bach.dweet.js: -------------------------------------------------------------------------------- 1 | if(!t){K=F=0 2 | m=`46:1,44:1,46:8,:4,44:1,42:1,41:1,39:1,38:4,39:4,:8,34:1,33:1,34:8,:4,29:4,30:2,26:2,27:8,:8,22:1,20:1,22:8,:4,20:1,18:1,17:1,15:1,14:4,15:4,:8,14:6,14:12;17:6,17:12;20:6,20:6;23:6,14:12;17:12;20:12;23:12;26:12,:8,15:16;22:16;27:16;31:16;34:16`; 3 | mus=m.split(',').map(i=>i.split(/;/).map(j=>j.split(':'))) 4 | P=(n,d)=>{K=1 5 | I=[1,2,4,8,16,32] 6 | I.map(H=>{OS13k.PlaySamples(parent.zzfxG(1/(1+Math.log2(H)),0,(F=16.3516*2**((n-1)/12))*H,.01,d/10,.06,0,2),1)}) 7 | } 8 | g=()=>{if(n=mus.shift()){n.map(i=>{T=i[1];i[0]&&P(i[0],T)})} 9 | setTimeout(g,99*T)} 10 | setTimeout(g,2e3)} 11 | x.globalAlpha=.1;x.fillRect(0,0,2e3,2e3) 12 | K/=1.01 13 | x.fillStyle=R(F*K) 14 | for(X=-5;X<5;X=X+.01) 15 | Y=(1-(X)**2)*2**-((X+F/199+S(t+F))**2),x.clearRect((X+5)*192,600+Y*120*(S(F+S(X*4)/2)+C(F*t)/4)*K,2,999) 16 | // by Rodrigo Siqueira -------------------------------------------------------------------------------- /music/byteBeatPlayer.html: -------------------------------------------------------------------------------- 1 | ƒ(t)

Seconds -------------------------------------------------------------------------------- /music/minBytes.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /music/musicPlayer.html: -------------------------------------------------------------------------------- 1 | 2 |

 
3 |

4 | 5 | 6 | 7 |

8 | Volume 9 | Loop
10 |
11 | 3 | Octave   4 | Key
5 | Gain 6 | Noise 7 | Shape 8 | Crush
-------------------------------------------------------------------------------- /music/pianoMini.html: -------------------------------------------------------------------------------- 1 | 🌱

🔊 🐇 🐢 -------------------------------------------------------------------------------- /music/sequencer.html: -------------------------------------------------------------------------------- 1 | BPM 2 |  Loop 3 |   4 | 5 | 6 |

-------------------------------------------------------------------------------- /music/smallSeeds.html: -------------------------------------------------------------------------------- 1 | 2 | Length 3 | Randomness 4 | Frequency    5 | 6 | 7 |
8 | -------------------------------------------------------------------------------- /music/songs/captaincallisto.js: -------------------------------------------------------------------------------- 1 | /** 2 | * MOD pattern data for the "Adventures of Captain Callisto" music, by Cody Ebberson https://github.com/codyebberson/js13k-callisto 3 | */ 4 | if(localStorage[K='OS13kMusic,Captain Callisto by Cody Ebberson']==undefined) 5 | localStorage[K]=JSON.stringify([[[,0,240,.01,.09,.2,1,2,,,,,,,,,,.5],[.1,0,120,,.07,.07,1,0,,,.5,.01],[.8,0,240,.01,.4,.2,1,2,,,,,,,,,,.5]],[[[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[1,,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22],[1,,24,17,20,15,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22,24,17,20,12,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22]],[[2,,20,,,17,,,20,,19,,17,,15,,12,,17,,,,12,,,,15,,,,,,,,24,,,17,,,24,,22,,20,,19,,15,,17,,,,20,,,,19,,,,22,,,,],[1,,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22],[1,,24,17,20,15,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22,24,17,20,12,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22]],[[2,,17,,,,,,,,15,,,,10,,,,17,,,,,,20,,19,,,,22,,,,24,,,,17,,,,24,,22,,20,,19,,17,,,,,,19,17,19,,,,,,,,],[1,,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22],[1,,24,17,20,15,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22,24,17,20,12,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22]],[[2,,24,,20,,17,,,24,22,,19,,15,,,22,24,,22,,,,,,22,,,15,,19,15,22,24,,20,,17,,,24,22,,19,,15,,,22,24,,20,,,,,,22,,,15,,19,15,22],[1,,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22,24,24,20,20,17,17,17,24,22,22,19,19,15,15,15,22,24,24,20,20,8,13,8,8,22,22,22,15,15,19,15,22],[1,,24,17,20,15,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22,24,17,20,12,17,8,5,24,22,15,19,10,15,7,3,22,24,19,20,13,8,8,8,5,22,10,3,15,3,19,15,22]]],[0,1,2,3],70]); -------------------------------------------------------------------------------- /music/songs/cuddly.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a conversion of the main menu tune from the Atari ST demo "The Cuddly Demos", by The Carebears. The original was composed by Jochen Hippel (aka. MadMax). This pattern data was taken from a MOD file - I have no idea who converted it. 3 | */ 4 | if(localStorage[K='OS13kMusic,Cuddly by MadMax']==undefined) 5 | localStorage[K]=JSON.stringify([[[,0,22,,.07,.07,2,0,,,.5,.01],[2,0,426,.01,.2,.48,,44,,,200,,,.1],[2,0,426,,.02,.2,,44,,,200,,,.1],[,0,84,,,.1,,.7,,,,.5,,6.7,1,.05],[2,0,4000,,,.03,2,1.25,,,,,.02,6.8,-.3,,.5],[,0,209,,.02,.25,3],[,0,655,,,.09,3,1.65,,,,,.02,3.8,-.1,,.2]],[[[,-1,22,,,,22,,,,22,,17,,20,,22,,,,22,,20,,,,22,,20,,17,,22,,20,,,,20,,,,20,,17,,20,,20,,,,20,,17,,,,20,,17,,20,,22,,]],[[,-1,15,,,,15,,,,15,,15,,15,,15,,,,15,,15,,,,15,,15,,17,,20,,22,,,,22,,,,22,,17,,20,,22,,,,,,,,,,,,17,,20,,17,,]],[[,-1,22,,,,22,,,,22,,17,,20,,22,,,,22,,20,,,,22,,20,,17,,22,,20,,,,20,,,,20,,17,,20,,20,,,,20,,17,,,,20,,17,,20,,22,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34,,,,,,34.5,,,,,,34.5,,34,,,,,,,,,,,,34.5,,,,,,34,,,,,,34.5,,,,,,34.5,,34,,]],[[,-1,15,,,,15,,,,15,,15,,15,,15,,,,15,,15,,,,15,,15,,17,,20,,22,,,,22,,,,22,,17,,20,,22,,,,,,,,,,,,17,,20,,17,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34,,,,,,34.5,,,,,,34.5,,34,,,,,,,,,,,,34.5,,,,,,34,,,,,,34.5,,,,,,34.5,,34.5,,]],[[,-1,22,,,,22,,,,22,,17,,20,,22,,,,22,,20,,,,22,,20,,17,,22,,20,,,,20,,,,20,,17,,20,,20,,,,20,,17,,,,20,,17,,20,,22,,],[3,-1,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[4,-1,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,],[6,-1,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,]],[[,-1,15,,,,15,,,,15,,15,,15,,15,,,,15,,15,,,,15,,15,,17,,20,,22,,,,22,,,,22,,17,,20,,22,,,,,,,,,,,,17,,20,,17,,],[3,-1,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[4,-1,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,],[6,-1,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,]],[[,-1,22,,,,22,,,,22,,17,,20,,22,,,,22,,20,,,,22,,20,,17,,22,,20,,,,20,,,,20,,17,,20,,20,,,,20,,17,,,,20,,17,,20,,22,,],[5,1,22.5,,,,22.5,,,,22.5,,22.5,,,,22.5,,,,22.5,,,,22.5,,22.5,,,,22.5,,22.5,,20.5,,,,20.5,,,,20.5,,20.5,,,,20.5,,,,20.5,,,,20.5,,20.5,,,,20.5,,20.5,,],[3,-1,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[4,-1,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,],[6,-1,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,]],[[,-1,15,,,,15,,,,15,,15,,15,,15,,,,15,,15,,,,15,,15,,17,,20,,22,,,,22,,,,22,,17,,20,,22,,,,,,,,,,,,17,,20,,17,,],[5,1,27.5,,,,27.5,,,,27.5,,27.5,,,,27.5,,,,27.5,,,,27.5,,27.5,,,,27.5,,27.5,,22.5,,,,22.5,,,,22.5,,22.5,,,,22.5,,,,22.5,,,,22.5,,22.5,,,,22.5,,22.5,,],[3,-1,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[4,-1,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,],[6,-1,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,]],[[,-1,22,,,,22,,,,22,,17,,20,,22,,,,22,,20,,,,22,,20,,17,,22,,20,,,,20,,,,20,,17,,20,,20,,,,20,,17,,,,20,,17,,20,,22,,],[5,1,10,,13,,,,15,,17,,,,20,,22,,,,20,,,,17,,22,,22,,17,,20,,,,,,,,,,,,,,,,,,,,,,20,,17,,20,,22,,25,,27,,],[3,-1,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[4,-1,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,],[6,-1,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,]],[[,-1,15.26,,,,15.26,,,,15.26,,15.26,,15.26,,15.26,,,,15.26,,15.26,,,,15.26,,15.26,,17.26,,20.26,,22.26,,,,22.26,,,,22.26,,17.26,,20.26,,22.26,,,,,,,,,,,,17.26,,20.26,,17.26,,],[3,-1,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,25,,,,,,25,,,,,,25,,,,,,,,25,,,,,,,,,,,,],[1,1,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[5,1,,,27,,25,,,,27,,,,25,,27,,,,25,,22,,20,,22,,,,18,,20,,22,,,,22,,,,22,,,,22,,,,25,,22,,,,25,,,,22,,25,,22,,],[4,-1,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,,,32,,32,,,,,,32,,,,32,,32,,32,,,,32,,,,32,,32,,32,,],[6,-1,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,25,,,,,,,,],[2,1,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,,,,,,,,,,,34.5,,,,,,34.5,,,,,,34.5,,,,,,34.5,,34.5,,]]],[0,1,2,3,4,5,4,5,6,7,6,7,8,9,8,9,6,7,6,7,0,8,9,8,9,6,7,6,7],187.5,]) -------------------------------------------------------------------------------- /music/songs/depp.js: -------------------------------------------------------------------------------- 1 | /** 2 | * MOD pattern data for the song "Depp", by unknown. 3 | */ 4 | if(localStorage[K='OS13kMusic,Depp']==undefined) 5 | localStorage[K]=JSON.stringify([[[,0,77,,,.7,2,.41,,,,,,,,.06],[,0,43,.01,,.3,2,,,,,,,,,.02,.01],[,0,170,.003,,.008,,.97,-35,53,,,,,,.1],[.8,0,270,,,.12,3,1.65,-2,,,,,4.5,,.02],[,0,86,,,.1,,.7,,,,.5,,6.7,1,.05],[,0,41,,.05,.4,2,0,,,9,.01,,,,.08,.02],[,0,2200,,,.04,3,2,,,800,.02,,4.8,,.01,.1],[.3,0,16,,,.3,3]],[[[1,-1,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33],[3,1,22,,,,,,,,,,,,,,,,,,,,,,,,,,,,24,,,,24,,,,,,,,,,,,,,,,,,,,,,,,22,,22,,22,,,,],[5,-1,21,,,,,,,,,,,,,,,,,,,,,,,,,,,,24,,,,23,,,,,,,,,,,,,,,,,,,,,,,,24,,23,,21,,,,],[,1,21,,,,,,,,,,,,,,,,,,,,,,,,,,,,24,,,,23,,,,,,,,,,,,,,,,,,,,,,,,24,,23,,21,,,,]],[[1,-1,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33],[3,1,24,,,,,,,,27,,,,,,,,,,,,,,,,27,,,,24,,,,24,,,,,,,,27,,,,,,,,,,,,,,,,24,,24,,24,,,,],[5,-1,21,,,,,,,,,,,,,,,,,,,,,,,,,,,,24,,,,23,,,,,,,,,,,,,,,,,,,,,,,,24,,23,,21,,,,],[,1,21,,,,,,,,,,,,,,,,,,,,,,,,,,,,24,,,,23,,,,,,,,,,,,,,,,,,,,,,,,24,,23,,21,,,,],[6,1,,,34,34,34,,,,,,34,34,,,,,34,,,,34,34,,,,,34,,,,34,,,,34,34,34,,,,,,34,,,,,,34,34,,,34,34,,,,,,,,,34,34],[4,1,,,,,,,24,,,,,,24,,24,,,,24,,,,24,,,,,,,,,,,,,,,,24,,,,,,24,,24,,,,24,,,,24,,,,,,,,,,]],[[1,-1,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,23,23,35,23,23,36,23,23,35,23,23,36,23,23,35,35,23,23,35,23,23,35,23,23,36,23,23,35,23,23,36,36],[5,-1,21,,,19,,,21,,,,,,,,,,21,,,19,,,17,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],[3,1,24,,,24,,,24,,,,,,,,,,24,,,24,,,24,,,,24.75,24.5,24.26,24.01,24.01,24.01,,,,,25,,,,,,,,25,,,,,,,,25,,,,,,,,25,25,25,25],[4,-1,,,,,,,,,,,,,,,,,,,,,,,,,,,24.75,24.5,24.26,24.01,24.01,24.01,24.01,24,,24,24,,24,24,24,24,,24,24,,24,,24,24,,24,24,,24,24,24,24,,24,24,,24,24],[7,-1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,23,,21,23,,35,,23,,21,23,,35,,35,,23,,21,23,,35,,21,23,,35,,21,23,,,],[6,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34,36,34,,33,34,34,36,31,36,34,,31,34,32,,33,36,34,,31,34,34,36,33,36,33,,31,,,]],[[1,-1,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,21,21,33,21,21,33,21,21,33,21,21,33,21,21,33,33,17,17,29,17,17,29,17,17,29,17,17,29,17,17,29,29,17,17,29,17,17,29,17,17,29,17,17,29,17,17,29,29],[4,1,24,24,,24,24,,24,24,24,24,,24,24,,24,,24,24,,24,24,,24,24,24,24,,24,24,,24,24,24,24,,24,24,,24,24,24,,,24,24,,24,,24,24,,24,24,,24,24,24,24,,24,24,,24,24],[7,-1,21,,19,21,,33,,21,,19,21,,33,,33,,21,,19,21,,33,,21,,19,21,,33,,33,,17,,17,17,29,17,17,29,17,,17,17,29,17,17,29,17,,17,17,29,17,17,29,17,,17,17,29,17,17,29],[2,1,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,,,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,34,34,,34,,,],[6,1,,,36,,,,,,36,,36,,,,,,,,36,,,,,,36,,36,,,,,,,,36,,,,,,,,,,,,,,,,36,,,,,,36,,36,,,,,,],[3,1,,,,,25,,,,,,,,25,,,,,,,,25,,,,,,,,25,25,25,25,,,,,25,,,,,25,,,25,,,,,,,,25,,,,,,,,25,25,25,25]],[[1,-1,14,14,26,14,14,26,14,14,26,14,14,26,14,14,26,26,14,14,26,14,14,26,14,14,26,14,14,26,14,14,26,26,17,17,29,17,17,29,17,17,29,17,17,29,17,17,29,29,19,19,31,19,19,31,19,19,31,19,19,31,19,19,31,31],[4,1,24,24,,24,24,,24,24,24,24,,24,24,,24,,24,24,,24,24,,24,24,24,24,,24,24,,24,24,24,24,,24,24,,24,24,24,24,,24,24,,36,,24,24,,24,24,,24,24,24,24,,24,24,,24,24],[7,-1,14,,14,14,26,14,14,26,14,,14,14,26,14,14,26,14,,14,14,26,14,14,26,14,,14,14,26,14,14,26,17,,17,17,29,17,17,29,17,,17,17,29,17,17,29,19,,19,19,31,19,19,31,19,,19,19,31,19,19,31],[2,1,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,,,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,36,36,,36,,,],[3,1,,,,,25,,,,,,,,25,,,,,,,,25,,,,,,,,25,25,25,25,,,,,25,,,,,,,,25,,,,,,,,25,,,,,,,,25,25,25,25],[6,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34,,,,,,34,,34,,,,,,,,34,,,,,,34,,34,,,,,,]]],[0,1,1,2,3,4,4]]) -------------------------------------------------------------------------------- /music/songs/iamback.js: -------------------------------------------------------------------------------- 1 | /** 2 | * MOD pattern data for the song "I am back", by Sky. 3 | */ 4 | if(localStorage[K='OS13kMusic,I am back by Sky']==undefined) 5 | localStorage[K]=JSON.stringify([[[1.8,0,72,,,.2,,4,-2,6,50,.15,,6],[,0,655,,,.09,3,1.65,,,,,.02,3.8,-.1,,.2],[1.2,0,23,,,.2,3,4,,,3,.9,.05,],[1.5,0,740,,,.15,2,.2,-.1,-.15,9,.02,,.1,.12,,.06]],[[[3,-1,13,13,13,8,13,,,,,,,,,,,,11,11,11,6,11,,,,,,,,,,,,10,10,10,6,10,,,,,,,,,6,8,10,8,8,8,5,13,,8,8,8,5,13,,,,,,],[,1,25,,25,,,,,,,,,,,,,25,25,,25,,,,,,,25,,,25,,25,25,25,,25,,,,,,,,,,,25,25,25,25,,25,,,,,,,,,,,,,,],[2,-1,13,,25,,13,13,25,13,,13,25,13,13,13,25,,13,,25,,13,13,25,13,,13,25,13,13,13,,,13,,25,,13,13,25,13,,13,25,13,13,13,25,,13,,25,,13,13,25,13,,13,25,13,13,13,25,,]],[[3,-1,13,13,13,8,13,,,,,,,,,,,,11,11,11,6,11,,,,,,,,,,,,10,10,10,6,10,,,,,,,,,6,8,10,8,8,8,5,13,,8,8,8,5,13,8,8,8,5,13],[2,-1,13,,25,,13,13,25,13,,13,25,13,13,13,25,27,11,,23,,11,11,23,11,,11,23,11,11,11,23,22,18,,30,,18,18,30,18,,18,30,18,18,18,30,22,13,,25,,13,13,25,13,,13,25,13,13,13,25,,],[,1,25,,25,,,,,,,,,,,,,25,25,,25,,,,,,,,,,,,,,25,,25,,,,,,,,,,,25,25,25,25,,25,,,,,,,,,,,,,,],[1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13,13,13,13,13,13,13,13]],[[3,-1,13,13,13,8,13,,13,15,17,17,15,13,20,20,18,17,18,,,,17,,15,,,,17,,18,,22,22,22,,18,,,,25,25,25,,22,,,18,20,22,20,,,,,,,,,,,,,,,,],[2,-1,13,,25,,13,13,25,13,,13,25,13,13,13,25,27,11,,23,,11,11,23,11,,11,23,11,11,11,23,22,18,,30,,18,18,30,18,,18,30,18,18,18,30,22,13,,25,,13,13,25,13,,13,25,13,13,13,25,,],[,1,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,],[1,1,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,,13,,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,13,,13]],[[3,-1,13,,25,,13,13,25,13,,13,25,13,13,13,25,,11,,23,,11,11,23,11,,11,23,11,11,11,23,,10,,22,,10,10,22,10,,10,22,10,10,6,8,10,20,25,20,20,25,20,,20,25,20,20,20,25,,20,,],[2,-1,13,,25,,13,13,25,13,,13,25,13,13,13,25,,13,,25,,13,13,25,13,,13,25,13,13,13,25,,13,,25,,13,13,25,13,,13,25,13,13,13,25,,13,,25,,13,13,25,13,,13,25,13,13,13,25,,],[,1,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,],[1,1,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,,13,,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,13,,13]],[[3,-1,13,,,,,,8,,17,15,13,,17,15,13,,15,,,,10,13,15,10,13,15,10,13,15,10,13,15,12,,,,,,8,15,,,,,17,15,13,8,13,,,,,,10,8,,20,20,20,20,20,20,20],[2,-1,13,,25,,13,13,25,13,,13,25,13,13,13,25,,15,,27,,15,15,27,15,,15,27,15,15,15,27,32,20,,32,,20,20,32,20,,20,32,20,20,20,32,,13,,25,,13,13,25,20,,20,32,20,20,20,32,,],[,1,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,],[1,1,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,,13,,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,13,,13]],[[3,-1,13,,,,,,8,,17,,,,18,17,15,,18,,,,13,,,,10,,,,6,,,,8,12,15,12,20,,8,12,15,12,20,,22,20,15,,13,,,,,,10,,8,,,,,8,20,8],[2,-1,13,,25,25,13,,25,25,13,,25,25,13,,25,25,15,,27,27,15,,27,27,15,,27,27,15,,27,27,20,,32,32,20,,32,32,20,,32,32,20,,32,32,13,,25,25,13,,25,25,20,,32,32,20,,32,34],[,1,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,],[1,1,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,,13,,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,13,,13]],[[3,-1,13,,,,,,8,,17,,,,18,17,15,,18,,,,13,,,,10,,,,6,,,,8,12,15,12,20,,8,12,15,12,20,,22,20,15,,13,,,,,,10,,8,,,,,8,20,8],[,1,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,],[1,1,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,,13,,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,13,,13]],[[,1,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,,,25,25,,25,25,,,,,,25,,,,25,,,25,,,,25,25,25,25,25],[1,1,,,,,13,,,,,,,,13,,,,,,,,13,,,,,,,,13,,13,,,,,,13,,,,,,,,13,,,,,,,,13,13,,13,,13,13,13,13,13,13,13]]],[0,1,2,2,3,3,2,2,4,4,5,6,6,7,2,2,3],,]) -------------------------------------------------------------------------------- /music/songs/packabunchas.js: -------------------------------------------------------------------------------- 1 | /** 2 | * MOD pattern data for the "Packabunchas" music, by Mattia https://github.com/MattiaFortunati/packabunchas 3 | */ 4 | if(localStorage[K='OS13kMusic,Packabunchas by Mattia Fortunati']==undefined) 5 | localStorage[K]=JSON.stringify([[[.5,0,4e3,,,.03,,1.25,,,,,.02,6.8,-.3],[.5,0,8e3,,,.03,2,1.25,,,,,.02,6.8,-.3],[.5,0,80,,.08,.5,3]],[[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,10,,,,,,10,,17,,,,,,,,10,,,,,,10,,17,,,,,,,,12,,,,,,12,,19,,,,,,,,12,,,,,,12,,19,,,,,,,,],[2,,10,,,,10,,,,,,10,,,,10,,,,,,,,,,10,,,,10,,,,10,,,,10,,,,,,10,,,,10,,,,,,,,,,10,,,,10,,,,],[2,,14,,,,14,,,,,,14,,,,14,,,,,,,,,,14,,,,14,,,,17,,,,17,,,,,,17,,,,17,,,,,,,,,,17,,,,17,,,,],[2,,21,,,,21,,,,,,21,,,,21,,,,,,,,,,21,,,,21,,,,19,,,,19,,,,,,19,,,,19,,,,,,,,,,19,,,,19,,,,]],[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,5,,,,,,5,,12,,,,,,,,5,,,,,,5,,12,,,,,,,,10,,,,,,10,,17,,,,,,,,10,,,,,,10,,17,,,,,,,,],[2,,9,,,,9,,,,,,9,,,,9,,,,,,,,,,9,,,,9,,,,9,,,,9,,,,,,9,,,,9,,,,,,,,,,9,,,,9,,,,],[2,,15,,,,15,,,,,,15,,,,15,,,,,,,,,,15,,,,15,,,,14,,,,14,,,,,,14,,,,14,,,,,,,,,,14,,,,14,,,,],[2,,21,,,,21,,,,,,21,,,,21,,,,,,,,,,21,,,,21,,,,17,,,,17,,,,,,17,,,,17,,,,,,,,,,17,,,,17,,,,]],[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,10,,,,,,10,,17,,,,,,,,10,,,,,,10,,17,,,,,,,,3,,,,,,3,,7,,,,,,,,3,,,,,,3,,7,,,,,,,,],[2,,8,,,,8,,,,,,8,,,,8,,,,,,,,,,8,,,,8,,,,10,,,,10,,,,,,10,,,,10,,,,,,,,,,10,,,,10,,,,],[2,,14,,,,14,,,,,,14,,,,14,,,,,,,,,,14,,,,14,,,,14,,,,14,,,,,,14,,,,14,,,,,,,,,,14,,,,14,,,,],[2,,29,,,,29,,,,,,29,,,,29,,,,,,,,,,29,,,,29,,,,29,,,,19,,,,,,19,,,,19,,,,,,,,,,19,,,,19,,,,]],[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,12,,,,,,12,,19,,,,,,,,12,,,,,,12,,19,,,,,,,,5,,,,,,5,,12,,,,,,,,5,,,,,,5,,12,,,,,,,,],[2,,10,,,,10,,,,,,10,,,,10,,,,,,,,,,10,,,,10,,,,9,,,,9,,,,,,9,,,,9,,,,,,,,,,9,,,,9,,,,],[2,,15,,,,15,,,,,,15,,,,15,,,,,,,,,,15,,,,15,,,,17,,,,17,,,,,,17,,,,17,,,,,,,,,,17,,,,17,,,,],[2,,19,,,,19,,,,,,19,,,,19,,,,,,,,,,19,,,,19,,,,19,,,,19,,,,,,19,,,,19,,,,,,,,,,19,,,,19,,,,]],[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,10,,,,,,10,,17,,,,,,,,10,,,,,,10,,17,,,,,,,,12,,,,,,12,,19,,,,,,,,12,,,,,,12,,19,,,,,,,,],[2,,10,,,,,,,,,,,,,,,,,,,,,,,,10,,,,,,,,,,,,,,,,,,10,,,,10,,,,,,,,,,10,,,,10,,,,],[2,,14,,,,,,,,,,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,17,,,,17,,,,,,,,,,17,,,,17,,,,],[2,,21,,,,,,,,,,,,,,,,,,,,,,,,21,,,,,,,,,,,,,,,,,,19,,,,19,,,,,,,,,,19,,,,19,,,,],[2,,,,,,,,,,,,,,,,,,,,,,,,,,33,,31,,29,,,,31,,,,24,,,,,,,,,,,,,,,,,,,,33,,31,,29,,,,]],[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,5,,,,,,5,,12,,,,,,,,5,,,,,,5,,12,,,,,,,,10,,,,,,10,,17,,,,,,,,10,,,,,,10,,17,,,,,,,,],[2,,9,,,,,,,,,,,,,,9,,,,,,,,,,,,,,,,,,9,,,,9,,,,,,9,,,,9,,,,,,,,,,9,,,,,,,,],[2,,15,,,,,,,,,,,,,,15,,,,,,,,,,,,,,,,,,14,,,,14,,,,,,14,,,,14,,,,,,,,,,14,,,,,,,,],[2,,21,,,,,,,,,,,,,,21,,,,,,,,,,,,,,,,,,17,,,,17,,,,,,17,,,,17,,,,,,,,,,17,,,,,,,,],[2,,27,,,,24,,,,,,,,,,,,,,,,,,,,33,,32,,31,,33,,29,,,,,,,,,,,,,,,,,,,,26,,,,27,,,,29,,,,]],[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,10,,,,,,10,,17,,,,,,,,10,,,,,,10,,17,,,,,,,,3,,,,,,3,,7,,,,,,,,3,,,,,,3,,7,,,,,,,,],[2,,8,,,,,,,,,,,,,,8,,,,,,,,,,8,,,,8,,,,10,,,,,,,,,,,,,,,,,,,,,,,,10,,,,10,,,,],[2,,14,,,,,,,,,,,,,,14,,,,,,,,,,14,,,,14,,,,14,,,,,,,,,,,,,,,,,,,,,,,,14,,,,14,,,,],[2,,29,,,,,,,,,,,,,,29,,,,,,,,,,29,,,,29,,,,29,,,,,,,,,,,,,,,,,,,,,,,,19,,,,19,,,,],[2,,29,,,,26,,,,,,,,,,,,,,,,,,,,29,,27,,26,,,,27,,,,24,,,,,,,,,,,,,,,,,,,,24,,26,,27,,,,]],[[,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,1,,,,,,1,,1,,,,,,1,,,,,,,,1,,1,,,,,,,,],[1,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,,,,,1,,,,,,1,,,,,,,,1,,,,,,,,,,1,,,,],[2,,12,,,,,,12,,19,,,,,,,,12,,,,,,12,,19,,,,,,,,5,,,,,,5,,12,,,,,,,,5,,,,,,5,,12,,,,,,,,],[2,,10,,,,,,,,,,,,,,,,,,,,,,,,10,,,,10,,,,9,,,,,,,,,,9,,,,9,,,,,,,,,,9,,,,9,,,,],[2,,15,,,,,,,,,,,,,,,,,,,,,,,,15,,,,15,,,,17,,,,,,,,,,17,,,,17,,,,,,,,,,17,,,,17,,,,],[2,,19,,,,,,,,,,,,,,,,,,,,,,,,19,,,,19,,,,19,,,,,,,,,,19,,,,19,,,,,,,,,,19,,,,19,,,,],[2,,26,,,,24,,,,,,,,,,,,,,,,,,,,27,,,,27,,,,26,,,,24,,,,22,,,,24,,,,22,,,,,,,,21,,,,,,,,]]],[4,5,6,7,0,1,2,3],120]); -------------------------------------------------------------------------------- /music/songs/sanxion.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This pattern data is based on a conversion of the loading tune from the game "Sanxion", published by Thalumus. The original song was composed by Rob Hubbard. I have no idea who converted it to MOD format. 3 | */ 4 | if(localStorage[K='OS13kMusic,Sanxion by Thalumus']==undefined) 5 | localStorage[K]=JSON.stringify([[[.4,0,9999,,,.1,,,,,,,.01,6.8,-.2],[1.4,0,84,,,.1,,.7,,,,.5,,6.7,1,.01],[,0,60,,.1,.1,2],[2,0,360,,,.12,2,2,,,,,,9,,.1],[.75,0,586,,,.25,6],[2,0,360,,,.3,2,3.5],[2,0,490,,.25],[.75,0,386,,,.25,6]],[[[,-1,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,],[2,-1,,20,8,8,20,8,,8,,20,,8,20,8,,20,,20,8,8,20,8,,8,,20,,8,20,8,,8,,20,8,8,20,8,,8,,20,,8,20,8,,8,,20,8,8,20,8,,8,,20,,8,20,8,,20],[,1,32,22,22,32,32,22,32,27,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,27,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,27,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,,20,,,20,,,20,20.5,20,,,20,,,20,,20,,,20,,,20,20.5,20,,,20,,,20,,20,,,20,,,20,20.5,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[4,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,24.75,20.75,,,,,,,24.75,20.75,,,,21.75,20.75,,24.75,20.75,,,,,,,24.75,20.75,,,,21.75,20.75]],[[,-1,8,,,,,,8,,8,,,,,,8,,6,,,,,,6,,6,,,,,,6,,13,,,,,,13,,13,,,,,,13,,8,,,,,,8,,8,,,,,,8,,],[2,-1,,20,8,8,20,8,,8,,20,,8,20,8,,20,,18,6,6,18,6,,18,,18,,6,18,6,,6,,25,13,13,25,13,,13,,25,13.75,13,25,13,,25,,20,8,8,20,8,,8,,20,,8,20,8,,20],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[5,1,20,20,15,,18,,13,15,,11,,6,8,,18,20,11,11,13,,10,,13,18,23,23,22,,18,,13,,11,11,13,,25,,11,13,25,25,11,,13,,6,,8,,,,,,,,,,,,,,,,]],[[,-1,6,,,,,,6,,6,,,,,,6,,11,,,,,,11,,11,,,,,,11,,13,,,,,,13,,13,,,,,,13,,8,,,,,,8,,8,,,,,,8,,],[2,-1,,18,6,6,18,6,,6,,18,,6,18,6,,6,,23,11,11,23,11,,23,,23,,11,23,11,,11,,25,13,13,25,13,,13,,25,13.75,13,25,13,,25,,20,8,8,20,8,,8,,20,,8,20,8,,20],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[5,1,18,18,13,,11,,10,11,,11,,13,10,,11,13,23,23,22,,18,,13,,11,10,,18,11,,11,18,11,11,13,,25,,18,23,25,23,18,,23,23,18,,20,,20,18,11,,6,8,,,,,,,,,]],[[,-1,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,],[2,-1,,20,8,8,20,8,,8,,20,,8,20,8,,20,,20,8,8,20,8,,8,,20,,8,20,8,,8],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.5,20,,,20,,,20,,20,,,20,,,20,20.5],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,]],[[,-1,11,,,,,,11,,11,,,,,,11,,11,,,,,,11,,11,,,,,,11,,16,,,,,,16,,16,,,,,,16,,16,,,,,,16,,16,,,,,,16,,],[2,-1,,23,11,11,23,11,,11,,23,,11,23,11,,23,,23,11,11,23,11,,11,,23,,11,23,11,,11,,28,16,16,28,16,,16,,28,,16,28,16,,16,,28,16,16,28,16,,16,,28,,16,28,16,,16],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,15,,,,,,,,,,,,,,,,18,,,,,,,,,,,,15,18,15,18,18,,,,20,,,,,,,,,,,,23,,,,,,,,,,,,20,23,20,23]],[[,-1,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,15,,,,,,15,,15,,,,,,15,,15,,,,,,15,,15,,,,,,15,,],[2,-1,,25,13,13,25,13,,25,,25,,13,25,13,,13,,25,13,13,25,13,,25,,25,,13,25,13,,25,,27,15,15,27,15,,27,,27,,15,27,15,,15,,27,15,15,27,15,,27,,27,,15,27,15,,15],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,25,,,,,,,,,,,,,,,,,,,,,,,,,,,,20,23,25,,27,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]],[[2,-1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[4,1,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,,,,,,,,,],[7,1,,,,,,,,,,,,,,,,,,,,,,,,,18,18,,18,13,13,10,10]],[[,-1,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,],[2,-1,,16,4,4,16,4,,16,,16,,4,16,4,,16,,16,4,4,16,4,,4,,16,,4,16,4,,4,,25,13,13,25,13,,13,,25,,13,25,13,,13,,25,13,13,25,13,,25,,25,,13,25,13,,13],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,4,,,,,,11,,,,,,16,,,,21,,,,,,20,,,,,,20,,,,11,,,,,,13,,,,,,13,,,,11,,,,,,13,,,13,,,11,11,13,13]],[[,-1,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,],[2,-1,,20,8,8,20,8,,8,,20,,8,20,8,,20,,20,8,8,20,8,,8,,20,,8,20,8,,8,,18,6,6,18,6,,18,,18,,6,18,6,,18,,18,6,6,18,6,,18,,18,,6,18,6,,18],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,8,,,,,,18,,,,,,,,,,11,,,,,,22,,,,,,,,,,,,,,18,,,,,,,,,,,,18,18,18,18,18,18,18,18,20,20,20,20,18,18,18,18],[5,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,18,,,,,,,,,,,,,,,,,,]],[[,-1,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,],[2,-1,,16,4,4,16,4,,16,,16,,4,16,4,,16,,16,4,4,16,4,,4,,16,,4,16,4,,4,,25,13,13,25,13,,13,,25,,13,25,13,,13,,25,13,13,25,13,,25,,25,,13,25,13,,13],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,4.25,,,,16,,16,,,,,,,,16,,,,18,,15,,,,13,,11,,,,,,1,,,,16,,16,,,,,,,,21,,,,23,,20,,,,18,,16,,11,,9,,]],[[,-1,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,],[2,-1,,20,8,8,20,8,,8,,20,,8,20,8,,20,,20,8,8,20,8,,8,,20,,8,20,8,,8,,18,6,6,18,6,,18,,18,,6,18,6,,18,,18,6,6,18,6,,18,,18,,6,18,6,,18],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,11,,,,,,9,,,,,,8,,,,16,,,,,,15,,,,,,15,,,,6,,,,,,13,,,,,,18,,,,23,22.5,22.5,22.37,22.37,22.5,22.5,22.37,22.37,22.5,22.5,22.37,22.37,22.5,22.5,22.37]],[[,-1,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,],[2,-1,,16,4,4,16,4,,16,,16,,4,16,4,,16,,16,4,4,16,4,,4,,16,,4,16,4,,4,,25,13,13,25,13,,13,,25,,13,25,13,,13,,25,13,13,25,13,,25,,25,,13,25,13,,13],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,4,,,,,,,,,,,,,,,,,16,16,16,15,16,16,16,15,16,16,16,4,,6,,8,,,,,,,,,,,,,,,,,20,20,20,19,20,20,20,19,20,20,20,8,,9,,]],[[,-1,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,],[2,-1,,20,8,8,20,8,,8,,20,,8,20,8,,20,,20,8,8,20,8,,8,,20,,8,20,8,,8,,18,6,6,18,6,,18,,18,,6,18,6,,18,,18,6,6,18,6,,18,,18,,6,18,6,,18],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,20,,,,,,21,,,,,,20,,,,16,,,,15,,11,,,,8,,,,,,6,,,,,,13,,,,,,18,,,,30,,,,,,25,,23,,22,,18,,13,,]],[[,-1,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,4,,,,,,4,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,13,,,,,,13,,],[2,-1,,16,4,4,16,4,,16,,16,,4,16,4,,16,,16,4,4,16,4,,4,,16,,4,16,4,,4,,25,13,13,25,13,,13,,25,,13,25,13,,13,,25,13,13,25,13,,25,,25,,13,25,13,,13],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,4.25,,3,,4,,11,,16,,,,23,,20,,8,,8.25,,20,,,,21,,,,23,,,,,,,,23,,,,21,,,,20,,8,8,8,1,3,,4,,8,,13,,16,,20,,21,,]],[[,-1,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,8,,,,,,8,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,6,,,,,,6,,],[2,-1,,20,8,8,20,8,,8,,20,,8,20,8,,20,,20,8,8,20,8,,8,,20,,8,20,8,,8,,18,6,6,18,6,,18,,18,,6,18,6,,18,,18,6,6,18,6,,18,,18,,6,18,6,,18],[,1,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32,32,22,22,32,32,22,32,22,32,22,22,32,32,22,32,32],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,],[6,1,11,,,,,,,,,,,,,,,,,23,23,23,22,23,21,,20,,15,,11,,8,,6,,,,,,8,,,,,,10,,,,11,,,,,,13,,,,,,16,,,,]],[[4,-1,15,15,15,,15,,15,15,,15,,15,15,,15,15,15,15,15,,15,,15,15,27,15,,15,15,,15,15,15,15,15,,15,,15,15,15,15,15,,15,15,15,,15,,15,15,15,,15,15,,,,,,,,,],[1,-1,20,,,20,,,20,22.5,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25,20,,,20,,,20,,20,,,20,,,20,20.25],[,-1,,22,22,,,22,,,,22,22,,,22,,,,22,22,,,22,,22,,22,22,,,22,,,,22,22,,,22,,22,,22,22,,,22,,,,22,22,,,22,,22,,22,22,,,22,,,],[3,-1,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,,,,,32,,,,]]],[0,1,2,3,2,4,5,6,1,2,3,7,10,9,8,13,12,11,14,4,5,15,6],,]) -------------------------------------------------------------------------------- /music/soundSeeds.html: -------------------------------------------------------------------------------- 1 | 2 | Seed  

3 | 4 | 5 |   6 | Auto Save
-------------------------------------------------------------------------------- /music/visualizer.dweet.js: -------------------------------------------------------------------------------- 1 | x.fillRect(0,0,2e3,2e3) 2 | x.fillStyle='#0003' 3 | t?x.lineWidth=9:h=[] 4 | x.strokeStyle='#fff' 5 | for(i=32;i--;x.beginPath(x.strokeStyle=`hsl(${-99-i*360/32} 99%${9+m/2}%)`,x.stroke())) 6 | for(m=OS13k.GetAnalyserData(i)*199,j=5;j--;)x.arc(960,540,256+(j+1&2?1:-1)*m,a=((j&2)/2-8.5+i)*2*Math.PI/32,a) 7 | x.drawImage(c,-40,-20,2e3,1120) 8 | // by Pavel and KilledByPixel -------------------------------------------------------------------------------- /music/zzfxSoundBoard.html: -------------------------------------------------------------------------------- 1 | 15 |
16 |
ℤ𝕫𝔽𝕏 - Zuper Zmall Zound Zynth
17 |
Example sound effects created and played using ZzFX
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
57 | ZzFX Sound Effect Designer at zzfx.3d2k.com ☮♥☻␌ -------------------------------------------------------------------------------- /programs.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // Add programs here, format... [icon, src, width, height, flags, name, help, folder] 5 | 6 | const programStubs = 7 | [ 8 | ['❌',,,,closeAll,'Close All'], 9 | ['?','help.html',300,350,resize|shortcut,,'Check here to see help, code, or edit user programs.\n\nHave fun! ✌️😄'], 10 | ['⚙️',,,,shortcut,'System',, 11 | [ 12 | ['🏆','system/trophyCase.html',,,full|resize|sticky,,'View all your trophies here.\nAny JS13k game can add trophies, play to win more!'], 13 | ['✏️','system/stickyNote.html',300,263,sticky|reload|sticky,,'Ctrl+B = Bold\nCtrl+I = Italic\nCtrl+U = Underline\nReload = Clear'], 14 | ['🕰️','system/clock.dweet.js',198,198,sticky|code|awake|sticky], 15 | ['🎚️','system/settings.html',470,190,sticky|sticky], 16 | ['📁',,,,,'Test',, 17 | [ 18 | [,'system/systemTest.html',600,370,defaultFlags|code], 19 | ['⌨️🖱️','system/inputTest.dweet.js'], 20 | ['✌️😄','index.html',,,,'Meta OS13k'], 21 | ]], 22 | ]], 23 | ['🛠️',,,,shortcut,'Apps',, 24 | [ 25 | ['🌐','apps/webBrowser.html',,,defaultFlags|shortcut,,'Tiny web browser with history controls.\nMany websites will prevent opening in a frame like this.'], 26 | ['🔎','https://dweetview.3d2k.com',,,defaultFlags|shortcut], 27 | ['⌛','apps/timer.html',400,139,reload|shortcut], 28 | ['👾','apps/spriteGenerator.html'], 29 | ['📈','apps/graphingCalculator.html',,,,,'Enter a math equation or function of x to see the graph.\n\nMouse = Show Values\nWheel = Zoom'], 30 | ['📸','apps/camera.html',640,480], 31 | ['JS>','apps/console.html'] 32 | ]], 33 | ['🎶',,,,shortcut,'Music',, 34 | [ 35 | ['🎵','music/musicPlayer.html',500,330,sticky,,'OS13k can play music using the tiny ZzFXM format.\nJS13k games can add their music to your library.\nPlay games to collect more music.'], 36 | ['👁️','music/visualizer.dweet.js',,,awake|full|resize|code], 37 | ['🎹','music/piano.html',520,510,reload|shortcut], 38 | ['🥁','music/sequencer.html',800,,,,'Keyboard = Note\nUp/Down = Volume\nSpace = Stop\nEnter = End'], 39 | ['🌱','music/soundSeeds.html',350,480,resize|reload,,'OS13k can play sounds using a hashed string.\nYou can also paste in ZzFX sounds.'], 40 | ['🦈','music/byteBeatPlayer.html',320,89,reload,,'Enter a funtion and length in seconds to generate music.'], 41 | ['🎼','music/bach.dweet.js',,,,,'By Rodrigo Siqueira'], 42 | ['𝓜','music/minBytes.html',450,450], 43 | ['🦗','music/smallSeeds.html',520,340,full|reload,,'This is a special tool for devs.\nUse smaller seeds to save space.\nYou can also tab through the list.'], 44 | ['𝐙𝐙','music/zzfxSoundBoard.html',700,420,,'ZzFX Sound Board'], 45 | ]], 46 | ['🕹️',,,,shortcut,'Games',, 47 | [ 48 | ['🚀','games/spaceHuggers.html',1280,720,defaultFlags|shortcut,,"A procedural run and gun roguelike for JS13k!\n\nWASD = Move\nZ or Left Click = Shoot\nX or Middle Click = Roll\nC or Right Click = Grenade\nR = Restart\n\nAlso supports Xbox or SNES style gamepads\nConnect up to 4 controllers for 4 player co-op"], 49 | ['💖','games/bounceBack.html',1280,720,defaultFlags|shortcut,,"When life gets you down, it's never too late to... BOUNCE BACK!\n\nWASD = Move\nMouse = Aim\nClick = Throw\nShift = Dash\n\nBy Frank Force"], 50 | ['🐍','games/sheddingSnake.dweet.js',800,600,defaultFlags|shortcut,,"Eat apples to grow and don't hit your skin!\n\nBy Niklas Berg and Frank Force"], 51 | ['🙉','games/dontFall.dweet.js',,,defaultFlags|shortcut,,'Build energy to bounce higher.\n\nLeft/Right = Move\nDown = Bounce\n\nBy Tomxor'], 52 | ['🏂🏻','games/bogusSlopes.dweet.js',,,defaultFlags|shortcut,,'Star = Invincible\nClick = Move\nR = Reset\n\nBy Frank Force'], 53 | ['🌋','games/lavaRush.html',640,400,defaultFlags|shortcut,,'Escape the rising lava for as long as you can.\n\nWASD = Move\nMouse = Look\nSpace = Jump\n\nBy Jeremy Burns'], 54 | ['🌈','games/swatch.html',320,340,reload|shortcut,,'Create a smooth gradient.\n\nClick = Swap Colors\n\nBy Nicholas Ortenzio'], 55 | ['🧜🏽‍♂️','games/aquaPop.html',640,480,defaultFlags|shortcut,,'Left/Right = Move\nSpace = Shoot\nEnter = Restart\n\nBy Kang Seonghoon and Erik Sombroek'], 56 | [' ☻ ','games/digitDilemma.html',400,560,defaultFlags|shortcut,,'Push numbers until none are left.\nAll puzzles are solvable!\n\nArrows = Move\nSpace = Undo\n+/- = Up/Down Level and Randomize\n\nBy Frank Force'], 57 | [' ♠️ ','games/freeCell.html',800,800,full|reload|shortcut,,'The classic game of Freecell Solitaire By Frank Force'], 58 | ['🌲','games/hueJumper.html',,,defaultFlags|shortcut,,'Reach checkpoints to get more time.\nThe road ends at 1000.\n\nMouse = Turn\nClick = Brake\nDouble Click = Jump\n\nBy Frank Force'], 59 | ['4x4','games/4x4.html',800,440,,'Four Fours','Use 4 4s and math operators to form each number.\nHow many can you find?\n\nBy Frank Force'], 60 | ['🛣️','games/bogusRoadsMini.dweet.js'], 61 | ['🏃','games/marathon.dweet.js',,,defaultFlags|code|shortcut], 62 | ['🦋','games/batafuraiko.html',,,defaultFlags|shortcut,,'Use mouse to fly.\nYou have 1 life to survive 9 waves.\nReload to start over.\n\nBy Frank Force'], 63 | ['⛱️','games/sandbox.dweet.js'], 64 | ]], 65 | [' III ',,,,shortcut,'Dweets',, 66 | [ 67 | ['🌌','dweets/blackHole.dweet.js'], 68 | ['🌊','dweets/underwaterCavern.dweet.js'], 69 | ['🚌','dweets/cityTraffic.dweet.js'], 70 | ['🚂','dweets/trainSet.dweet.js'], 71 | ['■','dweets/automaticBreakout.dweet.js'], 72 | ['❤️','dweets/colorZoom.dweet.js'], 73 | ['🔺','dweets/triFractal.dweet.js'], 74 | ['⛏️','dweets/lavaCave.dweet.js'], 75 | ['👉💧','dweets/touchWater.dweet.js'], 76 | ['🏃‍♀️','dweets/runningMan.dweet.js'], 77 | ['🔥','dweets/heatWaves.dweet.js'], 78 | ['🦠','dweets/simbiotic.dweet.js'], 79 | ['🏙️','dweets/cityOfShadows.dweet.js'], 80 | ['🩸','dweets/bloodstream.dweet.js'], 81 | ['📓','dweets/notebook.dweet.js'], 82 | ['🌴','dweets/palmTreeSunset.dweet.js'], 83 | ['🌆','dweets/oceanCity.dweet.js'], 84 | ['☸️','dweets/buddhabrot.dweet.js'], 85 | ]], 86 | ['𝓢',,,,shortcut,'Shader Toys',, 87 | [ 88 | ['𝓩𝔃','shaders/zzartLandscape.shader.txt',,,,'ZzArt Landscape'], 89 | ['☯','shaders/infiniteYinYangs.shader.txt'], 90 | ['🌀','shaders/vogelSpiral.shader.txt'], 91 | ['◣◣','shaders/sierpinskiTowers.shader.txt'], 92 | ['🕰️','shaders/timeGate.shader.txt'], 93 | ['👨‍💻','shaders/infinityMatrix.shader.txt'], 94 | ]], 95 | ['📼',,,,shortcut,'Videos',, 96 | [ 97 | ['🐈','https://www.youtube.com/embed/dpuqKAWISN0',,,,'Alien Cat vs Super Dog'], 98 | ['🚂','https://www.youtube.com/embed/chuBzGjv7Ms',,,,'LittleJS Engine'], 99 | ['🛣️','https://www.youtube.com/embed/txcH9sB9UTM',,,,'Bogus Roads Trailer'], 100 | ['π√','https://www.youtube.com/embed/i4Z8TMFQGJ0',,,,'π√ (Piroot) Trailer'], 101 | ['💫','https://www.youtube.com/embed/d69sIsu3kGQ',,,,'Dual Axis Illusion'], 102 | ['🔲','https://www.youtube.com/embed/nbZyXP7SCEg',,,,'Squaresville Sifteo Cubes'], 103 | ['🌳','https://www.youtube.com/embed/GxgwprJVs9c',,,,'Go Bonsai'], 104 | ['🌆','https://www.youtube.com/embed/vnx8kI4EcVc',,,,'Dwitter Coding Demo'], 105 | ]] 106 | ]; -------------------------------------------------------------------------------- /shaders/infiniteYinYangs.shader.txt: -------------------------------------------------------------------------------- 1 | // Infinte Yin Yangs By Frank Force 2 | #define T iTime 3 | #define R iResolution 4 | #define P(i)vec2(-(step(.5,fract(3.7*sin(i)))-.5)*sin(A(i)),(step(.5,fract(3.7*sin(i)))-.5)*cos(A(i))) 5 | #define A(i)(6.283185*fract(3.7*sin(i))+.7*mix(-1.,1.,fract(3.7*sin(i)))*T) 6 | void mainImage(out vec4 U,in vec2 Z){vec2 p=(2.*Z.rg-R.rg)/R.g+.5*vec2(sin(.2*T),sin(.3*T));float i=floor(T-length(p)),m=T-i-length(p),z=pow(2.718,-log(3.333)*m)*.08,v=0.;p=p*z+P(i);for(float r=0.;r<9.;++r)p+=P(i+r+1.)/3.333*pow(.3,r);for(float r=0.;r<9.;++r){m=-A(i);p=vec2(p.r*cos(m)-p.g*sin(m),p.r*sin(m)+p.g*cos(m));float b=5.*z/min(R.g,R.r),c=1.,l=length(2.*p+vec2(0,1)),d=l;if(p.r<0.)c=mix(c,0.,smoothstep(1.-b,1.+b,l));l=length(2.*p-vec2(0,1));if(p.r>0.)c=mix(0.,c,smoothstep(1.-b,1.+b,l));if(p.g>0.)d=l;v=mix(c,v,smoothstep(1.-b,1.,length(p)));if(d>.6){v=mix(step(0.,p.g),v,smoothstep(.72,.72+b,d));if(d<.72+b&&p.g>0.)++i;break;}p.g+=mix(.5,-.5,v=step(0.,p.g));z*=2./.6;p*=2./.6;m=A(i);p=vec2(p.r*cos(m)-p.g*sin(m),p.r*sin(m)+p.g*cos(m));++i;}U=vec4(v*vec3(1.+sin(i+T+i),1.+sin(i+T+1.),1.+sin(i+T+2.)),1.);} -------------------------------------------------------------------------------- /shaders/infinityMatrix.shader.txt: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////// 2 | // Infinity Matrix - Copyright 2017 Frank Force https://www.shadertoy.com/view/4scBW2 3 | // License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 4 | ////////////////////////////////////////////////////////////////////////////////// 5 | 6 | const float zoomSpeed = 1.0; // how fast to zoom (negative to zoom out) 7 | const float zoomScale = 0.1; // how much to multiply overall zoom (closer to zero zooms in) 8 | const int recursionCount = 5; // how deep to recurse 9 | const float recursionFadeDepth = 2.0; // how deep to fade out 10 | const int glyphSize = 5; // width & height of glyph in pixels 11 | const int glyphCount = 2; // how many glyphs total 12 | const float glyphMargin = 0.5; // how much to center the glyph in each pixel 13 | 14 | int GetGlyphPixel(ivec2 pos, int g) 15 | { 16 | if (pos.x >= glyphSize || pos.y >= glyphSize) 17 | return 0; 18 | 19 | // get if bit is on for this pixel in the glyph 20 | // 0x01110, 0x01110, 21 | // 0x11011, 0x11110, 22 | // 0x11011, 0x01110, 23 | // 0x11011, 0x01110, 24 | // 0x01110, 0x11111 25 | // 0 1 26 | 27 | if (g == 0) 28 | { 29 | if (pos.x > 0 && pos.x < 4 && (pos.y == 0 || pos.y == 4)) 30 | return 1; 31 | if (pos.y > 0 && pos.y < 4 && pos.x != 2) 32 | return 1; 33 | return 0; 34 | } 35 | else 36 | { 37 | if (pos.x == 0 && (pos.y == 4 || pos.y == 2 || pos.y == 1)) 38 | return 0; 39 | if (pos.x == 4 && pos.y > 0) 40 | return 0; 41 | return 1; 42 | } 43 | 44 | return 0; 45 | } 46 | 47 | ////////////////////////////////////////////////////////////////////////////////// 48 | // Precached values and math 49 | 50 | const float glyphSizeF = float(glyphSize) + 2.0*glyphMargin; 51 | const float glyphSizeLog = log(glyphSizeF); 52 | const float gsfi = 1.0 / glyphSizeF; 53 | const float e = 2.718281828459; 54 | const float pi = 3.14159265359; 55 | 56 | float RandFloat(int i) { return (fract(sin(float(i)) * 43758.5453)); } 57 | int RandInt(int i) { return int(100000.0*RandFloat(i)); } 58 | 59 | ////////////////////////////////////////////////////////////////////////////////// 60 | // Color and image manipulation 61 | 62 | float GetRecursionFade(int r, float timePercent) 63 | { 64 | if (r > recursionCount) 65 | return timePercent; 66 | 67 | // fade in and out recusion 68 | float rt = max(float(r) - timePercent - recursionFadeDepth, 0.0); 69 | float rc = float(recursionCount) - recursionFadeDepth; 70 | return rt / rc; 71 | } 72 | 73 | vec3 InitPixelColor() { return vec3(0); } 74 | vec3 CombinePixelColor(vec3 color, float timePercent, int i, int r, vec2 pos, ivec2 glyphPos, ivec2 glyphPosLast) 75 | { 76 | vec3 myColor = vec3(1.0); 77 | 78 | myColor.r *= mix(0.3, 1.0, RandFloat(i + r + 11*glyphPosLast.x + 13*glyphPosLast.y)); 79 | myColor.b *= mix(0.3, 1.0, RandFloat(i + r + 17*glyphPosLast.x + 19*glyphPosLast.y)); 80 | myColor *= mix(0.2, 0.7, RandFloat(i + r + 31*glyphPosLast.x + 37*glyphPosLast.y)); 81 | 82 | // combine with my color 83 | float f = GetRecursionFade(r, timePercent); 84 | color += myColor*f; 85 | return color; 86 | } 87 | 88 | vec3 FinishPixel(vec3 color, vec2 uv) 89 | { 90 | // brighten 91 | color += vec3(0.05); 92 | 93 | // make green 94 | color *= vec3(0.7, 1.0, 0.7); 95 | return color; 96 | } 97 | 98 | vec2 InitUV(vec2 uv) 99 | { 100 | // wave 101 | uv.x += 0.1*sin(2.0*uv.y + 1.0*iTime); 102 | uv.y += 0.1*sin(2.0*uv.x + 0.8*iTime); 103 | return uv; 104 | } 105 | 106 | 107 | ////////////////////////////////////////////////////////////////////////////////// 108 | // Fractal functions 109 | 110 | int imod(int a, int b) { return int(mod(float(a), float(b))); } 111 | int GetFocusGlyph(int i) { return imod(RandInt(i), glyphCount); } 112 | 113 | ivec2 CalculateFocusPos(int iterations) 114 | { 115 | // count valid pixels in glyph 116 | int g = GetFocusGlyph(iterations-1); 117 | int c = 18; // OPT - 1 and 0 glyps both have 18 pixels 118 | 119 | // find a random valid pixel in glyph 120 | c -= imod(RandInt(iterations), c); 121 | for (int y = 0; y < glyphSize; ++y) 122 | for (int x = 0; x < glyphSize; ++x) 123 | { 124 | c -= GetGlyphPixel(ivec2(x, y), g); 125 | if (c == 0) 126 | return ivec2(x, y); 127 | } 128 | 129 | return ivec2(0); 130 | } 131 | 132 | ivec2 GetFocusPos(int i) { return CalculateFocusPos(i); } 133 | 134 | int GetGlyph(int iterations, ivec2 glyphPos, int glyphLast, ivec2 glyphPosLast, ivec2 focusPos) 135 | { 136 | if (glyphPos == focusPos) 137 | return GetFocusGlyph(iterations); // inject correct glyph 138 | 139 | int seed = iterations + glyphPos.x * 313 + glyphPos.y * 411 + glyphPosLast.x * 557 + glyphPosLast.y * 121; 140 | return imod(RandInt(seed), glyphCount); 141 | } 142 | 143 | // get color of pos, where pos is 0-1 point in the glyph 144 | vec3 GetPixelFractal(vec2 pos, int iterations, float timePercent) 145 | { 146 | int glyphLast = GetFocusGlyph(iterations-1); 147 | ivec2 glyphPosLast = GetFocusPos(iterations-2); 148 | ivec2 glyphPos = GetFocusPos(iterations-1); 149 | 150 | bool isFocus = true; 151 | ivec2 focusPos = glyphPos; 152 | 153 | vec3 color = InitPixelColor(); 154 | for (int r = 0; r <= recursionCount + 1; ++r) 155 | { 156 | color = CombinePixelColor(color, timePercent, iterations, r, pos, glyphPos, glyphPosLast); 157 | 158 | //if (r == 1 && glyphPos == GetFocusPos(r-1)) 159 | // color.z = 1.0; // debug - show focus 160 | 161 | if (r > recursionCount) 162 | return color; 163 | 164 | // update pos 165 | pos -= vec2(glyphMargin*gsfi); 166 | pos *= glyphSizeF; 167 | 168 | // get glyph and pos within that glyph 169 | glyphPosLast = glyphPos; 170 | glyphPos = ivec2(pos); 171 | 172 | // check pixel 173 | int glyphValue = GetGlyphPixel(glyphPos, glyphLast); 174 | if (glyphValue == 0 || pos.x < 0.0 || pos.y < 0.0) 175 | return color; 176 | 177 | // next glyph 178 | pos -= vec2(floor(pos)); 179 | focusPos = isFocus? GetFocusPos(iterations+r) : ivec2(-10); 180 | glyphLast = GetGlyph(iterations + r, glyphPos, glyphLast, glyphPosLast, focusPos); 181 | isFocus = isFocus && (glyphPos == focusPos); 182 | } 183 | return color; 184 | } 185 | 186 | ////////////////////////////////////////////////////////////////////////////////// 187 | 188 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 189 | { 190 | // use square aspect ratio 191 | vec2 uv = fragCoord; 192 | uv = fragCoord / iResolution.y; 193 | uv -= vec2(0.5*iResolution.x / iResolution.y, 0.5); 194 | uv = InitUV(uv); 195 | 196 | // get time 197 | float timePercent = iTime*zoomSpeed; 198 | int iterations = int(floor(timePercent)); 199 | timePercent -= float(iterations); 200 | 201 | // update zoom, apply pow to make rate constant 202 | float zoom = pow(e, -glyphSizeLog*timePercent); 203 | zoom *= zoomScale; 204 | 205 | // get offset 206 | vec2 offset = vec2(0); 207 | for (int i = 0; i < 13; ++i) 208 | offset += ((vec2(GetFocusPos(iterations+i)) + vec2(glyphMargin)) * gsfi) * pow(gsfi, float(i)); 209 | 210 | // apply zoom & offset 211 | vec2 uvFractal = uv * zoom + offset; 212 | 213 | // check pixel recursion depth 214 | vec3 pixelFractalColor = GetPixelFractal(uvFractal, iterations, timePercent); 215 | pixelFractalColor = FinishPixel(pixelFractalColor, uv); 216 | 217 | // apply final color 218 | fragColor = vec4(pixelFractalColor, 1.0); 219 | } -------------------------------------------------------------------------------- /shaders/sierpinskiTowers.shader.txt: -------------------------------------------------------------------------------- 1 | // Sierpinski Towers by Frank Force - https://www.shadertoy.com/view/7ljGzR 2 | 3 | void mainImage(out vec4 c,vec2 p) 4 | { 5 | ivec4 b; 6 | for(;(b.x^b.y&b.z)%200 > b.z-9;) 7 | b = ivec4((p/5e2-.5)*c.a + iTime/.1, c+=.1); 8 | c = vec4(b*b.x%2) + c/2e2; 9 | } -------------------------------------------------------------------------------- /shaders/timeGate.shader.txt: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////// 2 | // Time Gate - Copyright 2019 Frank Force https://www.shadertoy.com/view/WlfSRs 3 | // License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 4 | ////////////////////////////////////////////////////////////////////////////////// 5 | 6 | #define PI (3.14159265359) 7 | #define time (PI*iTime) // 4 second loop 8 | 9 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 10 | { 11 | // uv between -.5 - .5 12 | vec2 uv = fragCoord/iResolution.xy; 13 | uv -= vec2(.5); 14 | 15 | // square aspect 16 | uv.x *= iResolution.x/iResolution.y; 17 | 18 | vec3 c1; // blue part 19 | float s; // stripes 20 | { 21 | // angle & distance 22 | float a = atan(uv.x,uv.y); 23 | float d = length(uv); 24 | 25 | // waves 26 | d += 0.1; 27 | d += .3*pow(d,2.5)*sin(a*18.); 28 | d = pow(d,0.005); 29 | d *= 5999.; 30 | 31 | // rings 32 | d = .5+.5*sin(d-2.0*8.*time); 33 | 34 | // thicker at center 35 | float b = pow(d, 1.0); 36 | 37 | // fade at sides 38 | b *= 1.0-length(uv); 39 | 40 | // thin stripes at sides 41 | s = 1.0+1.0*length(uv)*sin(a*300.); 42 | b *= s; 43 | 44 | // color 45 | c1 = vec3(0,0,b); 46 | } 47 | 48 | vec3 c2; // pink/cyan part 49 | { 50 | float y = uv.y; 51 | float x = uv.x; 52 | 53 | // skew 54 | x -= sin(y*6.)/9.; 55 | 56 | // perspective 57 | x /= pow(y+sign(y),6.0); 58 | 59 | // waves 60 | float a = pow(abs(y)+.03,0.1)*32.; 61 | x += 0.03*sin(a-time); 62 | 63 | // stripes 64 | x = sin(x*30.); 65 | 66 | // color - cycle pink and cyan 67 | float b = pow(abs(x), 20.0); 68 | float p = sin(time/2.)*.5+.5; 69 | c2 = vec3(b*p,b*(1.-p),b*.9); 70 | 71 | // apply inverse stripes 72 | c2 /= s; 73 | } 74 | 75 | fragColor = vec4(c1+c2*.5,1.0); 76 | } -------------------------------------------------------------------------------- /shaders/vogelSpiral.shader.txt: -------------------------------------------------------------------------------- 1 | // Vogel Spiral By Frank Force 2 | #define M iMouse 3 | #define R iResolution 4 | #define T iTime 5 | #define pi 3.14 6 | void mainImage(out vec4 fragColor,in vec2 fragCoord) 7 | {vec2 m=(M.xy)/R.xy+.5,u=99.*m.x*(gl_FragCoord.rg-R.rg/2.)/R.r; 8 | float d=pow(10.*length(u),.7), 9 | t=.005*(T+200.*m.x), 10 | i=floor(d-atan(u.g,u.r)/pi/2.+.5), 11 | a=atan(u.g,u.r)+pi*2.*i,h=.002*a+1.5*t, 12 | s=fract(a*.5*t)<.5?1.:0.,v=fract(a*t)<.5?0.:1.; 13 | fragColor=vec4(vec3(v-s*v*.5)+vec3(s*v)*cos(pi*2.*(h+vec3(1.,.666,.333))),1.);} -------------------------------------------------------------------------------- /shaders/zzartLandscape.shader.txt: -------------------------------------------------------------------------------- 1 | // ZzArt Landscape By Frank Force 2 | vec3 SmoothHSV(vec3 c) { vec3 rgb = clamp(abs(mod(c.x*6.+vec3(0,4,2),6.)-3.)-1.,0.,1.); return c.z * mix( vec3(1), rgb*rgb*(3.-2.*rgb), c.y); } 3 | vec4 lengthA(vec4 a) { return vec4(length(a)); } 4 | vec4 asinA(vec4 a) { return asin(clamp(a,-1.,1.)); } 5 | vec4 acosA(vec4 a) { return acos(clamp(a,-1.,1.)); } 6 | vec4 logA(vec4 a) { return log(abs(a)); } 7 | vec4 log2A(vec4 a) { return log2(abs(a)); } 8 | vec4 sqrtA(vec4 a) { return sqrt(abs(a)); } 9 | vec4 inversesqrtA(vec4 a) { return inversesqrt(abs(a)); } 10 | vec4 pow2(vec4 a) { return a*a; } 11 | vec4 pow3(vec4 a) { return a*a*a; } 12 | 13 | void mainImage(out vec4 a, in vec2 p) 14 | { 15 | a=p.yxyx/iResolution.yxyx; 16 | a.xywz *= vec2(-2.720, -11.550).xyxy; 17 | a.xywz += vec2(-9.370, 2.120).xyxy; 18 | vec4 b = a; 19 | 20 | // Generated Code - Line Count: 8 21 | for (int i = 0; i < 8; ++i) 22 | { 23 | b.yxzw += cos(b+(i>0?iTime:0.)).zwxx; 24 | b.yzxw *= (a).xwyx; 25 | a.yzwx = normalize(b).xzyw; 26 | b.xwyz -= (vec4(8.875, -6.698, 4.058, 5.739)).zwyz; 27 | b.xwzy *= exp(vec4(-1.442, 0.000, -1.654, 0.375)).yywy; 28 | b.wyzx /= floor(vec4(-0.008, 4.372, 0.419, 2.222)).xyxw; 29 | b.zwxy *= log2A(a).yxyz; 30 | a.zwxy = sqrtA(a).xxwz; 31 | } 32 | 33 | // Smooth HSV by iq 34 | a.x *= 0.539+0.964; 35 | a.y *= 0.587; 36 | a.xyz = SmoothHSV(a.xyz); 37 | 38 | vec2 uv = p.xy/iResolution.xy; 39 | vec4 c = texture(iChannel0, uv); 40 | a = c*.9+.1*a; 41 | } -------------------------------------------------------------------------------- /system/clock.dweet.js: -------------------------------------------------------------------------------- 1 | D=Date(L=(t,e,l,o=-6)=>x.fillRect(-e/2,o,e,l,x.rotate(-a+(a=Math.PI*(2*t-1)))));if(c.title!=D){document.hasFocus()&&OS13k.PlaySeed(6,.1,1,.01);c.title=D;c.style.background='#111';c.width=198;x.translate(99,99);D=D.slice(16,24).split`:`;for(a=i=0;i++<61;L(i/60,2,i%5?3:8,88))x.fillStyle='#fff';L(D[0]%12/12+D[1]/720,6,59);L(D[1]/60,3,85);x.fillStyle='#f00';L(D[2]/60,2,99)} -------------------------------------------------------------------------------- /system/inputTest.dweet.js: -------------------------------------------------------------------------------- 1 | i = OS13k.Input(window) 2 | c.width |= 0 3 | x.font = '4em"' 4 | x.fillText('x: ' + i.x + ' y: ' + i.y, X=h=79, Y=h) 5 | x.fillText('keypress:' + i.keypress.map((k,i)=>k?i:'').filter(k=>k).join`,`,X,Y+=h) 6 | x.fillText('keydown:' + i.keydown.map((k,i)=>k?i:'').filter(k=>k).join`,`,X,Y+=h) 7 | x.fillText('mousex: ' + i.mousex + ' mousey: ' + i.mousey,X,Y+=h) 8 | x.fillText('mousepress:' + i.mousepress.map((k,i)=>k>0?i:'').filter(k=>k!=='').join`,`,X,Y+=h) 9 | x.fillText('mousedown:' + i.mousedown.map((k,i)=>k>0?i:'').filter(k=>k!=='').join`,`,X,Y+=h) -------------------------------------------------------------------------------- /system/settings.html: -------------------------------------------------------------------------------- 1 | 2 | Volume 3 | Music

4 | System Sounds 5 | Speech 6 | Popups 7 |

Background 8 | 9 | 10 |

Filters 11 | -------------------------------------------------------------------------------- /system/stickyNote.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /system/systemTest.html: -------------------------------------------------------------------------------- 1 |
2 | Text area with local storage 3 |
4 | 7 |
8 | 10 |
11 | Test Shader 12 |
13 |
14 |
15 | Trophies 16 |
Game 17 |
Trophy 18 |
Icon 19 |
Message 20 |
21 | 23 | 24 | -------------------------------------------------------------------------------- /system/trophyCase.html: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------