From 0211e7ad2cd373423e00d17649496c48d414741b Mon Sep 17 00:00:00 2001 From: FMS-Cat Date: Sun, 4 Apr 2021 08:03:50 +0900 Subject: [PATCH] take this, pouet --- .eslintrc.js | 96 - .vscode/launch.json | 15 - README.md | 47 - automaton時間全部ずらすやつ.js | 19 - pages/condition.png => condition.png | Bin ...20_dev.html => condition_1280x720_dev.html | 0 ...80x720_dev.js => condition_1280x720_dev.js | 0 ...inal.html => condition_1280x720_final.html | Bin ...arty.html => condition_1280x720_party.html | Bin ...0_dev.html => condition_1920x1080_dev.html | 0 ...x1080_dev.js => condition_1920x1080_dev.js | 0 ...nal.html => condition_1920x1080_final.html | Bin ...rty.html => condition_1920x1080_party.html | Bin ...360_dev.html => condition_640x360_dev.html | 0 ...640x360_dev.js => condition_640x360_dev.js | 0 ...final.html => condition_640x360_final.html | Bin pages/index.html => index.html | 0 loaders/automaton-json-loader.js | 17 - loaders/shader-minifier-loader.js | 116 - package.json | 39 - shader-minifier-tips.md | 148 - src/automaton-fxs/ChaosTorus.ts | 84 - src/automaton-fxs/fxDefinitions.ts | 16 - src/automaton-fxs/gravity.ts | 39 - src/automaton-fxs/hermitePatch.ts | 34 - src/automaton-fxs/repeat.ts | 25 - src/automaton-fxs/sine.ts | 21 - src/automaton-fxs/transpose.ts | 24 - src/automaton.json | 1 - src/automaton.json.d.ts | 6 - src/config-hot.ts | 16 - src/config.ts | 12 - src/entities/Antialias.ts | 44 - src/entities/BeamCharge.ts | 61 - src/entities/BeamRing.ts | 62 - src/entities/BeamShot.ts | 70 - src/entities/BigBlur.ts | 105 - src/entities/Bloom.ts | 111 - src/entities/BoundingBox.ts | 100 - src/entities/Condition.ts | 164 - src/entities/Crystal.ts | 142 - src/entities/Cube.ts | 114 - src/entities/CubemapCameraEntity.ts | 36 - src/entities/CyclicBoard.ts | 119 - src/entities/DVi.ts | 71 - src/entities/DeferredCamera.ts | 176 - src/entities/EnvironmentMap.ts | 127 - src/entities/FlashyBall.ts | 91 - src/entities/FlickyParticles.ts | 125 - src/entities/ForwardCamera.ts | 30 - src/entities/GPUParticles.ts | 112 - src/entities/Glitch.ts | 75 - src/entities/Greetings.ts | 333 -- src/entities/HooperBall.ts | 95 - src/entities/IBLLUT.ts | 81 - src/entities/IFSAsUsual.ts | 110 - src/entities/IFSPiston.ts | 79 - src/entities/IFSPistons.ts | 87 - src/entities/LightCube.ts | 61 - src/entities/LightEntity.ts | 99 - src/entities/LightShaft.ts | 100 - src/entities/NoiseVoxels.ts | 108 - src/entities/Phantom.ts | 81 - src/entities/PixelSorter.ts | 161 - src/entities/Post.ts | 82 - src/entities/PsyField.ts | 117 - src/entities/RTInspector.ts | 146 - src/entities/Racer.ts | 147 - src/entities/RectTorus.ts | 79 - src/entities/Rings.ts | 102 - src/entities/SSR.ts | 128 - src/entities/SceneBegin.ts | 50 - src/entities/SceneCrystals.ts | 118 - src/entities/SceneDynamic.ts | 92 - src/entities/SceneNeuro.ts | 80 - src/entities/ScenePsy.ts | 43 - src/entities/Serial.ts | 118 - src/entities/SphereParticles.ts | 121 - src/entities/StoneParticles.ts | 0 src/entities/SufferTexts.ts | 173 - src/entities/TestScreen.ts | 60 - src/entities/Tetrahedron.ts | 119 - src/entities/TextOverlay.ts | 108 - src/entities/Wobbleball.ts | 107 - src/frag.d.ts | 4 - src/geometries/genCube.ts | 84 - src/geometries/genOctahedron.ts | 139 - src/geometries/genPlane.ts | 56 - src/geometries/genTorus.ts | 78 - src/globals/automaton.ts | 56 - src/globals/canvas.ts | 11 - src/globals/dom.ts | 107 - src/globals/dummyRenderTarget.ts | 22 - src/globals/music.ts | 18 - src/globals/quadGeometry.ts | 12 - src/globals/randomTexture.ts | 17 - src/globals/tinyCharTexture.ts | 11 - src/heck/BufferRenderTarget.ts | 91 - src/heck/CanvasRenderTarget.ts | 18 - src/heck/CubemapRenderTarget.ts | 43 - src/heck/Dog.ts | 45 - src/heck/Entity.ts | 135 - src/heck/GPUTimer.ts | 74 - src/heck/Geometry.ts | 68 - src/heck/InstancedGeometry.ts | 27 - src/heck/Material.ts | 212 - src/heck/RenderTarget.ts | 7 - src/heck/ShaderPool.ts | 117 - src/heck/Transform.ts | 64 - src/heck/components/Blit.ts | 60 - src/heck/components/Camera.ts | 78 - src/heck/components/Component.ts | 208 - src/heck/components/CubemapCamera.ts | 81 - src/heck/components/Lambda.ts | 31 - src/heck/components/LogTransform.ts | 18 - src/heck/components/Mesh.ts | 84 - src/heck/components/PerspectiveCamera.ts | 69 - src/heck/components/Quad.ts | 69 - src/images/char5x5.png | Bin 895 -> 0 bytes src/main.ts | 99 - src/music/AutomatonManager.ts | 99 - src/music/Music.ts | 199 - src/music/MusicOffline.ts | 67 - src/music/MusicRealtime.ts | 55 - src/music/MusicWrite.ts | 15 - src/music/SamplesManager.ts | 63 - src/music/music.vert | 780 --- src/music/samples.opus | Bin 2390 -> 0 bytes src/opus.d.ts | 4 - src/png.d.ts | 4 - src/scene.ts | 441 -- src/shaders/-distFunc.glsl | 54 - src/shaders/-prng.glsl | 18 - src/shaders/-simplex4d.glsl | 127 - src/shaders/ao.frag | 78 - src/shaders/big-blur.frag | 40 - src/shaders/bloom-down.frag | 59 - src/shaders/bloom-up.frag | 41 - src/shaders/blur.frag | 46 - src/shaders/bounding-box.frag | 48 - src/shaders/bounding-box.vert | 22 - src/shaders/chaos-torus.frag | 58 - src/shaders/chaos-torus.vert | 41 - src/shaders/color.frag | 11 - src/shaders/condition.frag | 75 - src/shaders/condition.vert | 65 - src/shaders/crystal.frag | 142 - src/shaders/cube.frag | 49 - src/shaders/cube.vert | 48 - src/shaders/cyclic-board.frag | 195 - src/shaders/depth.frag | 22 - src/shaders/discard.frag | 2 - src/shaders/dvi.frag | 103 - src/shaders/environment-map-merge.frag | 38 - src/shaders/environment-map.frag | 94 - src/shaders/flashy-ball.frag | 33 - src/shaders/flashy-ball.vert | 33 - src/shaders/flicky-particles-compute.frag | 114 - src/shaders/flicky-particles-render.frag | 189 - src/shaders/flicky-particles-render.vert | 96 - src/shaders/fxaa.frag | 69 - src/shaders/glitch.frag | 63 - src/shaders/greetings-pre-beatmania.frag | 13 - src/shaders/greetings-pre-lain.frag | 18 - src/shaders/greetings.frag | 41 - src/shaders/greetings.vert | 52 - src/shaders/hooperball.frag | 214 - src/shaders/ibl-lut.frag | 90 - src/shaders/ifs-as-usual.frag | 153 - src/shaders/ifs-piston.frag | 227 - src/shaders/inspector.frag | 122 - src/shaders/light-shaft.frag | 106 - src/shaders/light-shaft.vert | 33 - src/shaders/modules/brdfLambert.glsl | 14 - src/shaders/modules/brdfSpecularGGX.glsl | 26 - src/shaders/modules/cyclicNoise.glsl | 20 - src/shaders/modules/doAnalyticLighting.glsl | 38 - src/shaders/modules/doShadowMapping.glsl | 40 - src/shaders/modules/fractSin.glsl | 5 - src/shaders/modules/importanceSampleGGX.glsl | 30 - src/shaders/modules/orthBasis.glsl | 9 - src/shaders/modules/uniformHemisphere.glsl | 8 - src/shaders/modules/uniformSphere.glsl | 7 - src/shaders/noise-voxels.frag | 29 - src/shaders/noise-voxels.vert | 41 - src/shaders/nop.frag | 13 - src/shaders/normal.frag | 23 - src/shaders/object-inflate.vert | 27 - src/shaders/object.vert | 25 - src/shaders/phantom.frag | 99 - src/shaders/pixel-sorter-index.frag | 41 - src/shaders/pixel-sorter.frag | 59 - src/shaders/post.frag | 106 - src/shaders/psy-field.frag | 237 - src/shaders/quad.vert | 12 - src/shaders/racer-compute.frag | 146 - src/shaders/racer-render.frag | 55 - src/shaders/racer-render.vert | 46 - src/shaders/raymarch-object.vert | 22 - src/shaders/rect-torus.frag | 33 - src/shaders/rect-torus.vert | 43 - src/shaders/rings.frag | 35 - src/shaders/rings.vert | 56 - src/shaders/serial-decode.frag | 49 - src/shaders/serial-encode.frag | 81 - src/shaders/shading.frag | 318 -- src/shaders/shadow-blur.frag | 38 - src/shaders/sphere-particles-compute.frag | 157 - src/shaders/sphere-particles-render.frag | 46 - src/shaders/sphere-particles-render.vert | 103 - src/shaders/ssr.frag | 96 - src/shaders/suffer-texts-compute.frag | 24 - src/shaders/suffer-texts-render.frag | 37 - src/shaders/suffer-texts-render.vert | 66 - src/shaders/test-screen.frag | 30 - src/shaders/tetrahedron.frag | 134 - src/shaders/text-overlay.frag | 28 - src/shaders/white.frag | 20 - src/shaders/wobbleball.frag | 153 - src/utils/Pool.ts | 18 - src/utils/RandomTexture.ts | 55 - src/utils/arraySetDelete.ts | 8 - src/utils/calcCharPos.ts | 30 - src/utils/createFontSpriteSheet.ts | 42 - src/utils/createSVGTableTexture.ts | 41 - src/utils/injectCodeToShader.ts | 10 - src/utils/iterateOverMap.ts | 6 - src/utils/mod.ts | 3 - src/utils/objectEntriesMap.ts | 13 - src/utils/quatFromUnitVectors.ts | 21 - src/utils/setLightUniforms.ts | 57 - src/utils/vdc.ts | 18 - src/vert.d.ts | 4 - tsconfig.json | 16 - webpack.config.js | 124 - yarn.lock | 4438 ----------------- 236 files changed, 20906 deletions(-) delete mode 100644 .eslintrc.js delete mode 100644 .vscode/launch.json delete mode 100644 README.md delete mode 100644 automaton時間全部ずらすやつ.js rename pages/condition.png => condition.png (100%) rename pages/condition_1280x720_dev.html => condition_1280x720_dev.html (100%) rename pages/condition_1280x720_dev.js => condition_1280x720_dev.js (100%) rename pages/condition_1280x720_final.html => condition_1280x720_final.html (100%) rename pages/condition_1280x720_party.html => condition_1280x720_party.html (100%) rename pages/condition_1920x1080_dev.html => condition_1920x1080_dev.html (100%) rename pages/condition_1920x1080_dev.js => condition_1920x1080_dev.js (100%) rename pages/condition_1920x1080_final.html => condition_1920x1080_final.html (100%) rename pages/condition_1920x1080_party.html => condition_1920x1080_party.html (100%) rename pages/condition_640x360_dev.html => condition_640x360_dev.html (100%) rename pages/condition_640x360_dev.js => condition_640x360_dev.js (100%) rename pages/condition_640x360_final.html => condition_640x360_final.html (100%) rename pages/index.html => index.html (100%) delete mode 100644 loaders/automaton-json-loader.js delete mode 100644 loaders/shader-minifier-loader.js delete mode 100644 package.json delete mode 100644 shader-minifier-tips.md delete mode 100644 src/automaton-fxs/ChaosTorus.ts delete mode 100644 src/automaton-fxs/fxDefinitions.ts delete mode 100644 src/automaton-fxs/gravity.ts delete mode 100644 src/automaton-fxs/hermitePatch.ts delete mode 100644 src/automaton-fxs/repeat.ts delete mode 100644 src/automaton-fxs/sine.ts delete mode 100644 src/automaton-fxs/transpose.ts delete mode 100644 src/automaton.json delete mode 100644 src/automaton.json.d.ts delete mode 100644 src/config-hot.ts delete mode 100644 src/config.ts delete mode 100644 src/entities/Antialias.ts delete mode 100644 src/entities/BeamCharge.ts delete mode 100644 src/entities/BeamRing.ts delete mode 100644 src/entities/BeamShot.ts delete mode 100644 src/entities/BigBlur.ts delete mode 100644 src/entities/Bloom.ts delete mode 100644 src/entities/BoundingBox.ts delete mode 100644 src/entities/Condition.ts delete mode 100644 src/entities/Crystal.ts delete mode 100644 src/entities/Cube.ts delete mode 100644 src/entities/CubemapCameraEntity.ts delete mode 100644 src/entities/CyclicBoard.ts delete mode 100644 src/entities/DVi.ts delete mode 100644 src/entities/DeferredCamera.ts delete mode 100644 src/entities/EnvironmentMap.ts delete mode 100644 src/entities/FlashyBall.ts delete mode 100644 src/entities/FlickyParticles.ts delete mode 100644 src/entities/ForwardCamera.ts delete mode 100644 src/entities/GPUParticles.ts delete mode 100644 src/entities/Glitch.ts delete mode 100644 src/entities/Greetings.ts delete mode 100644 src/entities/HooperBall.ts delete mode 100644 src/entities/IBLLUT.ts delete mode 100644 src/entities/IFSAsUsual.ts delete mode 100644 src/entities/IFSPiston.ts delete mode 100644 src/entities/IFSPistons.ts delete mode 100644 src/entities/LightCube.ts delete mode 100644 src/entities/LightEntity.ts delete mode 100644 src/entities/LightShaft.ts delete mode 100644 src/entities/NoiseVoxels.ts delete mode 100644 src/entities/Phantom.ts delete mode 100644 src/entities/PixelSorter.ts delete mode 100644 src/entities/Post.ts delete mode 100644 src/entities/PsyField.ts delete mode 100644 src/entities/RTInspector.ts delete mode 100644 src/entities/Racer.ts delete mode 100644 src/entities/RectTorus.ts delete mode 100644 src/entities/Rings.ts delete mode 100644 src/entities/SSR.ts delete mode 100644 src/entities/SceneBegin.ts delete mode 100644 src/entities/SceneCrystals.ts delete mode 100644 src/entities/SceneDynamic.ts delete mode 100644 src/entities/SceneNeuro.ts delete mode 100644 src/entities/ScenePsy.ts delete mode 100644 src/entities/Serial.ts delete mode 100644 src/entities/SphereParticles.ts delete mode 100644 src/entities/StoneParticles.ts delete mode 100644 src/entities/SufferTexts.ts delete mode 100644 src/entities/TestScreen.ts delete mode 100644 src/entities/Tetrahedron.ts delete mode 100644 src/entities/TextOverlay.ts delete mode 100644 src/entities/Wobbleball.ts delete mode 100644 src/frag.d.ts delete mode 100644 src/geometries/genCube.ts delete mode 100644 src/geometries/genOctahedron.ts delete mode 100644 src/geometries/genPlane.ts delete mode 100644 src/geometries/genTorus.ts delete mode 100644 src/globals/automaton.ts delete mode 100644 src/globals/canvas.ts delete mode 100644 src/globals/dom.ts delete mode 100644 src/globals/dummyRenderTarget.ts delete mode 100644 src/globals/music.ts delete mode 100644 src/globals/quadGeometry.ts delete mode 100644 src/globals/randomTexture.ts delete mode 100644 src/globals/tinyCharTexture.ts delete mode 100644 src/heck/BufferRenderTarget.ts delete mode 100644 src/heck/CanvasRenderTarget.ts delete mode 100644 src/heck/CubemapRenderTarget.ts delete mode 100644 src/heck/Dog.ts delete mode 100644 src/heck/Entity.ts delete mode 100644 src/heck/GPUTimer.ts delete mode 100644 src/heck/Geometry.ts delete mode 100644 src/heck/InstancedGeometry.ts delete mode 100644 src/heck/Material.ts delete mode 100644 src/heck/RenderTarget.ts delete mode 100644 src/heck/ShaderPool.ts delete mode 100644 src/heck/Transform.ts delete mode 100644 src/heck/components/Blit.ts delete mode 100644 src/heck/components/Camera.ts delete mode 100644 src/heck/components/Component.ts delete mode 100644 src/heck/components/CubemapCamera.ts delete mode 100644 src/heck/components/Lambda.ts delete mode 100644 src/heck/components/LogTransform.ts delete mode 100644 src/heck/components/Mesh.ts delete mode 100644 src/heck/components/PerspectiveCamera.ts delete mode 100644 src/heck/components/Quad.ts delete mode 100644 src/images/char5x5.png delete mode 100644 src/main.ts delete mode 100644 src/music/AutomatonManager.ts delete mode 100644 src/music/Music.ts delete mode 100644 src/music/MusicOffline.ts delete mode 100644 src/music/MusicRealtime.ts delete mode 100644 src/music/MusicWrite.ts delete mode 100644 src/music/SamplesManager.ts delete mode 100644 src/music/music.vert delete mode 100644 src/music/samples.opus delete mode 100644 src/opus.d.ts delete mode 100644 src/png.d.ts delete mode 100644 src/scene.ts delete mode 100644 src/shaders/-distFunc.glsl delete mode 100644 src/shaders/-prng.glsl delete mode 100644 src/shaders/-simplex4d.glsl delete mode 100644 src/shaders/ao.frag delete mode 100644 src/shaders/big-blur.frag delete mode 100644 src/shaders/bloom-down.frag delete mode 100644 src/shaders/bloom-up.frag delete mode 100644 src/shaders/blur.frag delete mode 100644 src/shaders/bounding-box.frag delete mode 100644 src/shaders/bounding-box.vert delete mode 100644 src/shaders/chaos-torus.frag delete mode 100644 src/shaders/chaos-torus.vert delete mode 100644 src/shaders/color.frag delete mode 100644 src/shaders/condition.frag delete mode 100644 src/shaders/condition.vert delete mode 100644 src/shaders/crystal.frag delete mode 100644 src/shaders/cube.frag delete mode 100644 src/shaders/cube.vert delete mode 100644 src/shaders/cyclic-board.frag delete mode 100644 src/shaders/depth.frag delete mode 100644 src/shaders/discard.frag delete mode 100644 src/shaders/dvi.frag delete mode 100644 src/shaders/environment-map-merge.frag delete mode 100644 src/shaders/environment-map.frag delete mode 100644 src/shaders/flashy-ball.frag delete mode 100644 src/shaders/flashy-ball.vert delete mode 100644 src/shaders/flicky-particles-compute.frag delete mode 100644 src/shaders/flicky-particles-render.frag delete mode 100644 src/shaders/flicky-particles-render.vert delete mode 100644 src/shaders/fxaa.frag delete mode 100644 src/shaders/glitch.frag delete mode 100644 src/shaders/greetings-pre-beatmania.frag delete mode 100644 src/shaders/greetings-pre-lain.frag delete mode 100644 src/shaders/greetings.frag delete mode 100644 src/shaders/greetings.vert delete mode 100644 src/shaders/hooperball.frag delete mode 100644 src/shaders/ibl-lut.frag delete mode 100644 src/shaders/ifs-as-usual.frag delete mode 100644 src/shaders/ifs-piston.frag delete mode 100644 src/shaders/inspector.frag delete mode 100644 src/shaders/light-shaft.frag delete mode 100644 src/shaders/light-shaft.vert delete mode 100644 src/shaders/modules/brdfLambert.glsl delete mode 100644 src/shaders/modules/brdfSpecularGGX.glsl delete mode 100644 src/shaders/modules/cyclicNoise.glsl delete mode 100644 src/shaders/modules/doAnalyticLighting.glsl delete mode 100644 src/shaders/modules/doShadowMapping.glsl delete mode 100644 src/shaders/modules/fractSin.glsl delete mode 100644 src/shaders/modules/importanceSampleGGX.glsl delete mode 100644 src/shaders/modules/orthBasis.glsl delete mode 100644 src/shaders/modules/uniformHemisphere.glsl delete mode 100644 src/shaders/modules/uniformSphere.glsl delete mode 100644 src/shaders/noise-voxels.frag delete mode 100644 src/shaders/noise-voxels.vert delete mode 100644 src/shaders/nop.frag delete mode 100644 src/shaders/normal.frag delete mode 100644 src/shaders/object-inflate.vert delete mode 100644 src/shaders/object.vert delete mode 100644 src/shaders/phantom.frag delete mode 100644 src/shaders/pixel-sorter-index.frag delete mode 100644 src/shaders/pixel-sorter.frag delete mode 100644 src/shaders/post.frag delete mode 100644 src/shaders/psy-field.frag delete mode 100644 src/shaders/quad.vert delete mode 100644 src/shaders/racer-compute.frag delete mode 100644 src/shaders/racer-render.frag delete mode 100644 src/shaders/racer-render.vert delete mode 100644 src/shaders/raymarch-object.vert delete mode 100644 src/shaders/rect-torus.frag delete mode 100644 src/shaders/rect-torus.vert delete mode 100644 src/shaders/rings.frag delete mode 100644 src/shaders/rings.vert delete mode 100644 src/shaders/serial-decode.frag delete mode 100644 src/shaders/serial-encode.frag delete mode 100644 src/shaders/shading.frag delete mode 100644 src/shaders/shadow-blur.frag delete mode 100644 src/shaders/sphere-particles-compute.frag delete mode 100644 src/shaders/sphere-particles-render.frag delete mode 100644 src/shaders/sphere-particles-render.vert delete mode 100644 src/shaders/ssr.frag delete mode 100644 src/shaders/suffer-texts-compute.frag delete mode 100644 src/shaders/suffer-texts-render.frag delete mode 100644 src/shaders/suffer-texts-render.vert delete mode 100644 src/shaders/test-screen.frag delete mode 100644 src/shaders/tetrahedron.frag delete mode 100644 src/shaders/text-overlay.frag delete mode 100644 src/shaders/white.frag delete mode 100644 src/shaders/wobbleball.frag delete mode 100644 src/utils/Pool.ts delete mode 100644 src/utils/RandomTexture.ts delete mode 100644 src/utils/arraySetDelete.ts delete mode 100644 src/utils/calcCharPos.ts delete mode 100644 src/utils/createFontSpriteSheet.ts delete mode 100644 src/utils/createSVGTableTexture.ts delete mode 100644 src/utils/injectCodeToShader.ts delete mode 100644 src/utils/iterateOverMap.ts delete mode 100644 src/utils/mod.ts delete mode 100644 src/utils/objectEntriesMap.ts delete mode 100644 src/utils/quatFromUnitVectors.ts delete mode 100644 src/utils/setLightUniforms.ts delete mode 100644 src/utils/vdc.ts delete mode 100644 src/vert.d.ts delete mode 100644 tsconfig.json delete mode 100644 webpack.config.js delete mode 100644 yarn.lock diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index ed18d42..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports = { - "root": true, - - "plugins": [ - "sort-imports-es6-autofix", - "@typescript-eslint", - ], - - "env": { - "es6": true, - }, - - "parser": "@typescript-eslint/parser", - - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 2017 - }, - - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - - "globals": { - "process": true // good ol' process.env - }, - - "rules": { - // basics - "@typescript-eslint/indent": [ "error", 2, { // indentation should be 2 spaces - "flatTernaryExpressions": true, // ternary should be performed in flat - "MemberExpression": 1 // member chain should be performed with an indent - } ], // it forces 2 spaces indentation - "linebreak-style": [ "error", "unix" ], // fuck you, CRLF - "quotes": [ "error", "single" ], // quotes must be single - "eqeqeq": [ "error", "smart" ], // fuck you, `==` - "max-len": [ "error", { // don't be too long, code - "code": 100, - "ignoreComments": true, // comments are okay - "ignoreStrings": true, // strings are okay - "ignoreTemplateLiterals": true, // templates are also okay - "ignoreRegExpLiterals": true, // regexs are also okay too - } ], - "sort-imports-es6-autofix/sort-imports-es6": [ "error" ], // imports have to be ordered - "eol-last": [ "error", "always" ], // eof newline is cool - - // variables - "@typescript-eslint/no-unused-vars": [ "warn", { "argsIgnorePattern": "^_" } ], // draw yellow line under unused vars - // "no-undef": [ "warn" ], // draws yellow line under undefined vars // it doesn't work on typescript sometimes - "no-var": [ "error" ], // fuck you, var - "prefer-const": [ "error" ], // const is better than let - - // omittables - "semi": [ "error", "always" ], // semicolon is required - "curly": [ "error" ], // it kills `if (foo) bar++;` - "arrow-parens": [ "error", "always" ], // it kills `arg => { func(); }` - - // force spacing (I prefer super sparse code!) - "array-bracket-spacing": [ "error", "always" ], // it kills `[val1, val2]` - "arrow-spacing": [ "error", { "before": true, "after": true } ], // it kills `( arg )=>{ func(); }` - "block-spacing": [ "error", "always" ], // it kills `if ( cond ) {func();}` - "comma-spacing": [ "error", { "before": false, "after": true } ], // it kills `func( arg1,arg2 )` - "computed-property-spacing": [ "error", "always" ], // it kills `arr[i]` - "key-spacing": [ "error", { "beforeColon": false, "afterColon": true } ], // it kills `{ key:val }` - "keyword-spacing": [ "error", { "before": true, "after": true } ], // it kills `}else{` - "object-curly-spacing": [ "error", "always" ], // it kills `{key: val}` - "semi-spacing": [ "error", { "before": false, "after": true } ], // it kills `func1();func2();` - "space-before-blocks": [ "error", "always" ], // it kills `if (cond){` - "space-in-parens": [ "error", "always" ], // it kills `func (arg)` - "space-infix-ops": [ "error" ], // it kills val1+val2 - "space-unary-ops": [ "error", { "words": true, "nonwords": false, "overrides": { "++": true, "--": true } } ], // it kills `val++` - "spaced-comment": [ "error", "always" ], // it kills `//this is comment` - - // ban spacing - "func-call-spacing": [ "error", "never" ], // no-trailing-spaces. yea. - "no-trailing-spaces": [ "error" ], // no-trailing-spaces. yea. - "no-whitespace-before-property": [ "error" ], // it kills `obj .key` - "space-before-function-paren": [ "error", { "anonymous": "never", "named": "never", "asyncArrow": "always" } ], // it kills `func ()` - - // others - "no-eval": [ "off" ], // we need to go the evil way - "no-implied-eval": [ "warn" ], // ok don't - "no-console": [ "error", { allow: [ "info", "warn", "error" ] } ], // don't forget to remove `console.log` ! - - // typescript-specifics - "@typescript-eslint/no-explicit-any": [ "off" ], // yea - "@typescript-eslint/explicit-module-boundary-types": [ "off" ], // We are using explicit any on purpose because it's explicit, be permissive - "@typescript-eslint/no-inferrable-types": [ "off" ], // it's ok - "@typescript-eslint/no-non-null-assertion": [ "off" ], // bang is sometimes required - "@typescript-eslint/no-empty-interface": [ "off" ], // we need to perform mixins - "@typescript-eslint/explicit-function-return-type": [ "error", { "allowExpressions": true } ], // return type is required - "@typescript-eslint/explicit-member-accessibility": [ "error" ], // `public` / `private` for members and methods are required - } -}; diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 7dfe89d..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "pwa-chrome", - "request": "launch", - "name": "Launch Chrome against localhost", - "url": "http://localhost:8080", - "webRoot": "${workspaceFolder}", - "sourceMapPathOverrides": { - "webpack://revision-2021/*": "${workspaceFolder}/*", - } - } - ] -} diff --git a/README.md b/README.md deleted file mode 100644 index 1e13504..0000000 --- a/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Condition - -"Condition" by FMS_Cat -A 64KB WebGL Intro -Appeared in Revision 2021, PC 64KB Intro Compo - -[See the demo!](https://fms-cat.github.io/condition/pages) - -![Condition](./pages/condition.png) - -## `#define COMPROMISE 1` - -I'm so embarrassed that this project contains so many dumb strategies about size / performance optimization because deadline matters. -You totally shouldn't reference this project to do something by yourself. - -## Build - -- You will need these stuff in your PATH: - - [`shader_minifier.exe`](https://github.com/laurentlb/Shader_Minifier) - - [`jsexe.exe`](https://www.pouet.net/) - -```sh -yarn -yarn build -``` - -## Keyboard Controls - -Only works in development build - -- `Escape`: Panic -- `Space`: Play / Pause -- `Left`: Rewind 8 beats -- `Right`: Skip 8 beats - -## Minification - -[terser's](https://terser.org/docs/api-reference.html) mangler is spicy -you'll die instantly if you access to object properties using a string identifier -see `webpack.config.js` and `src/automaton-fxs/fxDefinitions.ts` for the funny jokes - -jsexe is good -note that it cannot parse nowadays ecmascript though - -shader minifier is way too spicy so I made a [separate document](./shader-minifier-tips.md) - -libopus is cheating diff --git a/automaton時間全部ずらすやつ.js b/automaton時間全部ずらすやつ.js deleted file mode 100644 index 84006bf..0000000 --- a/automaton時間全部ずらすやつ.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @type {import('../automaton/node_modules/@fms-cat/automaton/types').SerializedAutomaton} - */ -const data = require( './src/automaton.json' ); - -const newData = JSON.parse( JSON.stringify( data ) ); - -const bpm = 180.0; -const beat = 60.0 / bpm; - -const shift = 16.0 * beat; - -newData.channels.forEach( ( [ name, channel ] ) => { - channel.items.forEach( ( item ) => { - item.time += shift; - } ); -} ); - -console.log( JSON.stringify( newData ) ); diff --git a/pages/condition.png b/condition.png similarity index 100% rename from pages/condition.png rename to condition.png diff --git a/pages/condition_1280x720_dev.html b/condition_1280x720_dev.html similarity index 100% rename from pages/condition_1280x720_dev.html rename to condition_1280x720_dev.html diff --git a/pages/condition_1280x720_dev.js b/condition_1280x720_dev.js similarity index 100% rename from pages/condition_1280x720_dev.js rename to condition_1280x720_dev.js diff --git a/pages/condition_1280x720_final.html b/condition_1280x720_final.html similarity index 100% rename from pages/condition_1280x720_final.html rename to condition_1280x720_final.html diff --git a/pages/condition_1280x720_party.html b/condition_1280x720_party.html similarity index 100% rename from pages/condition_1280x720_party.html rename to condition_1280x720_party.html diff --git a/pages/condition_1920x1080_dev.html b/condition_1920x1080_dev.html similarity index 100% rename from pages/condition_1920x1080_dev.html rename to condition_1920x1080_dev.html diff --git a/pages/condition_1920x1080_dev.js b/condition_1920x1080_dev.js similarity index 100% rename from pages/condition_1920x1080_dev.js rename to condition_1920x1080_dev.js diff --git a/pages/condition_1920x1080_final.html b/condition_1920x1080_final.html similarity index 100% rename from pages/condition_1920x1080_final.html rename to condition_1920x1080_final.html diff --git a/pages/condition_1920x1080_party.html b/condition_1920x1080_party.html similarity index 100% rename from pages/condition_1920x1080_party.html rename to condition_1920x1080_party.html diff --git a/pages/condition_640x360_dev.html b/condition_640x360_dev.html similarity index 100% rename from pages/condition_640x360_dev.html rename to condition_640x360_dev.html diff --git a/pages/condition_640x360_dev.js b/condition_640x360_dev.js similarity index 100% rename from pages/condition_640x360_dev.js rename to condition_640x360_dev.js diff --git a/pages/condition_640x360_final.html b/condition_640x360_final.html similarity index 100% rename from pages/condition_640x360_final.html rename to condition_640x360_final.html diff --git a/pages/index.html b/index.html similarity index 100% rename from pages/index.html rename to index.html diff --git a/loaders/automaton-json-loader.js b/loaders/automaton-json-loader.js deleted file mode 100644 index 17a2b4e..0000000 --- a/loaders/automaton-json-loader.js +++ /dev/null @@ -1,17 +0,0 @@ -const { getOptions } = require( 'loader-utils' ); -const { AutomatonWithGUI } = require( '@fms-cat/automaton-with-gui' ); - -/** - * @param {string} content - */ -module.exports = function( content ) { - const options = getOptions( this ); - - let data = JSON.parse( content ); - - if ( options.minimize ) { - data = AutomatonWithGUI.minimizeData( data, { ...options.minimize } ); - } - - return `module.exports = ${ JSON.stringify( data ) }`; -}; diff --git a/loaders/shader-minifier-loader.js b/loaders/shader-minifier-loader.js deleted file mode 100644 index f936ffe..0000000 --- a/loaders/shader-minifier-loader.js +++ /dev/null @@ -1,116 +0,0 @@ -const { getOptions } = require( 'loader-utils' ); -const cp = require( 'child_process' ); -const tempy = require( 'tempy' ); -const path = require( 'path' ); -const fs = require( 'fs' ); -const { promisify } = require( 'util' ); - -const exec = promisify( cp.exec ); - -/** - * @param {object} options - * @returns {string} - */ -function buildMinifierOptionsString( options ) { - let str = ''; - - if ( options.hlsl ) { - str += '--hlsl '; - } - - str += '--format none '; - - if ( typeof options.fieldNames === 'string' ) { - str += `--field-names ${ options.fieldNames } `; - } - - if ( options.preserveExternals ) { - str += '--preserve-externals '; - } - - if ( options.preserveAllGlobals ) { - str += '--preserve-all-globals '; - } - - if ( options.noRenaming ) { - str += '--no-renaming '; - } - - if ( Array.isArray( options.noRenamingList ) ) { - str += `--no-renaming-list ${ options.noRenamingList.join( ',' ) } `; - } - - if ( options.noSequence ) { - str += '--no-sequence '; - } - - if ( options.smoothstep ) { - str += '--smoothstep '; - } - - return str; -} - -/** - * @param {string} content - * @returns string - */ -function sanitizeContent( content ) { - return content.split( '\n' ).map( ( line ) => { - let lineSanitized = line; - - // precision - // https://github.com/laurentlb/Shader_Minifier/issues/8 - if ( /^\s*precision/m.exec( lineSanitized ) ) { - lineSanitized = `//[\n${ lineSanitized }\n//]` - } - - return lineSanitized; - } ).join( '\n' ); -} - -/** - * @param {string} content - */ -module.exports = async function( content ) { - const callback = this.async(); - - const name = path.basename( this.resourcePath ); - - if ( content.includes( '#pragma shader_minifier_loader bypass' ) ) { - this.emitWarning( `#pragma shader_minifier_loader detected in ${ name }. Bypassing shader minifier` ); - - callback( null, content ); - - return; - } - - const options = getOptions( this ); - - const minifierOptions = buildMinifierOptionsString( options ); - - const contentSanitized = sanitizeContent( content ); - - const minified = await tempy.file.task( async ( pathOriginal ) => { - await fs.promises.writeFile( pathOriginal, contentSanitized, { encoding: 'utf8' } ); - - return await tempy.file.task( async ( pathMinified ) => { - const command = `shader_minifier.exe ${ pathOriginal } ${ minifierOptions }-o ${ pathMinified }`; - await exec( command ).catch( ( error ) => { - if ( error.stdout ) { - this.emitError( Error( error.stdout ) ); - } - - throw error; - } ); - - return await fs.promises.readFile( pathMinified, { encoding: 'utf8' } ); - }, { name } ); - }, { name } ).catch( ( error ) => { - callback( error ); - } ); - - if ( minified ) { - callback( null, minified ); - } -}; diff --git a/package.json b/package.json deleted file mode 100644 index 2372fa7..0000000 --- a/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "revision-2021", - "version": "0.0.1", - "main": "index.js", - "license": "MIT", - "scripts": { - "dev": "webpack-cli serve --mode development", - "build": "yarn build-js && yarn build-png", - "build-js": "webpack --mode production", - "build-png": "jsexe -cn -po ./dist/bundle.js ./dist/out.png.html", - "h": "start http://localhost:8081/out.png.html && http-server ./dist", - "lint": "eslint \"src/**/*.{ts,tsx}\"", - "lint-fix": "eslint --fix \"src/**/*.{ts,tsx}\"" - }, - "devDependencies": { - "@fms-cat/automaton": "^4.2.0-beta.0", - "@fms-cat/automaton-fxs": "^4.2.0-beta.0", - "@fms-cat/automaton-with-gui": "^4.2.0-beta.0", - "@fms-cat/experimental": "^0.6.1", - "@fms-cat/glcat-ts": "^0.15.0", - "@types/audiobuffer-to-wav": "^1.0.0", - "@types/webpack-env": "^1.16.0", - "@typescript-eslint/eslint-plugin": "^4.17.0", - "@typescript-eslint/parser": "^4.17.0", - "audiobuffer-to-wav": "^1.0.0", - "eslint": "^7.21.0", - "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", - "glslify-loader": "^2.0.0", - "html-webpack-plugin": "^5.3.0", - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0", - "tempy": "^1.0.0", - "ts-loader": "^8.0.17", - "typescript": "^4.2.3", - "webpack": "^5.24.4", - "webpack-cli": "^4.5.0", - "webpack-dev-server": "^3.11.2" - } -} diff --git a/shader-minifier-tips.md b/shader-minifier-tips.md deleted file mode 100644 index 968ff0b..0000000 --- a/shader-minifier-tips.md +++ /dev/null @@ -1,148 +0,0 @@ -# shader-minifier-tips.md - -[shader_minifier](https://github.com/laurentlb/Shader_Minifier) is good. The behavior is kinda [jej](https://www.youtube.com/watch?v=Wjhhs6GcUx0) though. -This tips should cover all the tips you have to care when you are using shader_minifier. - -## Precisions - -It will be handled automatically in shader-minifier-loader. - -It doesn't accept `precision ;` for some reasons. -There are a workaround that put `//[` and `//]` around the line (shoutouts to [davidar](https://github.com/laurentlb/Shader_Minifier/issues/8#issuecomment-401582088)): - -```glsl -//[ -precision highp float; -//] -``` - -### Error Examples - -``` -Parse error: Error in : Ln: 5 Col: 17 -precision highp float; - ^ -Expecting: '(' -``` - -### Issues - -- https://github.com/laurentlb/Shader_Minifier/issues/8 - -(issue) - -## Preprocessor Branches - -Preprocessor branching often triggers issues on minified output. Use with cares. - -The branch below should be accepted without problems: - -```glsl -vec3 func() { - vec3 ret; -#ifdef CONDITION - ret = vec3( 1.0 ); -#else - ret = vec3( 0.0 ); -#endif - return ret; -} -``` - -For more details, see these issues below. - -### Error Examples - -``` -ERROR: 0:9: 'r' : undeclared identifier -ERROR: 0:9: 'constructor' : not enough data provided for construction -``` - -``` -ERROR: 0:30: 'm' : variable expected -ERROR: 0:30: 'return' : function return is not matching type: -``` - -``` -ERROR: 0:25: 'ifdef' : unexpected end of file found in conditional block -``` - -### Issues - -- https://github.com/laurentlb/Shader_Minifier/issues/27 -- https://github.com/laurentlb/Shader_Minifier/issues/28 - -## Overloading - -I don't think overloading is not working properly for most of cases. - -### Error Examples - -``` -ERROR: 0:11: 't' : no matching overloaded function found -ERROR: 0:11: '=' : dimension mismatch -ERROR: 0:11: 'assign' : cannot convert from 'highp 3-component vector of float' to 'highp float' -``` - -## Variable Declarations - -Variable declarations with same types (especially, uniforms) should be done at once. - -```glsl -// uh -uniform float uHoge; -uniform float uFuga; -uniform vec3 uFoo; -uniform float uBar; -// -> uniform float uHoge,uFuga;uniform vec3 uFoo;uniform float uBar; - -// better -uniform float uHoge; -uniform float uFuga; -uniform float uBar; -uniform vec3 uFoo; -// -> uniform float uHoge,uFuga,uBar;uniform vec3 uFoo; -``` - -## Preprocessor Constants - -Defining constants should be performed using `const` rather than `#define`. - -```glsl -// no -const float PI = 3.14159265; -const float TAU = 6.283185307; -// -> const float PI = 3.14159265; -// const float TAU = 6.283185307; - -// preferable -const float PI = 3.1415926535; -const float TAU = 6.283185307; -// -> const float e=3.14159,s=6.28319; -``` - -You might want to also avoid macros with arguments for the same reason. - -## Hentai Preprocessors - -You can't use your favorite `beat` preprocessor. damn. - -```glsl -// won't compile -#define beat *60.0/BPM - -t = mod( time, 2.0 beat ); - -// use this instead -const float BEAT = 60.0 / BPM; - -t = mod( time, 2.0 * BEAT ); -``` - -### Error Examples - -``` - int prog = int( mod( time.z / ( 8.0 beat ), 8.0 ) ); - ^ -Expecting: infix operator, postfix operator, ',' or ';' -``` diff --git a/src/automaton-fxs/ChaosTorus.ts b/src/automaton-fxs/ChaosTorus.ts deleted file mode 100644 index 30d55d2..0000000 --- a/src/automaton-fxs/ChaosTorus.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Material } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { genTorus } from '../geometries/genTorus'; -import chaosTorusFrag from '../shaders/chaos-torus.frag'; -import chaosTorusVert from '../shaders/chaos-torus.vert'; -import depthFrag from '../shaders/depth.frag'; - -export class ChaosTorus extends Entity { - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const torus = genTorus( { segmentsRadial: 64, segmentsTubular: 8 } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( torus.position, 0, 3 ); - geometry.vao.bindVertexbuffer( torus.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( torus.index ); - - geometry.count = torus.count; - geometry.mode = torus.mode; - geometry.indexType = torus.indexType; - - // -- materials -------------------------------------------------------------------------------- - const cubemap = new Material( - chaosTorusVert, - chaosTorusFrag, - { - defines: [ 'FORWARD 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const deferred = new Material( - chaosTorusVert, - chaosTorusFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const depth = new Material( - chaosTorusVert, - depthFrag, - { initOptions: { geometry, target: dummyRenderTarget } }, - ); - - const materials = { - cubemap, - deferred, - depth, - }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/chaos-torus.vert', - '../shaders/chaos-torus.frag', - ], - () => { - cubemap.replaceShader( chaosTorusVert, chaosTorusFrag ); - deferred.replaceShader( chaosTorusVert, chaosTorusFrag ); - depth.replaceShader( chaosTorusVert, depthFrag ); - }, - ); - } - } - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'ChaosTorus/mesh', - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - } -} diff --git a/src/automaton-fxs/fxDefinitions.ts b/src/automaton-fxs/fxDefinitions.ts deleted file mode 100644 index e237fec..0000000 --- a/src/automaton-fxs/fxDefinitions.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { gravity } from './gravity'; -import { hermitePatch } from './hermitePatch'; -import { repeat } from './repeat'; -import { sine } from './sine'; -import { transpose } from './transpose'; - -// quotes! prevent fx names from being mangled -const fxDefinitions = { - 'gravity': gravity, - 'hermitePatch': hermitePatch, - 'repeat': repeat, - 'sine': sine, - 'transpose': transpose, -}; - -export { fxDefinitions }; diff --git a/src/automaton-fxs/gravity.ts b/src/automaton-fxs/gravity.ts deleted file mode 100644 index 286bdd7..0000000 --- a/src/automaton-fxs/gravity.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { FxDefinition } from '@fms-cat/automaton'; - -export const gravity: FxDefinition = { - func( context ) { - const dt = context.deltaTime; - const v = context.value; - - if ( context.init ) { - context.state.pos = v; - if ( context.params.preserve ) { - const dv = v - context.getValue( context.time - dt ); - context.state.vel = dv / dt; - } else { - context.state.vel = 0.0; - } - } - - const a = Math.sign( v - context.state.pos ) * context.params.a; - context.state.vel += a * dt; - context.state.pos += context.state.vel * dt; - - if ( Math.sign( a ) !== Math.sign( v - context.state.pos ) ) { - context.state.vel *= -context.params.e; - context.state.pos = v + context.params.e * ( v - context.state.pos ); - } - - return context.state.pos; - } -}; - -if ( process.env.DEV ) { - gravity.name = 'Gravity'; - gravity.description = 'Accelerate and bounce the curve.'; - gravity.params = { - a: { name: 'Acceleration', type: 'float', default: 9.8 }, - e: { name: 'Restitution', type: 'float', default: 0.5, min: 0.0 }, - preserve: { name: 'Preserve Velocity', type: 'boolean', default: false } - }; -} diff --git a/src/automaton-fxs/hermitePatch.ts b/src/automaton-fxs/hermitePatch.ts deleted file mode 100644 index 5a31cbe..0000000 --- a/src/automaton-fxs/hermitePatch.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { FxDefinition } from '@fms-cat/automaton'; - -export const hermitePatch: FxDefinition = { - func( context ) { - if ( context.init ) { - const dt = context.deltaTime; - - const v0 = context.getValue( context.t0 ); - const dv0 = v0 - context.getValue( context.t0 - dt ); - const v1 = context.getValue( context.t1 ); - const dv1 = v1 - context.getValue( context.t1 - dt ); - - context.state.p0 = v0; - context.state.m0 = dv0 / dt * context.length; - context.state.p1 = v1; - context.state.m1 = dv1 / dt * context.length; - } - - const { p0, m0, p1, m1 } = context.state; - const t = context.progress; - - return ( - ( ( 2.0 * t - 3.0 ) * t * t + 1.0 ) * p0 + - ( ( ( t - 2.0 ) * t + 1.0 ) * t ) * m0 + - ( ( -2.0 * t + 3.0 ) * t * t ) * p1 + - ( ( t - 1.0 ) * t * t ) * m1 - ); - } -}; - -if ( process.env.DEV ) { - hermitePatch.name = 'Hermite Patch'; - hermitePatch.description = 'Patch a curve using hermite spline.'; -} diff --git a/src/automaton-fxs/repeat.ts b/src/automaton-fxs/repeat.ts deleted file mode 100644 index 9511267..0000000 --- a/src/automaton-fxs/repeat.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { FxDefinition } from '@fms-cat/automaton'; - -export const repeat: FxDefinition = { - func( context ) { - if ( context.index === context.i1 ) { - context.setShouldNotInterpolate( true ); - } - - if ( - ( context.elapsed + context.deltaTime ) % context.params.interval < context.deltaTime - ) { - context.setShouldNotInterpolate( true ); - } - - return context.getValue( context.t0 + context.elapsed % context.params.interval ); - } -}; - -if ( process.env.DEV ) { - repeat.name = 'Repeat'; - repeat.description = 'Repeat a section of the curve.'; - repeat.params = { - interval: { name: 'Interval', type: 'float', default: 1.0, min: 0.0 }, - }; -} diff --git a/src/automaton-fxs/sine.ts b/src/automaton-fxs/sine.ts deleted file mode 100644 index bb0ffdf..0000000 --- a/src/automaton-fxs/sine.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { FxDefinition } from '@fms-cat/automaton'; - -const TAU = Math.PI * 2.0; - -export const sine: FxDefinition = { - func( context ) { - const v = context.value; - const p = context.elapsed * context.params.freq + context.params.offset; - return v + context.params.amp * Math.sin( p * TAU ); - } -}; - -if ( process.env.DEV ) { - sine.name = 'Sinewave'; - sine.description = 'Overlay a sinewave to the curve.'; - sine.params = { - amp: { name: 'Amp', type: 'float', default: 0.1 }, - freq: { name: 'Frequency', type: 'float', default: 5.0 }, - offset: { name: 'Offset', type: 'float', default: 0.0, min: 0.0, max: 1.0 } - }; -} diff --git a/src/automaton-fxs/transpose.ts b/src/automaton-fxs/transpose.ts deleted file mode 100644 index b5b47a0..0000000 --- a/src/automaton-fxs/transpose.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { FxDefinition } from '@fms-cat/automaton'; - -export const transpose: FxDefinition = { - func( context ) { - if ( context.init ) { - context.state.v0 = context.value; - } - - if ( context.index === context.i1 ) { - context.setShouldNotInterpolate( true ); - } - - const { v0 } = context.state; - return v0 + ( context.value - v0 ) * Math.pow( 2.0, context.params.note / 12.0 ); - } -}; - -if ( process.env.DEV ) { - transpose.name = 'Transpose'; - transpose.description = 'I probably don\'t need it...'; - transpose.params = { - note: { name: 'Note', type: 'float', default: 0.0 }, - }; -} diff --git a/src/automaton.json b/src/automaton.json deleted file mode 100644 index 820a649..0000000 --- a/src/automaton.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"4.1.1","resolution":400,"curves":[{"nodes":[[0,1,0,0,0.16140350877192983],[1,0,-0.47719298245614045]]},{"nodes":[[],[0.6666666666666666,1,-0.4560629631300563,-0.1852941176470587],[0.6666666666666666,0,0,0,0.26644908616188,0.1029411764705882],[2,1.1900000000000002,-0.1],[2,0.00686274509803933,0,0,0.10652741514360319],[2.6666666666666665,0.7000000000000001],[2.6666666666666665,0,0,0,0.1391644908616188,0.5215686274509802],[3.333333333333333,0.9,-0.5014360313315928,-0.22647058823529403],[3.333333333333333,0,0,0,0.3974946346535474,0.10043744264185422],[4.666666666666666,1.2000000000000002,0,0,0.1],[4.666666666666666],[5.333333333333333,0.7000000000000001,-0.24079400848586707,-0.49736814906842436],[5.333333333333333],[6,0.8,-0.4356422056174482,-0.17156862745098037],[6,0,0,0,0.32852235276081576,0.05490196078431372],[7.333333333333333,1.1441176470588237,-0.1,0,0.1],[7.333333333333333],[8,0.3333],[8,0,0,0,0.08806743643105143,0.4254901960784307],[8.666666666666666,0.9,-0.3995834676293276,-0.08230605476940031],[8.666666666666666],[9.4,1.1,-0.2785205844025618,-0.17156862745098012,0.2785205844025618,0.17156862745098012],[10,1.3],[10],[10.666666666666666,0.6000000000000001,-0.11225401796276425,-0.5783350570563074]],"fxs":[{"def":"repeat","params":{"interval":0.2299999999999996},"time":7.333333333333333,"length":0.6666666666666667}]},{"nodes":[[0,0,0,0,0.12284595300261082,0.061764705882352944],[0.6666666666666666,0.4,-0.1],[0.6666666666666666,0.06568627450980391],[2,0.2],[2.236344893790143,0.4,-0.1,0,0.1],[2.6666666666666665,0,-0.34575086532310695,0,0.04271204452939744],[2.769918291305192,0.1,-0.05130523784998782,0,0.09999999999999999],[3.333333333333333,0.1],[3.6666666666666665,0.32774323388394533],[4.666666666666666,0.30000000000000004],[4.666666666666666,0.023323265139934546],[5.333333333333333,0.1],[5.333333333333333],[6,0.30000000000000004],[6,0.02745098039215696,0,0,0.09974597868276715,-0.006845312262542842],[7.333333333333333,0.1,-0.1],[7.333333333333333,0.7000000000000001],[8.666666666666666,0.7000000000000001],[8.666666666666666,1],[10,0.1],[10.666666666666666]]},{"nodes":[[0,0,0,0,0.1],[0.3333333333333333,1,-0.1,0,0.1],[0.6666666666666666,0,-0.1],[1.9166666666666665,1,-1.0007832898172324,0,0.06],[2],[2.025071712633245,1,-0.044516971279373374,0,0.1],[2.1623944411350506,0.5,-0.07221383357420871,0.2738348538091391,0.07221383357420871,-0.2738348538091391],[2.6666666666666665,0,-0.1,0,0.1],[3,1,-0.2864316909347707,0,0.24406085208595923],[3.333333333333333,0,-0.036443741726782705,0.4106336078810942],[3.6666666666666665,0.7544057184393509,-0.08631141286229893,-0.07178801363349067,0.13346814639852406,0.11100980502520727],[4.666666666666666,1,-0.33942558746736295,-0.018347344929083464,0.09208797505724492,-0.3264027483296351],[4.851079899134173,0.30000000000000004,-0.07486057061026631,-0.013179150760383026,0.1],[5.0444017511428605,0.9656862745098039,-0.1,0,0.1],[5.333333333333333,0.044689231228471016,-0.1,0,0.1],[5.666666666666666,1,-0.1,0,0.1],[6,0,-0.1],[7.333333333333333,1,-1.0426547051383652,0,0.1],[7.6000000000000005,0.7000000000000001,-0.1,0,0.1],[8,1],[8,0,-0.1,0,0.1],[8.166666666666666,1,-0.099988538641853,-0.006965859231865531],[8.489362746562259,1,0,0,0.09998887794379856,-0.006861981819672439],[8.666666666666666,0,-0.11262160793957762,0.041182622607896624],[8.9,1,-0.11617352813418727,-0.020588235294117612,0.11617352813418727,0.020588235294117612],[9.04400609908224,0.15784313725490162,-0.0988340957186134,-0.027450980392156817,0.0988340957186134,0.027450980392156817],[9.3,1,-0.09200304954112025,-0.041176470588235224,0.09200304954112025,0.041176470588235224],[9.5,0.2,-0.09449923761471994,-0.06176470588235285,0.09449923761471994,0.06176470588235285],[9.666666666666666,1,-0.08899847522943988,-0.027450980392156817,0.08899847522943988,0.027450980392156817],[10,0.30000000000000004,-0.06149466330303955,-0.06176470588235285,0.06149466330303955,0.06176470588235285],[10,1,-0.1,0,0.1],[10.666666666666666,0.1,-0.1,0,0.1]],"fxs":[{"def":"repeat","params":{"interval":0.2490000000000001},"time":2,"length":0.6666666666666665},{"def":"sine","params":{"amp":0.26,"freq":8.590000000000002,"offset":0},"time":3.934411837854859,"length":0.7322548288118069},{"def":"sine","params":{"amp":0.4400000000000004,"freq":5.889999999999998,"offset":0},"time":10.234266741175261,"length":0.4323999254914046},{"def":"hermitePatch","params":{},"time":3.821100533282267,"length":0.12610951070520438,"row":1},{"def":"hermitePatch","params":{},"time":10.18270758125172,"length":0.09198590579094379,"row":1}]},{"nodes":[[0,0,0,0,0.1],[0.6666666666666666,1,-0.1],[0.6666666666666666,0.04000000000000001],[2,0.019999999999999997],[2,0.4],[2.6666666666666665],[3.333333333333333,0.2,-0.1],[3.333333333333333,0.5],[4.666666666666666,0.6000000000000001],[4.666666666666666,0.059594068084455554],[5.333333333333333],[6,0.1],[7.333333333333333,0,-1.3219093627620064,-0.061764705882352944],[8],[8,0.8],[10,0.8],[10,0.1],[10.666666666666666]]},{"nodes":[[0,0,0,0,0.11631853785900784,0.15784313725490196],[0.3333333333333333,0.2,-0.1,-0.06862745098039215],[0.3333333333333333,0,0,0,0.10652741514360313,0.034313725490196074],[0.6257615317667536,0.4,-0.035197899213743125,-0.1178437887562426,0.05762038784328031,0.19291505927163513],[1.5833333333333333,1.6588235294117648,-0.14423846823324632,-0.08235294117647059],[1.5833333333333333,0,0,0,0.0706266318537859,0.12352941176470589],[1.8333333333333333,0.6000000000000001,-0.07923141560987097,-0.16655319476142408,0.05223508415950609,0.10980392156862741],[2,0.8,-0.07118673688066018,-0.08235294117647059]]},{"nodes":[[0,0.7000000000000001,0,0,0.14895561357702347,-0.7343137254901958],[0.6666666666666666,0.01999999999999999,-0.07958650842810296,0.0005266470222471706,0.7602446192333546,-0.005030759268204068],[1.75,0.2,-0.175065274151436,-0.0480392156862745],[2,1,-0.1]]},{"nodes":[[0,0.264705882352941,0,0,0.2664490861618798,-0.3705882352941175],[1.75,0,-0.1,0,0.1],[2,1,-0.1]]},{"nodes":[[0,0,0,0,0.1],[0.3333333333333333,0.9460784313725474,-0.1,0,0.1],[1.3333333333333333,0.3627450980392144,-0.11276290315437737,0.31798356313506776,0.058202350589290165,-0.16412659044332573],[1.6666666666666665,1,-0.1,0,0.1],[1.7304177545691903,0.1,-0.1,0,0.1],[2,1.4000000000000001,-0.05099116999738633,-0.5930547707442783]],"fxs":[{"def":"sine","params":{"amp":0.3999999999999999,"freq":17.779999999999987,"offset":0},"time":0.6103133159268926,"length":0.7230200174064406},{"def":"hermitePatch","params":{},"time":0.5580939947780674,"length":0.08289817232376029,"row":1},{"def":"hermitePatch","params":{},"time":1.2836814621409922,"length":0.11631853785900792,"row":1}]},{"nodes":[[0,1,0,0,0.06843643544269563,-0.8715686274509801],[0.6666666666666666,0,-0.47719298245614045]]},{"nodes":[[],[2,2]]},{"nodes":[[0,0.1],[1.3333333333333333,0.30000000000000004]]},{"nodes":[[],[1.3333333333333333]]},{"nodes":[[0,0,0,0,0.07564543093234954,0.8647058823529409],[1.3333333333333333,1]]},{"nodes":[[],[0.3333333333333333,0.333],[0.3333333333333333,0,0,0,0.04050107306929012,0.096078431372549],[0.5833333333333333,0.30000000000000004,-0.10502788587794674,-0.054901960784313704],[1.3333333333333333]],"fxs":[{"def":"repeat","params":{"interval":0.2499999999999999},"time":0.3333333333333333,"length":1}]},{"nodes":[[0,0,0,0,0.041253263707571805],[0.1,0.472549019607836,-0.044516971279373374,-0.2333333333333331,0.037233176309202774,0.19515571003904697],[1.3333333333333333,1,-1.2945169712793734]]},{"nodes":[[0,0,0,0,0.1],[0.8,0.9,-0.10634811016391839,-0.09574850838471399,0.10634811016391839,0.09574850838471399],[1,1,-0.034837955875665044,-0.008249475331448328]]},{"nodes":[[0,1,0,0,0.08905168734696595,-0.6204705716763121],[0.8,0.1,-0.3657976094933656,0.05238364149449456,0.3657976094933656,-0.05238364149449456],[4,0,-0.5779474714155504]]},{"nodes":[[0,0,0,0,0.33333333333333337],[0.5833333333333333,0.13137254901960788,-0.06553651288762144,-0.14663596634864273,0.06553651288762144,0.14663596634864273],[0.6673629242819844,0.7480392156862745,-0.06736292428198434,-0.16470588235294117,0.06736292428198434,0.16470588235294117],[1.563751087902524,0.9519607843137257,-0.20443864229765013,-0.02745098039215686,0.20443864229765013,0.02745098039215686],[4,1,-0.5779474714155504]]},{"nodes":[[0,0,0,0,0.3154046997389034],[1.3333333333333333,1,-0.29908616187989556]]},{"nodes":[[],[1.3333333333333333,1]]},{"nodes":[[0,1,0,0,0.08905168734696595,-0.6204705716763121],[4,0,-3.146485330423383]]},{"nodes":[[0,1,0,0,0.15000000000000002],[0.25,1,-0.1,0,0.047780678851174936],[0.3333333333333333,0,-0.006527415143603133,0.3068670573880632,0.04083550913838122,0.1415436161688415],[0.4601827676240209,0,-0.031462140992167105,0.14076447719138005,0.031462140992167105,0.08154620354285587],[0.5515665796344648,0,-0.024934725848563967,0.05959145643516391,0.03472584856396867,0.040773101771427935],[0.6364229765013054,0,-0.024934725848563963,0.02509113955164797],[1,0,0,0,0.35333333333333333],[2.333333333333333,1,-0.3643603133159269,0,0.1]]},{"nodes":[[0,0,0,0,0.3317232375979112],[2,1,-1.3746781892076712]]},{"nodes":[[0,0,0,0,0.28276762402088773],[2.6666666666666665,1,-0.4673674842468357]]},{"nodes":[[0,0,0,0,0.429634464751958],[2.6666666666666665,0.99,-1.447911227154047]]},{"nodes":[[0,1,0,0,0.03472584856396867,-0.3705882352941176],[0.6666666666666666,0,-0.6417754569190601]]},{"nodes":[[0,0.4166666666666666,0,0,0.1],[0.6666666666666666,0,-0.664621409921671]]},{"nodes":[[0,0,0,0,0.1],[1.0065274151436032,0.9480392156862747,-0.791906005221932,-0.19215686274509805,0.17102946263472904,0.04150048712872081],[1.3333333333333333,1,-0.1]]},{"nodes":[[0,0,0,0,0.09780980358890974,0.020588235294117938],[0.3333333333333333,1,-0.04311987540653206,-0.9333333333333332]]},{"nodes":[[0,0.2],[1.3333333333333333,1.8,-1.0186386106576615,-0.609915244226372]]},{"nodes":[[0,0,0,0,0.011879895561357705,0.5490196078431372],[1.3333333333333333,1,-1.2292428198433418]]},{"nodes":[[0,0,0,0,0.1],[1,0,-0.1]]},{"nodes":[[0,0,0,0,0.9453002610966057],[4,1]]},{"nodes":[[0,0.9539215686274509,0,0,0.11305483028720623,-0.5970588235294118],[0.3333333333333333,0.1294117647058824,-0.07715404699738904,0.05490196078431372,0.07715404699738904,-0.05490196078431372],[1.3333333333333333,0,-1.133333333333333]]},{"nodes":[[0,0,0,0,3.415926892950391],[4,1]]},{"nodes":[[0,0.9539215686274509,0,0,0.15548302872062658,-0.6039215686274509],[1.3333333333333333,0,-0.6862053959965185]]},{"nodes":[[0,0.9539215686274509,0,0,0.06736292428198429,-0.6862745098039215],[1.3333333333333333,0,-1.208398607484769]]},{"nodes":[[],[0.16666666666666666,0.16642898215255936],[0.16666666666666666],[0.3333333333333333,0.1728044353004796],[0.3333333333333333,0,0,0,0.04050107306929012,0.096078431372549],[0.5833333333333333,0.30000000000000004,-0.10502788587794674,-0.054901960784313704],[1.3333333333333333]],"fxs":[{"def":"repeat","params":{"interval":0.2499999999999999},"time":0.3333333333333333,"length":1}]},{"nodes":[[],[0.16666666666666666,0.16642898215255936],[0.16666666666666666],[0.3333333333333333,0.1728044353004796],[0.3333333333333333,0,0,0,0.3126188615546539,0.15175152819068202],[1.1666666666666665,1,-0.1572879554706029,-0.28764433356035396],[1.1666666666666665,0.3653790156299723],[1.3333333333333333]]},{"nodes":[[],[0.16666666666666666,0.333],[0.16666666666666666],[0.3333333333333333,0.659941132909589],[0.3333333333333333,0,0,0,0.04050107306929012,0.096078431372549],[0.5833333333333333,0.30000000000000004,-0.10502788587794674,-0.054901960784313704],[1],[1.0833333333333333,0.10984958946310308,-0.05834560450044708,-0.037115397878755355],[1.3333333333333333]],"fxs":[{"def":"repeat","params":{"interval":0.2499999999999999},"time":0.3333333333333333,"length":0.6624660750216953},{"def":"repeat","params":{"interval":0.08199999999999981},"time":1,"length":0.33333333333333326},{"def":"repeat","params":{"interval":0.040999999999999204},"time":1.1666666666666665,"length":0.16666666666666674,"row":1}]},{"nodes":[[0,0.1],[0.3333333333333333,1.2904533929940294],[1.3333333333333333,0.053457044213489124,-0.8632620739919382,0.12473310316480792]]},{"nodes":[[0,1],[0.3333333333333333,0.43235294117647044],[0.3333333333333333,1,0,0,0.04376478064109168,-0.28137254901960784],[0.5833333333333333,0.44607843137254904,-0.11808271616515305,0.10980392156862744],[1.3333333333333333]],"fxs":[{"def":"repeat","params":{"interval":0.2499999999999999},"time":0.3333333333333333,"length":1}]},{"nodes":[[0,0.9539215686274509,0,0,0.034725848563968625,-9.752547353570001e-17],[0.6666666666666666,0,-0.343516100957354]]},{"nodes":[[],[0.3333333333333333],[0.3333333333333333,-0.05198601764452032],[0.6666666666666666,-0.05003067313800835],[0.6666666666666666,0.08137254901960772],[1,0.048075328631496494],[1,-0.06985411519380896],[1.3333333333333333,0.0678987706872971],[1.3333333333333333,-0.04483877862480479],[1.6666666666666665,-0.059133256664235745],[1.6666666666666665,0.026633611572350058],[2,0.030207231082207797],[2,0.17315201147651754],[2.333333333333333,0.1910201090258063],[2.333333333333333,-0.059133256664235745],[2.6666666666666665,-0.06075153166758168]]},{"nodes":[[],[0.3333333333333333],[0.3333333333333333,0.5848468902973432],[0.6666666666666666,0.6616434679226759],[0.6666666666666666,-0.8860315941263585],[1,-0.808569470793401],[1,1],[1.3333333333333333,1.0695142284764083],[1.3333333333333333,-2],[1.6666666666666665,-2.2305568969182348],[1.6666666666666665,0.026633611572350058],[2,0.030207231082207797],[2,1.5],[2.333333333333333,1.7457274844900992],[2.333333333333333,-0.6390158901210896],[2.6666666666666665,-0.5],[2.6666666666666665,3.188286829112519],[3,3.409441685547314]]},{"nodes":[[0,3,0,0,0.520892711478413],[16.400000000000002,65]]},{"nodes":[[0,1],[1,1,0,0,0.054029590948651],[1.3333333333333333,0,-0.2860313315926893]]},{"nodes":[[0,0,0,0,0.1],[1,0,-0.1]]},{"nodes":[[0,0,0,0,0.1],[0.6666666666666666,1,-0.1,0,0.1],[4.666666666666666,1,-0.1,0,0.1],[5.333333333333333,0,-0.1]]},{"nodes":[[0,1],[0.6666666666666666,0,-0.37741514360313316]]}],"channels":[["EnvironmentMap/accumulate",{"items":[{},{"time":5.333333333333333,"length":1,"value":0.1,"curve":26,"amp":0.9},{"time":48,"length":1,"value":0.1,"curve":26,"amp":0.9},{"time":90.66666666666666,"length":1,"value":0.1,"curve":26,"amp":0.9},{"time":110.66666666666666,"length":1,"value":0.1,"curve":26,"amp":0.9},{"time":121.33333333333333,"length":1,"value":0.1,"curve":26,"amp":0.9},{"time":122.66666666666666,"length":1,"value":0.1,"curve":26,"amp":0.9},{"time":154,"length":1,"value":0.9,"curve":26,"amp":0.1}]}],["Glitch/amp",{"items":[{},{"time":48,"length":1,"curve":0},{"time":50.666666666666664,"length":1,"curve":0},{"time":53.333333333333336,"length":1,"curve":0},{"time":56,"length":1,"curve":0},{"time":58.666666666666664,"length":1,"curve":0},{"time":61.333333333333336,"length":1,"curve":0},{"time":64,"length":1,"curve":0},{"time":66.66666666666666,"length":1,"curve":0},{"time":69.33333333333333,"length":1,"curve":0},{"time":71.99999999999999,"length":1,"curve":0},{"time":74.66666666666666,"length":1,"curve":0},{"time":77.33333333333333,"length":1,"curve":0},{"time":79.99999999999999,"length":1,"curve":0},{"time":82.66666666666666,"length":1,"curve":0},{"time":85.33333333333333,"length":1,"curve":0},{"time":88,"length":1,"curve":0},{"time":149.33333333333331,"length":4,"curve":33,"amp":0.5000000000000002},{"time":153.33333333333331,"length":1.3333333333333428,"value":0.53,"reset":true}]}],["PixelSorter/amp",{"items":[{},{"time":48,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":50.666666666666664,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":53.333333333333336,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":56,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":58.666666666666664,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":61.333333333333336,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":64,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":66.66666666666666,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":69.33333333333333,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":71.99999999999999,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":74.66666666666666,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":77.33333333333333,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":79.99999999999999,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":82.66666666666666,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":85.33333333333333,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":87.99999999999999,"length":1.3333333333333357,"curve":9,"speed":0.4999999999999975},{"time":90.30000000000001,"length":0.3333333333333286,"curve":29,"speed":1.0000000000000153,"amp":-0.4},{"time":90.66666666666666,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":93.33333333333333,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":96,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":97.33333333333333},{"time":98.66666666666667,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":101.33333333333333,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":104,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":106.66666666666667,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":109.33333333333333,"length":0.3333333333333428,"curve":9,"speed":1.999999999999927},{"time":153.33333333333331,"length":0.6666666666666856,"value":0.53},{"time":154,"length":0.6666666666666572,"value":0.08000000000000004,"reset":true}]}],["Serial/enable",{"items":[{},{"time":91.99999999999999,"length":1.3333333333333428},{"time":94.66666666666666,"length":1.3333333333333428},{"time":97.33333333333333,"length":1.3333333333333428},{"time":99.99999999999999,"length":1.3333333333333428},{"time":102.66666666666666,"length":1.3333333333333428},{"time":105.33333333333333,"length":1.3333333333333428},{"time":107.99999999999999,"length":1.3333333333333428},{"time":110.66666666666666,"length":1.3333333333333428},{"time":153.33333333333331,"length":1.3333333333333428}]}],["SceneBegin/active",{"items":[{},{"time":5.333333333333333,"length":42.666666666666664}]}],["Sync/first/clap",{"items":[{},{"time":27.666666666666664,"length":1.3333333333333321,"curve":15},{"time":28.999999999999996,"length":1.3333333333333321,"value":1,"curve":15},{"time":30.33333333333333,"length":1.3333333333333321,"value":2,"curve":15},{"time":31.66666666666666,"length":1.3333333333333321,"value":3,"curve":15},{"time":32.99999999999999,"length":1.3333333333333321,"value":4,"curve":15},{"time":34.33333333333333,"length":1.3333333333333321,"value":5,"curve":15},{"time":35.66666666666666,"length":1.3333333333333321,"value":6,"curve":15},{"time":36.99999999999999,"length":1.3333333333333321,"value":7,"curve":15},{"time":38.33333333333332,"length":1.3333333333333321,"value":8,"curve":15},{"time":39.66666666666665,"length":1.3333333333333321,"value":9,"curve":15},{"time":40.99999999999998,"length":1.3333333333333321,"value":10,"curve":15},{"time":42.33333333333331,"length":1.3333333333333321,"value":11,"curve":15}]}],["Condition/hahaRatio",{"items":[{},{"time":42.666666666666664,"length":4,"curve":25},{"time":159.75338772105422,"length":1,"value":0.5,"curve":26,"amp":0.16}]}],["Condition/phaseWidth",{"items":[{"value":0.1},{"time":27.666666666666664,"length":20.333333333333332,"value":0.1,"curve":16,"speed":0.049180327868852465,"amp":0.5888750576601328}]}],["SceneNeuro/active",{"items":[{},{"time":48,"length":42.66666666666666}]}],["sufferText/push",{"items":[{"time":48},{"time":50.666666666666664,"value":1},{"time":53.333333333333336,"value":2},{"time":56,"value":3},{"time":58.666666666666664,"value":4},{"time":61.333333333333336,"value":5},{"time":64,"value":6},{"time":66.66666666666666,"value":7},{"time":69.33333333333333,"value":8},{"time":71.99999999999999,"value":9},{"time":74.66666666666666,"value":10},{"time":77.33333333333333,"value":11},{"time":79.99999999999999,"value":12},{"time":82.66666666666666,"value":13},{"time":85.33333333333333,"value":14},{"time":87.99999999999999,"value":15}]}],["IFSPistons/group0/rot",{"items":[{},{"time":48.666666666666664,"length":2,"curve":23},{"time":54,"length":2,"value":1,"curve":23},{"time":59.333333333333336,"length":2,"value":2,"curve":23},{"time":64.66666666666666,"length":2,"value":3,"curve":23},{"time":69.99999999999999,"length":2,"value":4,"curve":23},{"time":75.33333333333333,"length":2,"value":5,"curve":23},{"time":80.66666666666666,"length":2,"value":6,"curve":23},{"time":85.99999999999999,"length":2,"value":7,"curve":23}]}],["IFSPistons/group1/rot",{"items":[{},{"time":51.333333333333336,"length":2,"curve":23},{"time":56.666666666666664,"length":2,"value":1,"curve":23},{"time":62,"length":2,"value":2,"curve":23},{"time":67.33333333333333,"length":2,"value":3,"curve":23},{"time":72.66666666666666,"length":2,"value":4,"curve":23},{"time":77.99999999999999,"length":2,"value":5,"curve":23},{"time":83.33333333333333,"length":2,"value":6,"curve":23},{"time":88.66666666666666,"length":2,"value":7,"curve":23}]}],["IFSPistons/group0/pos",{"items":[{"value":3},{"time":47.666666666666664,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":53,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":58.333333333333336,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":63.666666666666664,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":69.03333333333333,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":74.33333333333333,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":79.66666666666666,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":84.99999999999999,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998}]}],["IFSPistons/group1/pos",{"items":[{"value":3},{"time":50.333333333333336,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":55.666666666666664,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":61,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":66.33333333333333,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":71.66666666666666,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":76.99999999999999,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":82.33333333333333,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998},{"time":87.66666666666666,"length":2.3333333333333357,"value":1.2000000000000002,"curve":22,"amp":1.7999999999999998}]}],["Music/NEURO_TIME",{"items":[{},{"time":48,"length":10.666666666666664,"curve":1},{"time":58.666666666666664,"length":8.666666666666671,"curve":1},{"time":67.33333333333333,"length":1.999999999999993,"curve":5},{"time":69.33333333333333,"length":10.666666666666664,"curve":1},{"time":79.99999999999999,"length":8.666666666666671,"curve":1},{"time":88.66666666666666,"length":0.6666666666666714,"curve":5},{"time":89.33333333333333,"length":1.3333333333333286,"curve":30},{"time":90.66666666666666,"length":1.3333333333333286,"curve":10,"offset":1.4210854715202004e-14},{"time":91.99999999999999,"length":1.3333333333333286,"curve":14},{"time":93.33333333333331,"length":1.3333333333333428,"curve":10},{"time":94.66666666666666,"length":1.3333333333333286,"curve":39},{"time":95.99999999999999,"length":1.3333333333333428,"curve":10},{"time":97.33333333333333,"length":1.3333333333333286,"curve":14},{"time":98.66666666666666,"length":1.3333333333333428,"curve":10},{"time":100,"length":1.3333333333333286,"curve":40},{"time":101.33333333333333,"length":1.3333333333333428,"curve":10},{"time":102.66666666666667,"length":1.3333333333333144,"curve":14},{"time":103.99999999999999,"length":1.3333333333333428,"curve":10},{"time":105.33333333333333,"length":1.3333333333333286,"curve":39},{"time":106.66666666666666,"length":1.3333333333333428,"curve":10},{"time":108,"length":1.3333333333333286,"curve":14},{"time":109.33333333333333,"length":1.3333333333333428,"curve":10}]}],["Music/NEURO_DETUNE",{"items":[{},{"time":48,"length":10.666666666666664,"curve":2},{"time":58.666666666666664,"length":8.666666666666671,"curve":2},{"time":67.33333333333333,"length":1.999999999999993,"curve":6},{"time":69.33333333333333,"length":10.666666666666664,"curve":2},{"time":79.99999999999999,"length":8.666666666666671,"curve":2},{"time":88.66666666666666,"length":2,"curve":6,"speed":0.8333333333333358},{"time":90.66666666666666,"length":1.3333333333333286,"curve":11},{"time":93.33333333333333,"length":1.3333333333333286,"curve":11},{"time":95,"length":0.9999999999999858,"curve":2,"offset":2},{"time":95.99999999999999,"length":1.3333333333333286,"curve":11},{"time":97.33333333333331,"length":1.3333333333333428,"value":0.77},{"time":98.66666666666666,"length":1.3333333333333286,"curve":11},{"time":99.99999999999999,"length":1.3333333333333428,"curve":41},{"time":101.33333333333333,"length":1.3333333333333286,"curve":11},{"time":103.99999999999999,"length":1.3333333333333286,"curve":11},{"time":105.66666666666667,"length":0.9999999999999858,"curve":2,"offset":2},{"time":106.66666666666666,"length":1.3333333333333286,"curve":11},{"time":107.99999999999999,"length":1.3333333333333428,"value":0.77},{"time":109.33333333333333,"length":1.3333333333333286,"curve":11}]}],["Music/NEURO_DETUNE_PHASE",{"items":[{},{"time":48,"length":10.666666666666664,"curve":4},{"time":58.666666666666664,"length":8.666666666666671,"curve":4},{"time":67.33333333333333,"length":1.999999999999993,"curve":7},{"time":69.33333333333333,"length":10.666666666666664,"curve":4},{"time":79.99999999999999,"length":8.666666666666671,"curve":4},{"time":88.66666666666666,"length":2,"curve":7,"speed":0.8333333333333358},{"time":90.66666666666666,"length":1.3333333333333428,"curve":12},{"time":93.33333333333333,"length":1.3333333333333428,"curve":12},{"time":95,"length":0.9999999999999858,"curve":4,"offset":1.9999999999999858},{"time":95.99999999999999,"length":1.3333333333333428,"curve":12},{"time":98.66666666666666,"length":1.3333333333333428,"curve":12},{"time":101.33333333333333,"length":1.3333333333333428,"curve":12},{"time":103.99999999999999,"length":1.3333333333333428,"curve":12},{"time":105.66666666666667,"length":0.9999999999999858,"curve":4,"offset":1.9999999999999858},{"time":106.66666666666666,"length":1.3333333333333428,"curve":12},{"time":109.33333333333333,"length":1.3333333333333428,"curve":12}]}],["Music/NEURO_WUB_AMP",{"items":[{},{"time":48,"length":10.668578038364203,"curve":3},{"time":58.6685780383642,"length":8.664755294969133,"curve":3},{"time":67.33333333333333,"length":2.0038227433950624,"curve":8},{"time":69.33715607672839,"length":10.668578038364203,"curve":3},{"time":80.0057341150926,"length":8.660932551574064,"curve":3},{"time":88.66666666666666,"length":2,"curve":8,"speed":0.8028871529270708},{"time":90.66666666666666,"length":1.3333333333333333,"curve":13},{"time":93.33333333333333,"length":1.3333333333333333,"curve":13},{"time":94.66666666666666,"length":1.3333333333333286,"curve":3,"offset":1.6666666666666856},{"time":95.99999999999999,"length":1.3333333333333333,"curve":13},{"time":98.66666666666666,"length":1.3333333333333333,"curve":13},{"time":101.33333333333333,"length":1.3333333333333333,"curve":13},{"time":103.99999999999999,"length":1.3333333333333333,"curve":13},{"time":105.33333333333331,"length":1.0000000000000142,"curve":8,"offset":0.26762905097568646,"speed":0.8028871529270708},{"time":106.66666666666666,"length":1.3333333333333333,"curve":13},{"time":109.33333333333333,"length":1.3333333333333333,"curve":13}]}],["Music/NEURO_WUB_FREQ",{"items":[{},{"time":48,"length":2,"value":1},{"time":50,"length":0.6666666666666643,"value":0.49999999999999967},{"time":50.666666666666664,"length":0.6666666666666714,"value":1},{"time":51.333333333333336,"length":1.3333333333333286,"value":2},{"time":52.666666666666664,"length":0.6666666666666714,"value":2.5},{"time":53.333333333333336,"length":0.6666666666666643,"value":1},{"time":54,"length":1.3333333333333357,"value":1},{"time":55.333333333333336,"length":0.6666666666666643,"value":2},{"time":56,"length":2,"value":1},{"time":58,"length":0.6666666666666643,"value":2},{"time":58.666666666666664,"length":0.6666666666666714,"value":1},{"time":59.333333333333336,"length":1.3333333333333286,"value":2.1000000000000014},{"time":60.666666666666664,"length":0.6666666666666714,"value":0.5},{"time":61.333333333333336,"length":0.6666666666666643,"value":7},{"time":62,"length":1.3333333333333357,"value":3},{"time":63.333333333333336,"length":0.6666666666666714,"value":1},{"time":64,"length":0.6666666666666714,"value":0.9600000000000006},{"time":64.66666666666667,"length":1.3333333333333215,"value":6},{"time":66,"length":0.6666666666666785,"value":10.840000000000003},{"time":66.66666666666667,"length":0.6666666666666572,"value":1},{"time":67.33333333333333,"length":1.3333333333333428,"value":3.989999999999996},{"time":68.66666666666667,"length":0.6666666666666572,"value":4.109999999999999},{"time":69.33333333333333,"length":2,"value":1},{"time":71.33333333333333,"length":0.6666666666666643,"value":0.49999999999999967},{"time":71.99999999999999,"length":0.6666666666666714,"value":1},{"time":72.66666666666666,"length":1.3333333333333286,"value":2},{"time":73.99999999999999,"length":0.6666666666666714,"value":2.5},{"time":74.66666666666666,"length":0.6666666666666643,"value":1},{"time":75.33333333333333,"length":1.3333333333333357,"value":1},{"time":76.66666666666667,"length":0.6666666666666643,"value":2},{"time":77.33333333333333,"length":2,"value":1},{"time":79.33333333333333,"length":0.6666666666666643,"value":2},{"time":79.99999999999999,"length":0.6666666666666714,"value":1},{"time":80.66666666666666,"length":1.3333333333333286,"value":2.1000000000000014},{"time":81.99999999999999,"length":0.6666666666666714,"value":0.5},{"time":82.66666666666666,"length":0.6666666666666643,"value":7},{"time":83.33333333333333,"length":1.3333333333333357,"value":3},{"time":84.66666666666667,"length":0.6666666666666714,"value":1},{"time":85.33333333333334,"length":0.6666666666666714,"value":0.9600000000000006},{"time":86.00000000000001,"length":1.3333333333333144,"value":6},{"time":87.33333333333333,"length":0.6666666666666856,"value":10.840000000000003},{"time":88.00000000000001,"length":0.6666666666666572,"value":1},{"time":88.66666666666667,"length":1.3333333333333428,"value":3.9899999999999993},{"time":90.00000000000001,"length":0.6666666666666572,"value":4.109999999999999},{"time":90.66666666666667,"length":1.3333333333333144,"value":1},{"time":93.33333333333333,"length":1.3333333333333144,"value":1},{"time":94.83333333333333,"length":0.1666666666666714,"value":7.320000000000001},{"time":95,"length":0.8333333333333286,"value":0.3800000000000011},{"time":95.83333333333333,"length":1.4999999999999716,"value":1},{"time":97.3333333333333,"length":1.059777391433414,"value":2},{"time":98.66666666666666,"length":1.3333333333333144,"value":1},{"time":99.99999999999997,"length":1.333333333333357,"value":0.7099999999999999},{"time":101.33333333333333,"length":1.3333333333333144,"value":1},{"time":103.99999999999999,"length":1.3333333333333144,"value":1},{"time":105.5,"length":0.1666666666666572,"value":9.219999999999999},{"time":105.66666666666666,"length":1,"value":3.6300000000000145},{"time":106.66666666666666,"length":1.3333333333333144,"value":1},{"time":107.99999999999997,"length":1.333333333333357,"value":6.199999999999992},{"time":109.33333333333333,"length":1.3333333333333144,"value":1}]}],["Trails/active",{"items":[{}]}],["SceneDynamic/active",{"items":[{},{"time":90.66666666666666,"length":20}]}],["SceneCrystals/active",{"items":[{},{"time":109.33333333333333,"length":44.66666666666667}]}],["FlickyParticles/active",{"items":[{},{"time":48,"length":62.66666666666666},{"time":112,"length":42}]}],["SphereParticles/active",{"items":[{},{"time":112,"length":41.333333333333314}]}],["SceneCrystals/ChaosTorus/active",{"items":[{"time":-8.200000000000001},{},{"time":121.33333333333333,"length":1.3333333333333286}]}],["Phantom/amp",{"items":[{},{"time":112,"length":1.3333333333333286,"curve":31}]}],["SceneCrystals/light/amp",{"items":[{},{"time":112,"length":1.3333333333333286,"curve":31}]}],["IFSAsUsual/active",{"items":[{},{"time":98.66666666666666,"length":2.6666666666666856}]}],["IFSAsUsual/ifsSeed",{"items":[{},{"time":98.66666666666667,"length":1.3333333333333333,"value":3.75,"curve":20,"amp":0.12999999999999956},{"time":100,"value":6.387075950831853},{"time":100.16666666666666,"length":0.1666666666666572,"value":6.379868935734952,"curve":15,"speed":4.000000000000053,"amp":0.6201310642650482},{"time":100.33333333333331,"length":0.2500000000000142,"value":7,"curve":15,"speed":4.000000000000053,"amp":0.5},{"time":100.58333333333333,"length":0.2500000000000142,"value":7.5,"curve":15,"speed":4.000000000000053,"amp":0.5},{"time":100.83333333333334,"length":0.1666666666666572,"value":8,"curve":15,"speed":4.000000000000053,"amp":0.5},{"time":101,"length":0.0833333333333286,"value":-0.07450980392156825,"curve":15,"speed":4.000000000000053,"amp":0.07450980392156825},{"time":101.08333333333333,"length":0.0833333333333286,"value":-0.07450980392156825,"curve":15,"speed":4.000000000000053,"amp":0.07450980392156825},{"time":101.16666666666666,"length":0.041666666666671404,"value":-0.07450980392156825,"curve":15,"speed":4.000000000000053,"amp":0.07450980392156825},{"time":101.20833333333333,"length":0.041666666666671404,"value":-0.07450980392156825,"curve":15,"speed":4.000000000000053,"amp":0.07450980392156825},{"time":101.25,"length":0.041666666666671404,"value":-0.07450980392156825,"curve":15,"speed":4.000000000000053,"amp":0.07450980392156825},{"time":101.29166666666667,"length":0.041666666666671404,"value":-0.07450980392156825,"curve":15,"speed":4.000000000000053,"amp":0.07450980392156825}]}],["FlashyBall/active",{"items":[{},{"time":96,"length":2.6666666666666856},{"time":106.66666666666666,"length":2.6666666666666856}]}],["FlashyBall/distortAmp",{"items":[{"time":96},{"time":97.33333333333333,"length":1.3333333333333286,"curve":42,"amp":2.1099999999999985},{"time":106.66666666666666},{"time":108,"length":1.3333333333333286,"curve":42,"amp":2.1199999999999983}]}],["Tetrahedron/active",{"items":[{},{"time":93.33333333333333,"length":2.6666666666666856},{"time":104,"length":2.6666666666666856}]}],["Tetrahedron/distortAmp",{"items":[{"time":93.33333333333333},{"time":94.66666666666666,"length":1.3333333333333286,"curve":3,"offset":1.6666666666666856},{"time":104},{"time":105.33333333333333,"length":1.0000000000000142,"curve":8,"offset":0.26762905097568646,"speed":0.8028871529270708}]}],["NoiseVoxels/active",{"items":[{},{"time":90.66666666666666,"length":2.6666666666666856},{"time":101.33333333333333,"length":2.6666666666666856}]}],["NoiseVoxels/phase",{"items":[{"time":90.66666666666666,"length":1.3333333333333333,"curve":20},{"time":91.99999999999999,"length":1.3333333333333333,"curve":20,"amp":3},{"time":101.33333333333333,"length":1.3333333333333333,"curve":20},{"time":102.66666666666666,"length":1.3333333333333333,"curve":20,"amp":3}]}],["ScenePsy/active",{"items":[{},{"time":154,"length":38}]}],["Camera/pos/x",{"items":[{},{"time":48,"value":0.029999999999999923},{"time":50.666666666666664,"value":0.22},{"time":53.333333333333336,"value":-0.3300000000000002},{"time":58.666666666666664,"value":0.030000000000000478},{"time":61.333333333333336,"value":0.4300000000000005},{"time":64,"value":-0.3099999999999998},{"time":66.66666666666666,"value":0.04000000000000473},{"time":69.33333333333333,"value":0.2500000000000004},{"time":71.99999999999999,"value":0.22},{"time":74.66666666666666,"value":0.18999999999999975},{"time":77.33333333333333,"value":-0.33000000000000024},{"time":79.99999999999999,"value":0.030000000000000478},{"time":82.66666666666666,"value":-0.32999999999999946},{"time":85.33333333333333,"value":6.349087922075114e-16},{"time":88},{"time":90.66666666666666},{"time":117.33333333333333,"value":0.2599999999999958},{"time":122.66666666666666,"value":-0.25000000000000006},{"time":128},{"time":154,"value":0.53}]}],["Camera/pos/y",{"items":[{},{"time":48},{"time":53.333333333333336,"value":0.18999999999999986},{"time":58.666666666666664},{"time":69.33333333333333},{"time":74.66666666666666,"value":-0.2599999999999998},{"time":79.99999999999999},{"time":87.99999999999999},{"time":90.66666666666666},{"time":104},{"time":117.33333333333333,"value":0.009999999999995882},{"time":122.66666666666666},{"time":128},{"time":149.33333333333331,"value":1.3599999999999999},{"time":154}]}],["Camera/pos/z",{"items":[{},{"time":48},{"time":64,"value":-0.12999999999999998},{"time":66.66666666666666,"value":0.04000000000000473},{"time":69.33333333333333},{"time":85.33333333333333,"value":-0.019999999999999588},{"time":87.99999999999999},{"time":90.66666666666666}]}],["Camera/rot/r",{"items":[{},{"time":5.333333333333333,"length":4,"value":5,"curve":17,"amp":10},{"time":26.033333333333335,"length":4,"value":5,"curve":18,"amp":-2},{"time":42.1,"length":4,"value":3,"curve":18,"amp":4},{"time":48,"value":3.316984746376379},{"time":50.666666666666664,"value":4.160000000000001},{"time":53.33333333333333,"value":2.9236224967058},{"time":56,"value":4.760000000000006},{"time":58.666666666666664,"value":3.490000000000002},{"time":61.333333333333336,"value":3.289999999999999},{"time":64,"value":2.519999999999998},{"time":66.66666666666666,"value":5.050000000000004},{"time":69.33333333333333,"value":4.170000000000001},{"time":71.99999999999999,"value":4.399999999999997},{"time":74.66666666666666,"value":2.699999999999999},{"time":77.33333333333333,"value":5.470000000000008},{"time":79.99999999999999,"value":3.4499999999999997},{"time":82.66666666666666,"value":4.43},{"time":85.33333333333333,"value":2.9000000000000017},{"time":88,"value":4.900000000000005},{"time":89.33333333333331,"length":1.3333333333333428,"value":4.9,"curve":28,"speed":0.4999999999999974,"amp":4.4999999999999964},{"time":90.66666666666666,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":91.99999999999999,"value":5.88},{"time":93.33333333333333,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":94.66666666666666,"value":2.4699999999999975},{"time":96,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":97.33333333333333,"value":7.749999999999996},{"time":98.66666666666666,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":99.99999999999999,"value":5},{"time":101.33333333333333,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":104,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":105.33333333333333,"value":2.4699999999999984},{"time":106.66666666666666,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":107.99999999999999,"value":7.589999999999998},{"time":109.33333333333333,"length":1.3333333333333286,"value":6,"curve":17,"speed":3.000000000000011,"amp":5},{"time":110.66666666666666,"value":4.339999999999998},{"time":111.33333333333333,"length":4,"value":4.34,"curve":18,"speed":1.0000000000000002,"amp":-1.2999999999999967},{"time":117.33333333333333,"value":2.939999999999995},{"time":121.33333333333333,"length":1.3333333333333286,"value":6.110000000000004,"curve":31,"amp":-0.99},{"time":122.66666666666666,"length":5.333333333333329,"value":3.4599999999999933,"curve":24,"speed":0.5000000000000013,"amp":-1.2000000000000026},{"time":127.99999999999999,"value":5.5899999999999945},{"time":130,"length":3.3333333333333144,"value":5.589999999999992,"curve":18,"speed":1.0000000000000002,"amp":-2},{"time":133.33333333333331,"value":2.6600000000000015},{"time":144,"value":2.05},{"time":149.33333333333331,"value":1.8299999999999976},{"time":152,"length":2,"value":1.8299999999999996,"curve":18,"speed":0.5,"amp":1.7899999999999974},{"time":154,"length":3.3333333333333144,"value":5,"curve":18,"offset":0.32538475665232625,"speed":0.5},{"time":157.33333333333331,"length":6.666666666666686,"value":6,"curve":19,"speed":0.19999999999999943,"amp":-3.170000000000002},{"time":165.16666666666666,"value":4.300000000000013},{"time":175.83333333333331,"length":16.166666666666686,"curve":46}]}],["Camera/rot/t",{"items":[{},{"time":26.666666666666664,"length":5.333333333333332,"curve":19,"speed":0.2499999999999999,"amp":0.30000000000000004},{"time":31.999999999999996,"length":5.333333333333332,"value":1.2000000000000002,"curve":19,"speed":0.2499999999999999,"amp":-0.9},{"time":37.333333333333336,"length":5.333333333333329,"value":-0.3,"curve":19,"speed":0.2499999999999999,"amp":0.30000000000000004},{"time":48,"value":0.12000000000000001},{"time":50.666666666666664,"value":-0.30999999999999495},{"time":53.333333333333336,"value":0.5200000000000048},{"time":56,"value":-0.029999999999995274},{"time":58.666666666666664,"value":0.2600000000000046},{"time":61.333333333333336,"value":-0.2899999999999953},{"time":64,"value":-0.06999999999999539},{"time":66.66666666666666,"value":0.2600000000000049},{"time":69.33333333333333,"value":0.12000000000000001},{"time":71.99999999999999,"value":0.7500000000000049},{"time":74.66666666666666,"value":-0.3599999999999952},{"time":77.33333333333333,"value":-1.1999999999999946},{"time":79.99999999999999,"value":0.2600000000000046},{"time":82.65764496093742,"value":-0.2899999999999953},{"time":85.33333333333333,"value":0.39000000000000457},{"time":87.99999999999999,"value":-0.029999999999995274},{"time":90.66666666666666},{"time":91.99999999999999,"value":0.5700000000000002},{"time":93.33333333333333},{"time":94.66666666666666,"value":0.10000000000000003},{"time":95.99999999999999},{"time":98.66666666666666},{"time":100,"value":-0.2799999999999997},{"time":101.33333333333333},{"time":102.66666666666666,"value":0.52},{"time":103.99999999999999},{"time":105.33333333333333,"value":-0.4100000000000001},{"time":106.66666666666666},{"time":108,"value":-0.1399999999999995},{"time":109.33333333333333},{"time":110.66666666666666,"value":0.14999999999999633},{"time":117.33333333333333,"value":0.5699999999999952},{"time":121.33333333333331,"length":1.3333333333333428,"value":0.37000000000000166,"curve":24,"speed":1.9999999999999891,"amp":-0.08000000000000007},{"time":122.66666666666666,"value":0.09999999999999977},{"time":128,"value":0.2},{"time":133.33333333333331,"value":0.4699999999999978},{"time":144,"value":-0.3700000000000031},{"time":149.33333333333331,"value":0.18000000000000063},{"time":151.86425044104683,"length":2.066666666666663,"value":0.18,"curve":18,"speed":0.5,"amp":-1.160000000000004},{"time":154},{"time":165.16666666666666,"length":2.666666666666657,"curve":44},{"time":167.83333333333331,"length":2.666666666666657,"curve":44},{"time":170.49999999999997,"length":2.666666666666657,"curve":44},{"time":173.16666666666663,"length":2.666666666666657,"curve":44},{"time":175.8333333333333,"length":0.16666666666671404}]}],["Camera/rot/p",{"items":[{},{"time":26.666666666666664,"length":5.333333333333332,"curve":19,"speed":0.2499999999999999,"amp":0.30000000000000004},{"time":32,"value":-2.3500000000000125},{"time":37.333333333333336,"length":5.333333333333329,"value":-0.3,"curve":19,"speed":0.2499999999999999,"amp":0.30000000000000004},{"time":48,"length":2.6666666666666643,"curve":24},{"time":50.666666666666664,"length":2.6666666666666714,"value":-0.9690196078431373,"curve":24},{"time":53.333333333333336,"length":2.6666666666666714,"value":-0.33999999999999997,"curve":24},{"time":56.00000000000001,"length":2.6666666666666714,"value":-0.39117647058823524,"curve":24},{"time":58.66666666666668,"length":2.6666666666666714,"value":-0.12117647058823516,"curve":24},{"time":61.33333333333335,"length":2.6666666666666714,"value":-1.4311764705882353,"curve":24},{"time":64.00000000000003,"length":2.6666666666666714,"value":-0.29117647058823515,"curve":24},{"time":66.66666666666669,"length":2.6666666666666714,"value":-0.7811764705882349,"curve":24},{"time":69.33333333333336,"length":2.6666666666666643,"curve":24},{"time":72.00000000000001,"length":2.6666666666666714,"value":-0.9690196078431373,"curve":24},{"time":74.66666666666669,"length":2.6666666666666714,"value":-0.51,"curve":24},{"time":77.33333333333336,"length":2.6666666666666714,"value":-0.5111764705882352,"curve":24},{"time":80.00000000000003,"length":2.6666666666666714,"value":-0.6411764705882351,"curve":24},{"time":82.6666666666667,"length":2.6666666666666714,"value":-1.3611764705882354,"curve":24},{"time":85.33333333333337,"length":2.6666666666666714,"value":-0.4911764705882345,"curve":24},{"time":88.00000000000004,"length":1.3333333333333286,"value":-1.5411764705882351,"curve":24},{"time":89.33333333333337,"length":1.333333333333286,"value":-1.016,"curve":28,"speed":0.5000000000000079,"amp":3},{"time":90.66666666666666},{"time":91.99999999999999,"length":1.3333333333333428,"curve":20,"amp":6},{"time":93.33333333333333},{"time":94.66666666666664,"length":1.3333333333333428,"curve":20,"amp":0.21000000000000407},{"time":95.99999999999999},{"time":97.33333333333331,"length":1.3333333333333428,"curve":20,"amp":6},{"time":98.66666666666666},{"time":100,"length":1.3333333333333286,"value":0.12000000000000002,"curve":20,"amp":0.6200000000000041},{"time":101.33333333333333},{"time":102.66666666666666,"length":1.3333333333333428,"value":-1.0699999999999998,"curve":20,"amp":6},{"time":104},{"time":105.33333333333331,"length":1.3333333333333428,"value":7.999999999999989,"curve":20,"amp":-0.582999999999996},{"time":106.66666666666666},{"time":107.99999999999999,"length":1.3333333333333428,"curve":20,"amp":6},{"time":109.33333333333333},{"time":110.66666666666666,"value":0.56},{"time":112,"length":5.333333333333329,"value":0.56,"curve":24,"speed":0.5000000000000013,"amp":-1.0400000000000003},{"time":117.33333333333333,"length":3.999999999999986,"value":0.6199999999999997,"curve":24,"speed":0.5000000000000012,"amp":-1.0400000000000003},{"time":121.33333333333331,"length":1.3333333333333428,"value":-0.3799999999999981,"curve":24,"speed":1.9999999999999891,"amp":0.56},{"time":122.66666666666666,"length":5.333333333333329,"value":0.37000000000000166,"curve":24,"speed":0.5000000000000013,"amp":-0.7100000000000002},{"time":127.99999999999999,"length":2.6666666666666714,"value":-0.71,"curve":24,"speed":0.9999999999999998,"amp":0.71},{"time":133.33333333333331,"length":10.666666666666686,"curve":20,"speed":0.12499999999999978,"amp":-14.000000000000476},{"time":144,"length":10,"curve":20,"speed":0.1093749999999997,"amp":-14.000000000000476},{"time":154,"value":1.2000000000000002},{"time":154.66666666666666,"length":10.5,"value":1.2000000000000002,"curve":33,"speed":0.37500000000000033,"amp":2.100000000000002},{"time":165.16666666666666,"length":3,"curve":45},{"time":168.16666666666666,"length":3,"curve":45},{"time":171.16666666666666,"length":3,"curve":45},{"time":174.16666666666666,"length":1.6666666666666572,"curve":45},{"time":175.83333333333331,"length":0.16666666666668561}]}],["Camera/roll",{"items":[{"time":5.333333333333334,"length":21.333333333333332,"value":-0.2500000000000003,"curve":21,"speed":0.1875},{"time":32,"value":-1.190000000000011},{"time":37.33333333333333,"length":5.333333333333329,"value":-0.3,"curve":19,"speed":0.2499999999999999,"amp":0.30000000000000004},{"time":48},{"time":53.333333333333336,"value":0.25},{"time":56},{"time":58.666666666666664,"value":-0.14},{"time":61.333333333333336,"value":-0.460000000000002},{"time":64},{"time":66.66666666666666},{"time":69.33333333333333,"value":0.54},{"time":71.99999999999999,"value":0.15},{"time":74.66666666666666,"value":-0.25},{"time":77.33333333333333,"value":0.5000000000000004},{"time":79.99999999999999,"value":0.33000000000000007},{"time":82.66666666666666,"value":0.23000000000000007},{"time":85.33333333333333,"value":2.380000000000001},{"time":88},{"time":89.33333333333331,"length":1.3333333333333428,"curve":28,"speed":0.4999999999999974,"amp":3},{"time":90.66666666666666},{"time":94.66666666666666,"value":0.06999999999999995},{"time":96},{"time":101.33333333333333},{"time":102.66666666666666,"value":-0.26000000000000006},{"time":104.00158889323498},{"time":105.33333333333333,"value":0.2599999999999987},{"time":106.66666666666666},{"time":108,"value":-0.33000000000000124},{"time":109.33333333333333},{"time":112,"length":5.333333333333329,"curve":24,"speed":0.5000000000000013,"amp":-0.2700000000000004},{"time":117.33333333333333,"value":0.32999999999999585},{"time":121.33333333333333,"value":-0.10000000000000413},{"time":122.66666666666666,"length":5.333333333333329,"value":0.10999999999999989,"curve":24,"speed":0.5000000000000013,"amp":0.049999999999999524},{"time":127.99999999999999},{"time":133.33333333333331,"value":0.4699999999999978},{"time":144,"value":-0.3300000000000022},{"time":154},{"time":154.66666666666666,"length":10.5,"curve":33,"speed":0.37500000000000033,"amp":2.100000000000002},{"time":165.16666666666666,"length":1.6666666666666572,"curve":45,"offset":1},{"time":166.83333333333331,"length":2.6666666666666856,"curve":45},{"time":169.5,"length":2.6666666666666856,"curve":45},{"time":172.16666666666669,"length":2.6666666666666856,"curve":45},{"time":174.83333333333337,"length":0.9999999999999432,"curve":45},{"time":175.83333333333331,"length":0.16666666666668561,"value":-0.27500000000000036}]}],["Rings/begin",{"items":[{},{"time":110.66666666666666,"length":1.3333333333333428,"curve":20}]}],["Camera/shake",{"items":[{},{"time":48,"length":1,"curve":27},{"time":50.666666666666664,"length":1,"curve":27},{"time":53.333333333333336,"length":1,"curve":27},{"time":56,"length":1,"curve":27},{"time":58.666666666666664,"length":1,"curve":27},{"time":61.333333333333336,"length":1,"curve":27},{"time":64,"length":1,"curve":27},{"time":66.66666666666666,"length":1,"curve":27},{"time":69.33333333333333,"length":1,"curve":27},{"time":71.99999999999999,"length":1,"curve":27},{"time":74.66666666666666,"length":1,"curve":27},{"time":77.33333333333333,"length":1,"curve":27},{"time":79.99999999999999,"length":1,"curve":27},{"time":82.66666666666666,"length":1,"curve":27},{"time":85.33333333333333,"length":1,"curve":27},{"time":88,"length":1,"curve":27},{"time":121.33333333333333,"length":1.3333333333333286,"value":0.01999999999999999,"reset":true},{"time":149.33333333333331,"length":4,"curve":33,"amp":0.020000000000000004},{"time":153.33333333333331,"length":1.3333333333333428,"curve":34,"amp":0.5499999999999999}]}],["Camera/fov",{"items":[{"value":0.5},{"time":48,"value":0.8},{"time":90.66666666666666,"value":0.5},{"time":110.66666666666666,"value":0.8},{"time":152.1,"length":1.9000000000000057,"value":0.8,"curve":18,"speed":0.5,"amp":0.3599999999999957},{"time":154,"value":0.9}]}],["DVi/amp",{"items":[{},{"time":112,"length":1.3333333333333286,"curve":31},{"time":149.33333333333331}]}],["DVi/offset",{"items":[{"time":112,"length":2.6666666666666856,"curve":31,"speed":0.4999999999999947,"amp":19.999999999999993}]}],["Post/colorPreset",{"items":[{},{"time":48,"value":1},{"time":112,"value":2}]}],["Greetings/active",{"items":[{},{"time":133.33333333333331,"length":16}]}],["Post/mixInvert",{"items":[{},{"time":121.33333333333333,"length":1.3333333333333286,"value":1,"reset":true}]}],["Crystal/enableDepth",{"items":[{"time":109.33333333333333,"length":1.3333333333333286}]}],["Crystal/beam/charge",{"items":[{},{"time":149.33333333333331,"length":4,"curve":35,"amp":0.36000000000000004},{"time":153.33333333333331,"length":1.3333333333333428,"curve":34,"amp":0.9599999999999995}]}],["Crystal/beam/shot",{"items":[{},{"time":153.33333333333331,"length":1.3333333333333428,"curve":34,"amp":0.9599999999999995}]}],["Crystal/beam/ring",{"items":[{},{"time":152,"length":2.666666666666657,"curve":36,"speed":0.7614331254621488,"amp":10.469999999999992}]}],["Post/mosaicAmp",{"items":[{},{"time":117.33333333333333,"length":2.666666666666657,"curve":37,"speed":0.7614331254621488,"amp":0.07},{"time":121.33333333333333,"length":1.3333333333333286,"curve":37,"speed":0.7614331254621488,"amp":0.07},{"time":122.66666666666666,"length":2.666666666666657,"curve":37,"speed":0.7614331254621488,"amp":0.07},{"time":128,"length":2.666666666666657,"curve":37,"speed":0.7614331254621488,"amp":0.07},{"time":133.33333333333331,"length":2.666666666666657,"curve":37,"speed":0.7614331254621488,"amp":0.07},{"time":144,"length":2.666666666666657,"curve":37,"speed":0.7614331254621488,"amp":0.07},{"time":149.33333333333331,"length":2.666666666666657,"curve":37,"speed":0.7614331254621488,"amp":0.07}]}],["BigBlur/amp",{"items":[{},{"time":5.333333333333333,"length":0.666666666666667,"curve":47,"offset":0.9999999999999627,"speed":0.5000000000000273,"amp":0.20999999999999935},{"time":32,"length":0.666666666666667,"curve":47,"offset":0.9999999999999627,"speed":0.5000000000000273,"amp":0.20999999999999935},{"time":37.33333333333333,"length":0.666666666666667,"curve":47,"offset":0.9999999999999627,"speed":0.5000000000000273,"amp":0.20999999999999935},{"time":154,"length":0.8000000000000398,"curve":47,"offset":0.5333333333332746,"amp":0.20999999999999935},{"time":181,"length":8.799999999999983,"curve":35,"speed":0.45454545454545536,"amp":1.4500000000000002}]}],["SufferTexts/active",{"items":[{"time":48,"length":42.66666666666666}]}],["TextOverlay/texture",{"items":[{"time":26.666666666666664},{"time":32,"value":1},{"time":37.33333333333333,"value":2},{"time":176,"value":3}]}],["TextOverlay/amp",{"items":[{},{"time":26.666666666666664,"length":5.333333333333336,"curve":49},{"time":32,"length":5.333333333333336,"curve":49},{"time":37.333333333333336,"length":5.333333333333336,"curve":49},{"time":184,"length":4,"curve":49}]}],["TestScreen/circle",{"items":[{"time":2.6666666666666665,"length":0.3333333333333335,"curve":50},{"time":3,"length":0.3333333333333335,"curve":50},{"time":3.3333333333333335,"length":0.3333333333333335,"curve":50},{"time":3.666666666666667,"length":0.3333333333333335,"curve":50},{"time":4,"length":0.3333333333333335,"curve":50},{"time":4.333333333333334,"length":0.3333333333333335,"curve":50},{"time":4.666666666666668,"length":0.3333333333333335,"curve":50},{"time":5.000000000000002,"length":0.3333333333333335,"curve":50}]}],["TestScreen/fade",{"items":[{"length":2.6666666666666665,"curve":20,"speed":0.5}]}],["TestScreen/mode",{"items":[{"value":1},{"time":2.6666666666666665,"value":2},{"time":5.333333333333333}]}],["SSR/active",{"items":[{"time":154,"length":38}]}],["Hooperball/deformSeed",{"items":[{"time":154,"value":13.679999999999938},{"time":165.16666666666666,"value":2},{"time":165.5,"value":3.249999999999995},{"time":165.83333333333331,"value":5.27999999999999},{"time":166.16666666666666,"value":6.569999999999989},{"time":166.5,"value":7.769999999999978},{"time":166.83333333333331,"value":8.979999999999974},{"time":167.16666666666666,"value":9.639999999999969},{"time":167.5,"value":10.329999999999961},{"time":167.83333333333331,"value":2},{"time":168.16666666666666,"value":3.249999999999995},{"time":168.5,"value":5.27999999999999},{"time":168.83333333333331,"value":6.569999999999989},{"time":169.16666666666666,"value":7.769999999999978},{"time":169.5,"value":8.979999999999974},{"time":169.83333333333331,"value":9.639999999999969},{"time":170.16666666666666,"value":10.329999999999961},{"time":170.5,"value":2},{"time":170.83333333333331,"value":3.249999999999995},{"time":171.16666666666666,"value":5.27999999999999},{"time":171.5,"value":6.569999999999989},{"time":171.83333333333331,"value":7.769999999999978},{"time":172.16666666666666,"value":8.979999999999974},{"time":172.5,"value":9.639999999999969},{"time":172.83333333333331,"value":10.329999999999961},{"time":173.16666666666666,"value":2},{"time":173.5,"value":3.249999999999995},{"time":173.83333333333331,"value":5.27999999999999},{"time":174.16666666666666,"value":6.569999999999989},{"time":174.5,"value":7.769999999999978},{"time":174.83333333333331,"value":8.979999999999974},{"time":175.16666666666666,"value":9.639999999999969},{"time":175.5,"value":10.329999999999961},{"time":175.83333333333331,"value":2}]}],["Racer/active",{"items":[{},{"time":154.66666666666666,"length":37.33333333333334}]}]],"labels":{"zero":0,"begin":5.333333333333333,"neuro":48,"porterfuckingrobinson":112,"fuckingcamellia":90.66666666666666,"psy":154.66666666666666,"greetings":133.33333333333331,"fadeout":176},"guiSettings":{"snapTimeActive":true,"snapTimeInterval":0.1,"snapValueActive":true,"snapValueInterval":0.5,"snapBeatActive":true,"bpm":180,"beatOffset":0,"useBeatInGUI":true,"minimizedPrecisionTime":3,"minimizedPrecisionValue":3}} \ No newline at end of file diff --git a/src/automaton.json.d.ts b/src/automaton.json.d.ts deleted file mode 100644 index c9787b6..0000000 --- a/src/automaton.json.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SerializedAutomatonWithGUI } from '@fms-cat/automaton-with-gui'; - -declare module './automaton.json' { - const data: SerializedAutomatonWithGUI; - export default data; -} diff --git a/src/config-hot.ts b/src/config-hot.ts deleted file mode 100644 index d10f5c3..0000000 --- a/src/config-hot.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const - RTINSPECTOR_MULTIPLE = false, - // RTINSPECTOR_MULTIPLE = true, - RTINSPECTOR_CAPTURE_NAME: string | null = null, - // RTINSPECTOR_CAPTURE_NAME: string | null = 'SSR/quad', - // RTINSPECTOR_CAPTURE_NAME: string | null = 'Greetings/intermediate0', - // RTINSPECTOR_CAPTURE_NAME: string | null = 'main/postSwap0', - // RTINSPECTOR_CAPTURE_NAME: string | null = 'EnvironmentMap/swap0', - // RTINSPECTOR_CAPTURE_NAME: string | null = 'DeferredCamera/cameraTarget', - RTINSPECTOR_CAPTURE_INDEX = 3, - COMPONENT_UPDATE_BREAKPOINT: string | null = null, - // COMPONENT_UPDATE_BREAKPOINT: string | null = 'lightDynamic2/shadowMapCamera', - // COMPONENT_UPDATE_BREAKPOINT: string | null = 'lightDynamic1/shadowMapCamera', - COMPONENT_DRAW_BREAKPOINT: string | null = null, - COMPONENT_UPDATE_PATTERN = /.*/, - COMPONENT_DRAW_PATTERN = /deferred/; diff --git a/src/config.ts b/src/config.ts deleted file mode 100644 index 365c1b4..0000000 --- a/src/config.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const - RANDOM_RESOLUTION = [ 64, 64 ], - STATIC_RANDOM_RESOLUTION = [ 2048, 2048 ], - CUBEMAP_RESOLUTION = [ 512, 512 ], - AO_RESOLUTION_RATIO = 1.0, - RESOLUTION = [ 1280, 720 ], - MUSIC_BPM = 180, - START_POSITION = 0, - MUSIC_LENGTH = 213, - MUSIC_AUTOMATON_TEXTURE_HEIGHT = 16, - IBLLUT_ITER = 400, - IBLLUT_SIZE = 256; diff --git a/src/entities/Antialias.ts b/src/entities/Antialias.ts deleted file mode 100644 index 34a5b1d..0000000 --- a/src/entities/Antialias.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import fxaaFrag from '../shaders/fxaa.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface PostOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -export class Antialias extends Entity { - public constructor( options: PostOptions ) { - super(); - - this.visible = false; - - // -- post ------------------------------------------------------------------------------------- - const material = new Material( - quadVert, - fxaaFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - material.addUniformTextures( 'sampler0', options.input.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/fxaa.frag', () => { - material.replaceShader( quadVert, fxaaFrag ); - } ); - } - } - - this.components.push( new Quad( { - target: options.target, - material, - name: process.env.DEV && 'quad', - } ) ); - } -} diff --git a/src/entities/BeamCharge.ts b/src/entities/BeamCharge.ts deleted file mode 100644 index 031df17..0000000 --- a/src/entities/BeamCharge.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Vector3 } from '@fms-cat/experimental'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { genOctahedron } from '../geometries/genOctahedron'; -import { gl } from '../globals/canvas'; -import colorFrag from '../shaders/color.frag'; -import objectVert from '../shaders/object.vert'; - -export class BeamCharge extends Entity { - public mesh: Mesh; - private __forward: Material; - - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const octahedron = genOctahedron( { div: 3 } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( octahedron.position, 0, 3 ); - geometry.vao.bindVertexbuffer( octahedron.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( octahedron.index ); - - geometry.count = octahedron.count; - geometry.mode = octahedron.mode; - geometry.indexType = octahedron.indexType; - - // -- materials -------------------------------------------------------------------------------- - const forward = this.__forward = new Material( - objectVert, - colorFrag, - { - blend: [ gl.ONE, gl.ONE ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const materials = { forward, cubemap: forward }; - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'BeamCharge/mesh', - } ); - this.components.push( this.mesh ); - } - - public setRadius( radius: number ): void { - this.mesh.visible = radius > 0.0; - - const mul = 0.1 + 0.9 * radius; - this.__forward.addUniform( 'color', '4f', mul * 30.0, mul * 100.0, mul * 1000.0, 1.0 ); - - this.transform.scale = new Vector3( [ radius, radius, radius ] ); - } -} diff --git a/src/entities/BeamRing.ts b/src/entities/BeamRing.ts deleted file mode 100644 index fee7ce9..0000000 --- a/src/entities/BeamRing.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { genTorus } from '../geometries/genTorus'; -import { gl } from '../globals/canvas'; -import colorFrag from '../shaders/color.frag'; -import objectInflateVert from '../shaders/object-inflate.vert'; - -export class BeamRing extends Entity { - public mesh: Mesh; - private __forward: Material; - - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const torus = genTorus(); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( torus.position, 0, 3 ); - geometry.vao.bindVertexbuffer( torus.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( torus.index ); - - geometry.count = torus.count; - geometry.mode = torus.mode; - geometry.indexType = torus.indexType; - - // -- materials -------------------------------------------------------------------------------- - const forward = this.__forward = new Material( - objectInflateVert, - colorFrag, - { - blend: [ gl.ONE, gl.ONE ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - forward.addUniform( 'inflate', '1f', 0.01 ); - - const materials = { forward, cubemap: forward }; - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'BeamRing/mesh', - } ); - this.components.push( this.mesh ); - } - - public setRadius( radius: number ): void { - this.mesh.visible = radius > 0.0; - - const mul = Math.exp( -2.0 * radius ); - this.__forward.addUniform( 'color', '4f', mul * 30.0, mul * 100.0, mul * 1000.0, 1.0 ); - - this.__forward.addUniform( 'scale', '3f', radius, radius, radius ); - } -} diff --git a/src/entities/BeamShot.ts b/src/entities/BeamShot.ts deleted file mode 100644 index 30f27be..0000000 --- a/src/entities/BeamShot.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Vector3 } from '@fms-cat/experimental'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { gl } from '../globals/canvas'; -import colorFrag from '../shaders/color.frag'; -import objectVert from '../shaders/object.vert'; - -interface BeamShotOptions { - length: number; -} - -export class BeamShot extends Entity { - public mesh: Mesh; - private __forward: Material; - - public constructor( { length }: BeamShotOptions ) { - super(); - - // -- pivot ------------------------------------------------------------------------------------ - const pivot = new Entity(); - pivot.transform.position = new Vector3( [ 0.0, 0.5 * length, 0.0 ] ); - this.children.push( pivot ); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ 1.0, 0.5 * length, 1.0 ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindVertexbuffer( cube.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const forward = this.__forward = new Material( - objectVert, - colorFrag, - { - blend: [ gl.ONE, gl.ONE ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const materials = { forward, cubemap: forward }; - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'BeamShot/mesh', - } ); - pivot.components.push( this.mesh ); - } - - public setWidth( width: number ): void { - this.mesh.visible = width > 0.0; - - const mul = 0.1 + 0.9 * width; - this.__forward.addUniform( 'color', '4f', mul * 30.0, mul * 100.0, mul * 1000.0, 1.0 ); - - this.transform.scale = new Vector3( [ 0.5 * width, 1.0, 0.5 * width ] ); - } -} diff --git a/src/entities/BigBlur.ts b/src/entities/BigBlur.ts deleted file mode 100644 index a368e93..0000000 --- a/src/entities/BigBlur.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import bigBlurFrag from '../shaders/big-blur.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface BigBlurOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -export class BigBlur extends Entity { - public constructor( options: BigBlurOptions ) { - super(); - - const entityBypass = new Entity(); - entityBypass.visible = false; - this.children.push( entityBypass ); - - const entityMain = new Entity(); - entityMain.active = false; - entityMain.visible = false; - this.children.push( entityMain ); - - if ( process.env.DEV ) { - entityBypass.name = 'entityBypass'; - entityMain.name = 'entityMain'; - } - - // -- bypass ----------------------------------------------------------------------------------- - entityBypass.components.push( new Blit( { - src: options.input, - dst: options.target, - name: process.env.DEV && 'blitBypass', - } ) ); - - // -- h ---------------------------------------------------------------------------------------- - const targetH = new BufferRenderTarget( { - width: options.target.width, - height: options.target.height, - name: process.env.DEV && 'BigBlur/targetH', - } ); - - const materialH = new Material( - quadVert, - bigBlurFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - materialH.addUniformTextures( 'sampler0', options.input.texture ); - - if ( module.hot ) { - module.hot.accept( '../shaders/big-blur.frag', () => { - materialH.replaceShader( quadVert, bigBlurFrag ); - } ); - } - - const quadH = new Quad( { - target: targetH, - material: materialH, - name: process.env.DEV && 'quadH', - } ); - entityMain.components.push( quadH ); - - // -- h ---------------------------------------------------------------------------------------- - const materialV = new Material( - quadVert, - bigBlurFrag, - { - defines: [ 'IS_VERTICAL 1' ], - initOptions: { geometry: quadGeometry, target: dummyRenderTarget } - }, - ); - materialV.addUniformTextures( 'sampler0', targetH.texture ); - - if ( module.hot ) { - module.hot.accept( '../shaders/big-blur.frag', () => { - materialV.replaceShader( quadVert, bigBlurFrag ); - } ); - } - - const quadV = new Quad( { - target: options.target, - material: materialV, - name: process.env.DEV && 'quadV', - } ); - entityMain.components.push( quadV ); - - // -- update uniform --------------------------------------------------------------------------- - auto( 'BigBlur/amp', ( { value } ) => { - materialH.addUniform( 'ratio', '1f', Math.min( 1.0, 100.0 * value ) ); - materialH.addUniform( 'sigma', '1f', 100.0 * value ); - materialV.addUniform( 'ratio', '1f', Math.min( 1.0, 100.0 * value ) ); - materialV.addUniform( 'sigma', '1f', 100.0 * value ); - - entityMain.active = 0.0 < value; - entityBypass.active = !entityMain.active; - } ); - } -} diff --git a/src/entities/Bloom.ts b/src/entities/Bloom.ts deleted file mode 100644 index 7bd508a..0000000 --- a/src/entities/Bloom.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { Swap } from '@fms-cat/experimental'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import bloomDownFrag from '../shaders/bloom-down.frag'; -import bloomUpFrag from '../shaders/bloom-up.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface BloomOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -export class Bloom extends Entity { - public constructor( options: BloomOptions ) { - super(); - - const { width, height } = options.target; - - const swap = new Swap( - new BufferRenderTarget( { - width, - height, - name: process.env.DEV && 'Bloom/swap0', - } ), - new BufferRenderTarget( { - width, - height, - name: process.env.DEV && 'Bloom/swap1', - } ), - ); - - // -- dry -------------------------------------------------------------------------------------- - this.components.push( new Blit( { - src: options.input, - dst: options.target, - name: process.env.DEV && 'blitDry', - } ) ); - - // -- down ------------------------------------------------------------------------------------- - for ( let i = 0; i < 6; i ++ ) { - const isFirst = i === 0; - - const material = new Material( - quadVert, - bloomDownFrag, - { initOptions: { target: dummyRenderTarget, geometry: quadGeometry } }, - ); - - material.addUniform( 'level', '1f', i ); - material.addUniformTextures( - 'sampler0', - isFirst ? options.input.texture : swap.i.texture, - ); - - const p = 2.0 * Math.pow( 0.5, i ); - const range: [ number, number, number, number ] = isFirst - ? [ -1.0, -1.0, 0.0, 0.0 ] - : [ 1.0 - p, 1.0 - p, 1.0 - 0.5 * p, 1.0 - 0.5 * p ]; - - this.components.push( new Quad( { - target: swap.o, - material, - range, - name: `quadDown${ i }`, - } ) ); - - swap.swap(); - } - - // -- up --------------------------------------------------------------------------------------- - for ( let i = 5; i >= 0; i -- ) { - const isLast = i === 0; - - const material = new Material( - quadVert, - bloomUpFrag, - { - initOptions: { target: dummyRenderTarget, geometry: quadGeometry }, - blend: [ gl.ONE, gl.ONE ], - }, - ); - - material.addUniform( 'level', '1f', i ); - material.addUniformTextures( - 'sampler0', - swap.i.texture, - ); - - const p = 4.0 * Math.pow( 0.5, i ); - const range: [ number, number, number, number ] = isLast - ? [ -1.0, -1.0, 1.0, 1.0 ] - : [ 1.0 - p, 1.0 - p, 1.0 - 0.5 * p, 1.0 - 0.5 * p ]; - - this.components.push( new Quad( { - target: isLast ? options.target : swap.o, - material, - range, - name: `quadUp${ i }`, - } ) ); - - swap.swap(); - } - } -} diff --git a/src/entities/BoundingBox.ts b/src/entities/BoundingBox.ts deleted file mode 100644 index b0b4ef1..0000000 --- a/src/entities/BoundingBox.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl, glCat } from '../globals/canvas'; -import boundingBoxFrag from '../shaders/bounding-box.frag'; -import boundingBoxVert from '../shaders/bounding-box.vert'; - -export class BoundingBox extends Entity { - public constructor() { - super(); - - // -- create buffers --------------------------------------------------------------------------- - const arrayPos = [ - -1, -1, -1, - 1, -1, -1, - -1, 1, -1, - 1, 1, -1, - -1, -1, 1, - 1, -1, 1, - -1, 1, 1, - 1, 1, 1, - ]; - const arrayInd = [ - 0, 1, - 0, 2, - 0, 4, - 1, 3, - 1, 5, - 2, 3, - 2, 6, - 3, 7, - 4, 5, - 4, 6, - 5, 7, - 6, 7, - ]; - - const bufferPos = glCat.createBuffer(); - bufferPos.setVertexbuffer( new Float32Array( arrayPos ) ); - - const bufferInd = glCat.createBuffer(); - bufferInd.setIndexbuffer( new Uint16Array( arrayInd ) ); - - // -- create geometry -------------------------------------------------------------------------- - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( bufferPos, 0, 3 ); - geometry.vao.bindIndexbuffer( bufferInd ); - - geometry.count = 24; - geometry.mode = gl.LINES; - geometry.indexType = gl.UNSIGNED_SHORT; - - // -- create materials ------------------------------------------------------------------------- - const forward = new Material( - boundingBoxVert, - boundingBoxFrag, - { - defines: [ 'FORWARD 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const depth = new Material( - boundingBoxVert, - boundingBoxFrag, - { - defines: [ 'SHADOW 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const materials = { forward, cubemap: forward, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/bounding-box.vert', - '../shaders/bounding-box.frag', - ], - () => { - forward.replaceShader( boundingBoxVert, boundingBoxFrag ); - depth.replaceShader( boundingBoxVert, boundingBoxFrag ); - }, - ); - } - } - - // -- create meshes ---------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - this.components.push( mesh ); - } -} diff --git a/src/entities/Condition.ts b/src/entities/Condition.ts deleted file mode 100644 index 46f22b5..0000000 --- a/src/entities/Condition.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { createSVGTableTexture } from '../utils/createSVGTableTexture'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { gl, glCat } from '../globals/canvas'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import conditionFrag from '../shaders/condition.frag'; -import conditionVert from '../shaders/condition.vert'; - -const POINTS_MAX = 256; - -export class Condition extends Entity { - public constructor() { - super(); - this.transform.scale = new Vector3( [ 0.05, 0.05, 0.05 ] ); - - // -- paths ------------------------------------------------------------------------------------ - const texture = createSVGTableTexture( [ - 'M5,5l-9,0l-1,-1l0,-8l1,-1l9,0l0,2l-8,0l0,6l8,0Z', - 'M5,4l0,-8l-1,-1l-8,0l-1,1l0,8l1,1l8,0Z', - 'M3,3l0,-6l-6,0l0,6Z', - 'M5,4l0,-9l-2,0l0,8l-6,0l0,-8l-2,0l0,9l1,1l8,0Z', - 'M5,4l0,-8l-1,-1l-9,0l0,10l9,0Z', - 'M1,5l0,-10l-2,0l0,10Z', - 'M5,5l0,-2l-4,0l0,-8l-2,0l0,8l-4,0l0,2Z', - ] ); - - const tablePos: number[] = [ - 0, -40, - 1, -28, - 2, -28, - 3, -16, - 4, -4, - 2, -4, - 5, 4, - 6, 12, - 5, 20, - 1, 28, - 2, 28, - 3, 40, - ]; - - // -- create buffers --------------------------------------------------------------------------- - const arrayPos = []; - const arrayInd = []; - - for ( let i = 0; i < POINTS_MAX; i ++ ) { - const x = i / POINTS_MAX; - arrayPos.push( x, 0, x, 1, x, 2 ); - - for ( let j = 0; j < 3; j ++ ) { - const j1 = ( j + 1 ) % 3; - arrayInd.push( - i * 3 + j, - i * 3 + 3 + j, - i * 3 + 3 + j1, - i * 3 + j, - i * 3 + 3 + j1, - i * 3 + j1, - ); - } - } - - arrayPos.push( 1, 0, 1, 1, 1, 2 ); - - const bufferPos = glCat.createBuffer(); - bufferPos.setVertexbuffer( new Float32Array( arrayPos ) ); - - const bufferInd = glCat.createBuffer(); - bufferInd.setIndexbuffer( new Uint16Array( arrayInd ) ); - - const arrayIter: number[] = []; - - for ( let i = 0; i < 16; i ++ ) { - for ( let j = 0; j < 12; j ++ ) { - arrayIter.push( - ( tablePos[ j * 2 + 0 ] + 0.5 ) / 7.0, - tablePos[ j * 2 + 1 ], - i / 16.0, - j / 12.0, - ); - } - } - - const bufferIter = glCat.createBuffer(); - bufferIter.setVertexbuffer( new Float32Array( arrayIter ) ); - - // -- create geometry -------------------------------------------------------------------------- - const geometry = new InstancedGeometry(); - - geometry.vao.bindVertexbuffer( bufferPos, 0, 2 ); - geometry.vao.bindIndexbuffer( bufferInd ); - geometry.vao.bindVertexbuffer( bufferIter, 1, 4, 1 ); - - geometry.count = 18 * POINTS_MAX; - geometry.mode = gl.TRIANGLES; - geometry.indexType = gl.UNSIGNED_SHORT; - geometry.primcount = 12 * 16; - - // -- create materials ------------------------------------------------------------------------- - const cubemap = new Material( - conditionVert, - conditionFrag, - { - defines: [ 'FORWARD 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const deferred = new Material( - conditionVert, - conditionFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const materials = { cubemap, deferred }; - - objectValuesMap( materials, ( material ) => { - material.addUniformTextures( 'samplerSvg', texture ); - - auto( 'Condition/phaseWidth', ( { value } ) => { - material.addUniform( 'phaseWidth', '1f', value ); - } ); - - auto( 'Sync/first/clap', ( { value } ) => { - material.addUniform( 'phaseOffset', '1f', value ); - } ); - - auto( 'Condition/hahaRatio', ( { value } ) => { - material.addUniform( 'hahaRatio', '1f', value ); - } ); - } ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/condition.vert', - '../shaders/condition.frag', - ], - () => { - cubemap.replaceShader( conditionVert, conditionFrag ); - deferred.replaceShader( conditionVert, conditionFrag ); - }, - ); - } - } - - // -- create meshes ---------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - this.components.push( mesh ); - } -} diff --git a/src/entities/Crystal.ts b/src/entities/Crystal.ts deleted file mode 100644 index 4b1df0a..0000000 --- a/src/entities/Crystal.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { BeamCharge } from './BeamCharge'; -import { BeamRing } from './BeamRing'; -import { BeamShot } from './BeamShot'; -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material, MaterialMap } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import crystalFrag from '../shaders/crystal.frag'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; - -interface CrystalOptions { - width: number; - height: number; - noiseOffset: number; -} - -export class Crystal extends Entity { - public constructor( { width, height, noiseOffset }: CrystalOptions ) { - super(); - - this.transform.position = new Vector3( [ 0.0, 0.0, 0.0 ] ); - this.transform.scale = new Vector3( [ 1.0, 1.0, 1.0 ] ); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ width, height, width ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - raymarchObjectVert, - crystalFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - raymarchObjectVert, - crystalFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry, target: dummyRenderTarget } - }, - ); - - const materials: MaterialMap = { deferred }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/crystal.frag', () => { - deferred.replaceShader( raymarchObjectVert, crystalFrag ); - depth.replaceShader( raymarchObjectVert, crystalFrag ); - } ); - } - } - - // haha - auto( 'Crystal/enableDepth', ( { uninit } ) => { - if ( uninit ) { - delete materials.depth; - } else { - materials.depth = depth; - } - } ); - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - material?.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material?.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - - material?.addUniform( 'size', '2f', width, height ); - material?.addUniform( 'noiseOffset', '1f', noiseOffset ); - } ); - }, - name: process.env.DEV && 'Crystal/updater', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'Crystal/mesh', - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - - // -- beam ------------------------------------------------------------------------------------- - const beamCharge = new BeamCharge(); - beamCharge.transform.position = new Vector3( [ 0.0, 1.8, 0.0 ] ); - - const beamShot = new BeamShot( { length: 100.0 } ); - beamShot.transform.position = new Vector3( [ 0.0, 1.8, 0.0 ] ); - - const beamRing = new BeamRing(); - beamRing.transform.position = new Vector3( [ 0.0, 1.8, 0.0 ] ); - - auto( 'Crystal/beam/charge', ( { value } ) => { - beamCharge.setRadius( value ); - } ); - - auto( 'Crystal/beam/ring', ( { value } ) => { - beamRing.setRadius( value ); - } ); - - auto( 'Crystal/beam/shot', ( { value } ) => { - beamShot.setWidth( value ); - } ); - - this.children.push( beamCharge, beamShot, beamRing ); - } -} diff --git a/src/entities/Cube.ts b/src/entities/Cube.ts deleted file mode 100644 index f4daeb3..0000000 --- a/src/entities/Cube.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Quaternion, Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { glCat } from '../globals/canvas'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import { quadGeometry } from '../globals/quadGeometry'; -import cubeFrag from '../shaders/cube.frag'; -import cubeVert from '../shaders/cube.vert'; -import depthFrag from '../shaders/depth.frag'; - -const PRIMCOUNT = 64; - -export class Cube extends Entity { - public mesh: Mesh; - - public constructor() { - super(); - - const rot0 = Quaternion.fromAxisAngle( - new Vector3( [ 1.0, 0.0, 0.0 ] ), - 0.4, - ).multiply( Quaternion.fromAxisAngle( - new Vector3( [ 0.0, 0.0, 1.0 ] ), - 0.4, - ) ); - - this.transform.rotation = rot0; - this.transform.scale = this.transform.scale.scale( 0.3 ); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube(); - - const geometry = new InstancedGeometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindVertexbuffer( cube.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - const arrayInstanceId = [ ...Array( PRIMCOUNT ).keys() ]; - const bufferInstanceId = glCat.createBuffer(); - bufferInstanceId.setVertexbuffer( new Float32Array( arrayInstanceId ) ); - geometry.vao.bindVertexbuffer( bufferInstanceId, 2, 1, 1 ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - geometry.primcount = PRIMCOUNT; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - cubeVert, - cubeFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry: quadGeometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - cubeVert, - depthFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/cube.vert', - '../shaders/cube.frag', - ], - () => { - deferred.replaceShader( cubeVert, cubeFrag ); - depth.replaceShader( cubeVert, depthFrag ); - }, - ); - } - } - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onUpdate: ( { time } ) => { - this.transform.rotation = rot0.multiply( - Quaternion.fromAxisAngle( new Vector3( [ 0.0, 1.0, 0.0 ] ), time ) - ).multiply( - Quaternion.fromAxisAngle( new Vector3( [ 1.0, 0.0, 0.0 ] ), 1.0 ) - ).multiply( - Quaternion.fromAxisAngle( new Vector3( [ 0.0, 0.0, 1.0 ] ), 1.0 ) - ); - - objectValuesMap( materials, ( material ) => ( - material.addUniform( 'clap', '1f', auto( 'Sync/first/clap' ) ) - ) ); - }, - name: process.env.DEV && 'speen', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry: geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - this.components.push( this.mesh ); - } -} diff --git a/src/entities/CubemapCameraEntity.ts b/src/entities/CubemapCameraEntity.ts deleted file mode 100644 index 5c79633..0000000 --- a/src/entities/CubemapCameraEntity.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CUBEMAP_RESOLUTION } from '../config'; -import { CubemapCamera } from '../heck/components/CubemapCamera'; -import { CubemapRenderTarget } from '../heck/CubemapRenderTarget'; -import { Entity } from '../heck/Entity'; -import { LightEntity } from './LightEntity'; - -export interface CubemapCameraEntityOptions { - scenes: Entity[]; - lights: LightEntity[]; -} - -export class CubemapCameraEntity extends Entity { - public scenes: Entity[]; - public camera: CubemapCamera; - public readonly target: CubemapRenderTarget; - - public constructor( options: CubemapCameraEntityOptions ) { - super(); - - this.scenes = options.scenes; - - this.target = new CubemapRenderTarget( { - width: CUBEMAP_RESOLUTION[ 0 ], - height: CUBEMAP_RESOLUTION[ 1 ], - } ); - - this.camera = new CubemapCamera( { - scenes: options.scenes, - renderTarget: this.target, - near: 1.0, - far: 20.0, - materialTag: 'cubemap', - } ); - this.components.push( this.camera ); - } -} diff --git a/src/entities/CyclicBoard.ts b/src/entities/CyclicBoard.ts deleted file mode 100644 index 548ccb5..0000000 --- a/src/entities/CyclicBoard.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { LightEntity } from './LightEntity'; -import { Material } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { Vector3 } from '@fms-cat/experimental'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import { setLightUniforms } from '../utils/setLightUniforms'; -import cyclicBoardFrag from '../shaders/cyclic-board.frag'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; - -export class CyclicBoard extends Entity { - public lights: LightEntity[] = []; - - public constructor() { - super(); - - this.transform.position = new Vector3( [ 0.0, 0.0, 0.0 ] ); - this.transform.scale = new Vector3( [ 1.0, 1.0, 1.0 ] ); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ 100.0, 1.0, 100.0 ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const forward = new Material( - raymarchObjectVert, - cyclicBoardFrag, - { - defines: [ 'FORWARD 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const deferred = new Material( - raymarchObjectVert, - cyclicBoardFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - // it was way too expensive,,, - // const depth = new Material( - // raymarchObjectVert, - // cyclicBoardFrag, - // { - // defines: [ 'DEPTH 1' ], - // initOptions: { geometry, target: dummyRenderTarget } - // }, - // ); - - const materials = { cubemap: forward, deferred }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/cyclic-board.frag', () => { - forward.replaceShader( raymarchObjectVert, cyclicBoardFrag ); - deferred.replaceShader( raymarchObjectVert, cyclicBoardFrag ); - // depth.replaceShader( raymarchObjectVert, cyclicBoardFrag ); - } ); - } - } - - // -- forward lights --------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( { frameCount } ) => { - setLightUniforms( forward, this.lights, frameCount ); - }, - name: process.env.DEV && 'setLightUniforms', - } ) ); - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - } ); - }, - name: process.env.DEV && 'setCameraUniforms', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - } -} diff --git a/src/entities/DVi.ts b/src/entities/DVi.ts deleted file mode 100644 index 92f25a7..0000000 --- a/src/entities/DVi.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import dviFrag from '../shaders/dvi.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface DViOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -export class DVi extends Entity { - public constructor( options: DViOptions ) { - super(); - - // -- bypass ----------------------------------------------------------------------------------- - const blitBypass = new Blit( { - src: options.input, - dst: options.target, - name: process.env.DEV && 'blitBypass', - } ); - - // -- dvi -------------------------------------------------------------------------------------- - const material = new Material( - quadVert, - dviFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - material.addUniformTextures( 'sampler0', options.input.texture ); - material.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/dvi.frag', () => { - material.replaceShader( quadVert, dviFrag ); - } ); - } - } - - const quadDVi = new Quad( { - target: options.target, - material, - name: process.env.DEV && 'quad', - } ); - - // -- components ------------------------------------------------------------------------------- - this.components.push( - blitBypass, - quadDVi, - ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'DVi/amp', ( { value } ) => { - material.addUniform( 'amp', '1f', value ); - - quadDVi.active = value > 0.0; - blitBypass.active = !quadDVi.active; - } ); - - auto( 'DVi/offset', ( { value } ) => { - material.addUniform( 'offset', '1f', value ); - } ); - } -} diff --git a/src/entities/DeferredCamera.ts b/src/entities/DeferredCamera.ts deleted file mode 100644 index f95cd7c..0000000 --- a/src/entities/DeferredCamera.ts +++ /dev/null @@ -1,176 +0,0 @@ -import { AO_RESOLUTION_RATIO } from '../config'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { Lambda } from '../heck/components/Lambda'; -import { LightEntity } from './LightEntity'; -import { Material } from '../heck/Material'; -import { PerspectiveCamera } from '../heck/components/PerspectiveCamera'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import { setLightUniforms } from '../utils/setLightUniforms'; -import aoFrag from '../shaders/ao.frag'; -import quadVert from '../shaders/quad.vert'; -import shadingFrag from '../shaders/shading.frag'; - -export interface DeferredCameraOptions { - scenes: Entity[]; - target: RenderTarget; - lights: LightEntity[]; - textureIBLLUT: GLCatTexture; - textureEnv: GLCatTexture; -} - -export class DeferredCamera extends Entity { - public cameraTarget: BufferRenderTarget; - public camera: PerspectiveCamera; - - public constructor( options: DeferredCameraOptions ) { - super(); - - // -- camera ----------------------------------------------------------------------------------- - this.cameraTarget = new BufferRenderTarget( { - width: options.target.width, - height: options.target.height, - numBuffers: 4, - name: process.env.DEV && 'DeferredCamera/cameraTarget', - filter: gl.NEAREST, - } ); - - this.camera = new PerspectiveCamera( { - scenes: options.scenes, - renderTarget: this.cameraTarget, - near: 0.1, - far: 20.0, - name: process.env.DEV && 'camera', - materialTag: 'deferred', - } ); - - // -- ao --------------------------------------------------------------------------------------- - const aoTarget = new BufferRenderTarget( { - width: AO_RESOLUTION_RATIO * options.target.width, - height: AO_RESOLUTION_RATIO * options.target.height, - name: process.env.DEV && 'DeferredCamera/aoTarget', - } ); - - const aoMaterial = new Material( - quadVert, - aoFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - - const lambdaAoSetCameraUniforms = new Lambda( { - onUpdate: () => { - const cameraView = this.transform.matrix.inverse!; - - aoMaterial.addUniformMatrixVector( - 'cameraPV', - 'Matrix4fv', - this.camera.projectionMatrix.multiply( - cameraView - ).elements - ); - }, - name: process.env.DEV && 'aoSetCameraUniforms', - } ); - - for ( let i = 0; i < 2; i ++ ) { // it doesn't need 2 and 3 - aoMaterial.addUniformTextures( - 'sampler' + i, - this.cameraTarget.getTexture( gl.COLOR_ATTACHMENT0 + i )!, - ); - } - - aoMaterial.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - const aoQuad = new Quad( { - material: aoMaterial, - target: aoTarget, - name: process.env.DEV && 'aoQuad', - } ); - - // -- deferred --------------------------------------------------------------------------------- - const shadingMaterial = new Material( - quadVert, - shadingFrag, - { - initOptions: { geometry: quadGeometry, target: dummyRenderTarget }, - }, - ); - - const shadingQuad = new Quad( { - material: shadingMaterial, - target: options.target, - name: process.env.DEV && 'shadingQuad', - } ); - shadingQuad.clear = []; - - const lambda = new Lambda( { - onUpdate: ( { frameCount } ) => { - const cameraView = this.transform.matrix.inverse!; - - shadingMaterial.addUniformMatrixVector( - 'cameraView', - 'Matrix4fv', - cameraView.elements - ); - - shadingMaterial.addUniformMatrixVector( - 'cameraPV', - 'Matrix4fv', - this.camera.projectionMatrix.multiply( - cameraView - ).elements - ); - - shadingMaterial.addUniform( - 'cameraNearFar', - '2f', - this.camera.near, - this.camera.far - ); - - shadingMaterial.addUniform( - 'cameraPos', - '3f', - ...this.transform.position.elements - ); - - setLightUniforms( shadingMaterial, options.lights, frameCount ); - }, - name: process.env.DEV && 'shadingSetCameraUniforms', - } ); - - for ( let i = 0; i < 4; i ++ ) { - shadingMaterial.addUniformTextures( - 'sampler' + i, - this.cameraTarget.getTexture( gl.COLOR_ATTACHMENT0 + i )!, - ); - } - - shadingMaterial.addUniformTextures( 'samplerAo', aoTarget.texture ); - shadingMaterial.addUniformTextures( 'samplerIBLLUT', options.textureIBLLUT ); - shadingMaterial.addUniformTextures( 'samplerEnv', options.textureEnv ); - shadingMaterial.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - this.components.push( - this.camera, - lambdaAoSetCameraUniforms, - aoQuad, - lambda, - shadingQuad, - ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/shading.frag', () => { - shadingMaterial.replaceShader( quadVert, shadingFrag ); - } ); - } - } - } -} diff --git a/src/entities/EnvironmentMap.ts b/src/entities/EnvironmentMap.ts deleted file mode 100644 index 3f82f90..0000000 --- a/src/entities/EnvironmentMap.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { CubemapRenderTarget } from '../heck/CubemapRenderTarget'; -import { Entity } from '../heck/Entity'; -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { Swap, Xorshift } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import environmentMapFrag from '../shaders/environment-map.frag'; -import environmentMapMergeFrag from '../shaders/environment-map-merge.frag'; -import quadVert from '../shaders/quad.vert'; - -const WIDTH = 1024; -const HEIGHT = 512; - -export class EnvironmentMap extends Entity { - public readonly texture: GLCatTexture; - - public constructor( { cubemap }: { - cubemap: CubemapRenderTarget; - } ) { - super(); - this.visible = false; - - const rng = new Xorshift( 114514 ); - - // -- swap ------------------------------------------------------------------------------------- - const swap = new Swap( - new BufferRenderTarget( { - width: WIDTH, - height: HEIGHT, - name: process.env.DEV && 'EnvironmentMap/swap0', - } ), - new BufferRenderTarget( { - width: WIDTH, - height: HEIGHT, - name: process.env.DEV && 'EnvironmentMap/swap1', - } ), - ); - swap.i.texture.textureWrap( gl.REPEAT ); - swap.o.texture.textureWrap( gl.REPEAT ); - - // -- integrate -------------------------------------------------------------------------------- - swap.swap(); - - const materialIntegrate = new Material( - quadVert, - environmentMapFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - materialIntegrate.addUniform( 'uniformSeed', '4f', rng.gen(), rng.gen(), rng.gen(), rng.gen() ); - materialIntegrate.addUniformTextures( 'sampler0', swap.i.texture ); - materialIntegrate.addUniformTextures( 'samplerCubemap', cubemap.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/environment-map.frag', () => { - materialIntegrate.replaceShader( quadVert, environmentMapFrag ); - } ); - } - } - - const quadIntegrate = new Quad( { - target: swap.o, - material: materialIntegrate, - name: process.env.DEV && 'quadIntegrate', - } ); - - // -- merge results ---------------------------------------------------------------------------- - swap.swap(); - - const materialMerge = new Material( - quadVert, - environmentMapMergeFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - materialMerge.addUniformTextures( 'sampler0', swap.i.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/environment-map-merge.frag', () => { - materialMerge.replaceShader( quadVert, environmentMapMergeFrag ); - } ); - } - } - - const quadMerge = new Quad( { - target: swap.o, - material: materialMerge, - name: process.env.DEV && 'quadMerge', - } ); - - // -- this is the output ----------------------------------------------------------------------- - this.texture = swap.o.texture; - - // -- auto ------------------------------------------------------------------------------------- - auto( 'EnvironmentMap/accumulate', ( { value } ) => { - materialIntegrate.addUniform( 'accumulate', '1f', value ); - } ); - - // -- updater ---------------------------------------------------------------------------------- - const lambdaUpdater = new Lambda( { - onUpdate: () => { - materialIntegrate.addUniform( - 'uniformSeed', - '4f', - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - ); - }, - name: process.env.DEV && 'lambdaUpdater', - } ); - - // -- components ------------------------------------------------------------------------------- - this.components.push( - lambdaUpdater, - quadIntegrate, - quadMerge, - ); - } -} diff --git a/src/entities/FlashyBall.ts b/src/entities/FlashyBall.ts deleted file mode 100644 index 36a62e8..0000000 --- a/src/entities/FlashyBall.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Quaternion, Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genOctahedron } from '../geometries/genOctahedron'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import { quadGeometry } from '../globals/quadGeometry'; -import depthFrag from '../shaders/depth.frag'; -import flashyBallFrag from '../shaders/flashy-ball.frag'; -import flashyBallVert from '../shaders/flashy-ball.vert'; - -export class FlashyBall extends Entity { - public mesh: Mesh; - - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const octahedron = genOctahedron( { div: 5 } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( octahedron.position, 0, 3 ); - geometry.vao.bindVertexbuffer( octahedron.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( octahedron.index ); - - geometry.count = octahedron.count; - geometry.mode = octahedron.mode; - geometry.indexType = octahedron.indexType; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - flashyBallVert, - flashyBallFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry: quadGeometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - flashyBallVert, - depthFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/flashy-ball.vert', - '../shaders/flashy-ball.frag', - ], - () => { - deferred.replaceShader( flashyBallVert, flashyBallFrag ); - depth.replaceShader( flashyBallVert, depthFrag ); - }, - ); - } - } - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry, - materials, - } ); - this.components.push( this.mesh ); - - // -- speen ------------------------------------------------------------------------------------ - const axis = new Vector3( [ 1.0, -1.0, 1.0 ] ).normalized; - this.components.push( new Lambda( { - onUpdate: ( { time } ) => { - this.transform.rotation = Quaternion.fromAxisAngle( axis, time ); - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'distort', - '1f', - auto( 'FlashyBall/distortAmp' ) - ); - } ); - }, - name: process.env.DEV && 'speen', - } ) ); - } -} diff --git a/src/entities/FlickyParticles.ts b/src/entities/FlickyParticles.ts deleted file mode 100644 index b1387f0..0000000 --- a/src/entities/FlickyParticles.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { GPUParticles } from './GPUParticles'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Material } from '../heck/Material'; -import { MeshCull } from '../heck/components/Mesh'; -import { TRIANGLE_STRIP_QUAD } from '@fms-cat/experimental'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl, glCat } from '../globals/canvas'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture, randomTextureStatic } from '../globals/randomTexture'; -import flickyParticleComputeFrag from '../shaders/flicky-particles-compute.frag'; -import flickyParticleRenderFrag from '../shaders/flicky-particles-render.frag'; -import flickyParticleRenderVert from '../shaders/flicky-particles-render.vert'; -import quadVert from '../shaders/quad.vert'; - -const PARTICLES_SQRT = 8; -const PARTICLES = PARTICLES_SQRT * PARTICLES_SQRT; - -export class FlickyParticles extends Entity { - public constructor() { - super(); - - // -- material compute ------------------------------------------------------------------------- - const materialCompute = new Material( - quadVert, - flickyParticleComputeFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - - materialCompute.addUniform( 'particlesSqrt', '1f', PARTICLES_SQRT ); - materialCompute.addUniform( 'particles', '1f', PARTICLES ); - materialCompute.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/flicky-particles-compute.frag', () => { - materialCompute.replaceShader( quadVert, flickyParticleComputeFrag ); - } ); - } - } - - // -- geometry render -------------------------------------------------------------------------- - const geometryRender = new InstancedGeometry(); - - const bufferP = glCat.createBuffer(); - bufferP.setVertexbuffer( new Float32Array( TRIANGLE_STRIP_QUAD ) ); - - geometryRender.vao.bindVertexbuffer( bufferP, 0, 2 ); - - const bufferComputeUV = glCat.createBuffer(); - bufferComputeUV.setVertexbuffer( ( () => { - const ret = new Float32Array( PARTICLES * 2 ); - for ( let iy = 0; iy < PARTICLES_SQRT; iy ++ ) { - for ( let ix = 0; ix < PARTICLES_SQRT; ix ++ ) { - const i = ix + iy * PARTICLES_SQRT; - const s = ( ix + 0.5 ) / PARTICLES_SQRT; - const t = ( iy + 0.5 ) / PARTICLES_SQRT; - ret[ i * 2 + 0 ] = s; - ret[ i * 2 + 1 ] = t; - } - } - return ret; - } )() ); - - geometryRender.vao.bindVertexbuffer( bufferComputeUV, 1, 2, 1 ); - - geometryRender.count = 4; - geometryRender.mode = gl.TRIANGLE_STRIP; - geometryRender.primcount = PARTICLES; - - // -- materials render ------------------------------------------------------------------------- - const forward = new Material( - flickyParticleRenderVert, - flickyParticleRenderFrag, - { - defines: [ 'FORWARD 1' ], - initOptions: { geometry: geometryRender, target: dummyRenderTarget }, - }, - ); - - const depth = new Material( - flickyParticleRenderVert, - flickyParticleRenderFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry: geometryRender, target: dummyRenderTarget }, - }, - ); - - const materialsRender = { forward, cubemap: forward, depth }; - - objectValuesMap( materialsRender, ( material ) => { - material.addUniformTextures( 'samplerRandomStatic', randomTextureStatic.texture ); - } ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/flicky-particles-render.vert', - '../shaders/flicky-particles-render.frag', - ], - () => { - forward.replaceShader( flickyParticleRenderVert, flickyParticleRenderFrag ); - depth.replaceShader( flickyParticleRenderVert, flickyParticleRenderFrag ); - } - ); - } - } - - // -- gpu particles ---------------------------------------------------------------------------- - const gpuParticles = new GPUParticles( { - materialCompute, - geometryRender, - materialsRender, - computeWidth: PARTICLES_SQRT, - computeHeight: PARTICLES_SQRT, - computeNumBuffers: 1, - brtNamePrefix: process.env.DEV && this.name, - } ); - gpuParticles.meshRender.cull = MeshCull.None; - this.children.push( gpuParticles ); - } -} diff --git a/src/entities/ForwardCamera.ts b/src/entities/ForwardCamera.ts deleted file mode 100644 index 5d4530f..0000000 --- a/src/entities/ForwardCamera.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { LightEntity } from './LightEntity'; -import { PerspectiveCamera } from '../heck/components/PerspectiveCamera'; -import { RenderTarget } from '../heck/RenderTarget'; - -export interface ForwardCameraOptions { - scenes: Entity[]; - target: RenderTarget; - lights: LightEntity[]; -} - -export class ForwardCamera extends Entity { - public camera: PerspectiveCamera; - - public constructor( options: ForwardCameraOptions ) { - super(); - - this.camera = new PerspectiveCamera( { - scenes: options.scenes, - renderTarget: options.target, - near: 0.1, - far: 20.0, - name: process.env.DEV && 'camera', - materialTag: 'forward', - } ); - this.camera.clear = false; - - this.components.push( this.camera ); - } -} diff --git a/src/entities/GPUParticles.ts b/src/entities/GPUParticles.ts deleted file mode 100644 index 5042be1..0000000 --- a/src/entities/GPUParticles.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { BufferRenderTarget, BufferRenderTargetOptions } from '../heck/BufferRenderTarget'; -import { Entity, EntityOptions } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material, MaterialMap } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Quad } from '../heck/components/Quad'; -import { Swap } from '@fms-cat/experimental'; -import { gl } from '../globals/canvas'; -import { objectValuesMap } from '../utils/objectEntriesMap'; - -export interface GPUParticlesOptions extends EntityOptions { - materialCompute: Material; - geometryRender: Geometry; - materialsRender: MaterialMap; - computeWidth: number; - computeHeight: number; - computeNumBuffers: number; - brtNamePrefix?: string; -} - -export class GPUParticles extends Entity { - public meshRender: Mesh; - - public constructor( options: GPUParticlesOptions ) { - super( options ); - - const { - materialCompute, - geometryRender, - materialsRender, - computeWidth, - computeHeight, - computeNumBuffers, - brtNamePrefix, - } = options; - - const brtOptions: BufferRenderTargetOptions = { - width: computeWidth, - height: computeHeight, - numBuffers: computeNumBuffers, - }; - - const swapCompute = new Swap( - new BufferRenderTarget( { - ...brtOptions, - name: process.env.DEV && `${ brtNamePrefix }/swap0`, - filter: gl.NEAREST, - } ), - new BufferRenderTarget( { - ...brtOptions, - name: process.env.DEV && `${ brtNamePrefix }/swap1`, - filter: gl.NEAREST, - } ), - ); - - // -- compute ---------------------------------------------------------------------------------- - const quadCompute = new Quad( { - target: swapCompute.o, - material: materialCompute, - name: process.env.DEV && 'quadCompute', - } ); - - // -- render ----------------------------------------------------------------------------------- - this.meshRender = new Mesh( { - geometry: geometryRender, - materials: materialsRender, - name: process.env.DEV && 'meshRender', - } ); - - objectValuesMap( materialsRender, ( material ) => { - material?.addUniform( - 'resolutionCompute', - '2f', - computeWidth, - computeHeight - ); - } ); - - // -- swapper ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onUpdate: () => { - swapCompute.swap(); - - for ( let i = 0; i < computeNumBuffers; i ++ ) { - const attachment = gl.COLOR_ATTACHMENT0 + i; - - materialCompute.addUniformTextures( - `samplerCompute${ i }`, - swapCompute.i.getTexture( attachment )! - ); - - objectValuesMap( materialsRender, ( material ) => { - material?.addUniformTextures( - `samplerCompute${ i }`, - swapCompute.o.getTexture( attachment )! - ); - } ); - } - - quadCompute.target = swapCompute.o; - }, - name: process.env.DEV && 'swapper', - } ) ); - - // -- rest of components ----------------------------------------------------------------------- - this.components.push( - quadCompute, - this.meshRender, - ); - } -} diff --git a/src/entities/Glitch.ts b/src/entities/Glitch.ts deleted file mode 100644 index 1e3070d..0000000 --- a/src/entities/Glitch.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import glitchFrag from '../shaders/glitch.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface GlitchOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -export class Glitch extends Entity { - public amp = 0.0; - public material: Material; - - public constructor( options: GlitchOptions ) { - super(); - - const entityBypass = new Entity(); - entityBypass.visible = false; - this.children.push( entityBypass ); - - const entityMain = new Entity(); - entityMain.active = false; - entityMain.visible = false; - this.children.push( entityMain ); - - if ( process.env.DEV ) { - entityBypass.name = 'entityBypass'; - entityMain.name = 'entityMain'; - } - - // -- bypass ----------------------------------------------------------------------------------- - entityBypass.components.push( new Blit( { - src: options.input, - dst: options.target, - name: process.env.DEV && 'blitBypass', - } ) ); - - // -- quad ------------------------------------------------------------------------------------- - this.material = new Material( - quadVert, - glitchFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - this.material.addUniformTextures( 'sampler0', options.input.texture ); - - if ( module.hot ) { - module.hot.accept( '../shaders/glitch.frag', () => { - this.material.replaceShader( quadVert, glitchFrag ); - } ); - } - - const quad = new Quad( { - target: options.target, - material: this.material, - name: process.env.DEV && 'quad', - } ); - entityMain.components.push( quad ); - - // -- update uniform --------------------------------------------------------------------------- - auto( 'Glitch/amp', ( { value } ) => { - this.material.addUniform( 'amp', '1f', value ); - - entityMain.active = 0.0 < value; - entityBypass.active = !entityMain.active; - } ); - } -} diff --git a/src/entities/Greetings.ts b/src/entities/Greetings.ts deleted file mode 100644 index 3a0ace3..0000000 --- a/src/entities/Greetings.ts +++ /dev/null @@ -1,333 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Quad } from '../heck/components/Quad'; -import { SPRITE_SHEET_SIZE, createFontSpriteSheet } from '../utils/createFontSpriteSheet'; -import { Swap, TRIANGLE_STRIP_QUAD } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { calcCharPos } from '../utils/calcCharPos'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl, glCat } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import blurFrag from '../shaders/blur.frag'; -import greetingsFrag from '../shaders/greetings.frag'; -import greetingsPreBeatmaniaFrag from '../shaders/greetings-pre-beatmania.frag'; -import greetingsPreLainFrag from '../shaders/greetings-pre-lain.frag'; -import greetingsVert from '../shaders/greetings.vert'; -import quadVert from '../shaders/quad.vert'; - -const INSTANCES = 64; - -// -- preprocessor --------------------------------------------------------------------------------- -const materialBlurH = new Material( - quadVert, - blurFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, -); - -const materialBlurV = new Material( - quadVert, - blurFrag, - { - defines: [ 'IS_VERTICAL 1' ], - initOptions: { geometry: quadGeometry, target: dummyRenderTarget } - }, -); - -const materialPreBeatmania = new Material( - quadVert, - greetingsPreBeatmaniaFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, -); - -const materialPreLain = new Material( - quadVert, - greetingsPreLainFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, -); - -/** - * Do not add me to its components! - * It's just for preprocessing - */ -const quadPreprocessor = new Quad( { - name: process.env.DEV && 'Greetings/quadPreprocessor', -} ); - -// -- spritesheets --------------------------------------------------------------------------------- -const styles = [ - { - font: 'Bold 96px Courier New', - preprocessorMaterials: [ materialPreLain ], - }, - { - font: '96px Arial', - spacing: 1.3, - }, - { - font: 'Bold 96px Arial', - preprocessorMaterials: [ - materialBlurH, - materialBlurV, - materialBlurH, // fuck you - materialBlurV, // fuck you (2) - materialPreBeatmania, - ], - }, - { - font: '96px Times New Roman', - scaleY: 1.2, - spacing: 1.9, - }, - { - font: 'Bold 96px Courier New', - preprocessorMaterials: [ materialPreLain ], - }, - { - font: 'Bold 96px Arial', - scaleY: 1.2, - spacing: 1.4, - }, - { - font: 'Bold 96px Arial', - preprocessorMaterials: [ - materialBlurH, - materialBlurV, - materialBlurH, // fuck you - materialBlurV, // fuck you (2) - materialPreBeatmania, - ], - }, - { - font: '96px Times New Roman', - }, -]; - -const swapIntermediate = new Swap( - new BufferRenderTarget( { - width: SPRITE_SHEET_SIZE, - height: SPRITE_SHEET_SIZE, - name: process.env.DEV && 'Greetings/intermediateSwap0', - } ), - new BufferRenderTarget( { - width: SPRITE_SHEET_SIZE, - height: SPRITE_SHEET_SIZE, - name: process.env.DEV && 'Greetings/intermediateSwap1', - } ), -); - -const spritesheets = styles.map( ( style, iStyle ) => { - const textureSpriteSheet = createFontSpriteSheet( style ); - let texture: GLCatTexture = textureSpriteSheet; - - ( style.preprocessorMaterials ?? [] ).map( ( material, i ) => { - material.addUniformTextures( - 'sampler0', - i === 0 ? textureSpriteSheet : swapIntermediate.o.texture, - ); - - quadPreprocessor.material = material; - quadPreprocessor.target = swapIntermediate.i; - quadPreprocessor.drawImmediate(); - - swapIntermediate.swap(); - texture = swapIntermediate.o.texture; - } ); - - const dest = new BufferRenderTarget( { - width: SPRITE_SHEET_SIZE, - height: SPRITE_SHEET_SIZE, - name: process.env.DEV && `Greetings/spriteSheet${ iStyle }`, - } ); - - materialBlurH.addUniformTextures( 'sampler0', texture ); - - quadPreprocessor.material = materialBlurH; - quadPreprocessor.target = dest; - quadPreprocessor.drawImmediate(); - - return dest.texture; -} ); - -// -- greetings! ----------------------------------------------------------------------------------- -const charPosList = [ - '0x4015', - 'Alcatraz', - 'Altair', - 'ASD', - 'Astronomena', - 'CNCD', - 'Cocoon', - 'Conspiracy', - 'Ctrl+Alt+Test', - 'doxas', - 'Fairlight', - 'Flopine', - 'FRONTL1NE', - 'holon', - 'gam0022', - 'gaz', - 'gyabo', - 'iYOYi', - 'jetlag', - 'Jugem-T', - 'kaneta', - 'Limp Ninja', - 'LJ', - 'Logicoma', - 'marcan', - 'Mercury', - 'mrdoob', - 'nikq::club', - 'Ninjadev', - 'NuSan', - 'orange', - 'Poo-Brain', - 'Primitive', - 'Prismbeings', - 'Radium Software', - 'quite', - 'rgba', - 'Satori', - 'setchi', - 'sp4ghet', - 'Still', - 'Suricrasia Online', - 'tdhooper', - 'Ümlaüt Design', - 'Virgill', - 'Wrighter', - 'yx', -].map( ( text, iGreeting ) => { - const style = styles[ iGreeting % styles.length ]; - const spacing = style.spacing ?? 1.0; - const { totalWidth, chars } = calcCharPos( text, style.font ); - - return { - totalWidth: totalWidth * spacing, - scaleY: style.scaleY ?? 1.0, - chars: chars.map( ( { char, x } ) => ( { - char: char.charCodeAt( 0 ), - x: ( x - 0.5 * totalWidth ) / 96.0 * spacing * 1.4 // what the fuck is this magic number - } ) ), - }; -} ); - -export class Greetings extends Entity { - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const geometry = new InstancedGeometry(); - - const bufferP = glCat.createBuffer(); - bufferP.setVertexbuffer( new Float32Array( TRIANGLE_STRIP_QUAD ) ); - - geometry.vao.bindVertexbuffer( bufferP, 0, 2 ); - - const arrayParams = new Float32Array( 4 * INSTANCES ); // char, posFromCenter, width, time - const arrayParams2 = new Float32Array( 4 * INSTANCES ); // totalWidth, scaleY - for ( let i = 0; i < INSTANCES; i ++ ) { - arrayParams[ 4 * i + 0 ] = 0; - arrayParams[ 4 * i + 1 ] = 0; - arrayParams[ 4 * i + 2 ] = 0; - arrayParams[ 4 * i + 3 ] = 0; - arrayParams2[ 4 * i + 0 ] = 0; - } - - const bufferParams = glCat.createBuffer(); - bufferParams.setVertexbuffer( arrayParams, gl.STREAM_DRAW ); - geometry.vao.bindVertexbuffer( bufferParams, 1, 4, 1 ); - - const bufferParams2 = glCat.createBuffer(); - bufferParams2.setVertexbuffer( arrayParams2, gl.STREAM_DRAW ); - geometry.vao.bindVertexbuffer( bufferParams2, 2, 4, 1 ); - - geometry.count = 4; - geometry.mode = gl.TRIANGLE_STRIP; - geometry.primcount = INSTANCES; - - // -- material render -------------------------------------------------------------------------- - const forward = new Material( - greetingsVert, - greetingsFrag, - { - initOptions: { geometry: geometry, target: dummyRenderTarget }, - blend: [ gl.ONE, gl.ONE ], - }, - ); - - const materials = { forward }; - - forward.addUniformTextures( 'samplerSpriteSheets', ...spritesheets ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/greetings.vert', - '../shaders/greetings.frag', - ], - () => { - forward.replaceShader( greetingsVert, greetingsFrag ); - } - ); - } - } - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - } ); - mesh.depthTest = false; - mesh.depthWrite = false; - - // -- buffer updater --------------------------------------------------------------------------- - let headInstance = 0; - let headGreetings = 0; - - const lambda = new Lambda( { - onUpdate: ( { time, deltaTime } ) => { - if ( Math.floor( 8.0 * time ) === Math.floor( 8.0 * ( time - deltaTime ) ) ) { - return; - } - - const { totalWidth, scaleY, chars } = charPosList[ headGreetings ]; - - chars.map( ( { char, x } ) => { - arrayParams[ 4 * headInstance + 0 ] = char; - arrayParams[ 4 * headInstance + 1 ] = x; - arrayParams[ 4 * headInstance + 2 ] = headGreetings; - arrayParams[ 4 * headInstance + 3 ] = time; - arrayParams2[ 4 * headInstance + 0 ] = totalWidth; - arrayParams2[ 4 * headInstance + 1 ] = scaleY; - - headInstance = ( headInstance + 1 ) % INSTANCES; - } ); - - headGreetings = ( headGreetings + 1 ) % charPosList.length; - - bufferParams.setVertexbuffer( arrayParams, gl.STREAM_DRAW ); - bufferParams2.setVertexbuffer( arrayParams2, gl.STREAM_DRAW ); - }, - name: process.env.DEV && 'spawner', - } ); - - // -- components ------------------------------------------------------------------------------- - this.components.push( - lambda, - mesh, - ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'Greetings/active', ( { uninit } ) => { - mesh.active = !uninit; - mesh.visible = !uninit; - } ); - } -} diff --git a/src/entities/HooperBall.ts b/src/entities/HooperBall.ts deleted file mode 100644 index 35d3bc7..0000000 --- a/src/entities/HooperBall.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genOctahedron } from '../geometries/genOctahedron'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import hooperballFrag from '../shaders/hooperball.frag'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; - -export class Hooperball extends Entity { - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const octahedron = genOctahedron( { radius: 2.0, div: 1 } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( octahedron.position, 0, 3 ); - geometry.vao.bindIndexbuffer( octahedron.index ); - - geometry.count = octahedron.count; - geometry.mode = octahedron.mode; - geometry.indexType = octahedron.indexType; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - raymarchObjectVert, - hooperballFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - raymarchObjectVert, - hooperballFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry, target: dummyRenderTarget } - }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/hooperball.frag', () => { - deferred.replaceShader( raymarchObjectVert, hooperballFrag ); - depth.replaceShader( raymarchObjectVert, hooperballFrag ); - } ); - } - } - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - - material.addUniform( 'deformSeed', '1f', auto( 'Hooperball/deformSeed' ) ); - } ); - }, - name: process.env.DEV && 'setCameraUniforms', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - } -} diff --git a/src/entities/IBLLUT.ts b/src/entities/IBLLUT.ts deleted file mode 100644 index 82747a8..0000000 --- a/src/entities/IBLLUT.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { IBLLUT_ITER, IBLLUT_SIZE } from '../config'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { Swap } from '@fms-cat/experimental'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import { vdc } from '../utils/vdc'; -import iblLutFrag from '../shaders/ibl-lut.frag'; -import quadVert from '../shaders/quad.vert'; - -export class IBLLUT extends Entity { - public swap: Swap; - - public get texture(): GLCatTexture { - return this.swap.o.texture; - } - - public constructor() { - super(); - - // -- swap ------------------------------------------------------------------------------------- - this.swap = new Swap( - new BufferRenderTarget( { - width: IBLLUT_SIZE, - height: IBLLUT_SIZE, - name: process.env.DEV && 'IBLLUT/swap0', - filter: gl.NEAREST, - } ), - new BufferRenderTarget( { - width: IBLLUT_SIZE, - height: IBLLUT_SIZE, - name: process.env.DEV && 'IBLLUT/swap1', - filter: gl.NEAREST, - } ), - ); - - // -- post ------------------------------------------------------------------------------------- - let samples = 0.0; - - const material = new Material( - quadVert, - iblLutFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - material.addUniform( 'samples', '1f', samples ); - material.addUniform( 'vdc', '1f', vdc( samples, 2.0 ) ); - material.addUniformTextures( 'sampler0', this.swap.i.texture ); - - const quad = new Quad( { - target: this.swap.o, - material, - name: process.env.DEV && 'quad', - } ); - - // -- swapper ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onUpdate: () => { - samples ++; - this.swap.swap(); - - if ( samples > IBLLUT_ITER ) { - this.active = false; // THE LAMBDA ITSELF WILL ALSO BE DEACTIVATED - } else { - material.addUniform( 'samples', '1f', samples ); - material.addUniform( 'vdc', '1f', vdc( samples, 2.0 ) ); - material.addUniformTextures( 'sampler0', this.swap.i.texture ); - - quad.target = this.swap.o; - } - }, - name: process.env.DEV && 'swapper', - } ) ); - - this.components.push( quad ); - } -} diff --git a/src/entities/IFSAsUsual.ts b/src/entities/IFSAsUsual.ts deleted file mode 100644 index 8bfa1ce..0000000 --- a/src/entities/IFSAsUsual.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { Quaternion, Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import ifsAsUsualFrag from '../shaders/ifs-as-usual.frag'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; - -export class IFSAsUsual extends Entity { - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ 1.1, 1.1, 1.1 ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - raymarchObjectVert, - ifsAsUsualFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - raymarchObjectVert, - ifsAsUsualFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry, target: dummyRenderTarget } - }, - ); - - const materials = { deferred }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/ifs-as-usual.frag', () => { - deferred.replaceShader( raymarchObjectVert, ifsAsUsualFrag ); - depth.replaceShader( raymarchObjectVert, ifsAsUsualFrag ); - } ); - } - } - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - } ); - }, - name: process.env.DEV && 'setCameraUniforms', - } ) ); - - // -- speen ------------------------------------------------------------------------------------ - const axis = new Vector3( [ 1.0, -1.0, 1.0 ] ).normalized; - this.components.push( new Lambda( { - onUpdate: ( { time } ) => { - this.transform.rotation = Quaternion.fromAxisAngle( axis, time ); - }, - name: process.env.DEV && 'speen', - } ) ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'IFSAsUsual/ifsSeed', ( { value } ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( 'ifsSeed', '1f', value ); - } ); - } ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - } -} diff --git a/src/entities/IFSPiston.ts b/src/entities/IFSPiston.ts deleted file mode 100644 index ef2fd99..0000000 --- a/src/entities/IFSPiston.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Entity, EntityOptions } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { MaterialMap } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { Quaternion, Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { objectValuesMap } from '../utils/objectEntriesMap'; - -interface IFSPistonOptions extends EntityOptions { - group: number; - geometry: Geometry; - materials: MaterialMap; -} - -export class IFSPiston extends Entity { - public constructor( options: IFSPistonOptions ) { - super( options ); - - const { group, geometry, materials } = options; - - const pivot = new Entity(); - pivot.transform.position = new Vector3( [ 0.0, 10.0, 0.0 ] ); - this.children.push( pivot ); - - if ( process.env.DEV ) { - pivot.name = 'pivot'; - } - - // -- animation -------------------------------------------------------------------------------- - const up = new Vector3( [ 0, 1, 0 ] ); - - auto( `IFSPistons/group${ group }/rot`, ( { value } ) => { - pivot.transform.rotation = Quaternion.fromAxisAngle( up, 4.0 * Math.PI * value ); - } ); - - // -- updater ---------------------------------------------------------------------------------- - pivot.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - if ( material == null ) { return; } - - material.addUniform( - 'ifsSeed', - '1f', - auto( `IFSPistons/group${ group }/rot` ) + 60.0 * group, - ); - - material.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - } ); - }, - name: process.env.DEV && 'setCameraUniforms', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - mesh.cull = MeshCull.None; - pivot.components.push( mesh ); - } -} diff --git a/src/entities/IFSPistons.ts b/src/entities/IFSPistons.ts deleted file mode 100644 index 4e239a2..0000000 --- a/src/entities/IFSPistons.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { IFSPiston } from './IFSPiston'; -import { Material } from '../heck/Material'; -import { Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { quatFromUnitVectors } from '../utils/quatFromUnitVectors'; -import ifsPistonFrag from '../shaders/ifs-piston.frag'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; - -export class IFSPistons extends Entity { - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ 1.1, 10.1, 1.1 ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - raymarchObjectVert, - ifsPistonFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - raymarchObjectVert, - ifsPistonFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry, target: dummyRenderTarget } - }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/ifs-piston.frag', () => { - deferred.replaceShader( raymarchObjectVert, ifsPistonFrag ); - depth.replaceShader( raymarchObjectVert, ifsPistonFrag ); - } ); - } - } - - // -- children pistons ------------------------------------------------------------------------- - const up = new Vector3( [ 0, 1, 0 ] ); - - ( [ - [ new Vector3( [ 1, 1, 0 ] ).normalized, 0 ], - [ new Vector3( [ -1, -1, 0 ] ).normalized, 0 ], - [ new Vector3( [ -1, 1, 0 ] ).normalized, 1 ], - [ new Vector3( [ 1, -1, 0 ] ).normalized, 1 ], - ] as [ Vector3, number ][] ).map( ( [ v, group ], i ) => { - const piston = new IFSPiston( { - group, - geometry, - materials, - name: process.env.DEV && `${ i }`, - } ); - - piston.transform.position = v.scale( 1.5 ); - piston.transform.rotation = quatFromUnitVectors( up, v ); - - auto( `IFSPistons/group${ group }/pos`, ( { value } ) => { - piston.transform.position = v.scale( value ); - } ); - - this.children.push( piston ); - - return piston; - } ); - } -} diff --git a/src/entities/LightCube.ts b/src/entities/LightCube.ts deleted file mode 100644 index 495699b..0000000 --- a/src/entities/LightCube.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { gl } from '../globals/canvas'; -import colorFrag from '../shaders/color.frag'; -import objectVert from '../shaders/object.vert'; - -export class LightCube extends Entity { - public mesh: Mesh; - public color = [ 1.0, 1.0, 1.0 ]; - private __forward: Material; - - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ 1.0, 1.0, 1.0 ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindVertexbuffer( cube.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const forward = this.__forward = new Material( - objectVert, - colorFrag, - { - blend: [ gl.ONE, gl.ONE ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const materials = { forward, cubemap: forward }; - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onUpdate: () => { - this.__forward.addUniform( 'color', '4f', ...this.color, 1.0 ); - }, - name: process.env.DEV && 'updater', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'LightBar/mesh', - } ); - this.components.push( this.mesh ); - } -} diff --git a/src/entities/LightEntity.ts b/src/entities/LightEntity.ts deleted file mode 100644 index 7bf7030..0000000 --- a/src/entities/LightEntity.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity, EntityOptions } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { PerspectiveCamera } from '../heck/components/PerspectiveCamera'; -import { Quad } from '../heck/components/Quad'; -import { Swap } from '@fms-cat/experimental'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import quadVert from '../shaders/quad.vert'; -import shadowBlurFrag from '../shaders/shadow-blur.frag'; - -export interface LightEntityOptions extends EntityOptions { - scenes: Entity[]; - shadowMapFov?: number; - shadowMapNear?: number; - shadowMapFar?: number; - shadowMapSize?: number; - brtNamePrefix?: string; -} - -export class LightEntity extends Entity { - public spotness: number = 0.0; - public color: [ number, number, number ] = [ 1.0, 1.0, 1.0 ]; - public camera: PerspectiveCamera; - public shadowMap: BufferRenderTarget; - - public get shadowMapFov(): number { - return this.camera.fov; - } - - public get shadowMapNear(): number { - return this.camera.near; - } - - public get shadowMapFar(): number { - return this.camera.far; - } - - public constructor( options: LightEntityOptions ) { - super( options ); - - const swapOptions = { - width: options.shadowMapSize ?? 1024, - height: options.shadowMapSize ?? 1024, - }; - - const swap = new Swap( - new BufferRenderTarget( { - ...swapOptions, - name: process.env.DEV && `${ options.brtNamePrefix }/swap0`, - } ), - new BufferRenderTarget( { - ...swapOptions, - name: process.env.DEV && `${ options.brtNamePrefix }/swap1`, - } ) - ); - - // -- camera ----------------------------------------------------------------------------------- - const fov = options.shadowMapFov ?? 45.0; - const near = options.shadowMapNear ?? 0.1; - const far = options.shadowMapFar ?? 100.0; - - this.camera = new PerspectiveCamera( { - fov, - near, - far, - renderTarget: swap.o, - scenes: options.scenes, - name: process.env.DEV && 'shadowMapCamera', - materialTag: 'depth', - } ); - this.camera.clear = [ 1.0, 1.0, 1.0, 1.0 ]; - this.components.push( this.camera ); - - swap.swap(); - - // -- blur ------------------------------------------------------------------------------------- - for ( let i = 0; i < 2; i ++ ) { - const material = new Material( - quadVert, - shadowBlurFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - material.addUniform( 'isVert', '1i', i ); - material.addUniformTextures( 'sampler0', swap.i.texture ); - - this.components.push( new Quad( { - target: swap.o, - material, - name: process.env.DEV && `quadShadowBlur${ i }`, - } ) ); - - swap.swap(); - } - - // -- this is the shadow map ------------------------------------------------------------------- - this.shadowMap = swap.i; - } -} diff --git a/src/entities/LightShaft.ts b/src/entities/LightShaft.ts deleted file mode 100644 index bd69f60..0000000 --- a/src/entities/LightShaft.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity, EntityOptions } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { LightEntity } from './LightEntity'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { gl } from '../globals/canvas'; -import { randomTexture } from '../globals/randomTexture'; -import lightShaftFrag from '../shaders/light-shaft.frag'; -import lightShaftVert from '../shaders/light-shaft.vert'; - -interface LightShaftOptions extends EntityOptions { - light: LightEntity; - intensity?: number; -} - -export class LightShaft extends Entity { - private __forward: Material; - - public constructor( options: LightShaftOptions ) { - super( options ); - - const { light, intensity } = options; - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube(); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const forward = this.__forward = new Material( - lightShaftVert, - lightShaftFrag, - { - initOptions: { geometry: geometry, target: dummyRenderTarget }, - blend: [ gl.ONE, gl.ONE ], - }, - ); - - forward.addUniform( 'intensity', '1f', intensity ?? 0.01 ); - - forward.addUniformTextures( 'samplerRandom', randomTexture.texture ); - forward.addUniformTextures( 'samplerShadow', light.shadowMap.texture ); - - const materials = { forward }; - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - forward.addUniform( 'lightFov', '1f', light.shadowMapFov ); - forward.addUniform( 'lightNearFar', '2f', light.shadowMapNear, light.shadowMapFar ); - forward.addUniform( 'lightPos', '3f', ...light.globalTransformCache.position.elements ); - forward.addUniform( 'lightColor', '3f', ...light.color ); - - forward.addUniformMatrixVector( - 'lightPV', - 'Matrix4fv', - light.camera.projectionMatrix.multiply( - light.globalTransformCache.matrix.inverse! - ).elements, - ); - - forward.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - }, - name: process.env.DEV && 'updater', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - mesh.depthTest = false; - mesh.depthWrite = false; - this.components.push( mesh ); - } - - /** - * どうやってフレームバッファのデプスを取るかわかりませんでした 許してほしい - */ - public setDefferedCameraTarget( deferredCameraTarget: BufferRenderTarget ): void { - this.__forward.addUniformTextures( 'samplerDeferred0', deferredCameraTarget.texture ); - } -} diff --git a/src/entities/NoiseVoxels.ts b/src/entities/NoiseVoxels.ts deleted file mode 100644 index 2ccc385..0000000 --- a/src/entities/NoiseVoxels.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { Quaternion, Vector3, matrix3d } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { glCat } from '../globals/canvas'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import { quadGeometry } from '../globals/quadGeometry'; -import depthFrag from '../shaders/depth.frag'; -import noiseVoxelsFrag from '../shaders/noise-voxels.frag'; -import noiseVoxelsVert from '../shaders/noise-voxels.vert'; - -const CUBE_PER_AXIS = 8; -const PRIMCOUNT = CUBE_PER_AXIS * CUBE_PER_AXIS * CUBE_PER_AXIS; - -export class NoiseVoxels extends Entity { - public mesh: Mesh; - - public constructor() { - super(); - - this.transform.scale = Vector3.one.scale( 0.7 ); - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onUpdate: ( { time } ) => { - this.transform.rotation = Quaternion.fromAxisAngle( - new Vector3( [ 1.0, 0.5, -2.0 ] ).normalized, - 0.4 * time, - ).multiply( Quaternion.fromAxisAngle( - new Vector3( [ 0.0, 1.0, 0.2 ] ).normalized, - time, - ) ); - }, - } ) ); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube(); - - const geometry = new InstancedGeometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindVertexbuffer( cube.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - const arrayInstancePos = matrix3d( CUBE_PER_AXIS, CUBE_PER_AXIS, CUBE_PER_AXIS ); - const bufferInstancePos = glCat.createBuffer(); - bufferInstancePos.setVertexbuffer( new Float32Array( arrayInstancePos ) ); - geometry.vao.bindVertexbuffer( bufferInstancePos, 2, 3, 1 ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - geometry.primcount = PRIMCOUNT; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - noiseVoxelsVert, - noiseVoxelsFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry: quadGeometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - noiseVoxelsVert, - depthFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/noise-voxels.vert', - '../shaders/noise-voxels.frag', - ], - () => { - deferred.replaceShader( noiseVoxelsVert, noiseVoxelsFrag ); - depth.replaceShader( noiseVoxelsVert, depthFrag ); - }, - ); - } - } - - // -- auto ------------------------------------------------------------------------------------- - auto( 'NoiseVoxels/phase', ( { value } ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( 'phase', '1f', value ); - } ); - } ); - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry: geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - this.components.push( this.mesh ); - } -} diff --git a/src/entities/Phantom.ts b/src/entities/Phantom.ts deleted file mode 100644 index 7203b5e..0000000 --- a/src/entities/Phantom.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import phantomFrag from '../shaders/phantom.frag'; -import quadVert from '../shaders/quad.vert'; - -export class Phantom extends Entity { - private __forward: Material; - - public constructor() { - super(); - - // -- material --------------------------------------------------------------------------------- - const forward = this.__forward = new Material( - quadVert, - phantomFrag, - { - initOptions: { geometry: quadGeometry, target: dummyRenderTarget }, - blend: [ gl.ONE, gl.ONE ], - } - ); - - forward.addUniform( 'range', '4f', -1.0, -1.0, 1.0, 1.0 ); - forward.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV && module.hot ) { - module.hot.accept( [ '../shaders/phantom.frag' ], () => { - forward.replaceShader( quadVert, phantomFrag ); - } ); - } - - const materials = { forward, cubemap: forward }; - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - forward.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - }, - name: process.env.DEV && 'updater', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry: quadGeometry, - materials, - } ); - mesh.depthTest = false; - mesh.depthWrite = false; - this.components.push( mesh ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'Phantom/amp', ( { value } ) => { - forward.addUniform( 'amp', '1f', value ); - - mesh.active = value > 0.0; - mesh.visible = mesh.active; - } ); - } - - /** - * どうやってフレームバッファのデプスを取るかわかりませんでした 許してほしい - */ - public setDefferedCameraTarget( deferredCameraTarget: BufferRenderTarget ): void { - this.__forward.addUniformTextures( 'samplerDeferred0', deferredCameraTarget.texture ); - } -} diff --git a/src/entities/PixelSorter.ts b/src/entities/PixelSorter.ts deleted file mode 100644 index 3b112ba..0000000 --- a/src/entities/PixelSorter.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { Swap } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import pixelSorterFrag from '../shaders/pixel-sorter.frag'; -import pixelSorterIndexFrag from '../shaders/pixel-sorter-index.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface PixelSorterOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -export class PixelSorter extends Entity { - public swapBuffer: Swap; - - public constructor( options: PixelSorterOptions ) { - super(); - this.visible = false; - - const entityBypass = new Entity(); - entityBypass.visible = false; - this.children.push( entityBypass ); - - const entityMain = new Entity(); - entityMain.active = false; - entityMain.visible = false; - this.children.push( entityMain ); - - if ( process.env.DEV ) { - entityBypass.name = 'entityBypass'; - entityMain.name = 'entityMain'; - } - - this.swapBuffer = new Swap( - new BufferRenderTarget( { - width: options.target.width, - height: options.target.height, - name: process.env.DEV && 'PixelSorter/swap0', - filter: gl.NEAREST, - } ), - new BufferRenderTarget( { - width: options.target.width, - height: options.target.height, - name: process.env.DEV && 'PixelSorter/swap1', - filter: gl.NEAREST, - } ), - ); - - const bufferIndex = new BufferRenderTarget( { - width: options.target.width, - height: options.target.height, - name: process.env.DEV && 'PixelSorter/index', - filter: gl.NEAREST, - } ); - - // -- bypass ----------------------------------------------------------------------------------- - entityBypass.components.push( new Blit( { - src: options.input, - dst: options.target, - name: process.env.DEV && 'blitBypass', - } ) ); - - // -- calc index ------------------------------------------------------------------------------- - let mul = 1; - const indexMaterials: Material[] = []; - - while ( mul < options.target.width ) { - const isLast = ( mul * 8 > options.target.width ); - - const material = new Material( - quadVert, - pixelSorterIndexFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - material.addUniform( 'mul', '1f', mul ); - material.addUniformTextures( - 'sampler0', - options.input.texture, - ); - material.addUniformTextures( - 'sampler1', - this.swapBuffer.o.texture, - ); - indexMaterials.push( material ); - - entityMain.components.push( new Quad( { - target: isLast ? bufferIndex : this.swapBuffer.i, - material, - name: process.env.DEV && `quadIndex-${ mul }`, - } ) ); - - this.swapBuffer.swap(); - - mul *= 8; - } - - // -- sort ------------------------------------------------------------------------------------- - let dir = 1.0 / 32.0; - let comp = 1.0 / 32.0; - const sortMaterials: Material[] = []; - - while ( dir < 1.0 ) { - const isFirst = dir === 1.0 / 32.0; - const isLast = ( dir === 0.5 ) && ( comp === 1.0 / 32.0 ); - - const material = new Material( - quadVert, - pixelSorterFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - material.addUniform( 'dir', '1f', dir ); - material.addUniform( 'comp', '1f', comp ); - material.addUniformTextures( - 'sampler0', - ( isFirst ? options.input : this.swapBuffer.o ).texture, - ); - material.addUniformTextures( - 'sampler1', - bufferIndex.texture, - ); - sortMaterials.push( material ); - - entityMain.components.push( new Quad( { - target: isLast ? options.target : this.swapBuffer.i, - material, - name: process.env.DEV && `quad-${ dir }-${ comp }`, - } ) ); - - this.swapBuffer.swap(); - - if ( comp === 1.0 / 32.0 ) { - dir *= 2.0; - comp = dir; - } else { - comp /= 2.0; - } - } - - // -- update uniform --------------------------------------------------------------------------- - auto( 'PixelSorter/amp', ( { value } ) => { - indexMaterials.map( ( material ) => { - material.addUniform( 'threshold', '1f', Math.abs( value ) ); - } ); - - sortMaterials.map( ( material ) => { - material.addUniform( 'reverse', '1i', ( value < 0.0 ) ? 1 : 0 ); - } ); - - entityMain.active = 0.001 < Math.abs( value ); - entityBypass.active = !entityMain.active; - } ); - } -} diff --git a/src/entities/Post.ts b/src/entities/Post.ts deleted file mode 100644 index a806595..0000000 --- a/src/entities/Post.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import postFrag from '../shaders/post.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface PostOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -const colorPresets = [ - { - lift: [ -0.07, 0.02, 0.03, 0.01 ], - gamma: [ 0.0, -0.02, 0.07, 0.02 ], - gain: [ 1.20, 0.95, 0.92, 1.0 ], - }, - { - lift: [ -0.03, 0.01, 0.08, 0.0 ], - gamma: [ -0.04, 0.02, -0.05, 0.0 ], - gain: [ 1.04, 0.98, 1.04, 1.0 ], - }, - { - lift: [ -0.06, 0.03, 0.1, 0.02 ], - gamma: [ 0.02, 0.04, 0.04, 0.04 ], - gain: [ 1.0, 1.0, 1.0, 1.0 ], - }, -]; - -export class Post extends Entity { - public constructor( options: PostOptions ) { - super(); - - this.visible = false; - - // -- post ------------------------------------------------------------------------------------- - const material = new Material( - quadVert, - postFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - material.addUniformTextures( 'sampler0', options.input.texture ); - material.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/post.frag', () => { - material.replaceShader( quadVert, postFrag ); - } ); - } - } - - const quad = new Quad( { - target: options.target, - material, - name: process.env.DEV && 'quad', - } ); - this.components.push( quad ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'Post/colorPreset', ( { value } ) => { - const preset = colorPresets[ value ]; - material.addUniform( 'colorLift', '4f', ...preset.lift ); - material.addUniform( 'colorGamma', '4f', ...preset.gamma ); - material.addUniform( 'colorGain', '4f', ...preset.gain ); - } ); - - auto( 'Post/mixInvert', ( { value } ) => { - material.addUniform( 'mixInvert', '1f', value ); - } ); - - auto( 'Post/mosaicAmp', ( { value } ) => { - material.addUniform( 'mosaicAmp', '1f', value ); - } ); - } -} diff --git a/src/entities/PsyField.ts b/src/entities/PsyField.ts deleted file mode 100644 index 622f5a1..0000000 --- a/src/entities/PsyField.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { LightEntity } from './LightEntity'; -import { Material } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { Vector3 } from '@fms-cat/experimental'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import psyFieldFrag from '../shaders/psy-field.frag'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; - -export class PsyField extends Entity { - public lights: LightEntity[] = []; - - public constructor() { - super(); - - this.transform.position = new Vector3( [ 0.0, 0.0, 0.0 ] ); - this.transform.scale = new Vector3( [ 1.0, 1.0, 1.0 ] ); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ 100.0, 1.0, 100.0 ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - // const forward = new Material( - // raymarchObjectVert, - // psyFieldFrag, - // { - // defines: [ 'FORWARD 1' ], - // initOptions: { geometry, target: dummyRenderTarget }, - // }, - // ); - - const deferred = new Material( - raymarchObjectVert, - psyFieldFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - raymarchObjectVert, - psyFieldFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry, target: dummyRenderTarget } - }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/psy-field.frag', () => { - // forward.replaceShader( raymarchObjectVert, psyFieldFrag ); - deferred.replaceShader( raymarchObjectVert, psyFieldFrag ); - depth.replaceShader( raymarchObjectVert, psyFieldFrag ); - } ); - } - } - - // -- forward lights --------------------------------------------------------------------------- - // this.components.push( new Lambda( { - // onDraw: ( { frameCount } ) => { - // setLightUniforms( forward, this.lights, frameCount ); - // }, - // name: process.env.DEV && 'setLightUniforms', - // } ) ); - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - } ); - }, - name: process.env.DEV && 'setCameraUniforms', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - } -} diff --git a/src/entities/RTInspector.ts b/src/entities/RTInspector.ts deleted file mode 100644 index da3b778..0000000 --- a/src/entities/RTInspector.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RTINSPECTOR_CAPTURE_INDEX, RTINSPECTOR_CAPTURE_NAME, RTINSPECTOR_MULTIPLE } from '../config-hot'; -import { RenderTarget } from '../heck/RenderTarget'; -import { canvas, gl } from '../globals/canvas'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import inspectorFrag from '../shaders/inspector.frag'; -import quadVert from '../shaders/quad.vert'; - -export interface RTInspectorOptions { - target: RenderTarget; -} - -export class RTInspector extends Entity { - public entitySingle: Entity; - public entityMultiple: Entity; - public materialSingle: Material; - public quadSingle: Quad; - public blitsMultiple: Blit[]; - - public constructor( options: RTInspectorOptions ) { - super(); - - // -- single ----------------------------------------------------------------------------------- - this.entitySingle = new Entity( { - name: 'entitySingle', - } ); - this.children.push( this.entitySingle ); - - this.materialSingle = new Material( - quadVert, - inspectorFrag, - { initOptions: { target: dummyRenderTarget, geometry: quadGeometry } }, - ); - - this.quadSingle = new Quad( { - target: options.target, - material: this.materialSingle, - name: 'quadSingle', - ignoreBreakpoints: true, - } ); - this.entitySingle.components.push( this.quadSingle ); - - // -- mouse listener --------------------------------------------------------------------------- - canvas.addEventListener( 'mousemove', ( { offsetX, offsetY } ) => { - const rect = canvas.getBoundingClientRect(); - const x = offsetX / rect.width; - const y = 1.0 - offsetY / rect.height; - - this.materialSingle.addUniform( 'mouse', '2f', x, y ); - } ); - - // -- multiple --------------------------------------------------------------------------------- - this.entityMultiple = new Entity( { - name: 'entityMultiple', - } ); - this.children.push( this.entityMultiple ); - - // count first? - let count = 0; - for ( const src of BufferRenderTarget.nameMap.values() ) { - count += src.numBuffers; - } - - // grid - const grid = Math.ceil( Math.sqrt( count ) ); - const width = Math.floor( options.target.width / grid ); - const height = Math.floor( options.target.height / grid ); - - // then add blits - let iBlit = 0; - this.blitsMultiple = []; - for ( const src of BufferRenderTarget.nameMap.values() ) { - for ( let iAttachment = 0; iAttachment < src.numBuffers; iAttachment ++ ) { - const x = iBlit % grid; - const y = grid - 1 - Math.floor( iBlit / grid ); - const dstRect: [ number, number, number, number ] = [ - width * x, - height * y, - width * ( x + 1.0 ), - height * ( y + 1.0 ), - ]; - - const blit = new Blit( { - src, - dst: options.target, - attachment: gl.COLOR_ATTACHMENT0 + iAttachment, - dstRect, - name: `${ src.name }/${ iAttachment }`, - ignoreBreakpoints: true, - } ); - - this.blitsMultiple.push( blit ); - this.entityMultiple.components.push( blit ); - - iBlit ++; - } - } - - // -- see the config --------------------------------------------------------------------------- - this.__updateTarget(); - - // -- hot hot hot hot hot ---------------------------------------------------------------------- - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../config-hot', () => { - this.__updateTarget(); - } ); - } - } - } - - private __updateTarget(): void { - if ( RTINSPECTOR_MULTIPLE ) { - this.entityMultiple.active = true; - this.entitySingle.active = false; - } else if ( RTINSPECTOR_CAPTURE_NAME != null ) { - this.entityMultiple.active = false; - - const target = BufferRenderTarget.nameMap.get( RTINSPECTOR_CAPTURE_NAME ?? '' ) ?? null; - const attachment = gl.COLOR_ATTACHMENT0 + ( RTINSPECTOR_CAPTURE_INDEX ?? 0 ); - - if ( !target ) { - if ( process.env.DEV ) { - console.warn( `RTInspector: Cannot retrieve a render target texture, RTINSPECTOR_CAPTURE_NAME: ${ RTINSPECTOR_CAPTURE_NAME }, RTINSPECTOR_CAPTURE_INDEX: ${ RTINSPECTOR_CAPTURE_INDEX }` ); - } - - this.entitySingle.active = false; - return; - } - - const texture = target.getTexture( attachment )!; - this.materialSingle.addUniformTextures( 'sampler0', texture ); - - this.entitySingle.active = true; - } else { - // fallback to not render it - this.entityMultiple.active = false; - this.entitySingle.active = false; - } - } -} diff --git a/src/entities/Racer.ts b/src/entities/Racer.ts deleted file mode 100644 index 14b1572..0000000 --- a/src/entities/Racer.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { GPUParticles } from './GPUParticles'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { auto } from '../globals/automaton'; -import { dummyRenderTargetFourDrawBuffers, dummyRenderTargetTwoDrawBuffers } from '../globals/dummyRenderTarget'; -import { gl, glCat } from '../globals/canvas'; -import { matrix2d } from '@fms-cat/experimental'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import quadVert from '../shaders/quad.vert'; -import racerComputeFrag from '../shaders/racer-compute.frag'; -import racerRenderFrag from '../shaders/racer-render.frag'; -import racerRenderVert from '../shaders/racer-render.vert'; - -const TRAILS = 4096; -const TRAIL_LENGTH = 64; - -export class Racer extends Entity { - public constructor() { - super(); - - // -- material compute ------------------------------------------------------------------------- - const materialCompute = new Material( - quadVert, - racerComputeFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTargetTwoDrawBuffers } }, - ); - - materialCompute.addUniform( 'trails', '1f', TRAILS ); - materialCompute.addUniform( 'trailLength', '1f', TRAIL_LENGTH ); - materialCompute.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/racer-compute.frag', () => { - materialCompute.replaceShader( quadVert, racerComputeFrag ); - } ); - } - } - - // -- lambda to say update --------------------------------------------------------------------- - this.components.push( new Lambda( { - onUpdate: ( { time, deltaTime } ) => { - const shouldUpdate - = Math.floor( 60.0 * time ) !== Math.floor( 60.0 * ( time - deltaTime ) ); - materialCompute.addUniform( 'shouldUpdate', '1i', shouldUpdate ? 1 : 0 ); - }, - name: process.env.DEV && 'updateShouldUpdate', - } ) ); - - // -- geometry render -------------------------------------------------------------------------- - const geometryRender = new Geometry(); - - const bufferComputeUV = glCat.createBuffer(); - bufferComputeUV.setVertexbuffer( - new Float32Array( matrix2d( TRAIL_LENGTH, TRAILS ) ).map( ( v, i ) => { - if ( i % 2 === 0 ) { return ( v + 0.5 ) / TRAIL_LENGTH; } - else { return ( v + 0.5 ) / TRAILS; } - } ) - ); - - geometryRender.vao.bindVertexbuffer( bufferComputeUV, 0, 2 ); - - geometryRender.count = TRAILS * TRAIL_LENGTH; - geometryRender.mode = gl.POINTS; - - // -- materials render ------------------------------------------------------------------------- - const forward = new Material( - racerRenderVert, - racerRenderFrag, - { - defines: [ 'FORWARD 1' ], - initOptions: { geometry: geometryRender, target: dummyRenderTargetFourDrawBuffers }, - blend: [ gl.ONE, gl.ONE ], - }, - ); - - // const cubemap = new Material( - // racerRenderVert, - // racerRenderFrag, - // { - // defines: [ 'FORWARD 1', 'CUBEMAP 1' ], - // initOptions: { geometry: geometryRender, target: dummyRenderTargetFourDrawBuffers }, - // blend: [ gl.ONE, gl.ONE ], - // }, - // ); - - const deferred = new Material( - racerRenderVert, - racerRenderFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry: geometryRender, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - forward.addUniform( 'trails', '1f', TRAILS ); - forward.addUniform( 'trailLength', '1f', TRAIL_LENGTH ); - - // cubemap.addUniform( 'trails', '1f', TRAILS ); - // cubemap.addUniform( 'trailLength', '1f', TRAIL_LENGTH ); - - deferred.addUniform( 'trails', '1f', TRAILS ); - deferred.addUniform( 'trailLength', '1f', TRAIL_LENGTH ); - - const materialsRender = { forward, deferred }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/racer-render.vert', - '../shaders/racer-render.frag', - ], - () => { - forward.replaceShader( racerRenderVert, racerRenderFrag ); - // cubemap.replaceShader( racerRenderVert, racerRenderFrag ); - deferred.replaceShader( racerRenderVert, racerRenderFrag ); - } - ); - } - } - - // -- auto ------------------------------------------------------------------------------------- - auto( 'Racer/active', ( { init, uninit } ) => { - this.active = !uninit; - this.visible = !uninit; - - materialCompute.addUniform( 'init', '1i', init ? 1 : 0 ); - } ); - - // -- gpu particles ---------------------------------------------------------------------------- - const gpuParticles = new GPUParticles( { - materialCompute, - geometryRender, - materialsRender, - computeWidth: TRAIL_LENGTH, - computeHeight: TRAILS, - computeNumBuffers: 2, - brtNamePrefix: process.env.DEV && this.name, - } ); - gpuParticles.meshRender.depthWrite = false; - this.children.push( gpuParticles ); - } -} diff --git a/src/entities/RectTorus.ts b/src/entities/RectTorus.ts deleted file mode 100644 index 3ec6635..0000000 --- a/src/entities/RectTorus.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { glCat } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import depthFrag from '../shaders/depth.frag'; -import rectTorusFrag from '../shaders/rect-torus.frag'; -import rectTorusVert from '../shaders/rect-torus.vert'; - -export class RectTorus extends Entity { - public mesh: Mesh; - - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube(); - - const geometry = new InstancedGeometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindVertexbuffer( cube.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - const arrayInstanceId = [ ...Array( 4 ).keys() ]; - const bufferInstanceId = glCat.createBuffer(); - bufferInstanceId.setVertexbuffer( new Float32Array( arrayInstanceId ) ); - geometry.vao.bindVertexbuffer( bufferInstanceId, 2, 1, 1 ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - geometry.primcount = 4; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - rectTorusVert, - rectTorusFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry: quadGeometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - rectTorusVert, - depthFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/rect-torus.vert', - '../shaders/rect-torus.frag', - ], - () => { - deferred.replaceShader( rectTorusVert, rectTorusFrag ); - depth.replaceShader( rectTorusVert, depthFrag ); - }, - ); - } - } - - // -- mesh ------------------------------------------------------------------------------------- - this.mesh = new Mesh( { - geometry: geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - this.components.push( this.mesh ); - } -} diff --git a/src/entities/Rings.ts b/src/entities/Rings.ts deleted file mode 100644 index c19a959..0000000 --- a/src/entities/Rings.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Material } from '../heck/Material'; -import { Mesh } from '../heck/components/Mesh'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { genTorus } from '../geometries/genTorus'; -import { glCat } from '../globals/canvas'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import depthFrag from '../shaders/depth.frag'; -import ringsFrag from '../shaders/rings.frag'; -import ringsVert from '../shaders/rings.vert'; - -const PRIMCOUNT = 32; - -export class Rings extends Entity { - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const torus = genTorus( { segmentsRadial: 256 } ); - - const geometry = new InstancedGeometry(); - - geometry.vao.bindVertexbuffer( torus.position, 0, 3 ); - geometry.vao.bindVertexbuffer( torus.normal, 1, 3 ); - geometry.vao.bindIndexbuffer( torus.index ); - - const arrayInstanceId = [ ...Array( PRIMCOUNT ).keys() ]; - const bufferInstanceId = glCat.createBuffer(); - bufferInstanceId.setVertexbuffer( new Float32Array( arrayInstanceId ) ); - - geometry.vao.bindVertexbuffer( bufferInstanceId, 2, 1, 1 ); - - geometry.count = torus.count; - geometry.mode = torus.mode; - geometry.indexType = torus.indexType; - geometry.primcount = PRIMCOUNT; - - // -- materials -------------------------------------------------------------------------------- - const cubemap = new Material( - ringsVert, - ringsFrag, - { - defines: [ 'FORWARD 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const deferred = new Material( - ringsVert, - ringsFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTarget }, - }, - ); - - const depth = new Material( - ringsVert, - depthFrag, - { initOptions: { geometry, target: dummyRenderTarget } }, - ); - - const materials = { - cubemap, - deferred, - depth, - }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/rings.vert', - '../shaders/rings.frag', - ], - () => { - cubemap.replaceShader( ringsVert, ringsFrag ); - deferred.replaceShader( ringsVert, ringsFrag ); - depth.replaceShader( ringsVert, depthFrag ); - }, - ); - } - } - - // -- begin ------------------------------------------------------------------------------------ - auto( 'Rings/begin', ( { value } ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( 'begin', '1f', value ); - } ); - } ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'Rings/mesh', - } ); - this.components.push( mesh ); - } -} diff --git a/src/entities/SSR.ts b/src/entities/SSR.ts deleted file mode 100644 index 1e2871a..0000000 --- a/src/entities/SSR.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { DeferredCamera } from './DeferredCamera'; -import { Entity } from '../heck/Entity'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import quadVert from '../shaders/quad.vert'; -import ssrFrag from '../shaders/ssr.frag'; - -export interface SSROptions { - camera: DeferredCamera; - shaded: BufferRenderTarget; - target: RenderTarget; -} - -export class SSR extends Entity { - public constructor( options: SSROptions ) { - super(); - - const entityBypass = new Entity(); - entityBypass.visible = false; - this.children.push( entityBypass ); - - const entityMain = new Entity(); - entityMain.active = false; - entityMain.visible = false; - this.children.push( entityMain ); - - if ( process.env.DEV ) { - entityBypass.name = 'entityBypass'; - entityMain.name = 'entityMain'; - } - - // -- bypass ----------------------------------------------------------------------------------- - entityBypass.components.push( new Blit( { - src: options.shaded, - dst: options.target, - name: process.env.DEV && 'blitBypass', - } ) ); - - // -- ha --------------------------------------------------------------------------------------- - const { camera } = options; - - const material = new Material( - quadVert, - ssrFrag, - { - initOptions: { geometry: quadGeometry, target: dummyRenderTarget }, - }, - ); - - material.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - for ( let i = 0; i < 4; i ++ ) { - material.addUniformTextures( - 'sampler' + i, - options.camera.cameraTarget.getTexture( gl.COLOR_ATTACHMENT0 + i )!, - ); - } - - material.addUniformTextures( 'samplerShaded', options.shaded.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/ssr.frag', () => { - material.replaceShader( quadVert, ssrFrag ); - } ); - } - } - - // -- camera uniforms -------------------------------------------------------------------------- - const lambda = new Lambda( { - onUpdate: () => { - const cameraView = camera.transform.matrix.inverse!; - - material.addUniformMatrixVector( - 'cameraView', - 'Matrix4fv', - cameraView.elements - ); - - material.addUniformMatrixVector( - 'cameraPV', - 'Matrix4fv', - camera.camera.projectionMatrix.multiply( - cameraView - ).elements - ); - - material.addUniform( - 'cameraNearFar', - '2f', - camera.camera.near, - camera.camera.far - ); - - material.addUniform( - 'cameraPos', - '3f', - ...camera.transform.position.elements - ); - }, - name: process.env.DEV && 'setCameraUniforms', - } ); - entityMain.components.push( lambda ); - - // -- quad ------------------------------------------------------------------------------------- - const quad = new Quad( { - target: options.target, - material, - name: process.env.DEV && 'quad', - } ); - entityMain.components.push( quad ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'SSR/active', ( { uninit } ) => { - entityMain.active = !uninit; - entityBypass.active = !entityMain.active; - } ); - } -} diff --git a/src/entities/SceneBegin.ts b/src/entities/SceneBegin.ts deleted file mode 100644 index 9ee7c72..0000000 --- a/src/entities/SceneBegin.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Condition } from './Condition'; -import { Cube } from './Cube'; -import { Entity } from '../heck/Entity'; -import { LightEntity } from './LightEntity'; -import { Vector3 } from '@fms-cat/experimental'; - - -interface SceneBeginOptions { - scenes: Entity[]; -} - -export class SceneBegin extends Entity { - public readonly lights: LightEntity[]; - - public constructor( { scenes }: SceneBeginOptions ) { - super(); - - // -- lights ----------------------------------------------------------------------------------- - const light1 = new LightEntity( { - scenes, - shadowMapFov: 30.0, - shadowMapNear: 1.0, - shadowMapFar: 20.0, - name: process.env.DEV && 'light1', - brtNamePrefix: process.env.DEV && 'SceneBegin/light1', - } ); - light1.color = [ 200.0, 200.0, 200.0 ]; - light1.transform.lookAt( new Vector3( [ 4.0, 4.0, 4.0 ] ) ); - - const light2 = new LightEntity( { - scenes, - shadowMapFov: 30.0, - shadowMapNear: 1.0, - shadowMapFar: 20.0, - name: process.env.DEV && 'light2', - brtNamePrefix: process.env.DEV && 'SceneBegin/light2', - } ); - light2.color = [ 80.0, 90.0, 100.0 ]; - light2.transform.lookAt( new Vector3( [ -4.0, 0.0, -4.0 ] ) ); - - this.lights = [ light1, light2 ]; - - // -- scene ------------------------------------------------------------------------------------ - this.children.push( - new Cube(), - new Condition(), - ...this.lights, - ); - } -} diff --git a/src/entities/SceneCrystals.ts b/src/entities/SceneCrystals.ts deleted file mode 100644 index b9a7c35..0000000 --- a/src/entities/SceneCrystals.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { ChaosTorus } from '../automaton-fxs/ChaosTorus'; -import { Crystal } from './Crystal'; -import { Entity } from '../heck/Entity'; -import { Greetings } from './Greetings'; -import { Lambda } from '../heck/components/Lambda'; -import { LightEntity } from './LightEntity'; -import { Phantom } from './Phantom'; -import { Quaternion, Vector3, Xorshift } from '@fms-cat/experimental'; -import { Rings } from './Rings'; -import { auto } from '../globals/automaton'; - -interface SceneCrystalsOptions { - scenes: Entity[]; -} - -export class SceneCrystals extends Entity { - public readonly lights: LightEntity[]; - private __phantom: Phantom; - - public constructor( { scenes }: SceneCrystalsOptions ) { - super(); - - // -- crystals --------------------------------------------------------------------------------- - const crystal = new Crystal( { width: 0.3, height: 1.5, noiseOffset: 7.0 } ); - - const speen = new Entity(); - - const up = new Vector3( [ 0.0, 1.0, 0.0 ] ); - this.components.push( new Lambda( { - onUpdate: ( { time } ) => { - speen.transform.rotation = Quaternion.fromAxisAngle( up, time ); - }, - } ) ); - - for ( let i = 0; i < 3; i ++ ) { - const smolCrystal = new Crystal( { width: 0.3, height: 1.5, noiseOffset: i } ); - const t = Math.PI * i / 1.5; - smolCrystal.transform.position = new Vector3( [ Math.cos( t ), 0.0, Math.sin( t ) ] ); - smolCrystal.transform.scale = new Vector3( [ 0.5, 0.5, 0.5 ] ); - speen.children.push( smolCrystal ); - } - - // -- rings ------------------------------------------------------------------------------------ - const rings = new Rings(); - rings.transform.rotation = Quaternion.fromAxisAngle( - new Vector3( [ 1.0, 0.0, 0.0 ] ), - 0.1, - ).multiply( Quaternion.fromAxisAngle( - new Vector3( [ 0.0, 0.0, 1.0 ] ), - 0.1, - ) ); - - // -- chaos torus ------------------------------------------------------------------------------ - const rng = new Xorshift( 618954 ); - const chaosToruses = [ ...Array( 6 ).keys() ].map( () => { - const pivot = new Entity(); - pivot.visible = false; - pivot.transform.rotation = Quaternion.fromAxisAngle( - new Vector3( [ 1.0, 0.0, 0.0 ] ), - rng.gen() * 6.0, - ).multiply( Quaternion.fromAxisAngle( - new Vector3( [ 0.0, 1.0, 0.0 ] ), - rng.gen() * 6.0, - ) ); - - const chaosTorus = new ChaosTorus(); - chaosTorus.transform.position = new Vector3( [ 2.5, 0.0, 0.0 ] ); - pivot.children.push( chaosTorus ); - - return pivot; - } ); - - auto( 'SceneCrystals/ChaosTorus/active', ( { uninit } ) => { - chaosToruses.map( ( entity ) => ( entity.visible = !uninit ) ); - } ); - - // -- phantom ---------------------------------------------------------------------------------- - const phantom = this.__phantom = new Phantom(); - - // -- greetings -------------------------------------------------------------------------------- - const greetings = new Greetings(); - - // -- lights ----------------------------------------------------------------------------------- - const light1 = new LightEntity( { - scenes, - shadowMapFov: 30.0, - shadowMapNear: 1.0, - shadowMapFar: 20.0, - name: process.env.DEV && 'light1', - brtNamePrefix: process.env.DEV && 'SceneCrystals/light1', - } ); - light1.color = [ 100.0, 100.0, 100.0 ]; - light1.transform.lookAt( new Vector3( [ 0.0, 4.0, 1.0 ] ) ); - - auto( 'SceneCrystals/light/amp', ( { value } ) => { - light1.active = value > 0.0; - light1.color = [ 100.0 * value, 100.0 * value, 100.0 * value ]; - } ); - - this.lights = [ light1 ]; - - // -- children --------------------------------------------------------------------------------- - this.children.push( - crystal, - speen, - rings, - ...chaosToruses, - phantom, - greetings, - ...this.lights, - ); - } - - public setDefferedCameraTarget( deferredCameraTarget: BufferRenderTarget ): void { - this.__phantom.setDefferedCameraTarget( deferredCameraTarget ); - } -} diff --git a/src/entities/SceneDynamic.ts b/src/entities/SceneDynamic.ts deleted file mode 100644 index 9bc24e5..0000000 --- a/src/entities/SceneDynamic.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { CyclicBoard } from './CyclicBoard'; -import { Entity } from '../heck/Entity'; -import { LightEntity } from './LightEntity'; -import { LightShaft } from './LightShaft'; -import { Quaternion, Vector3 } from '@fms-cat/experimental'; -import { RectTorus } from './RectTorus'; - -interface SceneDynamicOptions { - scenes: Entity[]; -} - -export class SceneDynamic extends Entity { - public readonly lights: LightEntity[]; - private readonly __shafts: LightShaft[]; - - public constructor( { scenes }: SceneDynamicOptions ) { - super(); - - // -- rectTorus -------------------------------------------------------------------------------- - const rectToruses = [ ...new Array( 4 ).keys() ].map( ( i ) => { - const rectTorus = new RectTorus(); - - rectTorus.transform.position = new Vector3( [ 0.0, 0.0, -0.5 - 0.5 * i ] ); - rectTorus.transform.rotation = Quaternion.fromAxisAngle( - new Vector3( [ 1.0, 0.0, 0.0 ] ).normalized, - 1.57 - ).multiply( Quaternion.fromAxisAngle( - new Vector3( [ 0.0, 1.0, 0.0 ] ).normalized, - i - ).multiply( Quaternion.fromAxisAngle( - new Vector3( [ 1.0, 0.0, 1.0 ] ).normalized, - 0.1 - ) ) ); - - return rectTorus; - } ); - - // -- cyclic board ----------------------------------------------------------------------------- - const cyclicBoard = new CyclicBoard(); - cyclicBoard.transform.position = new Vector3( [ 0.0, -2.0, 0.0 ] ); - - // -- lights ----------------------------------------------------------------------------------- - this.__shafts = []; - - const light1 = new LightEntity( { - scenes, - shadowMapFov: 70.0, - shadowMapNear: 1.0, - shadowMapFar: 20.0, - name: process.env.DEV && 'light1', - brtNamePrefix: process.env.DEV && 'SceneDynamic/light1', - } ); - light1.color = [ 50.0, 50.0, 50.0 ]; - light1.transform.lookAt( new Vector3( [ 5.0, 5.0, 5.0 ] ) ); - - const light2 = new LightEntity( { - scenes, - shadowMapFov: 30.0, - shadowMapNear: 1.0, - shadowMapFar: 20.0, - name: process.env.DEV && 'light2', - brtNamePrefix: process.env.DEV && 'SceneDynamic/light2', - } ); - light2.spotness = 0.9; - light2.color = [ 300.0, 360.0, 400.0 ]; - light2.transform.lookAt( new Vector3( [ 0.0, 6.0, 1.0 ] ) ); - - const shaft = new LightShaft( { - light: light2, - intensity: 0.06, - } ); - light2.children.push( shaft ); - this.__shafts.push( shaft ); - - this.lights = [ light1, light2 ]; - cyclicBoard.lights.push( ...this.lights ); - - // -- scene ------------------------------------------------------------------------------------ - this.children.push( - ...rectToruses, - cyclicBoard, - ...this.lights, - ); - } - - public setDefferedCameraTarget( deferredCameraTarget: BufferRenderTarget ): void { - this.__shafts.map( ( shaft ) => { - shaft.setDefferedCameraTarget( deferredCameraTarget ); - } ); - } -} diff --git a/src/entities/SceneNeuro.ts b/src/entities/SceneNeuro.ts deleted file mode 100644 index 4e04ad3..0000000 --- a/src/entities/SceneNeuro.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { BoundingBox } from './BoundingBox'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { IFSPistons } from './IFSPistons'; -import { LightEntity } from './LightEntity'; -import { LightShaft } from './LightShaft'; -import { Quaternion, Vector3 } from '@fms-cat/experimental'; -import { Wobbleball } from './Wobbleball'; - -interface SceneNeuroOptions { - scenes: Entity[]; -} - -export class SceneNeuro extends Entity { - public readonly lights: LightEntity[]; - private readonly __shafts: LightShaft[]; - - public constructor( { scenes }: SceneNeuroOptions ) { - super(); - - // -- lights ----------------------------------------------------------------------------------- - type TypeScriptSucks = [ [ number, number, number ], [ number, number, number ], boolean ][]; - - this.__shafts = []; - - this.lights = ( [ - [ [ 2000.0, 20.0, 100.0 ], [ 8.0, 4.0, -8.0 ], true ], - [ [ 2000.0, 20.0, 100.0 ], [ -8.0, 4.0, -8.0 ], true ], - [ [ 20.0, 20.0, 20.0 ], [ 0.0, -2.0, 4.0 ], false ], - ] as TypeScriptSucks ).map( ( [ color, pos, isSpot ], i ) => { - const light = new LightEntity( { - scenes, - shadowMapFov: isSpot ? 15.0 : 50.0, - shadowMapNear: 0.5, - shadowMapFar: 20.0, - shadowMapSize: isSpot ? 64 : 256, - name: process.env.DEV && `light${ i }`, - brtNamePrefix: process.env.DEV && `SceneNeuro/light${ i }`, - } ); - - light.color = color; - light.spotness = isSpot ? 0.9 : 0.0; - light.transform.lookAt( new Vector3( pos ) ); - - if ( isSpot ) { - const shaft = new LightShaft( { - light, - intensity: 0.06, - } ); - - this.__shafts.push( shaft ); - light.children.push( shaft ); - } - - return light; - } ); - - // -- bounding box ----------------------------------------------------------------------------- - const boundingBox = new BoundingBox(); - boundingBox.transform.rotation = Quaternion.fromAxisAngle( - new Vector3( [ 0.0, 0.0, 1.0 ] ), - 0.25 * Math.PI, - ); - boundingBox.transform.scale = new Vector3( [ 1.2, 1.2, 1.2 ] ); - - // -- scene ------------------------------------------------------------------------------------ - this.children.push( - new Wobbleball(), - new IFSPistons(), - boundingBox, - ...this.lights, - ); - } - - public setDefferedCameraTarget( deferredCameraTarget: BufferRenderTarget ): void { - this.__shafts.map( ( shaft ) => { - shaft.setDefferedCameraTarget( deferredCameraTarget ); - } ); - } -} diff --git a/src/entities/ScenePsy.ts b/src/entities/ScenePsy.ts deleted file mode 100644 index 8053dd6..0000000 --- a/src/entities/ScenePsy.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Hooperball } from './HooperBall'; -import { LightEntity } from './LightEntity'; -import { PsyField } from './PsyField'; -import { Racer } from './Racer'; -import { Vector3 } from '@fms-cat/experimental'; - -interface ScenePsyOptions { - scenes: Entity[]; -} - -export class ScenePsy extends Entity { - public readonly lights: LightEntity[]; - - public constructor( { scenes }: ScenePsyOptions ) { - super(); - - // -- hooperball ------------------------------------------------------------------------------- - const hooperball = new Hooperball(); - - // -- field ------------------------------------------------------------------------------------ - const psyField = new PsyField(); - psyField.transform.position = new Vector3( [ 0.0, -2.0, 0.0 ] ); - - const psyField2 = new PsyField(); - psyField2.transform.position = new Vector3( [ 0.0, 2.0, 0.0 ] ); - - // -- racer ------------------------------------------------------------------------------------ - const racer = new Racer(); - - // -- no lights -------------------------------------------------------------------------------- - this.lights = []; - - // -- scene ------------------------------------------------------------------------------------ - this.children.push( - hooperball, - psyField, - psyField2, - racer, - ...this.lights, - ); - } -} diff --git a/src/entities/Serial.ts b/src/entities/Serial.ts deleted file mode 100644 index 12484ac..0000000 --- a/src/entities/Serial.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { Blit } from '../heck/components/Blit'; -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import quadVert from '../shaders/quad.vert'; -import serialDecodeFrag from '../shaders/serial-decode.frag'; -import serialEncodeFrag from '../shaders/serial-encode.frag'; - -export interface SerialOptions { - input: BufferRenderTarget; - target: RenderTarget; -} - -export class Serial extends Entity { - public constructor( options: SerialOptions ) { - super(); - - const entityBypass = new Entity(); - entityBypass.visible = false; - this.children.push( entityBypass ); - - const entityMain = new Entity(); - entityMain.active = false; - entityMain.visible = false; - this.children.push( entityMain ); - - if ( process.env.DEV ) { - entityBypass.name = 'entityBypass'; - entityMain.name = 'entityMain'; - } - - // -- bypass ----------------------------------------------------------------------------------- - entityBypass.components.push( new Blit( { - src: options.input, - dst: options.target, - name: process.env.DEV && 'blitBypass', - } ) ); - - // -- encode ----------------------------------------------------------------------------------- - const bufferEncode = new BufferRenderTarget( { - width: 4096, - height: 240, - name: process.env.DEV && 'Serial/bufferEncode', - } ); - - const materialEncode = new Material( - quadVert, - serialEncodeFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - materialEncode.addUniformTextures( 'sampler0', options.input.texture ); - materialEncode.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/serial-encode.frag', () => { - materialEncode.replaceShader( quadVert, serialEncodeFrag ); - } ); - } - } - - entityMain.components.push( new Quad( { - target: bufferEncode, - material: materialEncode, - name: process.env.DEV && 'Serial/quadEncode', - } ) ); - - // -- decode ----------------------------------------------------------------------------------- - const bufferDecode = new BufferRenderTarget( { - width: 320, - height: 240, - name: process.env.DEV && 'Serial/bufferDecode', - } ); - - const materialDecode = new Material( - quadVert, - serialDecodeFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - materialDecode.addUniformTextures( 'sampler0', bufferEncode.texture ); - materialDecode.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/serial-decode.frag', () => { - materialDecode.replaceShader( quadVert, serialDecodeFrag ); - } ); - } - } - - entityMain.components.push( new Quad( { - target: bufferDecode, - material: materialDecode, - name: process.env.DEV && 'quadDecode', - } ) ); - - // -- blit to target ----------------------------------------------------------------------------- - entityMain.components.push( new Blit( { - src: bufferDecode, - dst: options.target, - name: process.env.DEV && 'blitTarget', - filter: gl.LINEAR, - } ) ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'Serial/enable', ( { uninit } ) => { - entityMain.active = !uninit; - entityBypass.active = !entityMain.active; - } ); - } -} diff --git a/src/entities/SphereParticles.ts b/src/entities/SphereParticles.ts deleted file mode 100644 index e975765..0000000 --- a/src/entities/SphereParticles.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { GPUParticles } from './GPUParticles'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Material } from '../heck/Material'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers, dummyRenderTargetTwoDrawBuffers } from '../globals/dummyRenderTarget'; -import { genOctahedron } from '../geometries/genOctahedron'; -import { glCat } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture, randomTextureStatic } from '../globals/randomTexture'; -import depthFrag from '../shaders/depth.frag'; -import quadVert from '../shaders/quad.vert'; -import sphereParticleComputeFrag from '../shaders/sphere-particles-compute.frag'; -import sphereParticleRenderFrag from '../shaders/sphere-particles-render.frag'; -import sphereParticleRenderVert from '../shaders/sphere-particles-render.vert'; - -const PARTICLES_SQRT = 256; -const PARTICLES = PARTICLES_SQRT * PARTICLES_SQRT; - -export class SphereParticles extends Entity { - public constructor() { - super(); - - // -- material compute ------------------------------------------------------------------------- - const materialCompute = new Material( - quadVert, - sphereParticleComputeFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTargetTwoDrawBuffers } }, - ); - - materialCompute.addUniform( 'particlesSqrt', '1f', PARTICLES_SQRT ); - materialCompute.addUniform( 'particles', '1f', PARTICLES ); - materialCompute.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/sphere-particles-compute.frag', () => { - materialCompute.replaceShader( quadVert, sphereParticleComputeFrag ); - } ); - } - } - - // -- geometry render -------------------------------------------------------------------------- - const octahedron = genOctahedron( { radius: 1.0, div: 1 } ); - - const geometryRender = new InstancedGeometry(); - - geometryRender.vao.bindVertexbuffer( octahedron.position, 0, 3 ); - geometryRender.vao.bindVertexbuffer( octahedron.normal, 1, 3 ); - geometryRender.vao.bindIndexbuffer( octahedron.index ); - - const bufferComputeUV = glCat.createBuffer(); - bufferComputeUV.setVertexbuffer( ( () => { - const ret = new Float32Array( PARTICLES * 2 ); - for ( let iy = 0; iy < PARTICLES_SQRT; iy ++ ) { - for ( let ix = 0; ix < PARTICLES_SQRT; ix ++ ) { - const i = ix + iy * PARTICLES_SQRT; - const s = ( ix + 0.5 ) / PARTICLES_SQRT; - const t = ( iy + 0.5 ) / PARTICLES_SQRT; - ret[ i * 2 + 0 ] = s; - ret[ i * 2 + 1 ] = t; - } - } - return ret; - } )() ); - - geometryRender.vao.bindVertexbuffer( bufferComputeUV, 2, 2, 1 ); - - geometryRender.count = octahedron.count; - geometryRender.mode = octahedron.mode; - geometryRender.indexType = octahedron.indexType; - geometryRender.primcount = PARTICLES_SQRT * PARTICLES_SQRT; - - // -- material render -------------------------------------------------------------------------- - const deferred = new Material( - sphereParticleRenderVert, - sphereParticleRenderFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry: geometryRender, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - sphereParticleRenderVert, - depthFrag, - { initOptions: { geometry: geometryRender, target: dummyRenderTarget } }, - ); - - const materialsRender = { deferred, depth }; - - deferred.addUniformTextures( 'samplerRandomStatic', randomTextureStatic.texture ); - depth.addUniformTextures( 'samplerRandomStatic', randomTextureStatic.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/sphere-particles-render.vert', - '../shaders/sphere-particles-render.frag', - ], - () => { - deferred.replaceShader( sphereParticleRenderVert, sphereParticleRenderFrag ); - depth.replaceShader( sphereParticleRenderVert, depthFrag ); - } - ); - } - } - - // -- gpu particles ---------------------------------------------------------------------------- - const gpuParticles = new GPUParticles( { - materialCompute, - geometryRender, - materialsRender, - computeWidth: PARTICLES_SQRT, - computeHeight: PARTICLES_SQRT, - computeNumBuffers: 2, - brtNamePrefix: process.env.DEV && this.name, - } ); - this.children.push( gpuParticles ); - } -} diff --git a/src/entities/StoneParticles.ts b/src/entities/StoneParticles.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/entities/SufferTexts.ts b/src/entities/SufferTexts.ts deleted file mode 100644 index 78853c4..0000000 --- a/src/entities/SufferTexts.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { AutomatonWithGUI } from '@fms-cat/automaton-with-gui'; -import { Entity } from '../heck/Entity'; -import { GPUParticles } from './GPUParticles'; -import { InstancedGeometry } from '../heck/InstancedGeometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { TRIANGLE_STRIP_QUAD } from '@fms-cat/experimental'; -import { auto, automaton } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl, glCat } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTextureStatic } from '../globals/randomTexture'; -import { tinyCharTexture } from '../globals/tinyCharTexture'; -import quadVert from '../shaders/quad.vert'; -import sufferTextsComputeFrag from '../shaders/suffer-texts-compute.frag'; -import sufferTextsRenderFrag from '../shaders/suffer-texts-render.frag'; -import sufferTextsRenderVert from '../shaders/suffer-texts-render.vert'; - -const PARTICLES = 256; - -const sufferList = [ - '#DEFINE DISGRACE 1', - 'WELCOME TO THE MANGLER HELL', - 'DEADLINE HARMS YOUR HEALTH', - 'LIBOPUS IS CHEATING', - 'PUBLIC GET FUCKED()', - '\'RETRUN\': UNDECLARED IDENTIFIER', - 'NOTICE ME, GARBAGE COLLECTOR', - 'WEBGL HATES YOU', - '#DEFINE COMPROMISE 1', - 'WHERE IS MY SLEEPING SCHEDULE?', - 'GL.DISABLE(GL.TIMEZONE)', - 'SVG.GETPOINTATLENGTH IS CHEATING', - 'COPY\'N\'PASTE ENGINEER', - '60FPS OR DIE', - 'EXPECT A TERRIBLE STYLE INCONSISTENCY', - 'END MY SUFFER', -]; - -export class SufferTexts extends Entity { - public queue: number[][]; - public particleIndex: number; - - public constructor() { - super(); - - // -- material compute ------------------------------------------------------------------------- - const materialCompute = new Material( - quadVert, - sufferTextsComputeFrag, - { initOptions: { geometry: quadGeometry, target: dummyRenderTarget } }, - ); - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/suffer-texts-compute.frag', () => { - materialCompute.replaceShader( quadVert, sufferTextsComputeFrag ); - } ); - } - } - - // -- geometry render -------------------------------------------------------------------------- - const geometryRender = new InstancedGeometry(); - - const bufferP = glCat.createBuffer(); - bufferP.setVertexbuffer( new Float32Array( TRIANGLE_STRIP_QUAD ) ); - - geometryRender.vao.bindVertexbuffer( bufferP, 0, 2 ); - - const bufferComputeX = glCat.createBuffer(); - bufferComputeX.setVertexbuffer( ( () => { - const ret = new Float32Array( PARTICLES ); - for ( let ix = 0; ix < PARTICLES; ix ++ ) { - const s = ( ix + 0.5 ) / PARTICLES; - ret[ ix ] = s; - } - return ret; - } )() ); - - geometryRender.vao.bindVertexbuffer( bufferComputeX, 1, 1, 1 ); - - geometryRender.count = 4; - geometryRender.mode = gl.TRIANGLE_STRIP; - geometryRender.primcount = PARTICLES; - - // -- material render -------------------------------------------------------------------------- - const forward = new Material( - sufferTextsRenderVert, - sufferTextsRenderFrag, - { - initOptions: { geometry: geometryRender, target: dummyRenderTarget }, - }, - ); - forward.blend = [ gl.ONE, gl.ONE ]; - - const materialsRender = { forward }; - - forward.addUniformTextures( 'samplerRandomStatic', randomTextureStatic.texture ); - forward.addUniformTextures( 'samplerTinyChar', tinyCharTexture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ - '../shaders/suffer-texts-render.vert', - '../shaders/suffer-texts-render.frag', - ], - () => { - forward.replaceShader( sufferTextsRenderVert, sufferTextsRenderFrag ); - } - ); - } - } - - // -- logic ------------------------------------------------------------------------------------ - this.queue = []; - - this.particleIndex = 0; - - auto( 'sufferText/push', ( { value } ) => { - const suffer = sufferList[ Math.floor( value ) ].split( '\n' ); - suffer.forEach( ( line, iLine ) => { - const chars = [ ...line ]; - this.queue.push( ...chars.map( ( char, iChar ) => [ - iChar - 0.5 * ( chars.length - 1 ), - iLine - 0.5 * ( suffer.length - 1 ), - char.charCodeAt( 0 ), - ] ) ); - } ); - } ); - - this.components.push( new Lambda( { - onUpdate: () => { - const val = this.queue.shift(); - if ( val != null ) { - const x = ( this.particleIndex + 0.5 ) / PARTICLES; - materialCompute.addUniform( 'logInit', '4f', ...val, x ); - this.particleIndex = ( this.particleIndex + 1 ) % PARTICLES; - } else { - materialCompute.addUniform( 'logInit', '4f', 0.0, 0.0, 0.0, 0.0 ); - } - }, - name: process.env.DEV && 'SufferTexts/logic', - } ) ); - - if ( process.env.DEV ) { - ( automaton as AutomatonWithGUI ).on( 'play', () => { - this.queue = []; - } ); - - ( automaton as AutomatonWithGUI ).on( 'pause', () => { - this.queue = []; - } ); - - ( automaton as AutomatonWithGUI ).on( 'seek', () => { - this.queue = []; - } ); - } - - // -- gpu particles ---------------------------------------------------------------------------- - const gpuParticles = new GPUParticles( { - materialCompute, - geometryRender, - materialsRender, - computeWidth: PARTICLES, - computeHeight: 1, - computeNumBuffers: 1, - brtNamePrefix: process.env.DEV && this.name, - } ); - gpuParticles.meshRender.depthTest = false; - gpuParticles.meshRender.depthWrite = false; - this.children.push( gpuParticles ); - } -} diff --git a/src/entities/TestScreen.ts b/src/entities/TestScreen.ts deleted file mode 100644 index 2787aa0..0000000 --- a/src/entities/TestScreen.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { quadGeometry } from '../globals/quadGeometry'; -import { randomTexture } from '../globals/randomTexture'; -import quadVert from '../shaders/quad.vert'; -import testScreenFrag from '../shaders/test-screen.frag'; - -export interface TestScreenOptions { - target: RenderTarget; -} - -export class TestScreen extends Entity { - public constructor( options: TestScreenOptions ) { - super(); - - // -- post ------------------------------------------------------------------------------------- - const material = new Material( - quadVert, - testScreenFrag, - { - initOptions: { geometry: quadGeometry, target: dummyRenderTarget }, - }, - ); - - material.addUniformTextures( 'samplerRandom', randomTexture.texture ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/test-screen.frag', () => { - material.replaceShader( quadVert, testScreenFrag ); - } ); - } - } - - const quad = new Quad( { - target: options.target, - material, - name: process.env.DEV && 'quad', - } ); - this.components.push( quad ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'TestScreen/circle', ( { value } ) => { - material.addUniform( 'circle', '1f', value ); - } ); - - auto( 'TestScreen/fade', ( { value } ) => { - material.addUniform( 'fade', '1f', value ); - } ); - - auto( 'TestScreen/mode', ( { value } ) => { - this.active = value > 0.0; - material.addUniform( 'mode', '1f', value ); - } ); - } -} diff --git a/src/entities/Tetrahedron.ts b/src/entities/Tetrahedron.ts deleted file mode 100644 index 3a18846..0000000 --- a/src/entities/Tetrahedron.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { Quaternion, Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genCube } from '../geometries/genCube'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import { randomTexture, randomTextureStatic } from '../globals/randomTexture'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; -import tetrahedronFrag from '../shaders/tetrahedron.frag'; - -export class Tetrahedron extends Entity { - public constructor() { - super(); - - // -- geometry --------------------------------------------------------------------------------- - const cube = genCube( { dimension: [ 1.1, 1.1, 1.1 ] } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( cube.position, 0, 3 ); - geometry.vao.bindIndexbuffer( cube.index ); - - geometry.count = cube.count; - geometry.mode = cube.mode; - geometry.indexType = cube.indexType; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - raymarchObjectVert, - tetrahedronFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - raymarchObjectVert, - tetrahedronFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry, target: dummyRenderTarget } - }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/tetrahedron.frag', () => { - deferred.replaceShader( raymarchObjectVert, tetrahedronFrag ); - depth.replaceShader( raymarchObjectVert, tetrahedronFrag ); - } ); - } - } - - objectValuesMap( materials, ( material ) => { - material.addUniformTextures( 'samplerRandom', randomTexture.texture ); - material.addUniformTextures( 'samplerRandomStatic', randomTextureStatic.texture ); - } ); - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - - material.addUniform( 'deformAmp', '1f', auto( 'Music/NEURO_WUB_AMP' ) ); - material.addUniform( 'deformFreq', '1f', auto( 'Music/NEURO_WUB_FREQ' ) + auto( 'Music/NEURO_DETUNE' ) ); - material.addUniform( 'deformTime', '1f', auto( 'Music/NEURO_TIME' ) ); - } ); - }, - name: process.env.DEV && 'setCameraUniforms', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - - // -- speen ------------------------------------------------------------------------------------ - const axis = new Vector3( [ 1.0, -1.0, 1.0 ] ).normalized; - this.components.push( new Lambda( { - onUpdate: ( { time } ) => { - this.transform.rotation = Quaternion.fromAxisAngle( axis, time ); - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'distort', - '1f', - auto( 'Tetrahedron/distortAmp' ) - ); - } ); - }, - name: process.env.DEV && 'speen', - } ) ); - } -} diff --git a/src/entities/TextOverlay.ts b/src/entities/TextOverlay.ts deleted file mode 100644 index 8f3005a..0000000 --- a/src/entities/TextOverlay.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { Material } from '../heck/Material'; -import { Quad } from '../heck/components/Quad'; -import { RenderTarget } from '../heck/RenderTarget'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget } from '../globals/dummyRenderTarget'; -import { gl, glCat } from '../globals/canvas'; -import { quadGeometry } from '../globals/quadGeometry'; -import quadVert from '../shaders/quad.vert'; -import textOverlayFrag from '../shaders/text-overlay.frag'; - -export interface TextOverlayOptions { - target: RenderTarget; -} - -export class TextOverlay extends Entity { - public constructor( options: TextOverlayOptions ) { - super(); - - // -- create cards ----------------------------------------------------------------------------- - const canvasText = document.createElement( 'canvas' ); - const width = canvasText.width = options.target.width; - const height = canvasText.height = options.target.height; - - const context = canvasText.getContext( '2d' )!; - context.fillStyle = '#fff'; - context.textAlign = 'center'; - context.textBaseline = 'middle'; - context.font = `100 ${ 0.02 * width }px Bahnschrift, sans-serif`; - - const heck = ( texture: GLCatTexture, text: string ): GLCatTexture => { - context.clearRect( 0, 0, width, height ); - context.fillText( text, width / 2.0, height / 2.0 ); - texture.setTexture( canvasText ); - return texture; - }; - - const textures = [ - heck( glCat.createTexture(), 'Revision 2021' ), - heck( glCat.createTexture(), 'A 64k WebGL intro' ), - glCat.createTexture(), - glCat.createTexture(), - ]; - - { - context.clearRect( 0, 0, width, height ); - context.fillText( 'Code, Graphics, Music', 0.5 * width, 0.47 * height ); - context.font = `100 ${ 0.03 * width }px Bahnschrift, sans-serif`; - context.fillText( 'FMS_Cat', 0.5 * width, 0.52 * height ); - context.font = `100 ${ 0.02 * width }px Bahnschrift, sans-serif`; - - textures[ 2 ].setTexture( canvasText ); - } - - { - context.clearRect( 0, 0, width, height ); - context.fillText( 'I promise I will hire a', 0.5 * width, 0.48 * height ); - context.fillText( 'graphic direction guy next time', 0.5 * width, 0.52 * height ); - - context.textAlign = 'right'; - context.fillText( 'Press Esc to exit the experience', 0.9 * width, 0.91 * height ); - - context.textAlign = 'left'; - context.fillText( 'by FMS_Cat', 0.28 * width, 0.85 * height ); - context.fillText( 'A 64K WebGL Intro @ Revision 2021', 0.1 * width, 0.91 * height ); - context.font = `100 ${ 0.04 * width }px Bahnschrift, sans-serif`; - context.fillText( 'Condition', 0.1 * width, 0.84 * height ); - - textures[ 3 ].setTexture( canvasText ); - } - - // -- post ------------------------------------------------------------------------------------- - const material = new Material( - quadVert, - textOverlayFrag, - { - initOptions: { geometry: quadGeometry, target: dummyRenderTarget }, - blend: [ gl.ONE, gl.ONE ], - }, - ); - material.addUniformTextures( 'sampler0', textures[ 0 ] ); - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/text-overlay.frag', () => { - material.replaceShader( quadVert, textOverlayFrag ); - } ); - } - } - - const quad = new Quad( { - target: options.target, - material, - name: process.env.DEV && 'quad', - } ); - this.components.push( quad ); - - // -- auto ------------------------------------------------------------------------------------- - auto( 'TextOverlay/texture', ( { value } ) => { - material.addUniformTextures( 'sampler0', textures[ value ] ); - } ); - - auto( 'TextOverlay/amp', ( { value } ) => { - material.addUniform( 'amp', '1f', value ); - } ); - } -} diff --git a/src/entities/Wobbleball.ts b/src/entities/Wobbleball.ts deleted file mode 100644 index 451cb72..0000000 --- a/src/entities/Wobbleball.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { Entity } from '../heck/Entity'; -import { Geometry } from '../heck/Geometry'; -import { Lambda } from '../heck/components/Lambda'; -import { Material } from '../heck/Material'; -import { Mesh, MeshCull } from '../heck/components/Mesh'; -import { Vector3 } from '@fms-cat/experimental'; -import { auto } from '../globals/automaton'; -import { dummyRenderTarget, dummyRenderTargetFourDrawBuffers } from '../globals/dummyRenderTarget'; -import { genOctahedron } from '../geometries/genOctahedron'; -import { objectValuesMap } from '../utils/objectEntriesMap'; -import { randomTexture, randomTextureStatic } from '../globals/randomTexture'; -import raymarchObjectVert from '../shaders/raymarch-object.vert'; -import wobbleballFrag from '../shaders/wobbleball.frag'; - -export class Wobbleball extends Entity { - public constructor() { - super(); - - this.transform.position = new Vector3( [ 0.0, 0.0, 0.0 ] ); - this.transform.scale = new Vector3( [ 1.0, 1.0, 1.0 ] ); - - // -- geometry --------------------------------------------------------------------------------- - const octahedron = genOctahedron( { radius: 2.0, div: 1 } ); - - const geometry = new Geometry(); - - geometry.vao.bindVertexbuffer( octahedron.position, 0, 3 ); - geometry.vao.bindIndexbuffer( octahedron.index ); - - geometry.count = octahedron.count; - geometry.mode = octahedron.mode; - geometry.indexType = octahedron.indexType; - - // -- materials -------------------------------------------------------------------------------- - const deferred = new Material( - raymarchObjectVert, - wobbleballFrag, - { - defines: [ 'DEFERRED 1' ], - initOptions: { geometry, target: dummyRenderTargetFourDrawBuffers }, - }, - ); - - const depth = new Material( - raymarchObjectVert, - wobbleballFrag, - { - defines: [ 'DEPTH 1' ], - initOptions: { geometry, target: dummyRenderTarget } - }, - ); - - const materials = { deferred, depth }; - - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../shaders/wobbleball.frag', () => { - deferred.replaceShader( raymarchObjectVert, wobbleballFrag ); - depth.replaceShader( raymarchObjectVert, wobbleballFrag ); - } ); - } - } - - objectValuesMap( materials, ( material ) => { - material.addUniformTextures( 'samplerRandom', randomTexture.texture ); - material.addUniformTextures( 'samplerRandomStatic', randomTextureStatic.texture ); - } ); - - // -- updater ---------------------------------------------------------------------------------- - this.components.push( new Lambda( { - onDraw: ( event ) => { - objectValuesMap( materials, ( material ) => { - material.addUniform( - 'cameraNearFar', - '2f', - event.camera.near, - event.camera.far - ); - - material.addUniformMatrixVector( - 'inversePVM', - 'Matrix4fv', - event.projectionMatrix - .multiply( event.viewMatrix ) - .multiply( event.globalTransform.matrix ) - .inverse! - .elements - ); - - material.addUniform( 'deformAmp', '1f', auto( 'Music/NEURO_WUB_AMP' ) ); - material.addUniform( 'deformFreq', '1f', auto( 'Music/NEURO_WUB_FREQ' ) + auto( 'Music/NEURO_DETUNE' ) ); - material.addUniform( 'deformTime', '1f', auto( 'Music/NEURO_TIME' ) ); - } ); - }, - name: process.env.DEV && 'updater', - } ) ); - - // -- mesh ------------------------------------------------------------------------------------- - const mesh = new Mesh( { - geometry, - materials, - name: process.env.DEV && 'mesh', - } ); - mesh.cull = MeshCull.None; - this.components.push( mesh ); - } -} diff --git a/src/frag.d.ts b/src/frag.d.ts deleted file mode 100644 index 19efb0b..0000000 --- a/src/frag.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.frag' { - const code: string; - export default code; -} diff --git a/src/geometries/genCube.ts b/src/geometries/genCube.ts deleted file mode 100644 index 6d631d9..0000000 --- a/src/geometries/genCube.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { GLCatBuffer } from '@fms-cat/glcat-ts'; -import { gl, glCat } from '../globals/canvas'; - -interface ResultGenCube { - position: GLCatBuffer; - normal: GLCatBuffer; - index: GLCatBuffer; - count: number; - mode: GLenum; - indexType: GLenum; -} - -export function genCube( options?: { - dimension?: [ number, number, number ] -} ): ResultGenCube { - const dimension = options?.dimension ?? [ 1, 1, 1 ]; - - const pos: number[] = []; - const nor: number[] = []; - const ind: number[] = []; - - const p = [ - [ -1, -1, 1 ], - [ 1, -1, 1 ], - [ -1, 1, 1 ], - [ 1, 1, 1 ], - ]; - const n = [ - [ 0, 0, 1 ], - [ 0, 0, 1 ], - [ 0, 0, 1 ], - [ 0, 0, 1 ], - ]; - - for ( let i = 0; i < 6; i ++ ) { - const rotate = ( v: number[] ): number[] => { - const vt: number[] = []; - - if ( i < 4 ) { - const t = i * Math.PI / 2.0; - vt[ 0 ] = Math.cos( t ) * v[ 0 ] - Math.sin( t ) * v[ 2 ]; - vt[ 1 ] = v[ 1 ]; - vt[ 2 ] = Math.sin( t ) * v[ 0 ] + Math.cos( t ) * v[ 2 ]; - } else { - const t = ( i - 0.5 ) * Math.PI; - vt[ 0 ] = v[ 0 ]; - vt[ 1 ] = Math.cos( t ) * v[ 1 ] - Math.sin( t ) * v[ 2 ]; - vt[ 2 ] = Math.sin( t ) * v[ 1 ] + Math.cos( t ) * v[ 2 ]; - } - - return vt; - }; - - const scale = ( v: number[] ): number[] => { - return [ - v[ 0 ] * dimension[ 0 ], - v[ 1 ] * dimension[ 1 ], - v[ 2 ] * dimension[ 2 ], - ]; - }; - - pos.push( ...p.map( rotate ).map( scale ).flat() ); - nor.push( ...n.map( rotate ).flat() ); - ind.push( ...[ 0, 1, 3, 0, 3, 2 ].map( ( v ) => v + 4 * i ) ); - } - - const position = glCat.createBuffer(); - position.setVertexbuffer( new Float32Array( pos ) ); - - const normal = glCat.createBuffer(); - normal.setVertexbuffer( new Float32Array( nor ) ); - - const index = glCat.createBuffer(); - index.setIndexbuffer( new Uint16Array( ind ) ); - - return { - position, - normal, - index, - count: ind.length, - mode: gl.TRIANGLES, - indexType: gl.UNSIGNED_SHORT, - }; -} diff --git a/src/geometries/genOctahedron.ts b/src/geometries/genOctahedron.ts deleted file mode 100644 index b573ca7..0000000 --- a/src/geometries/genOctahedron.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { GLCatBuffer } from '@fms-cat/glcat-ts'; -import { gl, glCat } from '../globals/canvas'; - -interface ResultGenOctahedron { - position: GLCatBuffer; - normal: GLCatBuffer; - index: GLCatBuffer; - count: number; - mode: GLenum; - indexType: GLenum; -} - -export function genOctahedron( options: { - radius?: number; - div?: number; -} = {} ): ResultGenOctahedron { - const radius = options.radius ?? 1.0; - const div = options.div ?? 1; - - const pos = []; - const nor = []; - const ind = []; - - for ( let ii = 0; ii < 2; ii ++ ) { // side - for ( let ip = 0; ip < 4; ip ++ ) { // plane - for ( let iy = 0; iy < div + 1; iy ++ ) { - for ( let ix = 0; ix < iy + 1; ix ++ ) { - const lat0 = ( ii * 2.0 + iy / ( div + 1 ) ) * Math.PI / 2.0; - const lat1 = ( ii * 2.0 + ( iy + 1 ) / ( div + 1 ) ) * Math.PI / 2.0; - - const lon0 = ( ii * 2.0 - 1.0 ) * ( ( ix - 1 ) / Math.max( 1, iy ) + ip ) * Math.PI / 2.0; - const lon1 = ( ii * 2.0 - 1.0 ) * ( ix / ( iy + 1 ) + ip ) * Math.PI / 2.0; - const lon2 = ( ii * 2.0 - 1.0 ) * ( ix / Math.max( 1, iy ) + ip ) * Math.PI / 2.0; - const lon3 = ( ii * 2.0 - 1.0 ) * ( ( ix + 1 ) / ( iy + 1 ) + ip ) * Math.PI / 2.0; - - if ( ix !== 0 ) { - ind.push( - pos.length / 3, - pos.length / 3 + 1, - pos.length / 3 + 2 - ); - - const x1 = radius * Math.sin( lat0 ) * Math.cos( lon0 ); - const y1 = radius * Math.cos( lat0 ); - const z1 = radius * Math.sin( lat0 ) * Math.sin( lon0 ); - - const x2 = radius * Math.sin( lat1 ) * Math.cos( lon1 ); - const y2 = radius * Math.cos( lat1 ); - const z2 = radius * Math.sin( lat1 ) * Math.sin( lon1 ); - - const x3 = radius * Math.sin( lat0 ) * Math.cos( lon2 ); - const y3 = radius * Math.cos( lat0 ); - const z3 = radius * Math.sin( lat0 ) * Math.sin( lon2 ); - - pos.push( - x1, y1, z1, - x2, y2, z2, - x3, y3, z3 - ); - - { - const x = x1 + x2 + x3; - const y = y1 + y2 + y3; - const z = z1 + z2 + z3; - const l = Math.sqrt( x * x + y * y + z * z ); - - for ( let i = 0; i < 3; i ++ ) { - nor.push( - x / l, - y / l, - z / l - ); - } - } - } - - { - ind.push( - pos.length / 3, - pos.length / 3 + 1, - pos.length / 3 + 2 - ); - - const x1 = radius * Math.sin( lat0 ) * Math.cos( lon2 ); - const y1 = radius * Math.cos( lat0 ); - const z1 = radius * Math.sin( lat0 ) * Math.sin( lon2 ); - - const x2 = radius * Math.sin( lat1 ) * Math.cos( lon1 ); - const y2 = radius * Math.cos( lat1 ); - const z2 = radius * Math.sin( lat1 ) * Math.sin( lon1 ); - - const x3 = radius * Math.sin( lat1 ) * Math.cos( lon3 ); - const y3 = radius * Math.cos( lat1 ); - const z3 = radius * Math.sin( lat1 ) * Math.sin( lon3 ); - - pos.push( - x1, y1, z1, - x2, y2, z2, - x3, y3, z3 - ); - - { - const x = x1 + x2 + x3; - const y = y1 + y2 + y3; - const z = z1 + z2 + z3; - const l = Math.sqrt( x * x + y * y + z * z ); - - for ( let i = 0; i < 3; i ++ ) { - nor.push( - x / l, - y / l, - z / l - ); - } - } - } - } - } - } - } - - const position = glCat.createBuffer(); - position.setVertexbuffer( new Float32Array( pos ) ); - - const normal = glCat.createBuffer(); - normal.setVertexbuffer( new Float32Array( nor ) ); - - const index = glCat.createBuffer(); - index.setIndexbuffer( new Uint16Array( ind ) ); - - return { - position, - normal, - index, - count: ind.length, - mode: gl.TRIANGLES, - indexType: gl.UNSIGNED_SHORT, - }; -} diff --git a/src/geometries/genPlane.ts b/src/geometries/genPlane.ts deleted file mode 100644 index ac06e62..0000000 --- a/src/geometries/genPlane.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { GLCatBuffer } from '@fms-cat/glcat-ts'; -import { gl, glCat } from '../globals/canvas'; - -interface ResultGenPlane { - position: GLCatBuffer; - index: GLCatBuffer; - count: number; - mode: GLenum; - indexType: GLenum; -} - -export function genPlane( options?: { - segment?: number; -} ): ResultGenPlane { - const segment = options?.segment ?? 33; - const segmentMinusOne = segment - 1; - - const pos: number[] = []; - const ind: number[] = []; - - for ( let iY = 0; iY < segmentMinusOne; iY ++ ) { - const y = iY / segmentMinusOne * 2.0 - 1.0; - - for ( let iX = 0; iX < segmentMinusOne; iX ++ ) { - const x = iX / segmentMinusOne * 2.0 - 1.0; - const i = iX + iY * segment; - - pos.push( x, y, 0 ); - ind.push( - i, i + 1, i + segment + 1, - i, i + segment + 1, i + segment, - ); - } - pos.push( 1, y, 0 ); - } - - for ( let iX = 0; iX < segment; iX ++ ) { - const x = iX / segmentMinusOne * 2.0 - 1.0; - - pos.push( x, 1, 0 ); - } - - const position = glCat.createBuffer(); - position.setVertexbuffer( new Float32Array( pos ) ); - - const index = glCat.createBuffer(); - index.setIndexbuffer( new Uint32Array( ind ) ); - - return { - position, - index, - count: ind.length, - mode: gl.TRIANGLES, - indexType: gl.UNSIGNED_INT, - }; -} diff --git a/src/geometries/genTorus.ts b/src/geometries/genTorus.ts deleted file mode 100644 index f8c92e5..0000000 --- a/src/geometries/genTorus.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { GLCatBuffer } from '@fms-cat/glcat-ts'; -import { gl, glCat } from '../globals/canvas'; - -interface ResultGenTorus { - position: GLCatBuffer; - normal: GLCatBuffer; - index: GLCatBuffer; - count: number; - mode: GLenum; - indexType: GLenum; -} - -export function genTorus( options?: { - radiusRadial?: number; - radiusTubular?: number; - segmentsRadial?: number; - segmentsTubular?: number; -} ): ResultGenTorus { - const radiusRadial = options?.radiusRadial ?? 1; - const radiusTubular = options?.radiusTubular ?? 0; // WHOA - const segmentsRadial = options?.segmentsRadial ?? 64; - const segmentsTubular = options?.segmentsTubular ?? 4; - - const pos = []; - const nor = []; - const ind = []; - - for ( let iRad = 0; iRad < segmentsRadial; iRad ++ ) { - const iRadn = ( iRad + 1 ) % segmentsRadial; - const tRad = 2.0 * Math.PI * iRad / segmentsRadial; - const xRad = Math.cos( tRad ); - const yRad = Math.sin( tRad ); - - for ( let iTub = 0; iTub < segmentsTubular; iTub ++ ) { - const iTubn = ( iTub + 1 ) % segmentsTubular; - const tTub = 2.0 * Math.PI * iTub / segmentsTubular; - const xTub = Math.cos( tTub ); - const yTub = Math.sin( tTub ); - - const nx = xRad * xTub; - const ny = yTub; - const nz = yRad * xTub; - - pos.push( - radiusRadial * xRad + radiusTubular * nx, - 0.0 + radiusTubular * ny, - radiusRadial * yRad + radiusTubular * nz - ); - nor.push( nx, ny, nz ); - ind.push( - segmentsTubular * iRad + iTub, - segmentsTubular * iRad + iTubn, - segmentsTubular * iRadn + iTubn, - segmentsTubular * iRad + iTub, - segmentsTubular * iRadn + iTubn, - segmentsTubular * iRadn + iTub, - ); - } - } - - const position = glCat.createBuffer(); - position.setVertexbuffer( new Float32Array( pos ) ); - - const normal = glCat.createBuffer(); - normal.setVertexbuffer( new Float32Array( nor ) ); - - const index = glCat.createBuffer(); - index.setIndexbuffer( new Uint16Array( ind ) ); - - return { - position, - normal, - index, - count: ind.length, - mode: gl.TRIANGLES, - indexType: gl.UNSIGNED_SHORT, - }; -} diff --git a/src/globals/automaton.ts b/src/globals/automaton.ts deleted file mode 100644 index 7d0c61d..0000000 --- a/src/globals/automaton.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Automaton } from '@fms-cat/automaton'; -import { AutomatonWithGUI } from '@fms-cat/automaton-with-gui'; -import { Music } from '../music/Music'; -import { fxDefinitions } from '../automaton-fxs/fxDefinitions'; -import { getDivAutomaton } from './dom'; -import automatonData from '../automaton.json'; - -export const automaton = ( () => { - if ( process.env.DEV ) { - // this cast smells so bad - // https://github.com/FMS-Cat/automaton/issues/121 - const automatonWithGUI = new AutomatonWithGUI( - automatonData, - { - gui: getDivAutomaton(), - isPlaying: false, - fxDefinitions, - }, - ); - - if ( module.hot ) { - module.hot.accept( '../automaton.json', () => { - // we probably don't need this feature for now... - // See: https://github.com/FMS-Cat/automaton/issues/120 - // automatonWithGUI.deserialize( automatonData ); - } ); - } - - return automatonWithGUI; - } else { - return new Automaton( - automatonData, - { - fxDefinitions, - }, - ); - } -} )(); - -/** - * Since automaton and music try to reference each other... - */ -export function automatonSetupMusic( music: Music ): void { - if ( process.env.DEV ) { - const automatonWithGUI = automaton as AutomatonWithGUI; - - automatonWithGUI.on( 'play', () => { music.isPlaying = true; } ); - automatonWithGUI.on( 'pause', () => { music.isPlaying = false; } ); - automatonWithGUI.on( 'seek', ( { time } ) => { - music.time = Math.max( 0.0, time ); - automatonWithGUI.reset(); - } ); - } -} - -export const auto = automaton.auto; diff --git a/src/globals/canvas.ts b/src/globals/canvas.ts deleted file mode 100644 index 3e1b715..0000000 --- a/src/globals/canvas.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { GLCat } from '@fms-cat/glcat-ts'; -import { RESOLUTION } from '../config'; - -export const canvas = document.createElement( 'canvas' ); -canvas.width = RESOLUTION[ 0 ]; -canvas.height = RESOLUTION[ 1 ]; - -export const gl = canvas.getContext( 'webgl2', { antialias: false } )!; -gl.lineWidth( 1 ); - -export const glCat = new GLCat( gl ); diff --git a/src/globals/dom.ts b/src/globals/dom.ts deleted file mode 100644 index 6e7d8a3..0000000 --- a/src/globals/dom.ts +++ /dev/null @@ -1,107 +0,0 @@ -function getElement( - id: string, - tagName: string, - style: { [ key: string ]: string }, - hook?: ( el: T ) => void, -): T { - let el = document.getElementById( id ) as T; - if ( el ) { - return el; - } - - el = document.createElement( tagName ) as T; - el.id = id; - - document.body.appendChild( el ); - - Object.assign( el.style, style ); - - hook?.( el ); - - return el; -} - -export function getCheckboxActive(): HTMLInputElement { - return getElement( - 'checkboxActive', - 'input', - { - position: 'fixed', - left: '8px', - bottom: '248px', - }, - ( el ) => { - el.type = 'checkbox'; - el.checked = true; - }, - ); -} - -export function getDivCanvasContainer(): HTMLDivElement { - return getElement( - 'divCanvasContainer', - 'div', - { - position: 'fixed', - width: 'calc( 100% - 420px )', - height: 'calc( 100% - 240px )', - left: '0', - top: '0', - display: 'flex', - }, - ); -} - -export function getDivAutomaton(): HTMLDivElement { - return getElement( - 'divAutomaton', - 'div', - { - position: 'fixed', - width: '100%', - height: '240px', - right: '0', - bottom: '0', - }, - ); -} - -export function getDivComponentsUpdate(): HTMLDivElement { - return getElement( - 'divComponentsUpdate', - 'div', - { - whiteSpace: 'pre', - color: '#ffffff', - font: '500 10px Wt-Position-Mono', - position: 'fixed', - padding: '0', - boxSizing: 'border-box', - width: '420px', - height: 'calc( ( 100% - 240px ) * 0.5 )', - right: '0', - top: '0', - overflowY: 'scroll', - }, - ); -} - -export function getDivComponentsDraw(): HTMLDivElement { - return getElement( - 'divComponentsDraw', - 'div', - { - whiteSpace: 'pre', - color: '#ffffff', - font: '500 10px Wt-Position-Mono', - position: 'fixed', - padding: '0', - boxSizing: 'border-box', - width: '420px', - height: 'calc( ( 100% - 240px ) * 0.5 )', - right: '0', - top: 'calc( ( 100% - 240px ) * 0.5 )', - overflowY: 'scroll', - }, - ); -} diff --git a/src/globals/dummyRenderTarget.ts b/src/globals/dummyRenderTarget.ts deleted file mode 100644 index 3a13c9e..0000000 --- a/src/globals/dummyRenderTarget.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { BufferRenderTarget } from '../heck/BufferRenderTarget'; - -export const dummyRenderTarget = new BufferRenderTarget( { - width: 1, - height: 1, - name: process.env.DEV && 'dummyRenderTarget', -} ); - -export const dummyRenderTargetTwoDrawBuffers = new BufferRenderTarget( { - width: 1, - height: 1, - numBuffers: 2, - name: process.env.DEV && 'dummyRenderTargetTwoDrawBuffers', -} ); - - -export const dummyRenderTargetFourDrawBuffers = new BufferRenderTarget( { - width: 1, - height: 1, - numBuffers: 4, - name: process.env.DEV && 'dummyRenderTargetFourDrawBuffers', -} ); diff --git a/src/globals/music.ts b/src/globals/music.ts deleted file mode 100644 index e5f2b95..0000000 --- a/src/globals/music.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Music } from '../music/Music'; -import { MusicOffline } from '../music/MusicOffline'; -import { MusicRealtime } from '../music/MusicRealtime'; -import { automatonSetupMusic } from './automaton'; - -export const audio = new AudioContext(); -let music: Music; - -if ( process.env.DEV ) { - music = new MusicRealtime(); - // music = new MusicWrite(); -} else { - music = new MusicOffline(); -} - -automatonSetupMusic( music ); - -export { music }; diff --git a/src/globals/quadGeometry.ts b/src/globals/quadGeometry.ts deleted file mode 100644 index ee97541..0000000 --- a/src/globals/quadGeometry.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Geometry } from '../heck/Geometry'; -import { TRIANGLE_STRIP_QUAD } from '@fms-cat/experimental'; -import { gl, glCat } from './canvas'; - -const quadBuffer = glCat.createBuffer(); -quadBuffer.setVertexbuffer( new Float32Array( TRIANGLE_STRIP_QUAD ) ); - -export const quadGeometry = new Geometry(); -quadGeometry.vao.bindVertexbuffer( quadBuffer, 0, 2 ); - -quadGeometry.count = 4; -quadGeometry.mode = gl.TRIANGLE_STRIP; diff --git a/src/globals/randomTexture.ts b/src/globals/randomTexture.ts deleted file mode 100644 index 692a727..0000000 --- a/src/globals/randomTexture.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { RANDOM_RESOLUTION, STATIC_RANDOM_RESOLUTION } from '../config'; -import { RandomTexture } from '../utils/RandomTexture'; -import { glCat } from './canvas'; - -export const randomTexture = new RandomTexture( - glCat, - RANDOM_RESOLUTION[ 0 ], - RANDOM_RESOLUTION[ 1 ] -); -randomTexture.update(); - -export const randomTextureStatic = new RandomTexture( - glCat, - STATIC_RANDOM_RESOLUTION[ 0 ], - STATIC_RANDOM_RESOLUTION[ 1 ] -); -randomTextureStatic.update(); diff --git a/src/globals/tinyCharTexture.ts b/src/globals/tinyCharTexture.ts deleted file mode 100644 index de829dc..0000000 --- a/src/globals/tinyCharTexture.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { gl, glCat } from './canvas'; -import char5x5Png from '../images/char5x5.png'; - -export const tinyCharTexture = glCat.createTexture(); - -const image = new Image(); -image.onload = () => { - tinyCharTexture.setTexture( image ); - tinyCharTexture.textureFilter( gl.NEAREST ); -}; -image.src = char5x5Png; diff --git a/src/heck/BufferRenderTarget.ts b/src/heck/BufferRenderTarget.ts deleted file mode 100644 index a479d0b..0000000 --- a/src/heck/BufferRenderTarget.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { GLCatFramebuffer, GLCatTexture } from '@fms-cat/glcat-ts'; -import { RenderTarget } from './RenderTarget'; -import { gl, glCat } from '../globals/canvas'; - -export interface BufferRenderTargetOptions { - width: number; - height: number; - numBuffers?: number; - isFloat?: boolean; - name?: string; - filter?: GLenum; -} - -export class BufferRenderTarget extends RenderTarget { - public static nameMap = new Map(); - - public readonly framebuffer: GLCatFramebuffer; - public readonly width: number; - public readonly height: number; - public readonly numBuffers: number; - - private __name?: string; - public get name(): string | undefined { - return this.__name; - } - public set name( name: string | undefined ) { - if ( process.env.DEV ) { - // remove previous one from the nameMap - if ( this.__name != null ) { - BufferRenderTarget.nameMap.delete( this.__name ); - } - - this.__name = name; - - // set the current one to the nameMap - if ( name != null ) { - if ( BufferRenderTarget.nameMap.has( name ) ) { - console.warn( `Duplicated BufferRenderTarget name, ${ name }` ); - return; - } - - BufferRenderTarget.nameMap.set( name, this ); - } else { - console.warn( 'BufferRenderTarget without name' ); - } - } - } - - public constructor( options: BufferRenderTargetOptions ) { - super(); - - this.framebuffer = glCat.lazyDrawbuffers( - options.width, - options.height, - options.numBuffers ?? 1, - { - isFloat: options.isFloat ?? true - } - ); - - this.width = options.width; - this.height = options.height; - this.numBuffers = options.numBuffers ?? 1; - - if ( options.filter != null ) { - this.texture.textureFilter( options.filter ); - } - - if ( process.env.DEV ) { - this.name = options?.name; - } - } - - public get texture(): GLCatTexture { - return this.framebuffer.texture!; - } - - public getTexture( attachment: number ): GLCatTexture | null { - return this.framebuffer.getTexture( attachment ); - } - - public bind(): void { - gl.bindFramebuffer( gl.FRAMEBUFFER, this.framebuffer.raw ); - glCat.drawBuffers( this.numBuffers ); - gl.viewport( 0, 0, this.width, this.height ); - } - - public dispose(): void { - this.framebuffer.dispose(); - } -} diff --git a/src/heck/CanvasRenderTarget.ts b/src/heck/CanvasRenderTarget.ts deleted file mode 100644 index 27fe9ff..0000000 --- a/src/heck/CanvasRenderTarget.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { RenderTarget } from './RenderTarget'; -import { canvas, gl, glCat } from '../globals/canvas'; - -export class CanvasRenderTarget extends RenderTarget { - public get width(): number { - return canvas.width; - } - - public get height(): number { - return canvas.height; - } - - public bind(): void { - gl.bindFramebuffer( gl.FRAMEBUFFER, null ); - glCat.drawBuffers( [ gl.BACK ] ); - gl.viewport( 0, 0, this.width, this.height ); - } -} diff --git a/src/heck/CubemapRenderTarget.ts b/src/heck/CubemapRenderTarget.ts deleted file mode 100644 index a8172e7..0000000 --- a/src/heck/CubemapRenderTarget.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { GLCatFramebuffer, GLCatTextureCubemap } from '@fms-cat/glcat-ts'; -import { RenderTarget } from './RenderTarget'; -import { gl, glCat } from '../globals/canvas'; - -export interface CubemapRenderTargetOptions { - width: number; - height: number; - isFloat?: boolean; -} - -export class CubemapRenderTarget extends RenderTarget { - public readonly framebuffer: GLCatFramebuffer; - public readonly texture: GLCatTextureCubemap; - public readonly width: number; - public readonly height: number; - - public constructor( options: CubemapRenderTargetOptions ) { - super(); - - const { framebuffer, texture } = glCat.lazyCubemapFramebuffer( - options.width, - options.height, - { - isFloat: options.isFloat ?? true - }, - ); - this.framebuffer = framebuffer; - this.texture = texture; - - this.width = options.width; - this.height = options.height; - } - - public bind(): void { - gl.bindFramebuffer( gl.FRAMEBUFFER, this.framebuffer.raw ); - glCat.drawBuffers( 1 ); - gl.viewport( 0, 0, this.width, this.height ); - } - - public dispose(): void { - this.framebuffer.dispose(); - } -} diff --git a/src/heck/Dog.ts b/src/heck/Dog.ts deleted file mode 100644 index 442c296..0000000 --- a/src/heck/Dog.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Component } from './components/Component'; -import { Entity } from './Entity'; -import { Transform } from './Transform'; -import { music } from '../globals/music'; - -/** - * And what a WONDERFUL Dog they are!! - */ -export class Dog { - public root: Entity; - public active: boolean; - - private __frameCount: number = 0; - - public constructor() { - this.root = new Entity(); - this.active = true; - - if ( process.env.DEV ) { - this.root.name = 'root'; - } - - const update = (): void => { - if ( this.active ) { - music.update(); - this.root.update( { - frameCount: this.__frameCount ++, - time: music.time, - deltaTime: music.deltaTime, - globalTransform: new Transform(), - parent: null, - path: process.env.DEV && '', - } ); - } - - if ( process.env.DEV ) { - Component.resetUpdateBreakpoint(); - Component.resetDrawBreakpoint(); - } - - requestAnimationFrame( update ); - }; - update(); - } -} diff --git a/src/heck/Entity.ts b/src/heck/Entity.ts deleted file mode 100644 index c09b2db..0000000 --- a/src/heck/Entity.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { Camera } from './components/Camera'; -import { Component } from './components/Component'; -import { MaterialTag } from './Material'; -import { Matrix4 } from '@fms-cat/experimental'; -import { RenderTarget } from './RenderTarget'; -import { Transform } from './Transform'; - -export interface EntityUpdateEvent { - frameCount: number; - time: number; - deltaTime: number; - globalTransform: Transform; - parent: Entity | null; - path?: string; -} - -export interface EntityDrawEvent { - frameCount: number; - time: number; - renderTarget: RenderTarget; - globalTransform: Transform; - viewMatrix: Matrix4; - projectionMatrix: Matrix4; - camera: Camera; - cameraTransform: Transform; - materialTag: MaterialTag; - path?: string; -} - -export interface EntityOptions { - active?: boolean; - visible?: boolean; - name?: string; -} - -export class Entity { - public readonly transform = new Transform(); - public globalTransformCache = new Transform(); - - public lastUpdateFrame = 0; - - public active = true; - public visible = true; - - public name?: string; - - public children: Entity[] = []; - public components: Component[] = []; - - public constructor( options?: EntityOptions ) { - this.active = options?.active ?? true; - this.visible = options?.visible ?? true; - - if ( process.env.DEV ) { - this.name = options?.name ?? ( this as any ).constructor.name; - } - } - - public update( event: EntityUpdateEvent ): void { - if ( !this.active ) { return; } - if ( this.lastUpdateFrame === event.frameCount ) { return; } - this.lastUpdateFrame = event.frameCount; - - const globalTransform = event.globalTransform.multiply( this.transform ); - - let path: string; - if ( process.env.DEV ) { - path = `${ event.path }/${ this.name }`; - } - - this.components.forEach( ( component ) => { - component.update( { - frameCount: event.frameCount, - time: event.time, - deltaTime: event.deltaTime, - globalTransform, - entity: this, - path, - } ); - } ); - - this.children.forEach( ( child ) => { - child.update( { - frameCount: event.frameCount, - time: event.time, - deltaTime: event.deltaTime, - globalTransform, - parent: this, - path, - } ); - } ); - } - - public draw( event: EntityDrawEvent ): void { - if ( !this.visible ) { return; } - - this.globalTransformCache = event.globalTransform.multiply( this.transform ); - - let path: string; - if ( process.env.DEV ) { - path = `${ event.path }/${ this.name }`; - } - - this.components.forEach( ( component ) => { - component.draw( { - frameCount: event.frameCount, - time: event.time, - renderTarget: event.renderTarget, - globalTransform: this.globalTransformCache, - camera: event.camera, - cameraTransform: event.cameraTransform, - viewMatrix: event.viewMatrix, - projectionMatrix: event.projectionMatrix, - entity: this, - materialTag: event.materialTag, - path, - } ); - } ); - - this.children.forEach( ( child ) => { - child.draw( { - frameCount: event.frameCount, - time: event.time, - renderTarget: event.renderTarget, - globalTransform: this.globalTransformCache, - viewMatrix: event.viewMatrix, - projectionMatrix: event.projectionMatrix, - camera: event.camera, - cameraTransform: event.cameraTransform, - materialTag: event.materialTag, - path, - } ); - } ); - } -} diff --git a/src/heck/GPUTimer.ts b/src/heck/GPUTimer.ts deleted file mode 100644 index d3d5b0a..0000000 --- a/src/heck/GPUTimer.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Pool } from '../utils/Pool'; -import { gl, glCat } from '../globals/canvas'; - -export class GPUTimer { - public queries: Pool; - public stack: Promise[]; - public ext: any; - - private __loopTasks: Set<() => void>; - - public constructor() { - const queries = new Array( 1024 ).fill( 1 ).map( () => gl.createQuery()! ); - this.queries = new Pool( queries ); - - this.stack = []; - - this.ext = glCat.getExtension( 'EXT_disjoint_timer_query_webgl2', true ); - - this.__loopTasks = new Set(); - } - - public update(): void { - for ( const task of this.__loopTasks ) { - task(); - } - } - - public async measure( func: () => void ): Promise { - if ( this.stack.length !== 0 ) { - gl.endQuery( this.ext.TIME_ELAPSED_EXT ); - const promiseFinishingPrev = this.check( this.queries.current ); - - this.stack = this.stack.map( async ( promiseAccum ) => { - return ( await promiseAccum ) + ( await promiseFinishingPrev ); - } ); - } - - this.stack.push( Promise.resolve( 0.0 ) ); - - gl.beginQuery( this.ext.TIME_ELAPSED_EXT, this.queries.next() ); - - func(); - - gl.endQuery( this.ext.TIME_ELAPSED_EXT ); - - const promiseAccum = this.stack.pop()!; - const promiseThis = this.check( this.queries.current ); - - if ( this.stack.length !== 0 ) { - this.stack = this.stack.map( async ( promiseAccum ) => { - return ( await promiseAccum ) + ( await promiseThis ); - } ); - - gl.beginQuery( this.ext.TIME_ELAPSED_EXT, this.queries.next() ); - } - - return ( await promiseAccum ) + ( await promiseThis ); - } - - public check( query: WebGLQuery ): Promise { - return new Promise( ( resolve ) => { - const task = (): void => { - const isAvailable = gl.getQueryParameter( query, gl.QUERY_RESULT_AVAILABLE ); - - if ( isAvailable ) { - this.__loopTasks.delete( task ); - resolve( gl.getQueryParameter( query, gl.QUERY_RESULT ) * 0.001 * 0.001 ); - } - }; - - this.__loopTasks.add( task ); - } ); - } -} diff --git a/src/heck/Geometry.ts b/src/heck/Geometry.ts deleted file mode 100644 index 2a28105..0000000 --- a/src/heck/Geometry.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { GLCatTransformFeedback, GLCatVertexArray } from '@fms-cat/glcat-ts'; -import { gl, glCat } from '../globals/canvas'; - -export class Geometry { - public static typeSizeMap = { - [ gl.BYTE ]: 1, - [ gl.UNSIGNED_BYTE ]: 1, - [ gl.SHORT ]: 2, - [ gl.UNSIGNED_SHORT ]: 2, - [ gl.INT ]: 4, - [ gl.UNSIGNED_INT ]: 4, - [ gl.HALF_FLOAT ]: 2, - [ gl.FLOAT ]: 4, - }; - - public transformFeedback?: GLCatTransformFeedback | null; - - public mode: GLenum = gl.TRIANGLES; - public first = 0; - public count = 0; - public indexType: GLenum | null = null; // null to not use index buffer - - public vao: GLCatVertexArray; - - public constructor() { - this.vao = glCat.createVertexArray(); - } - - public draw(): void { - if ( process.env.DEV ) { - if ( this.count === 0 ) { - console.warn( 'You attempt to draw a geometry that count is 0' ); - return; - } - } - - if ( this.transformFeedback ) { - glCat.bindTransformFeedback( this.transformFeedback, () => { - gl.beginTransformFeedback( this.mode ); - this.drawElementsOrArrays(); - gl.endTransformFeedback(); - } ); - } else { - this.drawElementsOrArrays(); - } - } - - public drawElementsOrArrays(): void { - glCat.bindVertexArray( this.vao, () => { - if ( this.indexType != null ) { - gl.drawElements( - this.mode, - this.count, - this.indexType!, - this.first * Geometry.typeSizeMap[ this.indexType! ], - ); - } else { - gl.drawArrays( this.mode, this.first, this.count ); - } - } ); - } - - public disposeBuffers(): void { - if ( process.env.DEV ) { - throw new Error( 'Not Implemented' ); - } - } -} diff --git a/src/heck/InstancedGeometry.ts b/src/heck/InstancedGeometry.ts deleted file mode 100644 index 1669fe3..0000000 --- a/src/heck/InstancedGeometry.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Geometry } from './Geometry'; -import { gl, glCat } from '../globals/canvas'; - -export class InstancedGeometry extends Geometry { - public primcount: number = 0; - - public drawElementsOrArrays(): void { - if ( this.primcount === 0 ) { - console.warn( 'You attempt to draw an instanced geometry that primcount is 0' ); - return; - } - - glCat.bindVertexArray( this.vao, () => { - if ( this.indexType != null ) { - gl.drawElementsInstanced( - this.mode, - this.count, - this.indexType!, - this.first * Geometry.typeSizeMap[ this.indexType! ], - this.primcount, - ); - } else { - gl.drawArraysInstanced( this.mode, this.first, this.count, this.primcount ); - } - } ); - } -} diff --git a/src/heck/Material.ts b/src/heck/Material.ts deleted file mode 100644 index 6f51bfd..0000000 --- a/src/heck/Material.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { GLCatProgram, GLCatProgramLinkOptions, GLCatProgramUniformMatrixVectorType, GLCatProgramUniformType, GLCatProgramUniformVectorType, GLCatTexture } from '@fms-cat/glcat-ts'; -import { Geometry } from './Geometry'; -import { RenderTarget } from './RenderTarget'; -import { SHADERPOOL } from './ShaderPool'; -import { gl, glCat } from '../globals/canvas'; -import { injectCodeToShader } from '../utils/injectCodeToShader'; - -export type MaterialTag = - | 'deferred' - | 'forward' - | 'cubemap' - | 'depth'; - -export type MaterialMap = { [ tag in MaterialTag ]?: Material }; - -export interface MaterialInitOptions { - target: RenderTarget; - geometry: Geometry; -} - -export class Material { - protected __linkOptions: GLCatProgramLinkOptions; - - protected __defines: string[]; - - protected __uniforms: { - [ name: string ]: { - type: GLCatProgramUniformType; - value: number[]; - }; - } = {}; - - protected __uniformVectors: { - [ name: string ]: { - type: GLCatProgramUniformVectorType; - value: Float32List | Int32List; - }; - } = {}; - - protected __uniformMatrixVectors: { - [ name: string ]: { - type: GLCatProgramUniformMatrixVectorType; - value: Float32List | Int32List; - transpose?: boolean; - }; - } = {}; - - protected __uniformTextures: { - [ name: string ]: { - textures: GLCatTexture[]; - }; - } = {}; - - private __vert: string; - - public get vert(): string { - return this.__vert; - } - - public get vertWithDefines(): string { - return this.__withDefines( this.vert ); - } - - private __frag: string; - - public get frag(): string { - return this.__frag; - } - - public get fragWithDefines(): string { - return this.__withDefines( this.frag ); - } - - public get program(): GLCatProgram { - return SHADERPOOL.getProgram( - this, - this.vertWithDefines, - this.fragWithDefines, - ); - } - - public blend: [ GLenum, GLenum ]; - - public constructor( - vert: string, - frag: string, - { defines, blend, linkOptions, initOptions }: { - defines?: string[], - blend?: [ GLenum, GLenum ], - linkOptions?: GLCatProgramLinkOptions, - initOptions?: MaterialInitOptions, - } = {}, - ) { - this.__vert = vert; - this.__frag = frag; - this.__linkOptions = linkOptions ?? {}; - this.__defines = defines ?? []; - this.blend = blend ?? [ gl.ONE, gl.ZERO ]; - - if ( initOptions ) { - this.d3dSucks( initOptions ); - } else { - if ( process.env.DEV ) { - console.warn( 'Material created without initOptions' ); - } - } - } - - public addUniform( name: string, type: GLCatProgramUniformType, ...value: number[] ): void { - this.__uniforms[ name ] = { type, value }; - } - - public addUniformVector( - name: string, - type: GLCatProgramUniformVectorType, - value: Float32List | Int32List - ): void { - this.__uniformVectors[ name ] = { type, value }; - } - - public addUniformMatrixVector( - name: string, - type: GLCatProgramUniformMatrixVectorType, - value: Float32List | Int32List - ): void { - this.__uniformMatrixVectors[ name ] = { type, value }; - } - - public addUniformTextures( name: string, ...textures: GLCatTexture[] ): void { - this.__uniformTextures[ name ] = { textures }; - } - - public setUniforms(): void { - const program = this.program; - - Object.entries( this.__uniforms ).forEach( ( [ name, { type, value } ] ) => { - program.uniform( name, type, ...value ); - } ); - - Object.entries( this.__uniformVectors ).forEach( ( [ name, { type, value } ] ) => { - program.uniformVector( name, type, value ); - } ); - - Object.entries( this.__uniformMatrixVectors ).forEach( - ( [ name, { type, value, transpose } ] ) => { - program.uniformMatrixVector( name, type, value, transpose ); - } - ); - - Object.entries( this.__uniformTextures ).forEach( ( [ name, { textures } ] ) => { - program.uniformTexture( name, ...textures ); - } ); - } - - public setBlendMode(): void { - gl.blendFunc( ...this.blend ); - } - - public async replaceShader( - vert: string, - frag: string, - options?: { - defines?: string[], - linkOptions?: GLCatProgramLinkOptions, - }, - ): Promise { - if ( options?.defines ) { - this.__defines = [ ...options.defines ]; - } - - const program = await SHADERPOOL.getProgramAsync( - this, - this.__withDefines( vert ), - this.__withDefines( frag ), - options?.linkOptions, - ).catch( ( e ) => { - console.error( e ); - } ); - - if ( program ) { - const prevVert = this.vertWithDefines; - const prevFrag = this.fragWithDefines; - - this.__vert = vert; - this.__frag = frag; - - SHADERPOOL.discardProgram( this, prevVert, prevFrag ); - } - } - - /** - * https://scrapbox.io/fms-cat/WebGL:_%E3%82%B7%E3%82%A7%E3%83%BC%E3%83%80%E3%81%AE%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%81%8C%E9%81%85%E3%81%84 - */ - public d3dSucks( { geometry, target }: MaterialInitOptions ): void { - target.bind(); - glCat.useProgram( this.program, () => { - geometry.drawElementsOrArrays(); - } ); - } - - protected __withDefines( code: string ): string { - let inject = ''; - - this.__defines.map( ( value ) => { - if ( value != null ) { - inject += `#define ${value}\n`; - } - } ); - - return injectCodeToShader( code, inject ); - } -} diff --git a/src/heck/RenderTarget.ts b/src/heck/RenderTarget.ts deleted file mode 100644 index 021e928..0000000 --- a/src/heck/RenderTarget.ts +++ /dev/null @@ -1,7 +0,0 @@ -export abstract class RenderTarget { - public abstract get width(): number; - - public abstract get height(): number; - - public abstract bind(): void; -} diff --git a/src/heck/ShaderPool.ts b/src/heck/ShaderPool.ts deleted file mode 100644 index 417a091..0000000 --- a/src/heck/ShaderPool.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { GLCatProgram, GLCatProgramLinkOptions } from '@fms-cat/glcat-ts'; -import { Material } from './Material'; -import { glCat } from '../globals/canvas'; - -export class ShaderPool { - private __programMap: Map = new Map(); - - private __ongoingPromises: Map> = new Map(); - - private __programUsersMap: Map> = new Map(); - - public getProgram( - user: TUser, - vert: string, - frag: string, - options?: GLCatProgramLinkOptions, - ): GLCatProgram { - let program = this.__programMap.get( vert + frag ); - if ( !program ) { - if ( process.env.DEV ) { - try { - program = glCat.lazyProgram( vert, frag, options ); - } catch ( e ) { - console.error( user ); - throw e; - } - } else { - program = glCat.lazyProgram( vert, frag, options ); - } - - this.__programMap.set( vert + frag, program ); - } - - this.__setUser( user, program ); - - return program; - } - - public async getProgramAsync( - user: TUser, - vert: string, - frag: string, - options?: GLCatProgramLinkOptions - ): Promise { - let program = this.__programMap.get( vert + frag ); - if ( !program ) { - let promise = this.__ongoingPromises.get( vert + frag ); - if ( !promise ) { - if ( process.env.DEV ) { - promise = glCat.lazyProgramAsync( vert, frag, options ).catch( ( e ) => { - console.error( user ); - throw e; - } ); - } else { - promise = glCat.lazyProgramAsync( vert, frag, options ); - } - - promise.then( ( program ) => { - this.__programMap.set( vert + frag, program ); - this.__ongoingPromises.delete( vert + frag ); - } ); - this.__ongoingPromises.set( vert + frag, promise ); - } - - program = await promise; - } - - this.__setUser( user, program ); - - return program; - } - - public discardProgram( - user: TUser, - vert: string, - frag: string, - ): void { - const program = this.__programMap.get( vert + frag )!; - - this.__deleteUser( user, program ); - - if ( this.__countUsers( program ) === 0 ) { - program.dispose( true ); - this.__programMap.delete( vert + frag ); - } - } - - private __setUser( user: TUser, program: GLCatProgram ): void { - let users = this.__programUsersMap.get( program ); - if ( !users ) { - users = new Set(); - this.__programUsersMap.set( program, users ); - } - - if ( !users.has( user ) ) { - users.add( user ); - } - } - - private __deleteUser( user: TUser, program: GLCatProgram ): void { - const users = this.__programUsersMap.get( program )!; - - if ( !users.has( user ) ) { - if ( process.env.DEV ) { - console.warn( 'Attempt to delete an user of the program but the specified user is not an owner' ); - } - } - users.delete( user ); - } - - private __countUsers( program: GLCatProgram ): number { - const users = this.__programUsersMap.get( program )!; - return users.size; - } -} - -export const SHADERPOOL = new ShaderPool(); diff --git a/src/heck/Transform.ts b/src/heck/Transform.ts deleted file mode 100644 index fb16b03..0000000 --- a/src/heck/Transform.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Matrix4, Quaternion, Vector3 } from '@fms-cat/experimental'; - -export class Transform { - protected __position: Vector3 = Vector3.zero; - - public get position(): Vector3 { - return this.__position; - } - - public set position( vector: Vector3 ) { - this.__position = vector; - - this.__matrix = Matrix4.compose( this.__position, this.__rotation, this.__scale ); - } - - protected __rotation: Quaternion = Quaternion.identity; - - public get rotation(): Quaternion { - return this.__rotation; - } - - public set rotation( quaternion: Quaternion ) { - this.__rotation = quaternion; - - this.__matrix = Matrix4.compose( this.__position, this.__rotation, this.__scale ); - } - - protected __scale: Vector3 = Vector3.one; - - public get scale(): Vector3 { - return this.__scale; - } - - public set scale( vector: Vector3 ) { - this.__scale = vector; - - this.__matrix = Matrix4.compose( this.__position, this.__rotation, this.__scale ); - } - - protected __matrix: Matrix4 = Matrix4.identity; - - public get matrix(): Matrix4 { - return this.__matrix; - } - - public set matrix( matrix: Matrix4 ) { - this.__matrix = matrix; - - const decomposed = this.__matrix.decompose(); - this.__position = decomposed.position; - this.__rotation = decomposed.rotation; - this.__scale = decomposed.scale; - } - - public lookAt( position: Vector3, target?: Vector3, up?: Vector3, roll?: number ): void { - this.matrix = Matrix4.lookAt( position, target, up, roll ); - } - - public multiply( transform: Transform ): Transform { - const result = new Transform(); - result.matrix = this.matrix.multiply( transform.matrix ); - return result; - } -} diff --git a/src/heck/components/Blit.ts b/src/heck/components/Blit.ts deleted file mode 100644 index 5ccaa3f..0000000 --- a/src/heck/components/Blit.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { BufferRenderTarget } from '../BufferRenderTarget'; -import { Component, ComponentOptions } from './Component'; -import { RenderTarget } from '../RenderTarget'; -import { gl } from '../../globals/canvas'; - -export interface BlitOptions extends ComponentOptions { - src?: BufferRenderTarget; - dst?: RenderTarget; - srcRect?: [ number, number, number, number ] | null; - dstRect?: [ number, number, number, number ] | null; - attachment?: GLenum; - mask?: GLenum; - filter?: GLenum; -} - -/** - * Blit. - */ -export class Blit extends Component { - public src?: BufferRenderTarget; - public dst?: RenderTarget; - public srcRect?: [ number, number, number, number ] | null; - public dstRect?: [ number, number, number, number ] | null; - public attachment?: GLenum; - public mask: GLenum; - public filter: GLenum; - - public constructor( options: BlitOptions ) { - super( options ); - - this.visible = false; - - this.src = options.src; - this.dst = options.dst; - this.srcRect = options.srcRect; - this.dstRect = options.dstRect; - this.attachment = options.attachment; - this.mask = options.mask ?? gl.COLOR_BUFFER_BIT; - this.filter = options.filter ?? gl.NEAREST; - } - - protected __updateImpl(): void { - if ( this.src && this.dst ) { - gl.bindFramebuffer( gl.READ_FRAMEBUFFER, this.src.framebuffer.raw ); - if ( this.dst instanceof BufferRenderTarget ) { - gl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, this.dst.framebuffer.raw ); - } else { - gl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, null ); - } - - gl.readBuffer( this.attachment ?? gl.COLOR_ATTACHMENT0 ); - gl.blitFramebuffer( - ...( this.srcRect ?? [ 0, 0, this.src.width, this.src.height ] ), - ...( this.dstRect ?? [ 0, 0, this.dst.width, this.dst.height ] ), - this.mask, - this.filter, - ); - } - } -} diff --git a/src/heck/components/Camera.ts b/src/heck/components/Camera.ts deleted file mode 100644 index e0af6ea..0000000 --- a/src/heck/components/Camera.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Component, ComponentOptions, ComponentUpdateEvent } from './Component'; -import { Entity } from '../Entity'; -import { MaterialTag } from '../Material'; -import { Matrix4 } from '@fms-cat/experimental'; -import { RenderTarget } from '../RenderTarget'; -import { Transform } from '../Transform'; -import { glCat } from '../../globals/canvas'; - -export interface CameraOptions extends ComponentOptions { - renderTarget?: RenderTarget; - projectionMatrix: Matrix4; - materialTag: MaterialTag; - scenes?: Entity[]; - clear?: Array | false; -} - -export abstract class Camera extends Component { - public projectionMatrix: Matrix4; - - public renderTarget?: RenderTarget; - - public scenes?: Entity[]; - - public clear: Array | false = []; - - public materialTag: MaterialTag; - - public abstract get near(): number; - - public abstract get far(): number; - - public constructor( options: CameraOptions ) { - super( options ); - - this.visible = false; - - this.renderTarget = options.renderTarget; - this.scenes = options.scenes; - this.projectionMatrix = options.projectionMatrix; - this.materialTag = options.materialTag; - if ( options.clear !== undefined ) { this.clear = options.clear; } - } - - protected __updateImpl( event: ComponentUpdateEvent ): void { - const { renderTarget, scenes } = this; - - if ( !renderTarget ) { - throw process.env.DEV && new Error( 'You must assign a renderTarget to the Camera' ); - } - - if ( !scenes ) { - throw process.env.DEV && new Error( 'You must assign scenes to the Camera' ); - } - - const viewMatrix = event.globalTransform.matrix.inverse!; - - renderTarget.bind(); - - if ( this.clear ) { - glCat.clear( ...this.clear ); - } - - scenes.map( ( scene ) => { - scene.draw( { - frameCount: event.frameCount, - time: event.time, - renderTarget: renderTarget, - cameraTransform: event.globalTransform, - globalTransform: new Transform(), - viewMatrix, - projectionMatrix: this.projectionMatrix, - camera: this, - materialTag: this.materialTag, - path: process.env.DEV && `(${ this.materialTag }) `, - } ); - } ); - } -} diff --git a/src/heck/components/Component.ts b/src/heck/components/Component.ts deleted file mode 100644 index 3c00442..0000000 --- a/src/heck/components/Component.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { COMPONENT_DRAW_BREAKPOINT, COMPONENT_DRAW_PATTERN, COMPONENT_UPDATE_BREAKPOINT, COMPONENT_UPDATE_PATTERN } from '../../config-hot'; -import { Camera } from './Camera'; -import { Entity } from '../Entity'; -import { GPUTimer } from '../GPUTimer'; -import { MaterialTag } from '../Material'; -import { Matrix4 } from '@fms-cat/experimental'; -import { RenderTarget } from '../RenderTarget'; -import { Transform } from '../Transform'; -import { getDivComponentsDraw, getDivComponentsUpdate } from '../../globals/dom'; - -export interface ComponentUpdateEvent { - frameCount: number; - time: number; - deltaTime: number; - globalTransform: Transform; - entity: Entity; - path: string; -} - -export interface ComponentDrawEvent { - frameCount: number; - time: number; - camera: Camera; - cameraTransform: Transform; - materialTag: MaterialTag; - renderTarget: RenderTarget; - globalTransform: Transform; - viewMatrix: Matrix4; - projectionMatrix: Matrix4; - entity: Entity; - path: string; -} - -export interface ComponentOptions { - active?: boolean; - visible?: boolean; - name?: string; - ignoreBreakpoints?: boolean; -} - -export class Component { - public static gpuTimer?: GPUTimer; - public static updateList?: Promise<{ path?: string; cpu: number; gpu: number; }>[]; - public static drawList?: Promise<{ path?: string; cpu: number; gpu: number; }>[]; - private static __updateHaveReachedBreakpoint = false; - private static __drawHaveReachedBreakpoint = false; - - public static resetUpdateBreakpoint(): void { - if ( process.env.DEV ) { - const divComponentsUpdate = getDivComponentsUpdate(); - - if ( Component.updateList != null ) { - Promise.all( Component.updateList ).then( ( list ) => { - let accumCpu = 0.0; - let accumGpu = 0.0; - - const strEach = list.map( ( { path, cpu, gpu } ) => { - accumCpu += cpu; - accumGpu += gpu; - return `${ cpu.toFixed( 3 ) }, ${ gpu.toFixed( 3 ) } - ${ path }`; - } ).join( '\n' ); - - const strAccum = `${ accumCpu.toFixed( 3 ) }, ${ accumGpu.toFixed( 3 ) } - UPDATE (${ COMPONENT_UPDATE_PATTERN })\n`; - divComponentsUpdate.innerHTML = strAccum + strEach; - } ); - } - Component.updateList = []; - - this.__updateHaveReachedBreakpoint = false; - } - } - - public static resetDrawBreakpoint(): void { - if ( process.env.DEV ) { - const divComponentsDraw = getDivComponentsDraw(); - - if ( Component.drawList != null ) { - Promise.all( Component.drawList ).then( ( list ) => { - let accumCpu = 0.0; - let accumGpu = 0.0; - - const strEach = list.map( ( { path, cpu, gpu } ) => { - accumCpu += cpu; - accumGpu += gpu; - return `${ cpu.toFixed( 3 ) }, ${ gpu.toFixed( 3 ) } - ${ path }`; - } ).join( '\n' ); - - const strAccum = `${ accumCpu.toFixed( 3 ) }, ${ accumGpu.toFixed( 3 ) } - DRAW (${ COMPONENT_DRAW_PATTERN })\n`; - divComponentsDraw.innerHTML = strAccum + strEach; - } ); - } - Component.drawList = []; - - this.__drawHaveReachedBreakpoint = false; - } - } - - public lastUpdateFrame = 0; - - public active: boolean; - public visible: boolean; - - public name?: string; - - public ignoreBreakpoints?: boolean; - - public constructor( options?: ComponentOptions ) { - this.active = options?.active ?? true; - this.visible = options?.visible ?? true; - - if ( process.env.DEV ) { - this.name = options?.name ?? ( this as any ).constructor.name; - this.ignoreBreakpoints = options?.ignoreBreakpoints; - - Component.gpuTimer = new GPUTimer(); - } - } - - public update( event: ComponentUpdateEvent ): void { - if ( !this.active ) { return; } - if ( this.lastUpdateFrame === event.frameCount ) { return; } - this.lastUpdateFrame = event.frameCount; - - if ( process.env.DEV ) { - if ( Component.__updateHaveReachedBreakpoint && !this.ignoreBreakpoints ) { - return; - } - } - - if ( process.env.DEV ) { - let cpu: number; - - const path = `${ event.path }/${ this.name }`; - - if ( COMPONENT_UPDATE_PATTERN.exec( path ) ) { - Component.updateList?.push( - Component.gpuTimer!.measure( () => { - const begin = performance.now(); - this.__updateImpl( event ); - cpu = ( performance.now() - begin ) * 0.001; - } ).then( ( gpu ) => ( { path, cpu, gpu } ) ) - ); - } else { - this.__updateImpl( event ); - } - } else { - this.__updateImpl( event ); - } - - if ( process.env.DEV ) { - if ( COMPONENT_UPDATE_BREAKPOINT != null && COMPONENT_UPDATE_BREAKPOINT === this.name ) { - Component.__updateHaveReachedBreakpoint = true; - } - } - } - - protected __updateImpl( event: ComponentUpdateEvent ): void { // eslint-disable-line - // do nothing - } - - public draw( event: ComponentDrawEvent ): void { - if ( !this.visible ) { return; } - - if ( process.env.DEV ) { - if ( Component.__drawHaveReachedBreakpoint && !this.ignoreBreakpoints ) { - return; - } - } - - if ( process.env.DEV ) { - let cpu: number; - - const path = `${ event.path }/${ this.name }`; - - if ( COMPONENT_DRAW_PATTERN.exec( path ) ) { - Component.drawList?.push( - Component.gpuTimer!.measure( () => { - const begin = performance.now(); - this.__drawImpl( event ); - cpu = ( performance.now() - begin ) * 0.001; - } ).then( ( gpu ) => ( { path, cpu, gpu } ) ) - ); - } else { - this.__drawImpl( event ); - } - } else { - this.__drawImpl( event ); - } - - if ( process.env.DEV ) { - if ( COMPONENT_DRAW_BREAKPOINT != null && COMPONENT_DRAW_BREAKPOINT === this.name ) { - Component.__drawHaveReachedBreakpoint = true; - } - } - } - - protected __drawImpl( event: ComponentDrawEvent ): void { // eslint-disable-line - // do nothing - } -} - -if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( '../../config-hot', () => { - // do nothing, just want to update breakpoints, and measures - } ); - } -} diff --git a/src/heck/components/CubemapCamera.ts b/src/heck/components/CubemapCamera.ts deleted file mode 100644 index b99d38d..0000000 --- a/src/heck/components/CubemapCamera.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Camera } from './Camera'; -import { ComponentOptions, ComponentUpdateEvent } from './Component'; -import { CubemapRenderTarget } from '../CubemapRenderTarget'; -import { Entity } from '../Entity'; -import { MaterialTag } from '../Material'; -import { Matrix4, Quaternion, Vector3 } from '@fms-cat/experimental'; -import { Transform } from '../Transform'; -import { gl } from '../../globals/canvas'; - -const INV_SQRT2 = 1.0 / Math.sqrt( 2.0 ); - -const CUBEMAP_ROTATIONS = [ // 🔥 - new Quaternion( [ 0.0, INV_SQRT2, 0.0, INV_SQRT2 ] ), // PX - new Quaternion( [ 0.0, -INV_SQRT2, 0.0, INV_SQRT2 ] ), // NX - new Quaternion( [ 0.0, INV_SQRT2, INV_SQRT2, 0.0 ] ), // PY - new Quaternion( [ 0.0, INV_SQRT2, -INV_SQRT2, 0.0 ] ), // NY - new Quaternion( [ 0.0, 1.0, 0.0, 0.0 ] ), // PZ - new Quaternion( [ 0.0, 0.0, 0.0, 1.0 ] ), // NZ -]; - -export interface CubemapCameraOptions extends ComponentOptions { - materialTag: MaterialTag; - renderTarget?: CubemapRenderTarget; - near?: number; - far?: number; - scenes?: Entity[]; - clear?: Array | false; -} - -export class CubemapCamera extends Camera { - public renderTarget?: CubemapRenderTarget; - public readonly near: number; - public readonly far: number; - - public constructor( options: CubemapCameraOptions ) { - const projectionMatrix = Matrix4.perspective( - 90.0, - options.near ?? 0.1, - options.far ?? 20.0, - ); - - super( { - ...options, - projectionMatrix, - renderTarget: options.renderTarget, - scenes: options.scenes, - clear: options.clear, - materialTag: options.materialTag, - } ); - - this.near = options.near ?? 0.1; - this.far = options.far ?? 20.0; - } - - protected __updateImpl( event: ComponentUpdateEvent ): void { - const { renderTarget } = this; - - if ( !renderTarget ) { - throw process.env.DEV && new Error( 'You must assign a renderTarget to the Camera' ); - } - - for ( let i = 0; i < 6; i ++ ) { - renderTarget.framebuffer.attachTexture( - renderTarget.texture, - { textarget: gl.TEXTURE_CUBE_MAP_POSITIVE_X + i }, - ); - - const globalTransform = new Transform(); - globalTransform.matrix = Matrix4.compose( - event.globalTransform.position, - CUBEMAP_ROTATIONS[ i ], - new Vector3( [ 1.0, 1.0, 1.0 ] ), - ); - - super.__updateImpl( { - ...event, - globalTransform, - } ); - } - } -} diff --git a/src/heck/components/Lambda.ts b/src/heck/components/Lambda.ts deleted file mode 100644 index d1aa13d..0000000 --- a/src/heck/components/Lambda.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, ComponentDrawEvent, ComponentOptions, ComponentUpdateEvent } from './Component'; - -export interface LambdaOptions extends ComponentOptions { - onUpdate?: ( event: ComponentUpdateEvent ) => void; - onDraw?: ( event: ComponentDrawEvent ) => void; -} - -export class Lambda extends Component { - public onUpdate?: ( event: ComponentUpdateEvent ) => void; - public onDraw?: ( event: ComponentDrawEvent ) => void; - - public constructor( options?: LambdaOptions ) { - super( options ); - - const { onUpdate, onDraw } = options ?? {}; - - this.onUpdate = onUpdate; - this.active = onUpdate != null; - - this.onDraw = onDraw; - this.visible = onDraw != null; - } - - protected __updateImpl( event: ComponentUpdateEvent ): void { - this.onUpdate && this.onUpdate( event ); - } - - protected __drawImpl( event: ComponentDrawEvent ): void { - this.onDraw && this.onDraw( event ); - } -} diff --git a/src/heck/components/LogTransform.ts b/src/heck/components/LogTransform.ts deleted file mode 100644 index c0759bf..0000000 --- a/src/heck/components/LogTransform.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component, ComponentOptions, ComponentUpdateEvent } from './Component'; - -export class LogTransform extends Component { - public constructor( options?: ComponentOptions ) { - super( options ); - - this.visible = false; - } - - protected __updateImpl( event: ComponentUpdateEvent ): void { - console.info( ` -Position: ${ event.globalTransform.position } -Rotation: ${ event.globalTransform.rotation } -Scale: ${ event.globalTransform.scale } -Matrix: ${ event.globalTransform.matrix } -` ); - } -} diff --git a/src/heck/components/Mesh.ts b/src/heck/components/Mesh.ts deleted file mode 100644 index 4c6af0c..0000000 --- a/src/heck/components/Mesh.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Component, ComponentDrawEvent, ComponentOptions } from './Component'; -import { Geometry } from '../Geometry'; -import { MaterialMap } from '../Material'; -import { glCat } from '../../globals/canvas'; - -export enum MeshCull { - None, - Front, - Back, - Both -} - -const meshCullMap = { - [ MeshCull.Front ]: /* GL_FRONT */ 1028, - [ MeshCull.Back ]: /* GL_BACK */ 1029, - [ MeshCull.Both ]: /* GL_FRONT_AND_BACK */ 1032 -}; - -export interface MeshOptions extends ComponentOptions { - geometry: Geometry; - materials: MaterialMap; -} - -export class Mesh extends Component { - public geometry: Geometry; - public materials: MaterialMap; - - public cull: MeshCull = MeshCull.Back; - public depthWrite = true; - public depthTest = true; - - public constructor( options: MeshOptions ) { - super( options ); - - this.active = false; - - this.geometry = options.geometry; - this.materials = options.materials; - } - - protected __drawImpl( event: ComponentDrawEvent ): void { - const gl = glCat.renderingContext; - - const material = this.materials[ event.materialTag ]; - if ( material == null ) { - return; - } - - const program = material.program; - - glCat.useProgram( program ); - material.setBlendMode(); - - if ( this.cull === MeshCull.None ) { - gl.disable( gl.CULL_FACE ); - } else { - gl.enable( gl.CULL_FACE ); - gl.cullFace( meshCullMap[ this.cull ] ); - } - - if ( this.depthTest ) { - gl.enable( gl.DEPTH_TEST ); - } else { - gl.disable( gl.DEPTH_TEST ); - } - - gl.depthMask( this.depthWrite ); - - material.setUniforms(); - - program.uniform( 'time', '1f', event.time ); - program.uniform( 'frameCount', '1f', event.frameCount ); - program.uniform( 'resolution', '2f', event.renderTarget.width, event.renderTarget.height ); - program.uniform( 'cameraPos', '3f', ...event.cameraTransform.position.elements ); - program.uniform( 'cameraNearFar', '2f', event.camera.near, event.camera.far ); - - program.uniformMatrixVector( 'normalMatrix', 'Matrix4fv', event.globalTransform.matrix.inverse!.elements, true ); - program.uniformMatrixVector( 'modelMatrix', 'Matrix4fv', event.globalTransform.matrix.elements ); - program.uniformMatrixVector( 'viewMatrix', 'Matrix4fv', event.viewMatrix.elements ); - program.uniformMatrixVector( 'projectionMatrix', 'Matrix4fv', event.projectionMatrix.elements ); - - this.geometry.draw(); - } -} diff --git a/src/heck/components/PerspectiveCamera.ts b/src/heck/components/PerspectiveCamera.ts deleted file mode 100644 index 79c7550..0000000 --- a/src/heck/components/PerspectiveCamera.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Camera } from './Camera'; -import { ComponentOptions } from './Component'; -import { Entity } from '../Entity'; -import { MaterialTag } from '../Material'; -import { Matrix4 } from '@fms-cat/experimental'; -import { RenderTarget } from '../RenderTarget'; - -export interface PerspectiveCameraOptions extends ComponentOptions { - materialTag: MaterialTag; - renderTarget?: RenderTarget; - near?: number; - far?: number; - fov?: number; - scenes?: Entity[]; - clear?: Array | false; -} - -export class PerspectiveCamera extends Camera { - public get fov(): number { - return this.__fov; - } - public set fov( value: number ) { - this.__fov = value; - this.__updatePerspectiveCamera(); - } - private __fov: number; - - public get near(): number { - return this.__near; - } - public set near( value: number ) { - this.__near = value; - this.__updatePerspectiveCamera(); - } - private __near: number; - - public get far(): number { - return this.__far; - } - public set far( value: number ) { - this.__far = value; - this.__updatePerspectiveCamera(); - } - private __far: number; - - public constructor( options: PerspectiveCameraOptions ) { - const fov = options.fov ?? 45.0; - const near = options.near ?? 0.01; - const far = options.far ?? 100.0; - - const projectionMatrix = Matrix4.perspective( fov, near, far ); - - super( { - ...options, - projectionMatrix, - renderTarget: options.renderTarget, - scenes: options.scenes, - clear: options.clear, - } ); - - this.__fov = fov; - this.__near = near; - this.__far = far; - } - - protected __updatePerspectiveCamera(): void { - this.projectionMatrix = Matrix4.perspective( this.fov, this.near, this.far ); - } -} diff --git a/src/heck/components/Quad.ts b/src/heck/components/Quad.ts deleted file mode 100644 index 5975315..0000000 --- a/src/heck/components/Quad.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Component, ComponentOptions, ComponentUpdateEvent } from './Component'; -import { Material } from '../Material'; -import { RenderTarget } from '../RenderTarget'; -import { gl, glCat } from '../../globals/canvas'; -import { quadGeometry } from '../../globals/quadGeometry'; - -export interface QuadOptions extends ComponentOptions { - material?: Material; - target?: RenderTarget; - range?: [ number, number, number, number ]; - clear?: Array | false; -} - -/** - * Renders a fullscreen quad. - */ -export class Quad extends Component { - public material?: Material; - public target?: RenderTarget; - public range: [ number, number, number, number ] = [ -1.0, -1.0, 1.0, 1.0 ]; - public clear: Array | false = false; - - public constructor( options: QuadOptions ) { - super( options ); - - this.visible = false; - - this.material = options.material; - this.target = options.target; - if ( options.range !== undefined ) { this.range = options.range; } - if ( options.clear !== undefined ) { this.clear = options.clear; } - } - - public drawImmediate( event?: Partial ): void { - const { target, material } = this; - - if ( target == null || material == null ) { - throw process.env.DEV && new Error( 'Quad: You must assign target and material before draw' ); - } - - glCat.useProgram( material.program ); - - target.bind(); - material.setBlendMode(); - - gl.enable( gl.DEPTH_TEST ); - gl.depthMask( true ); - - if ( this.clear ) { - glCat.clear( ...this.clear ); - } - - material.setUniforms(); - - const program = material.program; - - program.uniform( 'time', '1f', event?.time ?? 0.0 ); - program.uniform( 'deltaTime', '1f', event?.deltaTime ?? 0.0 ); - program.uniform( 'frameCount', '1f', event?.frameCount ?? 0 ); - program.uniform( 'resolution', '2f', target.width, target.height ); - program.uniform( 'range', '4f', ...this.range ); - - quadGeometry.draw(); - } - - protected __updateImpl( event: ComponentUpdateEvent ): void { - this.drawImmediate( event ); - } -} diff --git a/src/images/char5x5.png b/src/images/char5x5.png deleted file mode 100644 index ae9ba001e70c5a492f5e0a7dccf2ba3b8dc01851..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 895 zcmV-_1AzRAP)`Ulc7@!n`V<3O59OYAVYy-jom z)~TR-7?hZckrk@nS1GrGiZb+a5uytu?o5!b6YQc%5jQ;Z!8^1YqY7c7Ja8p2~MM{ zyR3Mz&F22uqNh5ZK_!;gDytj2@smH@vsWvxn5@P6m_BLk>v?Na$TLIZkv3H=kg(~W zceRV`wL$^cy~VEfR<4%?ejc2+g*5xzXa!D0G1}Eje*!@8tW4ZdD6?f6CEI)S^eUa` zu!1?w#(Oo|OpyMN8N07FlyuaRw1I4R4>4GuA;qtIWWEr6ous%jk=XwX>vN<{@W@;% zl+HI}q1ivYhbnL-=o0@j_s6U!p&-it-NG7C1plebc>3y$%ul2AjA_yw9+Hc#@Xch# zQ^XdJ;NX3i5Nr#dXrgiaY?OBb8;>WD+esd?-W)6noX4WYG->sFH|{#|K9#Ibe;WDb z?j?w<%aRf(Q$HYcp*AZh3w0Qm%PY>Le%O(Vo1s;jUO_dC@Wg(W{S$tAAIaXjAoG$T zY^+vbj>z58(!jef6k<=7oD#y~rAXeomj<5FYCh{WhofL1LgGR#rAEq`$K~%bn|c6_ zoxq2iGPx#;CH9IwLhLSv49WvaLJMLj6seUT1Nb&R7%AM!W7fXL>!0u4#XYa+d+uz3 zzTzPt5xiT-W7i9P+>*POX-FaL9cn&WLH2t1kY({O>Blo}uQ6s`mX$JkI^< z7-n+Mlb2VqW$NUD0*=}MTD{g^)`|msoLFzkvRLq-KE6BHmNFnp#gU853uMY3;3J6w VL%ra@yfpv-002ovPDHLkV1m|sygvW{ diff --git a/src/main.ts b/src/main.ts deleted file mode 100644 index 43f0e0b..0000000 --- a/src/main.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { BufferRenderTarget } from './heck/BufferRenderTarget'; -import { MUSIC_BPM, START_POSITION } from './config'; -import { automaton } from './globals/automaton'; -import { canvas } from './globals/canvas'; -import { dog } from './scene'; -import { getCheckboxActive, getDivCanvasContainer } from './globals/dom'; -import { music } from './globals/music'; -import type { AutomatonWithGUI } from '@fms-cat/automaton-with-gui'; - -// == dom ========================================================================================== -document.body.style.margin = '0'; -document.body.style.padding = '0'; - -if ( process.env.DEV ) { - document.body.style.background = '#000'; - document.body.style.width = '100%'; - - const divCanvasContainer = getDivCanvasContainer(); - - divCanvasContainer.appendChild( canvas ); - ( canvas.style as any ).aspectRatio = 'auto 1920 / 1080'; - canvas.style.margin = 'auto'; - canvas.style.maxWidth = '100%'; - canvas.style.maxHeight = '100%'; -} else { - canvas.style.position = 'fixed'; - canvas.style.left = '0'; - canvas.style.top = '0'; - document.body.style.width = canvas.style.width = '100%'; - document.body.style.height = canvas.style.height = '100%'; -} - -// -- keyboards ------------------------------------------------------------------------------------ -if ( process.env.DEV ) { - const checkboxActive = getCheckboxActive(); - - window.addEventListener( 'keydown', ( event ) => { - if ( event.key === 'Escape' ) { // panic button - dog.root.active = false; - music.isPlaying = false; - checkboxActive.checked = false; - } else if ( event.key === ' ' ) { - ( automaton as AutomatonWithGUI ).togglePlay(); - } else if ( event.key === 'ArrowLeft' ) { - music.time -= 480.0 / MUSIC_BPM; - automaton.reset(); - } else if ( event.key === 'ArrowRight' ) { - music.time += 480.0 / MUSIC_BPM; - automaton.reset(); - } - } ); - - checkboxActive.addEventListener( 'input', ( event: any ) => { - dog.root.active = event.target.checked; - music.isPlaying = event.target.checked; - } ); -} - -// -- wenis ---------------------------------------------------------------------------------------- -if ( process.env.DEV ) { - console.info( BufferRenderTarget.nameMap ); -} - -// -- let's gooooo --------------------------------------------------------------------------------- -async function load(): Promise { - if ( process.env.DEV ) { - music.time = START_POSITION; - ( automaton as AutomatonWithGUI ).play(); - } - - if ( !process.env.DEV ) { - document.body.innerHTML = ''; - document.write( 'Wait a moment...' ); - } - - await music.prepare(); - - if ( !process.env.DEV ) { - document.body.innerHTML = ''; - - const button = document.createElement( 'a' ); - document.body.prepend( button ); - button.innerHTML = 'click me!'; - - button.onclick = () => { - document.body.prepend( canvas ); - music.isPlaying = true; - document.body.requestFullscreen(); - }; - - window.addEventListener( 'keydown', ( event ) => { - if ( event.key === 'Escape' ) { // panic button - dog.root.active = false; - music.isPlaying = false; - } - } ); - } -} -load(); diff --git a/src/music/AutomatonManager.ts b/src/music/AutomatonManager.ts deleted file mode 100644 index 1493b88..0000000 --- a/src/music/AutomatonManager.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Channel } from '@fms-cat/automaton'; -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { MUSIC_AUTOMATON_TEXTURE_HEIGHT } from '../config'; -import { Music } from './Music'; -import { audio } from '../globals/music'; -import { automaton } from '../globals/automaton'; -import { gl, glCat } from '../globals/canvas'; -import type { AutomatonWithGUI } from '@fms-cat/automaton-with-gui'; - -/** - * Inject automaton params into music... - */ -export class AutomatonManager { - public texture: GLCatTexture; - public defineString: string; - private __music: Music; - private __ChannelList: Channel[]; - private __array: Float32Array; - - public constructor( music: Music ) { - this.__music = music; - - this.defineString = ''; - this.__ChannelList = []; - - this.__updateAutomatonChannelList(); - - this.__array = new Float32Array( - music.bufferLength * MUSIC_AUTOMATON_TEXTURE_HEIGHT - ); - - this.texture = glCat.createTexture(); - this.texture.textureFilter( gl.NEAREST ); - - // == hot hot hot hot hot ====================================================================== - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ '../automaton.json' ], - () => { - this.__updateAutomatonChannelList(); - music.recompile?.(); - } - ); - } - - ( automaton as AutomatonWithGUI ).on( 'createChannel', ( { name } ) => { - if ( name.startsWith( 'Music/' ) ) { - this.__updateAutomatonChannelList(); - music.recompile?.(); - } - } ); - - ( automaton as AutomatonWithGUI ).on( 'removeChannel', ( { name } ) => { - if ( name.startsWith( 'Music/' ) ) { - this.__updateAutomatonChannelList(); - music.recompile?.(); - } - } ); - } - } - - public update( time: number ): void { - const bufferLength = this.__music.bufferLength; - - for ( const [ iChannel, channel ] of this.__ChannelList.entries() ) { - for ( let iSample = 0; iSample < bufferLength; iSample ++ ) { - const t = time + iSample / audio.sampleRate; - this.__array[ bufferLength * iChannel + iSample ] = channel.getValue( t ); - } - } - - this.texture.setTextureFromArray( - bufferLength, - MUSIC_AUTOMATON_TEXTURE_HEIGHT, - this.__array, - { - internalformat: gl.R32F, - format: gl.RED, - type: gl.FLOAT, - } - ); - } - - private __updateAutomatonChannelList(): void { - this.__ChannelList = []; - this.defineString = ''; - - for ( const [ channelName, channel ] of automaton.mapNameToChannel.entries() ) { - if ( channelName.startsWith( 'Music/' ) ) { - const key = channelName.substring( 6 ); - const index = this.__ChannelList.length; - const y = ( index + 0.5 ) / MUSIC_AUTOMATON_TEXTURE_HEIGHT; - this.defineString += `const float AUTO_${key}=${y};`; - this.__ChannelList.push( channel ); - } - } - } -} diff --git a/src/music/Music.ts b/src/music/Music.ts deleted file mode 100644 index 22b90b7..0000000 --- a/src/music/Music.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { AutomatonManager } from './AutomatonManager'; -import { GLCatBuffer, GLCatProgram, GLCatTransformFeedback } from '@fms-cat/glcat-ts'; -import { MUSIC_BPM } from '../config'; -import { SamplesManager } from './SamplesManager'; -import { audio } from '../globals/music'; -import { binarySearch } from '@fms-cat/automaton'; -import { gl, glCat } from '../globals/canvas'; -import { injectCodeToShader } from '../utils/injectCodeToShader'; -import { randomTextureStatic } from '../globals/randomTexture'; -import musicVert from './music.vert'; - -const discardFrag = '#version 300 es\nvoid main(){discard;}'; - -const sectionResets = [ - 0.0, - 16.0, - 80.0, - 144.0, - 208.0, - 272.0, - 336.0, - 400.0, - 464.0, - 528.0, - 560.0, - 1E9, -].map( ( v ) => v * 60.0 / MUSIC_BPM ); - -export abstract class Music { - public isPlaying: boolean; - public time: number; - public deltaTime: number; - public readonly bufferLength: number; - - protected __program: GLCatProgram; - protected __samplesManager: SamplesManager; - protected __automatonManager: AutomatonManager; - - private __bufferOff: GLCatBuffer; - private __bufferTransformFeedbacks: [ - GLCatBuffer, - GLCatBuffer, - ]; - private __transformFeedback: GLCatTransformFeedback; - private __prevAudioTime: number; - - public constructor( bufferLength: number ) { - this.isPlaying = false; - this.time = 0.0; - this.deltaTime = 0.0; - this.__prevAudioTime = 0.0; - this.bufferLength = bufferLength; - - // == spicy boys =============================================================================== - this.__samplesManager = new SamplesManager( this ); - this.__automatonManager = new AutomatonManager( this ); - - // == gl ======================================================================================= - const bufferOffArray = new Array( bufferLength ) - .fill( 0 ) - .map( ( _, i ) => i ); - this.__bufferOff = glCat.createBuffer(); - this.__bufferOff.setVertexbuffer( new Float32Array( bufferOffArray ) ); - - this.__bufferTransformFeedbacks = [ - glCat.createBuffer(), - glCat.createBuffer(), - ]; - this.__transformFeedback = glCat.createTransformFeedback(); - - this.__bufferTransformFeedbacks[ 0 ].setVertexbuffer( - bufferLength * 4, - gl.STREAM_READ - ); - - this.__bufferTransformFeedbacks[ 1 ].setVertexbuffer( - bufferLength * 4, - gl.STREAM_READ - ); - - this.__transformFeedback.bindBuffer( 0, this.__bufferTransformFeedbacks[ 0 ] ); - this.__transformFeedback.bindBuffer( 1, this.__bufferTransformFeedbacks[ 1 ] ); - - this.__program = glCat.lazyProgram( - injectCodeToShader( musicVert, this.__automatonManager.defineString ), - discardFrag, - { transformFeedbackVaryings: [ 'outL', 'outR' ] }, - ); - - // == hot hot hot hot hot ====================================================================== - if ( process.env.DEV && module.hot ) { - module.hot.accept( - [ './music.vert' ], - () => { - this.recompile(); - } - ); - } - } - - public async prepare(): Promise { - await this.__samplesManager.loadSamples(); - } - - public async recompile(): Promise { - if ( process.env.DEV ) { - const program = await glCat.lazyProgramAsync( - injectCodeToShader( musicVert, this.__automatonManager.defineString ), - discardFrag, - { transformFeedbackVaryings: [ 'outL', 'outR' ] }, - ).catch( ( error: any ) => { - console.error( error ); - return null; - } ); - - if ( program ) { - this.__program.dispose( true ); - this.__program = program; - } - } - } - - public update(): void { - const now = audio.currentTime; - - if ( this.isPlaying ) { - this.deltaTime = now - this.__prevAudioTime; - this.time += this.deltaTime; - } else { - this.deltaTime = 0.0; - } - - this.__updateImpl(); - - this.__prevAudioTime = now; - } - - protected abstract __updateImpl(): void; - - protected __render( time: number, callback: ( channel: number ) => void ): void { - this.__automatonManager.update( time ); - - const program = this.__program; - - const beatLength = 60.0 / MUSIC_BPM; - const barLength = 240.0 / MUSIC_BPM; - - const sectionReset = binarySearch( sectionResets, time ); - const sectionBegin = sectionResets[ sectionReset - 1 ]; - const sectionLength = sectionResets[ sectionReset ] - sectionBegin; - - program.attribute( 'off', this.__bufferOff, 1 ); - program.uniform( 'bpm', '1f', MUSIC_BPM ); - program.uniform( 'bufferLength', '1f', this.bufferLength ); - program.uniform( '_deltaSample', '1f', 1.0 / audio.sampleRate ); - program.uniform( - 'timeLength', - '4f', - beatLength, - barLength, - sectionLength, - 1E16 - ); - program.uniform( - '_timeHead', - '4f', - time % beatLength, - time % barLength, - ( time - sectionBegin ) % sectionLength, - time, - ); - - program.uniformTexture( 'samplerRandom', randomTextureStatic.texture ); - program.uniformTexture( 'samplerAutomaton', this.__automatonManager.texture ); - - if ( this.__samplesManager.texture ) { - program.uniformTexture( 'samplerSamples', this.__samplesManager.texture ); - } - - glCat.useProgram( program, () => { - glCat.bindTransformFeedback( this.__transformFeedback, () => { - gl.enable( gl.RASTERIZER_DISCARD ); - gl.beginTransformFeedback( gl.POINTS ); - gl.drawArrays( gl.POINTS, 0, this.bufferLength ); - gl.endTransformFeedback(); - gl.disable( gl.RASTERIZER_DISCARD ); - } ); - } ); - - gl.finish(); // fenceよくわからん - - [ 0, 1 ].map( ( i ) => { - glCat.bindVertexBuffer( - this.__bufferTransformFeedbacks[ i ], - () => callback( i ), - ); - } ); - } -} diff --git a/src/music/MusicOffline.ts b/src/music/MusicOffline.ts deleted file mode 100644 index f165e8e..0000000 --- a/src/music/MusicOffline.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { MUSIC_LENGTH } from '../config'; -import { Music } from './Music'; -import { audio } from '../globals/music'; -import { gl } from '../globals/canvas'; - -const BUFFER_LENGTH = 16384; - -export class MusicOffline extends Music { - protected __buffer: AudioBuffer; - private __currentBufferSource?: AudioBufferSourceNode | null; - - public constructor() { - super( BUFFER_LENGTH ); - - this.__buffer = audio.createBuffer( - 2, - MUSIC_LENGTH * audio.sampleRate, - audio.sampleRate - ); - } - - public async prepare(): Promise { - await super.prepare(); - - let head = 0; - - return new Promise( ( resolve ) => { - const render = (): void => { - const remain = ( MUSIC_LENGTH * audio.sampleRate ) - head; - if ( remain <= 0 ) { - resolve(); - return; - } - - this.__render( head / audio.sampleRate, ( i ) => { - gl.getBufferSubData( - gl.ARRAY_BUFFER, - 0, - this.__buffer.getChannelData( i ), - head, - Math.min( remain, BUFFER_LENGTH ) - ); - } ); - - head += BUFFER_LENGTH; - - setTimeout( render, 1 ); - }; - render(); - } ); - } - - public __updateImpl(): void { - if ( this.isPlaying && this.__currentBufferSource == null ) { - this.__currentBufferSource = audio.createBufferSource(); - this.__currentBufferSource.buffer = this.__buffer; - this.__currentBufferSource.connect( audio.destination ); - - this.__currentBufferSource.start( audio.currentTime, this.time ); - } - - if ( !this.isPlaying && this.__currentBufferSource != null ) { - this.__currentBufferSource.stop( audio.currentTime ); - this.__currentBufferSource = null; - } - } -} diff --git a/src/music/MusicRealtime.ts b/src/music/MusicRealtime.ts deleted file mode 100644 index 7b5a72b..0000000 --- a/src/music/MusicRealtime.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Music } from './Music'; -import { Pool } from '../utils/Pool'; -import { audio } from '../globals/music'; -import { gl } from '../globals/canvas'; - -const BUFFER_LENGTH = 4096; - -export class MusicRealtime extends Music { - private __bufferPool: Pool; - private __prevBufferSource: AudioBufferSourceNode | null = null; - - public constructor() { - super( BUFFER_LENGTH ); - - this.__bufferPool = new Pool( [ - audio.createBuffer( 2, BUFFER_LENGTH, audio.sampleRate ), - audio.createBuffer( 2, BUFFER_LENGTH, audio.sampleRate ), - ] ); - - // casually calling async function - this.__samplesManager.loadSamples(); - } - - public __updateImpl(): void { - if ( this.isPlaying ) { - const buffer = this.__bufferPool.next(); - const genTime = audio.currentTime; - - if ( this.__program ) { - this.__render( this.time, ( i ) => { - gl.getBufferSubData( - gl.ARRAY_BUFFER, - 0, - buffer.getChannelData( i ), - 0, - BUFFER_LENGTH - ); - } ); - } - - const bufferSource = audio.createBufferSource(); - bufferSource.buffer = buffer; - bufferSource.connect( audio.destination ); - - this.__prevBufferSource?.stop( audio.currentTime ); - bufferSource.start( audio.currentTime, audio.currentTime - genTime ); - this.__prevBufferSource = bufferSource; - } else { - this.deltaTime = 0.0; - - this.__prevBufferSource?.stop( audio.currentTime ); - this.__prevBufferSource = null; - } - } -} diff --git a/src/music/MusicWrite.ts b/src/music/MusicWrite.ts deleted file mode 100644 index 7daccd6..0000000 --- a/src/music/MusicWrite.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MusicOffline } from './MusicOffline'; -import toWav from 'audiobuffer-to-wav'; - -export class MusicWrite extends MusicOffline { - public async prepare(): Promise { - await super.prepare(); - - const b = toWav( this.__buffer ); - const blob = new Blob( [ b ] ); - const anchor = document.createElement( 'a' ); - anchor.href = URL.createObjectURL( blob ); - anchor.download = 'wenis.wav'; - anchor.click(); - } -} diff --git a/src/music/SamplesManager.ts b/src/music/SamplesManager.ts deleted file mode 100644 index 1026791..0000000 --- a/src/music/SamplesManager.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { Music } from './Music'; -import { gl, glCat } from '../globals/canvas'; -import samplesOpus from './samples.opus'; - -export class SamplesManager { - public __music: Music; - - /** - * it can be undefined since it's loaded asynchronously - */ - public texture?: GLCatTexture; - - public constructor( music: Music ) { - this.__music = music; - - // == hot hot hot hot hot ====================================================================== - if ( process.env.DEV ) { - if ( module.hot ) { - module.hot.accept( - [ './samples.opus' ], - async () => { - await this.loadSamples(); - music.recompile?.(); - } - ); - } - } - } - - public async loadSamples(): Promise { - const audioToDecode = new AudioContext( { sampleRate: 48000 } ); - - const inputBuffer = await fetch( samplesOpus ).then( ( res ) => res.arrayBuffer() ); - const audioBuffer = await audioToDecode.decodeAudioData( inputBuffer ); - - const buffer = new Float32Array( 96000 ); - - const data = audioBuffer.getChannelData( 0 ); - for ( let i = 0; i < audioBuffer.length; i ++ ) { - buffer[ i ] = data[ i ]; - } - - const texture = glCat.createTexture()!; - texture.setTextureFromArray( - 6000, - 16, - buffer, - { - internalformat: gl.R32F, - format: gl.RED, - type: gl.FLOAT, - } - ); - texture.textureFilter( gl.LINEAR ); - - if ( process.env.DEV && this.texture != null ) { - this.texture.dispose(); - } - - this.texture = texture; - } -} diff --git a/src/music/music.vert b/src/music/music.vert deleted file mode 100644 index e6e27c6..0000000 --- a/src/music/music.vert +++ /dev/null @@ -1,780 +0,0 @@ -#version 300 es - -precision highp float; - -const float SAMPLES = 16.0; -const float INV_SAMPLES = 1.0 / SAMPLES; -const float PI = 3.14159265359; -const float TAU = 6.28318530718; -const float BPM = 180.0; -const float BEAT = 60.0 / BPM; -const float SECTION_BEGIN = 16.0 * BEAT; -const float SECTION_NEURO = 144.0 * BEAT; -const float SECTION_WHOA = 272.0 * BEAT; -const float SECTION_PORTER_FUCKING_ROBINSON = 336.0 * BEAT; -const float SECTION_AAAA = 400.0 * BEAT; -const float SECTION_PSY = 464.0 * BEAT; -const float SECTION_END = 528.0 * BEAT; - -#define saturate(i) clamp(i, 0.,1.) -#define aSaturate(i) clamp((i),-1.,1.) -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) -#define n2r(n) (pow(2.,((n)-1.)/12.)) -#define n2f(n) (n2r(float(n))*440.) -#define lofi(i,j) (floor((i)/(j))*(j)) -#define saw(p) (2.*fract(p)-1.) -#define pwm(x,d) (step(fract(x),(d))*2.0-1.0) -#define tri(p) (1.-4.*abs(fract(p)-0.5)) -#define snesloop(t,s,l) ((t)-lofi(max((t)-(s),0.0),(l))) - -uniform float bpm; -uniform float sampleRate; -uniform float bufferLength; -uniform float _deltaSample; -uniform vec4 timeLength; -uniform vec4 _timeHead; -uniform sampler2D samplerRandom; -uniform sampler2D samplerSamples; -uniform sampler2D samplerAutomaton; - -in float off; - -out float outL; -out float outR; - -float seed; - -float random() { - seed = fs( seed ); - return 2.0 * seed - 1.0; -} - -float auto( float y ) { - return texture( samplerAutomaton, vec2( off / bufferLength, y ) ).x; -} - -vec2 fbm( vec2 p ) { - vec2 sum = vec2( 0.0 ); - - sum += 0.5 * texture( samplerRandom, p * 0.0625 ).xy; - sum += 0.25 * texture( samplerRandom, p * 0.125 ).xy; - sum += 0.125 * texture( samplerRandom, p * 0.25 ).xy; - sum += 0.0625 * texture( samplerRandom, p * 0.5 ).xy; - - return sum; -} - -bool inRange( float t, float a, float b ) { - return ( a < t && t < b ); -} - -float inRangeFloat( float t, float a, float b ) { - return inRange( t, a, b ) ? 1.0 : 0.0; -} - -float inRangeSmooth( float t, float a, float b, float k ) { - return ( 1.0 - exp( -k * max( 0.0, t - a ) ) ) * exp( -k * max( 0.0, t - b ) ); -} - -float inRangeInteg( float t, float a, float b, float k ) { - return ( t < a ) - ? ( exp( k * ( t - a ) ) / k ) - : ( t < b ) - ? ( t - a + 1.0 / k ) - : ( b - a + ( 2.0 - exp( k * ( b - t ) ) ) / k ); -} - -vec2 wavetable( float phase, vec2 radius, vec2 offset ) { - float p = TAU * phase; - return 1.0 - 2.0 * fbm( radius * vec2( sin( p ), cos( p ) ) + offset ).xy; -} - -vec2 filterSaw( vec2 time, float freq, float cutoff, float resonance ) { - vec2 sum = vec2( 0.0 ); - - for ( int i = 1; i <= 32; i ++ ) { - float fi = float( i ); - float cut = smoothstep( cutoff * 1.2, cutoff * 0.8, fi * freq ); - cut += smoothstep( cutoff * 0.3, 0.0, abs( cutoff - fi * freq ) ) * resonance; - vec2 offset = vec2( -1.0, 1.0 ) * ( 0.1 * ( fi - 1.0 ) ); - sum += sin( fi * freq * time * TAU + offset ) / fi * cut; - } - - return sum; -} - -float kick( float t, float attackRatio ) { - if ( t < 0.0 ) { return 0.0; } - - float phase = 50.0 * t; - phase -= 15.0 * attackRatio * exp( -200.0 * t ); - phase -= 9.4 * ( 0.5 + 0.5 * attackRatio ) * exp( -30.0 * t ); - return exp( -4.0 * t ) * sin( TAU * phase ); -} - -vec2 deepkick( float t ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - vec2 tt = t + mix( 0.0, 0.007, smoothstep( 0.0, 0.1, t ) ) * wavetable( 0.1 * t, vec2( 2.0 ), vec2( -0.1 ) ); - vec2 phase = 50.0 * tt - 3.0 * exp( -100.0 * tt ) - 5.4 * exp( -30.0 * tt ); - return exp( -0.4 * tt ) * sin( TAU * phase ); -} - -vec2 longclap( float t, float tg ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - vec2 tt = t + lofi( exp( -1.0 * t ) * 0.008 * wavetable( tg, vec2( 0.3 ), vec2( 0.0 ) ), 0.0003 ); - return aSaturate( ( - sin( tt * 3000.0 * vec2( 1.005, 0.995 ) - exp( -tt * 300.0 ) * 50.0 ) * mix( exp( -tt * 30.0 ), exp( -1.0 * tt ), 0.04 ) * 2.0 - ) * 4.0 ); -} - -vec2 longsnare( float t ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - vec2 fm = exp( -t * 50.0 ) * 1.2 * sin( t * vec2( 1080.0, 1090.0 ) ); - return aSaturate( ( - ( 1.0 - 2.0 * texture( samplerRandom, vec2( t ) / vec2( 0.127, 0.124 ) ).xy ) * exp( -t * 6.0 ) + - sin( t * 3000.0 * vec2( 1.005, 0.995 ) - exp( -t * 300.0 ) * 50.0 + fm ) * mix( exp( -t * 30.0 ), exp( -t ), 0.04 ) * 2.0 - ) * 4.0 ); -} - -vec2 snare909( float t ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - vec2 sine = sin( t * vec2( 1500.0, 1510.0 ) - exp( -t * 80.0 ) * 30.0 - exp( -t * 300.0 ) * 30.0 ); - return aSaturate( ( - 1.0 - 2.0 * texture( samplerRandom, vec2( t ) / vec2( 0.127, 0.124 ) ).xy + - smoothstep( -1.0, 1.0, sine ) - ) * 2.0 * exp( -t * 10.0 ) ); -} - -vec2 snare( float t ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - vec2 fm = exp( -t * 100.0 ) * 1.2 * sin( t * vec2( 2080.0, 2090.0 ) ); - return aSaturate( ( - ( 1.0 - 2.0 * texture( samplerRandom, vec2( t ) / vec2( 0.127, 0.124 ) ).xy ) * exp( -t * 20.0 ) + - sin( t * 4500.0 * vec2( 1.005, 0.995 ) - exp( -t * 500.0 ) * 50.0 + fm ) * exp( -t * 50.0 ) * 2.0 - ) * 4.0 ); -} - -vec2 hihat( float t, float decay ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - float amp = exp( -decay * t ); - - float fm = sin( 189.0 * TAU * t ); - vec2 wave = 3.0 * sin( vec2( 22229.0, 22269.0 ) * TAU * t + fm ); - wave -= lofi( wave + 1.0, 2.0 ); - - return amp * wave; -} - -vec2 hihat2( float t, float decay ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - float fmamp = -5.4 * exp( -decay * t ); - vec2 fm = fmamp * sin( vec2( 25855.0, 25955.0 ) * t ); - float amp = exp( -decay * t ); - vec2 wave = vec2( sin( fm + vec2( 8892.0, 8792.0 ) * t ) ); - wave = 2.0 * ( fract( 2.0 * wave + 0.5 ) - 0.5 ); - - return amp * wave; -} - -vec2 crash( float t ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - t = t + 0.01 * sin( 0.5 * exp( -40.0 * t ) + 3.0 ); - t = lofi( 0.8 * t, 0.00004 ); - float fmamp = -3.4 * exp( -1.0 * t ); - vec2 fm = fmamp * sin( vec2( 38855.0, 38865.0 ) * t ); - float amp = exp( -3.0 * t ); - vec2 wave = vec2( sin( fm + vec2( 14892.0, 14890.0 ) * t ) ); - wave = 2.0 * ( fract( 2.0 * wave + 0.5 ) - 0.5 ); - - return amp * wave; -} - -vec2 clap( float t ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - t = t + 0.03 * sin( 10.0 * exp( -120.0 * t ) - 2.0 ); - float amp = 2.0 * exp( -30.0 * t ); - vec2 wave = texture( samplerRandom, t / vec2( 0.25, 0.23 ) + vec2( 0.4, 0.5 ) ).xy; - - return amp * wave; -} - -vec2 superbass( float t, float freq, float cutrate ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - vec2 wave = vec2( 0.0 ); - wave += 3.0 * sin( TAU * t * freq ); - - vec2 tt = t + 0.003 * sin( 3.0 * t + vec2( 0.0, 0.5 ) ); - - for ( int i = 0; i < 2; i ++ ) { - vec2 fm = 0.02 * sin( TAU * tt * freq ); - wave += filterSaw( tt + fm, freq * mix( 0.93, 1.07, float( i ) ), cutrate * 12.0 * freq, 1.0 ); - } - - return aSaturate( 2.0 * wave ); -} - -vec2 choir( float t ) { - if ( t < 0.0 ) { return vec2( 0.0 ); } - - vec2 tt0 = snesloop( 0.01 + t * vec2( 0.999, 1.001 ), 0.22, 0.26 ); - tt0 = lofi( tt0, 0.0001 ); - - return vec2( - texture( samplerSamples, vec2( 2.0 * tt0.x, 6.5 * INV_SAMPLES ) ).x, // hardcoded as a row = 0.5 sec - texture( samplerSamples, vec2( 2.0 * tt0.y, 6.5 * INV_SAMPLES ) ).x - ); -} - -vec2 harp( float t ) { - vec2 tt0 = snesloop( 0.02 + t * vec2( 0.999, 1.001 ), 0.22, 0.26 ); - tt0 = lofi( tt0, 0.0001 ); - - return 0.5 * ( exp( -10.0 * t ) + exp( -2.0 * t ) ) * vec2( - texture( samplerSamples, vec2( 2.0 * tt0.x, 7.5 * INV_SAMPLES ) ).x, // hardcoded as a row = 0.5 sec - texture( samplerSamples, vec2( 2.0 * tt0.y, 7.5 * INV_SAMPLES ) ).x - ); -} - -vec2 mainAudio( vec4 time ) { - vec2 dest = vec2( 0.0 ); - - const int chordsA[8] = int[]( - 0, 7, 10, 12, 19, 26, 27, 29 - ); - - const int chordsB[48] = int[]( - -4, 3, 5, 10, 12, 19, - -5, 2, 9, 10, 12, 17, - 0, 5, 7, 14, 15, 22, - -3, 4, 11, 12, 14, 19, - -4, 5, 7, 12, 14, 19, - -5, 2, 9, 10, 12, 17, - 0, 5, 7, 15, 22, 26, - -3, 3, 7, 12, 17, 22 - ); - - int progB = ( time.w < SECTION_PORTER_FUCKING_ROBINSON ) ? 6 * ( int( time.z / ( 8.0 * BEAT ) ) % 8 ) - : ( time.w < SECTION_AAAA - 8.0 * BEAT ) ? 6 * ( 4 + ( int( time.z / ( 8.0 * BEAT ) ) % 4 ) ) - : 36; - - float bassfreq = n2f( 0.0 ); - - float sidechain = 1.0; - - float fadeout = smoothstep( SECTION_END + 32.0 * BEAT, SECTION_END, time.w ); - - // -- test --------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_BEGIN - 8.0 * BEAT, SECTION_BEGIN ) ) { - float freq = 1000.0 * ( 1.0 + step( time.y, BEAT ) ); - float amp = inRangeSmooth( time.x, 0.0, 0.04, 1E3 ); - dest += 0.3 * amp * sin( TAU * freq * time.x ); - } - - // -- kick --------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_BEGIN + 64.0 * BEAT, SECTION_NEURO - 14.5 * BEAT ) ) { - float t = mod( mod( time.z - 1.5 * BEAT, 4.0 * BEAT ), 2.5 * BEAT ); - sidechain = smoothstep( 0.0, 0.7 * BEAT, t ); - dest += 0.25 * kick( t, 0.2 ); - } - - if ( inRange( time.w, SECTION_NEURO - 16.0 * BEAT, SECTION_NEURO ) ) { - dest += 0.25 * kick( mod( time.z - ( SECTION_NEURO - 16.0 * BEAT ), 64.0 * BEAT ), 0.2 ); - } - - // -- click -------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_BEGIN + 64.0 * BEAT, SECTION_NEURO - 16.0 * BEAT ) ) { - float t = mod( time.x, 0.25 * BEAT ); - vec2 w = fbm( vec2( time.w ) ) * 2.0 - 1.0; - dest += 0.3 * exp( -500.0 * t ) * mix( 0.3, 1.0, sidechain ) * w; - } - - // -- hihat -------------------------------------------------------------------------------------- - if ( - inRange( time.w, SECTION_BEGIN + 64.0 * BEAT, SECTION_NEURO ) - ) { - float t = mod( time.x, 0.5 * BEAT ); - dest += 0.03 * mix( 0.3, 1.0, sidechain ) * hihat2( 2.0 * t, 50.0 ); - } - - // -- longclap ----------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_BEGIN + 67.0 * BEAT, SECTION_NEURO - 17.0 * BEAT ) ) { - float t = mod( time.y - 3.0 * BEAT, 4.0 * BEAT ); - // float t = mod( time.z - 2.0 * BEAT, 4.0 * BEAT ); - dest += 0.1 * longclap( t, time.w ); - } - - if ( inRange( time.w, SECTION_BEGIN + 64.0 * BEAT, SECTION_NEURO ) ) { - dest += 0.1 * longclap( time.z - 47.0 * BEAT, time.w ); - } - - // -- pad ---------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_BEGIN, SECTION_NEURO ) ) { - vec2 sum = vec2( 0.0 ); - - float ph = lofi( time.w - SECTION_BEGIN, 0.5 * BEAT ) / SECTION_NEURO; - float tb = lofi( time.z, 0.5 * BEAT ); - float t = time.z - tb; - float rev = 0.02 * exp( -8.0 * t ); - rev += 0.02 * fs( floor( time.z / ( 0.5 * BEAT ) ) ); - vec2 radius = vec2( exp( 4.0 * ( ph - 1.0 ) ) ); - - for ( int i = 0; i < 21; i ++ ) { - float freq = n2f( chordsA[ ( i % 8 ) ] ) * 0.25; - freq *= 1.0 + 0.01 * ( 0.5 - fs( float( i ) ) ); - float phase = tri( time.w * freq ) * rev; - sum += 0.1 * inRangeSmooth( t, 0.0, 0.48 * BEAT, 1E3 ) * wavetable( phase, radius, vec2( 0.3 * float( i ) ) ); - } - - if ( inRange( time.w, SECTION_BEGIN + 64.0 * BEAT, SECTION_NEURO ) ) { - for ( int i = 0; i < 7; i ++ ) { - float rate = n2r( float( chordsA[ i ] ) ) * 0.5; - sum += 0.1 * choir( time.z * rate * 0.5 ); - } - } - - dest += 0.14 * mix( 0.3, 1.0, sidechain ) * aSaturate( sum ); - } - - // -- kick --------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_NEURO, SECTION_WHOA - 2.5 * BEAT ) ) { - float t = mod( mod( mod( time.y, 4.0 * BEAT ), 3.25 * BEAT ), 1.75 * BEAT ); - sidechain = smoothstep( 0.0, 0.7 * BEAT, t ); - dest += 0.25 * kick( t, 1.0 ); - } - - // -- hihat -------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_NEURO, SECTION_WHOA - 4.0 * BEAT ) ) { - float t = mod( time.x, 0.25 * BEAT ); - float decay = mix( 40.0, 100.0, fs( floor( time.z / ( 0.25 * BEAT ) ) ) ); - dest += 0.13 * mix( 0.3, 1.0, sidechain ) * hihat2( t, decay ); - } - - // -- snare -------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_NEURO, SECTION_WHOA - 4.0 * BEAT ) ) { - float t = mod( time.y - 2.0 * BEAT, 4.0 * BEAT ); - dest += 0.1 * snare( t ); - } - - // -- neuro bass --------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_NEURO, SECTION_WHOA ) ) { - vec2 sum = vec2( 0.0 ); - - float t = auto( AUTO_NEURO_TIME ); - float det = 0.01 * auto( AUTO_NEURO_DETUNE ); - float detPhase = auto( AUTO_NEURO_DETUNE_PHASE ); - float wubIntensity = auto( AUTO_NEURO_WUB_AMP ); - float wubFreq = auto( AUTO_NEURO_WUB_FREQ ); - - for ( int i = 0; i < 5; i ++ ) { - float fi = float( i ); - - float tt = t + det * fi * sin( fi * detPhase + 1.0 * t ); - - float radius = 0.1 * wubIntensity * fbm( 0.1 * vec2( sin( TAU * n2f( -36.0 ) * wubFreq * tt ) ) ).x; - - float phase = 0.2 * tri( n2f( -36.0 ) * tt ); - vec2 uv = radius * vec2( sin( phase ), cos( phase ) ) + 0.4; - - sum += 0.3 * ( 2.0 * fbm( uv ) - 1.0 ); - } - - dest += mix( 0.0, 1.0, sidechain ) * 0.27 * aSaturate( sum ); - dest += mix( 0.0, 1.0, sidechain ) * 0.2 * sin( n2f( -36.0 ) * TAU * t ); - } - - // -- kick --------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_WHOA, SECTION_PORTER_FUCKING_ROBINSON ) ) { - float t = mod( time.z, 8.0 * BEAT ); - sidechain = smoothstep( 0.0, 0.7 * BEAT, t ); - dest += 0.25 * kick( t, 1.0 ); - } - - // -- snare -------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_WHOA, SECTION_PORTER_FUCKING_ROBINSON - 4.0 * BEAT ) ) { - float t = mod( time.z - 4.0 * BEAT, 8.0 * BEAT ); - dest += 0.1 * snare( t ); - } - - // -- amen --------------------------------------------------------------------------------------- - if ( - inRange( time.w, SECTION_WHOA, SECTION_PORTER_FUCKING_ROBINSON - 4.0 * BEAT ) && - inRange( mod( time.z, 8.0 * BEAT ), 4.0 * BEAT, 8.0 * BEAT ) - ) { - float chunk = floor( 6.0 * fs( lofi( time.z, 0.5 * BEAT ) ) ); - // float chunk = time.y / ( 1.0 * BEAT ); - vec2 vib = 0.003 * sin( 3.0 * time.z + vec2( 0.0, 0.2 ) ); - vec2 tread = 2.0 * time.x + vib; - - float roll = fs( 2.4 + lofi( time.z, 0.5 * BEAT ) ); - tread -= lofi( tread, BEAT * pow( 0.5, floor( roll * 14.0 - 10.0 ) ) ); - - tread = fract( tread / BEAT ); - - vec2 tex = vec2( - texture( samplerSamples, vec2( tread.x, ( chunk + 0.5 ) * INV_SAMPLES ) ).x, // hardcoded as a row = 1 beat - texture( samplerSamples, vec2( tread.y, ( chunk + 0.5 ) * INV_SAMPLES ) ).x - ); - - dest += 0.1 * smoothstep( -0.8, 0.8, 4.0 * tex ); - } - - // -- neuro bass --------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_WHOA, SECTION_PORTER_FUCKING_ROBINSON ) ) { - vec2 sum = vec2( 0.0 ); - - float t = auto( AUTO_NEURO_TIME ); - float det = 0.01 * auto( AUTO_NEURO_DETUNE ); - float detPhase = auto( AUTO_NEURO_DETUNE_PHASE ); - float wubIntensity = auto( AUTO_NEURO_WUB_AMP ); - float wubFreq = auto( AUTO_NEURO_WUB_FREQ ); - float freq = n2f( chordsB[ progB ] ) * 0.125; - - for ( int i = 0; i < 5; i ++ ) { - float fi = float( i ); - - float tt = t + det * fi * sin( fi * detPhase + 1.0 * t ); - - float radius = 0.1 * wubIntensity * fbm( 0.1 * vec2( sin( TAU * freq * wubFreq * tt ) ) ).x; - - float phase = 0.2 * tri( freq * tt ); - vec2 uv = radius * vec2( sin( phase ), cos( phase ) ) + 0.4; - - sum += 0.3 * ( 2.0 * fbm( uv ) - 1.0 ); - } - - dest += mix( 0.0, 1.0, sidechain ) * 0.27 * aSaturate( sum ); - dest += mix( 0.0, 1.0, sidechain ) * 0.2 * sin( freq * TAU * t ); - } - - // -- choir -------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_WHOA, SECTION_PORTER_FUCKING_ROBINSON - 0.5 * BEAT ) ) { - vec2 sum = vec2( 0.0 ); - - float t = mod( time.z, 8.0 * BEAT ); - vec2 radius = vec2( 0.02 + 0.01 * ( 1.0 - exp( -t ) ) ); - - for ( int i = 0; i < 18; i ++ ) { - float freq = n2f( chordsB[ ( i % 6 ) + progB ] ) * 0.5; - freq *= 1.0 + 0.05 * ( 0.5 - fs( float( i ) ) ); - float phase = 0.4 * saw( t * freq ) + t; - float fm = 0.2 * wavetable( phase, radius, vec2( 0.2 + 0.3 * float( i ) ) ).x; - sum += 0.3 * mix( 0.0, 1.0, sidechain ) * wavetable( phase + fm, radius, vec2( 0.3 * float( i ) ) ); - } - - for ( int i = 0; i < 6; i ++ ) { - float rate = n2r( float( chordsB[ i + progB ] ) ); - sum += 0.4 * mix( 0.0, 1.0, sidechain ) * choir( t * rate * 0.5 ); - } - - float release = ( ( time.z > 60.0 * BEAT ) ? 2.0 : 1E3 ); - dest += 0.09 * inRangeSmooth( t, 0.0, 4.0 * BEAT, release ) * aSaturate( 2.0 * sum ); - } - - // -- reversecrash ------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_WHOA, SECTION_PORTER_FUCKING_ROBINSON - 0.5 * BEAT ) ) { - dest += 0.1 * crash( max( 0.0, 63.5 * BEAT - time.z ) ); - } - - // -- kick --------------------------------------------------------------------------------------- - // float tKick = mod( mod( time.y, 2.25 * BEAT ), 1.75 * BEAT ); - // float tKick = mod( mod( time.y, 4.0 * BEAT ), 2.5 * BEAT ); - float tKick = time.w < SECTION_PORTER_FUCKING_ROBINSON ? 1E9 - : time.w < SECTION_AAAA - 8.0 * BEAT ? time.x + mod( lofi( time.z, BEAT ), 8.0 * BEAT ) - : time.w < SECTION_AAAA ? 1E9 - : time.w < SECTION_AAAA + 1.0 * BEAT ? time.x + mod( lofi( time.z, BEAT ), 8.0 * BEAT ) - : time.w < SECTION_PSY ? 1E9 - : time.w < SECTION_END ? time.x - : time.z; - { - sidechain = smoothstep( 0.0, 0.7 * BEAT, tKick ); - dest += 0.25 * kick( tKick, 1.0 ); - } - - // -- longsnare ----------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_AAAA - 8.0 * BEAT ) ) { - float t = mod( lofi( time.z - 4.0, 1.0 * BEAT ), 8.0 * BEAT ) + time.x; - // float t = mod( time.z - 2.0 * BEAT, 4.0 * BEAT ); - dest += 0.12 * longsnare( t ); - } - - // -- hihat -------------------------------------------------------------------------------------- - if ( - inRange( time.w, SECTION_AAAA, SECTION_PSY ) - ) { - float t = mod( time.x - 0.5 * BEAT, BEAT ); - dest += 0.1 * mix( 0.3, 1.0, sidechain ) * hihat2( t, 9.0 ); - } - - if ( - inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_AAAA - 8.0 * BEAT ) || - inRange( time.w, SECTION_PSY + 16.0 * BEAT, SECTION_END ) - ) { - float t = mod( time.x, 0.25 * BEAT ); - float decay = mix( 40.0, 100.0, fs( floor( time.z / ( 0.25 * BEAT ) ) ) ); - dest += 0.1 * mix( 0.3, 1.0, sidechain ) * hihat2( t, decay ); - } - - if ( - inRange( time.w, SECTION_PSY + 31.5 * BEAT, SECTION_END ) - ) { - float t = mod( time.x - 0.5 * BEAT, BEAT ); - dest += 0.1 * mix( 0.3, 1.0, sidechain ) * hihat( t, 20.0 ); - } - - // -- crash -------------------------------------------------------------------------------------- - if ( - inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_PSY ) - ) { - float t = time.z; - dest += 0.14 * crash( t ); - } - - // -- amen --------------------------------------------------------------------------------------- - if ( - inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_AAAA - 8.0 * BEAT ) || - inRange( time.w, SECTION_AAAA, SECTION_PSY ) - ) { - float chunk = floor( 6.0 * fs( lofi( time.z, 0.5 * BEAT ) ) ); - // float chunk = time.y / ( 1.0 * BEAT ); - vec2 vib = 0.003 * sin( 3.0 * time.z + vec2( 0.0, 1.4 ) ); - vec2 tread = 2.0 * time.x + vib; - - float roll = fs( 2.4 + lofi( time.z, 0.5 * BEAT ) ); - tread -= lofi( tread, BEAT * pow( 0.5, floor( roll * 14.0 - 10.0 ) ) ); - - tread = fract( tread / BEAT ); - - vec2 tex = vec2( - texture( samplerSamples, vec2( tread.x, ( chunk + 0.5 ) * INV_SAMPLES ) ).x, // hardcoded as a row = 1 beat - texture( samplerSamples, vec2( tread.y, ( chunk + 0.5 ) * INV_SAMPLES ) ).x - ); - - dest += 0.1 * smoothstep( -0.8, 0.8, 4.0 * tex ); - } - - // -- psy bass ----------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_PSY, SECTION_END ) ) { - // float t = mod( aTime - 0.5 beat, 1.0 beat ); - float t = mod( time.x, 0.25 * BEAT ); - float decay = exp( -50.0 * t ); - float cutoff = mix( 100.0, 2000.0, decay ); - float noteI = 0.0; - float freq = n2f( -36 ); - float fm = -0.009 * exp( -6.0 * t ) * sin( TAU * 1.0 * freq * t ); - vec2 wave = ( 1.0 - exp( -t * 400.0 ) ) * filterSaw( vec2( t ) + fm, freq, cutoff, 0.0 ); - dest += 0.12 * sidechain * wave * exp( -max( 0.0, t - 0.22 * BEAT ) * 400.0 ); - } - - // -- pad ---------------------------------------------------------------------------------------- - if ( SECTION_PSY < time.w ) { - vec2 sum = vec2( 0.0 ); - - float tb = lofi( time.z, 0.25 * BEAT ); - float t = time.z - tb; - float rev = exp( 3.0 * fs( tb ) - 3.0 ) * exp( -20.0 * t ); - vec2 radius = vec2( 0.02 ) * fadeout; - - for ( int i = 0; i < 21; i ++ ) { - float freq = n2f( chordsA[ ( i % 8 ) ] ) * 0.25; - freq *= 1.0 + 0.001 * ( 0.5 - fs( float( i ) ) ); - float phase = tri( time.w * freq ) * rev; - sum += 0.14 * wavetable( phase, radius, vec2( 0.3 * float( i ) ) ); - } - - for ( int i = 0; i < 7; i ++ ) { - float rate = n2r( float( chordsA[ i ] ) ) * 0.5; - sum += 0.1 * choir( time.z * rate * 0.5 ) * exp( -30.0 * t ); - } - - dest += 0.14 * mix( 0.3, 1.0, sidechain ) * aSaturate( sum ); - } - - // -- superbass ---------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_AAAA ) ) { - float t = mod( time.z, 8.0 * BEAT ); - t += 1.0 * inRangeInteg( time.z, 28.0 * BEAT, 31.75 * BEAT, 50.0 ); - float freq = n2f( chordsB[ progB ] ) * 0.125; - float fadetime = max( 0.0, time.w - SECTION_AAAA + 8.0 * BEAT ); - dest += 0.11 * exp( -1.0 * fadetime ) * mix( 0.1, 1.0, sidechain ) * superbass( t, freq, exp( -2.0 * fadetime ) ); - } - - // -- choir -------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_AAAA - 8.0 * BEAT ) ) { - vec2 sum = vec2( 0.0 ); - - float t = mod( time.z, 8.0 * BEAT ); - vec2 radius = vec2( 0.01 + 0.03 * ( 1.0 - exp( -t ) ) ); - - for ( int i = 0; i < 18; i ++ ) { - float freq = n2f( chordsB[ ( i % 6 ) + progB ] ) * ( 0.25 + 0.25 * float( i % 2 ) ); - freq *= 1.0 + 0.03 * ( 0.5 - fs( float( i ) ) ); - float phase = t * freq; - sum += 0.2 * mix( 0.2, 1.0, sidechain ) * wavetable( phase, radius, vec2( 0.03 * float( i ) ) ); - } - - for ( int i = 0; i < 6; i ++ ) { - float rate = n2r( float( chordsB[ i + progB ] ) ); - sum += 0.3 * mix( 0.2, 1.0, sidechain ) * choir( t * rate * 0.5 ); - } - - dest += 0.1 * aSaturate( sum ); - } - - // -- harp --------------------------------------------------------------------------------------- - if ( - inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_PSY ) - ) { - const int notes[6] = int[]( - 0, 5, 7, 14, 15, 22 - ); - - for ( int i = 0; i < 4; i ++ ) { - float fi = float( i ); - float delay = fi * 0.75 * BEAT; - float t = mod( time.x - delay, 0.5 * BEAT ); - int prog = int( mod( ( time.w - delay ) / ( 0.5 * BEAT ), 6.0 ) ); - float radius = 0.001 + 0.003 * ( 1.0 - exp( -t ) ); - float rev = 0.3; - - float rate = n2r( float( notes[ prog ] ) ); - dest += 0.08 * exp( -0.5 * fi ) * mix( 0.2, 1.0, sidechain ) * harp( t * rate * 0.5 ); - } - } - - // -- lead --------------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON, SECTION_PSY ) ) { - const int notes[16] = int[]( - -4, 10, 12, 19, - -5, 14, 15, 22, - 0, 17, 19, 26, - -3, 14, 15, 22 - ); - - vec2 sum = vec2( 0.0 ); - - float t = mod( time.z, 0.5 * BEAT ); - int prog = int( mod( time.z / ( 0.5 * BEAT ), 4.0 ) ); - prog += ( progB / 6 * 4 ) % 16; - int progPrev = int( mod( ( time.z - 0.5 * BEAT ) / ( 0.5 * BEAT ), 4.0 ) ); - progPrev += int( mod( ( time.z - 0.5 * BEAT ) / ( 8.0 * BEAT ), 4.0 ) ); - - int note = notes[ prog ]; - int prevNote = notes[ progPrev ]; - float notef = float( note ) + float( note - prevNote ) * exp( -200.0 * t ); - - for ( int i = 0; i < 16; i ++ ) { - float fi = float( i ); - vec2 freq = n2f( notef ) * vec2( 0.5 ); - vec2 vib = freq * exp( -3.0 * t ) * 0.002 * sin( 20.0 * time.z + 6.0 * vec2( fs( fi ), fs( fi + 1.89 ) ) ); - vec2 phase = saw( t * freq + vib ); - sum += 0.1 * mix( 0.2, 1.0, sidechain ) * phase; - } - - dest += 0.14 * aSaturate( sum ); - } - - // -- deepkick ----------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_BEGIN, SECTION_BEGIN + 64.0 * BEAT ) ) { - dest += 0.3 * deepkick( time.z ); - } - - if ( inRange( time.w, SECTION_PORTER_FUCKING_ROBINSON - 4.0 * BEAT, SECTION_PORTER_FUCKING_ROBINSON - 0.5 * BEAT ) ) { - dest += 0.3 * deepkick( time.y ); - } - - if ( inRange( time.w, SECTION_AAAA - 8.0 * BEAT, SECTION_AAAA ) ) { - dest += 0.3 * deepkick( mod( time.z, 8.0 * BEAT ) ); - } - - if ( inRange( time.w, SECTION_END, SECTION_END + 64.0 * BEAT ) ) { - dest += 0.3 * deepkick( time.z ); - } - - // -- buildup ------------------------------------------------------------------------------------ - if ( inRange( time.w, SECTION_AAAA + 32.0 * BEAT, SECTION_PSY ) ) { - float ph = linearstep( SECTION_AAAA + 32.0 * BEAT, SECTION_PSY, time.w ); - vec2 radius = vec2( 0.03 * ( 1.0 + ph + sin( ph * 3000.0 ) ) ); - dest += 0.12 * ph * wavetable( ph * ( 0.5 + ph ) * 8000.0, radius, vec2( 0.4 ) ); - } - - // -- hi-cut kick -------------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_AAAA, SECTION_PSY ) ) { - float t = time.x; - float ph = linearstep( SECTION_AAAA, SECTION_PSY, time.w ); - - t = ( time.w > SECTION_PSY - 16.0 * BEAT ) ? mod( t, 0.5 * BEAT ) : t; - t = ( time.w > SECTION_PSY - 8.0 * BEAT ) ? mod( t, 0.25 * BEAT ) : t; - t = ( time.w > SECTION_PSY - 6.0 * BEAT ) ? mod( t, 0.125 * BEAT ) : t; - float decay = mix( 200.0, 0.0, sqrt( ph ) ); - - dest += 0.2 * kick( t, 1.0 ) * exp( -decay * t ); - dest += 0.1 * inRangeFloat( time.w, SECTION_PSY - 32.0 * BEAT, 1E9 ) * clap( t ); - dest += 0.05 * ph * inRangeFloat( time.w, SECTION_PSY - 16.0 * BEAT, 1E9 ) * snare909( t ); - } - - // -- fill, before psy --------------------------------------------------------------------------- - if ( inRange( time.w, SECTION_PSY - 4.0 * BEAT, SECTION_PSY ) ) { - dest *= 0.0; - dest += 0.2 * inRangeSmooth( time.y, 0.0, 2.0 * BEAT, 100.0 ) * texture( samplerRandom, time.y / vec2( 0.17, 0.19 ) ).xy; - - float choirTime = time.y - lofi( time.y, 0.03 ) * 0.6; - dest += 0.2 * inRangeSmooth( time.y, 2.0 * BEAT, 3.5 * BEAT, 100.0 ) * choir( 0.2 * choirTime ).xy; - - dest += 0.2 * kick( time.y - 3.5 * BEAT, 1.0 ) * inRangeSmooth( time.y, 3.0 * BEAT, 3.75 * BEAT, 100.0 ); - } - - // -- fadeout ------------------------------------------------------------------------------------ - dest *= fadeout; - - // -- oidos!! ------------------------------------------------------------------------------------ - // https://www.shadertoy.com/view/NdlGDl - if ( inRange( time.w, SECTION_END, 1E9 ) ) { - seed = 0.261; - - for ( int i = 0; i < 50; i ++ ) { - float reltone = 4.0 + random() * 45.0; - - float relfreq = pow( 2.0, reltone / 12.0 ); - float relfreqOt = floor( relfreq + 0.5 ); - float relfreqH = mix( relfreq, relfreqOt, 0.2 ); - reltone = log2( relfreqH ) * 12.0; - - float mtone = reltone; - float mfreq = 220.0 * pow( 2.0, mtone / 12.0 ); - - for ( int j = 0; j < 50; j ++ ) { - float ptone = mtone + random() * 0.5; - - float freq = 220.0 * pow( 2.0, ptone / 12.0 ); - - float noisePhase = TAU * fract( freq * time.z * 5.0 ); - vec2 tt = time.z + 0.002 * wavetable( noisePhase, vec2( 0.0001 ), vec2( 0.03 * float( j ) ) ); - - vec2 phase = TAU * fract( freq * tt ) + TAU * vec2( random(), random() ); - dest += ( 1.0 - fadeout ) * 0.0002 * sin( phase ); - } - } - } - - float realfadeout = smoothstep( SECTION_END + 48.0 * BEAT, SECTION_END + 16.0 * BEAT, time.w ); - dest *= realfadeout; - - return aSaturate( dest ); -} - -void main() { - vec2 out2 = mainAudio( mod( _timeHead + off * _deltaSample, timeLength ) ); - outL = out2.x; - outR = out2.y; -} diff --git a/src/music/samples.opus b/src/music/samples.opus deleted file mode 100644 index 2034702fcaaf9bdbf621ef8b47db97c7df3bb638..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2390 zcmX|Dc{tSDAD*$a5ONc_QI=`UVl0C(7z`~Mgckc4WF#Tmr7z0b$T})9Uy~N4MOmte zJ7aB%EFs2L5?Lc#gvNfy{oUvHKF@j1^1kQ&ob&$mvGwse4H1I;2V%>t<<>G;3K9X` zV;d9}dfeNS3KhabV=MlZ*lx-Hk1aV=uv1c6S%;cz$EShW^)eLWJwEauLh-!8o=$U9vwQ#KjXkWg^H9C&9R>>N%%df?+zC3>I3_&Ti zGCjc$&q@I!;(F=VeNedot&|-Pr7>4i%-ZiA&Gw}%1RP7F_#N`~2v~1xIcC{%IiVjU138xs4``;IE+B6@RTQdM7@JHLyFgoZ$T>=By&)-4OcSE=uEu|jo z>l`UV$A3BNV!o$Y8K4z@#>t)KwHK~P8f%onV%XZP$4oBf$gWl-w|VNQp$Ff9qL*gG zAz;EPK>Mf_3^g5Ra`OUmN`tBCyb8CrYGL{4O7Xz=d(@`?M1mv41!;isJ`(-T+bU-^ zYg;34Q@%6tqcTR+@}*80y*$s-4DT9vIZ@k~ztIga*c(x(I`r_ycinS2;u$(43OB2S zqi?5;iA%K+~-8uvOf)+DMv8KZ=xdL&5uy*(p z$eu64v%4gP0fs-(8eamRAI*E~#tk^N|Ch>J>Dv9+h9@sB*Pa%|+J@5y>fD600NS%1 zI!n?63!|+uit)-$F;0t)f064%#iX313P#^DwC{^{kjp*;V5sW()5XsWU4nB}`{-l+ zku5vrYkC?e`EVT5As3C#=yAdM=H>w)uoD)HY0?;q=A=MA9`^cfvOb?+#JA!0WFE{c zxn+GhEf)Z(Z(*+!cVuW5IFnqfo%fn;k0k~-!J`&A3PA&iNFkDHKLDDQtWAEopQJNv z+VIGM>)*kCTr2TwXuq#`>#GALt5PeZR%5{6(qJ_J%7O>wW7o>6&$_)yjboRV^F!)i z-+6N68OJj4$|zQ!7!EKR3|fGJDS6zJl!E8#l-Q_&q^@5)GP|-IsnQ~t$@qUYe`Q7)9cHYOYVeG zk&cd6Lp=(mq)9fqpXTB^W`=giyaE`LP`t9r1)H5j*1FRxCl+-#qiV6Dg%X-;nH?dL zZ(;E1`8xnK&Pj9fcK7HlY@DVHUh7%P+3sZWVM_VN3dxvf*Gz%JOC9K50BAXx@fD(L z!;$MNf^EY+j-MH8w)kds-{d;4<>)*63`>`jl*Ok2h@0pSFfsZ-mX~qP|0>4EF=Q^M zi>s?t8((geN>jJUhqM5+#z0AXlQgHQ@jXRjs1oe{8h^3*gt-7Ya>lOLrOOQu{O()t zGlvN>ox`i2XY$3D#8^)!*M+QE@9e9X{Bp!`Y~`o)h>LTU;cc>lSPgH-8YC%moFITH zd$y*tl^TW!ayTOMqx2G<6x|Un^%4~VFnXe(6H497p^cC4Hd5=+A-H}GD!t{q8lMfDt5N%AUwx0$TRl*3Ou3g^f(qlq?) zmQOncpB*0y*&+UTx)R-DCTqOxfBzHizBp4p+iFTADSC1=m&CX!QsolMa9(s<-kIP9WZTq9j(&`(&E)zKYbu z{x}0m8NKZ{NKv`4uabf~g#^GL)%|;~kwq0YdJBm^`;`bwGKS(^5HA98beK{Zk5eoH zK(~k6i;3eVury~3Oy6~)gSrh{QI(`8-OWn~%Wv2OK+*)SplNY(=Lr7@+^-JPUK?W= ztr7=$G8NiEY+Z>bpX4Z}Pd$I?0)WIE1i5E+IAA)=8o3G~UvX^J&_9B~%3djB^)~%h zJ|{5K=LBeN-QaFc#=>-T{7LSe+4k9`7+!DKuo(T(`shS>6VqgEpZV)uUaKVQ7Ll)&dWUJIreS-^^5m%s3Yvz(@2xdgd=y?+ zO|b^*=_dyPTBPpJ>U}uRx#8^UK82MVB;t#|^b_67u?Le1?{0ULfn+7XRlBR6wcqm} z-c3Oq==>=JWIvP%7SX;pY~?WV(eGUIyWm(1XV{c$H9ZU{b?Gi3k z7N{tU7aMMxS^4xmlC8CK>{_ExR`c0Et}GwBQcPQe9q)Sip@8s)HneZ$6RvdP?;ZIzrdYe}vLm$s`G(nM35(3 zla#NnPLE1n+hiF??NTJwaotr?|! zOfUW1p?5XG)|1aGlG^q@E|I_fSwEF5clV6U@7lY0QyJP8_C?;j@qb$p5q71Z{}5oS z6%iK9HPaKeP&lwH?8G;ZK)5gNJzg { - if ( process.env.DEV ) { - Component.gpuTimer!.update(); - } - - randomTexture.update(); - automaton.update( music.time ); - }, - name: process.env.DEV && 'main/update', -} ) ); - -// -- util ----------------------------------------------------------------------------------------- -class EntityReplacer { - public current!: T; - public creator: () => T; - - public constructor( creator: () => T, name?: string ) { - this.creator = creator; - this.replace(); - - if ( name ) { - auto( `${ name }/active`, ( { uninit } ) => { - const entity = this.current; - if ( entity ) { - entity.active = !uninit; - entity.visible = !uninit; - } - } ); - } - } - - public replace(): void { - if ( process.env.DEV ) { - if ( this.current ) { - arraySetDelete( dog.root.children, this.current ); - } - } - - this.current = this.creator(); - dog.root.children.push( this.current ); - - // not visible by default - this.current.active = false; - this.current.visible = false; - } -} - -// -- bake ----------------------------------------------------------------------------------------- -const ibllut = new IBLLUT(); -dog.root.children.push( ibllut ); - -const replacerFlickyParticles = new EntityReplacer( - () => new FlickyParticles(), - 'FlickyParticles', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/FlickyParticles', () => { - replacerFlickyParticles.replace(); - } ); -} - -const replacerSufferTexts = new EntityReplacer( - () => new SufferTexts(), - 'SufferTexts', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/SufferTexts', () => { - replacerSufferTexts.replace(); - } ); -} - -const replacerSphereParticles = new EntityReplacer( - () => new SphereParticles(), - 'SphereParticles', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/SphereParticles', () => { - replacerSphereParticles.replace(); - } ); -} - -const replacerFlashyBall = new EntityReplacer( - () => new FlashyBall(), - 'FlashyBall', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/FlashyBall', () => { - replacerFlashyBall.replace(); - } ); -} - -const replacerTetrahedron = new EntityReplacer( - () => new Tetrahedron(), - 'Tetrahedron', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/Tetrahedron', () => { - replacerTetrahedron.replace(); - } ); -} - -const replacerNoiseVoxels = new EntityReplacer( - () => new NoiseVoxels(), - 'NoiseVoxels', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/NoiseVoxels', () => { - replacerNoiseVoxels.replace(); - } ); -} - -const replacerIFSAsUsual = new EntityReplacer( - () => new IFSAsUsual(), - 'IFSAsUsual', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/IFSAsUsual', () => { - replacerIFSAsUsual.replace(); - } ); -} - -const replacerSceneBegin = new EntityReplacer( - () => new SceneBegin( { scenes: [ dog.root ] } ), - 'SceneBegin' -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/SceneBegin', () => { - replacerSceneBegin.current.lights.map( ( light ) => arraySetDelete( lights, light ) ); - replacerSceneBegin.replace(); - lights.push( ...replacerSceneBegin.current.lights ); - } ); -} - -const replacerSceneCrystals = new EntityReplacer( - () => new SceneCrystals( { scenes: [ dog.root ] } ), - 'SceneCrystals', -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/SceneCrystals', () => { - replacerSceneCrystals.current.lights.map( ( light ) => arraySetDelete( lights, light ) ); - replacerSceneCrystals.replace(); - lights.push( ...replacerSceneCrystals.current.lights ); - replacerSceneCrystals.current.setDefferedCameraTarget( deferredCamera.cameraTarget ); - } ); -} - -const replacerSceneDynamic = new EntityReplacer( - () => new SceneDynamic( { scenes: [ dog.root ] } ), - 'SceneDynamic', -); - -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/SceneDynamic', () => { - replacerSceneDynamic.current.lights.map( ( light ) => arraySetDelete( lights, light ) ); - replacerSceneDynamic.replace(); - lights.push( ...replacerSceneDynamic.current.lights ); - replacerSceneDynamic.current.setDefferedCameraTarget( deferredCamera.cameraTarget ); - } ); -} - -const replacerSceneNeuro = new EntityReplacer( - () => new SceneNeuro( { scenes: [ dog.root ] } ), - 'SceneNeuro' -); - -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/SceneNeuro', () => { - replacerSceneNeuro.current.lights.map( ( light ) => arraySetDelete( lights, light ) ); - replacerSceneNeuro.replace(); - lights.push( ...replacerSceneNeuro.current.lights ); - replacerSceneNeuro.current.setDefferedCameraTarget( deferredCamera.cameraTarget ); - } ); -} - -const replacerScenePsy = new EntityReplacer( - () => new ScenePsy( { scenes: [ dog.root ] } ), - 'ScenePsy' -); -if ( process.env.DEV && module.hot ) { - module.hot.accept( './entities/ScenePsy', () => { - replacerScenePsy.current.lights.map( ( light ) => arraySetDelete( lights, light ) ); - replacerScenePsy.replace(); - lights.push( ...replacerScenePsy.current.lights ); - } ); -} - -// -- things that is not an "object" --------------------------------------------------------------- -const swapOptions = { - width: canvasRenderTarget.width, - height: canvasRenderTarget.height -}; - -const swap = new Swap( - new BufferRenderTarget( { - ...swapOptions, - name: process.env.DEV && 'main/postSwap0', - } ), - new BufferRenderTarget( { - ...swapOptions, - name: process.env.DEV && 'main/postSwap1', - } ), -); - -const lights = [ - ...replacerSceneBegin.current.lights, - ...replacerSceneNeuro.current.lights, - ...replacerSceneDynamic.current.lights, - ...replacerSceneCrystals.current.lights, - ...replacerScenePsy.current.lights, -]; - -// const light2 = new LightEntity( { -// root: dog.root, -// shadowMapFov: 90.0, -// shadowMapNear: 1.0, -// shadowMapFar: 20.0, -// namePrefix: process.env.DEV && 'light2', -// } ); -// light2.color = [ 50.0, 30.0, 40.0 ]; -// light2.transform.lookAt( new Vector3( [ -4.0, -2.0, 6.0 ] ) ); -// dog.root.children.push( light2 ); - -const cubemapCamera = new CubemapCameraEntity( { - scenes: [ dog.root ], - lights, -} ); -dog.root.children.push( cubemapCamera ); - -const environmentMap = new EnvironmentMap( { - cubemap: cubemapCamera.target, -} ); -dog.root.children.push( environmentMap ); - -// -- camera --------------------------------------------------------------------------------------- -const deferredCamera = new DeferredCamera( { - scenes: [ dog.root ], - target: swap.o, - lights, - textureIBLLUT: ibllut.texture, - textureEnv: environmentMap.texture, -} ); -dog.root.children.push( deferredCamera ); -replacerSceneNeuro.current.setDefferedCameraTarget( deferredCamera.cameraTarget ); -replacerSceneDynamic.current.setDefferedCameraTarget( deferredCamera.cameraTarget ); -replacerSceneCrystals.current.setDefferedCameraTarget( deferredCamera.cameraTarget ); - -const forwardCamera = new ForwardCamera( { - scenes: [ dog.root ], - target: swap.o, - lights, -} ); -dog.root.children.push( forwardCamera ); - -dog.root.components.push( new Lambda( { - onUpdate: ( { time } ) => { - const r = auto( 'Camera/rot/r' ); - const t = auto( 'Camera/rot/t' ); - const p = auto( 'Camera/rot/p' ); - const x = auto( 'Camera/pos/x' ); - const y = auto( 'Camera/pos/y' ); - const z = auto( 'Camera/pos/z' ); - const roll = auto( 'Camera/roll' ); - const shake = auto( 'Camera/shake' ); - - const st = Math.sin( t ); - const ct = Math.cos( t ); - const sp = Math.sin( p ); - const cp = Math.cos( p ); - - const wubPosAmp = 0.01; - const wubPosTheta = 3.0 * time; - const wubTarAmp = 0.02; - const wubTarTheta = 4.21 * time; - - [ deferredCamera, forwardCamera ].map( ( camera ) => { - camera.transform.lookAt( - new Vector3( [ - r * ct * sp + wubPosAmp * Math.sin( wubPosTheta ), - r * st + wubPosAmp * Math.sin( 2.0 + wubPosTheta ), - r * ct * cp + wubPosAmp * Math.sin( 4.0 + wubPosTheta ), - ] ), - new Vector3( [ - wubTarAmp * Math.sin( wubTarTheta ), - wubTarAmp * Math.sin( 2.0 + wubTarTheta ), - wubTarAmp * Math.sin( 4.0 + wubTarTheta ), - ] ), - undefined, - 0.02 * Math.sin( 2.74 * time ) + roll, - ); - - camera.transform.position = camera.transform.position.add( - new Vector3( [ x, y, z ] ) - ); - - if ( shake > 0.0 ) { - camera.transform.position = camera.transform.position.add( - new Vector3( [ - Math.sin( 45.0 * time ), - Math.sin( 2.0 + 48.0 * time ), - Math.sin( 4.0 + 51.0 * time ) - ] ).scale( shake ) - ); - } - - auto( 'Camera/fov', ( { value } ) => { - camera.camera.fov = 90.0 * value; - } ); - } ); - }, - name: process.env.DEV && 'main/updateCamera', -} ) ); - -swap.swap(); -const ssr = new SSR( { - camera: deferredCamera, - shaded: swap.i, - target: swap.o, -} ); -dog.root.children.push( ssr ); - -// -- post ----------------------------------------------------------------------------------------- -swap.swap(); -const antialias = new Antialias( { - input: swap.i, - target: swap.o -} ); -dog.root.children.push( antialias ); - -swap.swap(); -const bigBlur = new BigBlur( { - input: swap.i, - target: swap.o, -} ); -dog.root.children.push( bigBlur ); - -const textOverlay = new TextOverlay( { - target: swap.o, -} ); -dog.root.children.push( textOverlay ); - -swap.swap(); -const bloom = new Bloom( { - input: swap.i, - target: swap.o -} ); -dog.root.children.push( bloom ); - -swap.swap(); -const glitch = new Glitch( { - input: swap.i, - target: swap.o, -} ); -dog.root.children.push( glitch ); - -swap.swap(); -const pixelSorter = new PixelSorter( { - input: swap.i, - target: swap.o, -} ); -dog.root.children.push( pixelSorter ); - -swap.swap(); -const serial = new Serial( { - input: swap.i, - target: swap.o, -} ); -dog.root.children.push( serial ); - -swap.swap(); -const dvi = new DVi( { - input: swap.i, - target: swap.o, -} ); -dog.root.children.push( dvi ); - -swap.swap(); -const post = new Post( { - input: swap.i, - target: canvasRenderTarget -} ); -dog.root.children.push( post ); - -const testScreen = new TestScreen( { - target: canvasRenderTarget -} ); -dog.root.children.push( testScreen ); - -if ( process.env.DEV ) { - const rtInspector = new RTInspector( { - target: canvasRenderTarget - } ); - dog.root.children.push( rtInspector ); -} diff --git a/src/shaders/-distFunc.glsl b/src/shaders/-distFunc.glsl deleted file mode 100644 index 016494a..0000000 --- a/src/shaders/-distFunc.glsl +++ /dev/null @@ -1,54 +0,0 @@ -float fractSin( float i ) { - return fract( sin( i ) * 1846.42 ); -} - -// https://www.iquilezles.org/www/articles/smin/smin.htm -float smin( float a, float b, float k ) { - float h = max( k - abs( a - b ), 0.0 ) / k; - return min( a, b ) - h * h * h * k * ( 1.0 / 6.0 ); -} - -mat2 rot2d( float t ) { - float c = cos( t ); - float s = sin( t ); - return mat2( c, -s, s, c ); -} - -vec3 ifs( vec3 p, vec3 r, vec3 t ) { - vec3 s = t; - - for ( int i = 0; i < 5; i ++ ) { - p = abs( p ) - abs( s ) * pow( 0.5, float( i ) ); - - s.yz = rot2d( r.x ) * s.yz; - s.zx = rot2d( r.y ) * s.zx; - s.xy = rot2d( r.z ) * s.xy; - - p.xy = p.x < p.y ? p.yx : p.xy; - p.yz = p.y < p.z ? p.zy : p.yz; - p.xz = p.x < p.z ? p.zx : p.xz; - } - - return p; -} - -float box( vec3 p, vec3 d ) { - vec3 absp = abs( p ); - return max( ( absp.x - d.x ), max( ( absp.y - d.y ), ( absp.z - d.z ) ) ); -} - -float distFunc( vec3 p, float time ) { - float dist = 1E9; - for ( int i = 0; i < 5; i ++ ) { - float fi = float( i ); - vec3 trans = 0.5 * vec3( - sin( 6.0 * fractSin( fi * 2.874 ) + time * ( 1.0 + fractSin( fi * 2.271 ) ) ), - sin( 6.0 * fractSin( fi * 4.512 ) + time * ( 1.0 + fractSin( fi * 1.271 ) ) ), - sin( 6.0 * fractSin( fi * 3.112 ) + time * ( 1.0 + fractSin( fi * 3.271 ) ) ) - ); - dist = smin( dist, length( p - trans ) - 0.5, 1.0 ); - } - return dist; -} - -#pragma glslify: export(distFunc) diff --git a/src/shaders/-prng.glsl b/src/shaders/-prng.glsl deleted file mode 100644 index c5c32f4..0000000 --- a/src/shaders/-prng.glsl +++ /dev/null @@ -1,18 +0,0 @@ -float GPURnd(inout vec4 n) -{ - // Based on the post http://gpgpu.org/forums/viewtopic.php?t=2591&sid=17051481b9f78fb49fba5b98a5e0f1f3 - // (The page no longer exists as of March 17th, 2015. Please let me know if you see why this code works.) - const vec4 q = vec4( 1225.0, 1585.0, 2457.0, 2098.0); - const vec4 r = vec4( 1112.0, 367.0, 92.0, 265.0); - const vec4 a = vec4( 3423.0, 2646.0, 1707.0, 1999.0); - const vec4 m = vec4(4194287.0, 4194277.0, 4194191.0, 4194167.0); - - vec4 beta = floor(n / q); - vec4 p = a * (n - beta * q) - beta * r; - beta = (sign(-p) + vec4(1.0)) * vec4(0.5) * m; - n = (p + beta); - - return fract(dot(n / m, vec4(1.0, -1.0, 1.0, -1.0))); -} - -#pragma glslify: export(GPURnd) diff --git a/src/shaders/-simplex4d.glsl b/src/shaders/-simplex4d.glsl deleted file mode 100644 index 7b8f8e7..0000000 --- a/src/shaders/-simplex4d.glsl +++ /dev/null @@ -1,127 +0,0 @@ -// -// Description : Array and textureless GLSL 2D/3D/4D simplex -// noise functions. -// Author : Ian McEwan, Ashima Arts. -// Maintainer : ijm -// Lastmod : 20110822 (ijm) -// License : Copyright (C) 2011 Ashima Arts. All rights reserved. -// Distributed under the MIT License. See LICENSE file. -// https://github.com/ashima/webgl-noise -// - -vec4 v4Mod289(vec4 x) { - return x - floor(x * (1.0 / 289.0)) * 289.0; } - -float fMod289(float x) { - return x - floor(x * (1.0 / 289.0)) * 289.0; } - -vec4 v4Permute(vec4 x) { - return v4Mod289(((x*34.0)+1.0)*x); -} - -float fPermute(float x) { - return fMod289(((x*34.0)+1.0)*x); -} - -vec4 v4TaylorInvSqrt(vec4 r) -{ - return 1.79284291400159 - 0.85373472095314 * r; -} - -float fTaylorInvSqrt(float r) -{ - return 1.79284291400159 - 0.85373472095314 * r; -} - -vec4 grad4(float j, vec4 ip) - { - const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0); - vec4 p,s; - - p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0; - p.w = 1.5 - dot(abs(p.xyz), ones.xyz); - s = vec4(lessThan(p, vec4(0.0))); - p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; - - return p; - } - -float snoise(vec4 v) - { - const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4 - 0.276393202250021, // 2 * G4 - 0.414589803375032, // 3 * G4 - -0.447213595499958); // -1 + 4 * G4 - -// First corner - vec4 i = floor(v + dot(v, vec4(0.309016994374947451)) ); // (sqrt(5) - 1)/4 - vec4 x0 = v - i + dot(i, C.xxxx); - -// Other corners - -// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) - vec4 i0; - vec3 isX = step( x0.yzw, x0.xxx ); - vec3 isYZ = step( x0.zww, x0.yyz ); -// i0.x = dot( isX, vec3( 1.0 ) ); - i0.x = isX.x + isX.y + isX.z; - i0.yzw = 1.0 - isX; -// i0.y += dot( isYZ.xy, vec2( 1.0 ) ); - i0.y += isYZ.x + isYZ.y; - i0.zw += 1.0 - isYZ.xy; - i0.z += isYZ.z; - i0.w += 1.0 - isYZ.z; - - // i0 now contains the unique values 0,1,2,3 in each channel - vec4 i3 = clamp( i0, 0.0, 1.0 ); - vec4 i2 = clamp( i0-1.0, 0.0, 1.0 ); - vec4 i1 = clamp( i0-2.0, 0.0, 1.0 ); - - // x0 = x0 - 0.0 + 0.0 * C.xxxx - // x1 = x0 - i1 + 1.0 * C.xxxx - // x2 = x0 - i2 + 2.0 * C.xxxx - // x3 = x0 - i3 + 3.0 * C.xxxx - // x4 = x0 - 1.0 + 4.0 * C.xxxx - vec4 x1 = x0 - i1 + C.xxxx; - vec4 x2 = x0 - i2 + C.yyyy; - vec4 x3 = x0 - i3 + C.zzzz; - vec4 x4 = x0 + C.wwww; - -// Permutations - i = v4Mod289(i); - float j0 = fPermute( fPermute( fPermute( fPermute(i.w) + i.z) + i.y) + i.x); - vec4 j1 = v4Permute( v4Permute( v4Permute( v4Permute ( - i.w + vec4(i1.w, i2.w, i3.w, 1.0 )) - + i.z + vec4(i1.z, i2.z, i3.z, 1.0 )) - + i.y + vec4(i1.y, i2.y, i3.y, 1.0 )) - + i.x + vec4(i1.x, i2.x, i3.x, 1.0 )); - -// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope -// 7*7*6 = 294, which is close to the ring size 17*17 = 289. - vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ; - - vec4 p0 = grad4(j0, ip); - vec4 p1 = grad4(j1.x, ip); - vec4 p2 = grad4(j1.y, ip); - vec4 p3 = grad4(j1.z, ip); - vec4 p4 = grad4(j1.w, ip); - -// Normalise gradients - vec4 norm = v4TaylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - p4 *= fTaylorInvSqrt(dot(p4,p4)); - -// Mix contributions from the five corners - vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0); - vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0); - m0 = m0 * m0; - m1 = m1 * m1; - return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 ))) - + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ; - - } - -#pragma glslify: export(snoise) diff --git a/src/shaders/ao.frag b/src/shaders/ao.frag deleted file mode 100644 index 838bcd6..0000000 --- a/src/shaders/ao.frag +++ /dev/null @@ -1,78 +0,0 @@ -#version 300 es - -precision highp float; - -const int AO_ITER = 16; -const float AO_BIAS = 0.0; -const float AO_RADIUS = 0.5; -const float PI = 3.14159265359; -const float TAU = 6.28318530718; -const float EPSILON = 1E-3; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -in vec2 vUv; - -out vec4 fragColor; - -uniform vec2 resolution; -uniform mat4 cameraPV; -uniform sampler2D sampler0; // position.xyz, depth -uniform sampler2D sampler1; // normal.xyz -uniform sampler2D samplerRandom; - -// == commons ====================================================================================== -#pragma glslify: prng = require( ./-prng ); - -vec3 randomDirection( inout vec4 seed ) { - float phi16_ = TAU * prng( seed ); - float theta = acos( -1.0 + 2.0 * prng( seed ) ); - - return vec3( - sin( theta ) * sin( phi16_ ), - cos( theta ), - sin( theta ) * cos( phi16_ ) - ); -} - -// == features ===================================================================================== -float ambientOcclusion( vec2 uv, vec3 position, vec3 normal ) { - float ao = 0.0; - - vec4 seed = texture( samplerRandom, uv ); - prng( seed ); - - for ( int i = 0; i < AO_ITER; i ++ ) { - vec3 dir = randomDirection( seed ) * prng( seed ); - if ( dot( dir, normal ) < 0.0 ) { dir = -dir; } - - vec4 screenPos = cameraPV * vec4( position + dir * AO_RADIUS, 1.0 ); - screenPos.x *= resolution.y / resolution.x; - vec2 screenUv = screenPos.xy / screenPos.w * 0.5 + 0.5; - vec4 s0 = texture( sampler0, screenUv ); - - vec3 dDir = s0.xyz - position; - if ( length( dDir ) < 1E-2 ) { - ao += 1.0; - } else { - float dNor = dot( normalize( normal ), normalize( dDir ) ); - ao += 1.0 - saturate( dNor - AO_BIAS ) / ( length( dDir ) + 1.0 ); - } - } - - ao = ao / float( AO_ITER ); - return pow( ao, 2.0 ); -} - -// == main procedure =============================================================================== -void main() { - vec4 tex0 = texture( sampler0, vUv ); - vec4 tex1 = texture( sampler1, vUv ); - - vec3 position = tex0.xyz; - vec3 normal = tex1.xyz; - - float ao = ambientOcclusion( vUv, position, normal ); - fragColor = vec4( vec3( ao ), 1.0 ); -} diff --git a/src/shaders/big-blur.frag b/src/shaders/big-blur.frag deleted file mode 100644 index 51f0f82..0000000 --- a/src/shaders/big-blur.frag +++ /dev/null @@ -1,40 +0,0 @@ -#version 300 es - -precision highp float; - -const float PI = 3.14159265; - -in vec2 vUv; - -out vec4 fragColor; - -uniform float ratio; -uniform float sigma; -uniform vec2 resolution; -uniform sampler2D sampler0; - -float gaussian( float x ) { - return 1.0 / sqrt( 2.0 * PI * sigma ) * exp( - x * x / 2.0 / sigma ); -} - -void main() { - vec2 bv; - -#ifdef IS_VERTICAL - bv = vec2( 0.0, 4.0 ) / resolution; -#else - bv = vec2( 4.0, 0.0 ) / resolution; -#endif - - vec4 sum = vec4( 0.0 ); - - for ( int i = -100; i < 100; i ++ ) { - float fi = float( i ); - vec2 uvt = vUv + fi * bv; - if ( abs( uvt.x - 0.5 ) < 0.5 && abs( uvt.y - 0.5 ) < 0.5 ) { - sum += gaussian( fi ) * texture( sampler0, uvt ); - } - } - - fragColor = mix( texture( sampler0, vUv ), sum / sum.w, ratio ); -} diff --git a/src/shaders/bloom-down.frag b/src/shaders/bloom-down.frag deleted file mode 100644 index 30bb8a2..0000000 --- a/src/shaders/bloom-down.frag +++ /dev/null @@ -1,59 +0,0 @@ -#version 300 es - -precision highp float; - -const float WEIGHT_1 = 1.0; -const float WEIGHT_2 = 2.0; -const float WEIGHT_4 = 4.0; -const vec3 LUMA = vec3( 0.299, 0.587, 0.114 ); - -in vec2 vUv; - -out vec4 fragColor; - -uniform float level; -uniform vec2 resolution; -uniform sampler2D sampler0; - -vec4 fetchWithWeight( vec2 uv ) { - vec4 tex = texture( sampler0, uv ); - float luma = dot( LUMA, tex.xyz ); - return vec4( tex.xyz, 1.0 + 0.5 * luma ); - // return vec4( tex.xyz, 1.0 + luma ); -} - -void main() { - float p = 2.0 * pow( 0.5, level ); // 2.0, 1.0, 0.5, 0.25... - - vec2 deltaTexel = 1.0 / resolution; - - vec2 uv0 = step( 0.5, level ) * vec2( 1.0 - p ); - vec2 uv1 = vec2( 1.0 - step( 0.5, level ) * 0.5 * p ); - vec2 uv = mix( uv0, uv1, vUv ); - uv = clamp( uv, uv0 + deltaTexel, uv1 - deltaTexel ); - - // http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare - vec4 tex = WEIGHT_1 * fetchWithWeight( uv - deltaTexel * vec2( -1.0, -1.0 ) ); - tex += WEIGHT_2 * fetchWithWeight( uv - deltaTexel * vec2( 0.0, -1.0 ) ); - tex += WEIGHT_1 * fetchWithWeight( uv - deltaTexel * vec2( 1.0, -1.0 ) ); - tex += WEIGHT_4 * fetchWithWeight( uv - deltaTexel * vec2( -0.5, -0.5 ) ); - tex += WEIGHT_4 * fetchWithWeight( uv - deltaTexel * vec2( 0.5, -0.5 ) ); - tex += WEIGHT_2 * fetchWithWeight( uv - deltaTexel * vec2( -1.0, 0.0 ) ); - tex += WEIGHT_4 * fetchWithWeight( uv - deltaTexel * vec2( 0.0, 0.0 ) ); - tex += WEIGHT_2 * fetchWithWeight( uv - deltaTexel * vec2( 1.0, 0.0 ) ); - tex += WEIGHT_4 * fetchWithWeight( uv - deltaTexel * vec2( -0.5, 0.5 ) ); - tex += WEIGHT_4 * fetchWithWeight( uv - deltaTexel * vec2( 0.5, 0.5 ) ); - tex += WEIGHT_1 * fetchWithWeight( uv - deltaTexel * vec2( -1.0, 1.0 ) ); - tex += WEIGHT_2 * fetchWithWeight( uv - deltaTexel * vec2( 0.0, 1.0 ) ); - tex += WEIGHT_1 * fetchWithWeight( uv - deltaTexel * vec2( 1.0, 1.0 ) ); - - vec3 col = tex.rgb / tex.w; - - if ( level == 0.0 ) { - float brightness = dot( LUMA, col ); - vec3 normalized = brightness < 1E-4 ? vec3( brightness ) : col / brightness; - col = max( 0.0, brightness - 0.6 ) * normalized; - } - - fragColor = vec4( col, 1.0 ); -} diff --git a/src/shaders/bloom-up.frag b/src/shaders/bloom-up.frag deleted file mode 100644 index babf8aa..0000000 --- a/src/shaders/bloom-up.frag +++ /dev/null @@ -1,41 +0,0 @@ -#version 300 es - -precision highp float; - -const float WEIGHT_1 = 1.0 / 16.0; -const float WEIGHT_2 = 2.0 / 16.0; -const float WEIGHT_4 = 4.0 / 16.0; - -in vec2 vUv; - -out vec4 fragColor; - -uniform float level; -uniform vec2 resolution; -uniform sampler2D sampler0; - -void main() { - float p = pow( 0.5, level ); // 1.0, 0.5, 0.25... - - vec2 deltaTexel = 1.0 / resolution; - - vec2 uv0 = vec2( 1.0 - p ); - vec2 uv1 = vec2( 1.0 - 0.5 * p ); - vec2 uv = mix( uv0, uv1, vUv ); - uv = clamp( uv, uv0 + 1.5 * deltaTexel, uv1 - 1.5 * deltaTexel ); - - // http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare - vec4 tex = WEIGHT_1 * texture( sampler0, uv - deltaTexel * vec2( -1.0, -1.0 ) ); - tex += WEIGHT_2 * texture( sampler0, uv - deltaTexel * vec2( 0.0, -1.0 ) ); - tex += WEIGHT_1 * texture( sampler0, uv - deltaTexel * vec2( 1.0, -1.0 ) ); - tex += WEIGHT_2 * texture( sampler0, uv - deltaTexel * vec2( -1.0, 0.0 ) ); - tex += WEIGHT_4 * texture( sampler0, uv - deltaTexel * vec2( 0.0, 0.0 ) ); - tex += WEIGHT_2 * texture( sampler0, uv - deltaTexel * vec2( 1.0, 0.0 ) ); - tex += WEIGHT_1 * texture( sampler0, uv - deltaTexel * vec2( -1.0, 1.0 ) ); - tex += WEIGHT_2 * texture( sampler0, uv - deltaTexel * vec2( 0.0, 1.0 ) ); - tex += WEIGHT_1 * texture( sampler0, uv - deltaTexel * vec2( 1.0, 1.0 ) ); - - vec3 col = tex.rgb; - - fragColor = vec4( col, 1.0 ); -} diff --git a/src/shaders/blur.frag b/src/shaders/blur.frag deleted file mode 100644 index ee5664e..0000000 --- a/src/shaders/blur.frag +++ /dev/null @@ -1,46 +0,0 @@ -#version 300 es - -precision highp float; - -const float OFFSET1 = 1.411764705882353; -const float OFFSET2 = 3.2941176470588234; -const float OFFSET3 = 5.176470588235294; -const float CONTRIBUTION0 = 0.1964825501511404; -const float CONTRIBUTION1 = 0.2969069646728344; -const float CONTRIBUTION2 = 0.09447039785044732; -const float CONTRIBUTION3 = 0.010381362401148057; - -in vec2 vUv; - -out vec4 fragColor; - -uniform vec2 resolution; -uniform sampler2D sampler0; - -void main() { - vec2 bv; - -#ifdef IS_VERTICAL - bv = vec2( 0.0, 1.0 ) / resolution; -#else - bv = vec2( 1.0, 0.0 ) / resolution; -#endif - - vec4 sum = vec4( 0.0 ); - - sum += CONTRIBUTION0 * texture( sampler0, vUv ); - vec2 uvt = vUv - bv * OFFSET1; - sum += CONTRIBUTION1 * texture( sampler0, uvt ); - uvt = vUv + bv * OFFSET1; - sum += CONTRIBUTION1 * texture( sampler0, uvt ); - uvt = vUv - bv * OFFSET2; - sum += CONTRIBUTION2 * texture( sampler0, uvt ); - uvt = vUv + bv * OFFSET2; - sum += CONTRIBUTION2 * texture( sampler0, uvt ); - uvt = vUv - bv * OFFSET3; - sum += CONTRIBUTION3 * texture( sampler0, uvt ); - uvt = vUv + bv * OFFSET3; - sum += CONTRIBUTION3 * texture( sampler0, uvt ); - - fragColor = vec4( sum.xyz, 1.0 ); -} diff --git a/src/shaders/bounding-box.frag b/src/shaders/bounding-box.frag deleted file mode 100644 index 4d0620d..0000000 --- a/src/shaders/bounding-box.frag +++ /dev/null @@ -1,48 +0,0 @@ -#version 300 es - -precision highp float; - -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -in vec4 vPositionWithoutModel; -in vec4 vPosition; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef SHADOW - out vec4 fragColor; -#endif - -uniform float time; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; - -void main() { - float phase = vPositionWithoutModel.x + vPositionWithoutModel.y + vPositionWithoutModel.z; - float pattern = sin( phase * 40.0 + 10.0 * time ); - - if ( pattern < 0.0 ) { - discard; - } - - #ifdef FORWARD - vec3 color = vec3( 1.0 ); - - float lenV = length( cameraPos - vPosition.xyz ); - color *= exp( -0.4 * max( lenV - 3.0, 0.0 ) ); - - fragColor = vec4( color, 1.0 ); - #endif - - #ifdef SHADOW - float depth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - vPosition.xyz ) - ); - fragColor = vec4( depth, depth * depth, depth, 1.0 ); - #endif -} diff --git a/src/shaders/bounding-box.vert b/src/shaders/bounding-box.vert deleted file mode 100644 index f8bfe3a..0000000 --- a/src/shaders/bounding-box.vert +++ /dev/null @@ -1,22 +0,0 @@ -#version 300 es - -layout (location = 0) in vec3 position; - -out vec4 vPositionWithoutModel; -out vec4 vPosition; - -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; - -void main() { - vPositionWithoutModel = vec4( position, 1.0 ); - vPosition = modelMatrix * vPositionWithoutModel; - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/chaos-torus.frag b/src/shaders/chaos-torus.frag deleted file mode 100644 index d2369f6..0000000 --- a/src/shaders/chaos-torus.frag +++ /dev/null @@ -1,58 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_PBR = 2; - -in float vLife; -in vec3 vNormal; -in vec4 vPosition; -in vec4 vPositionShaft; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform float time; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -void main() { - vec3 noisep = vNormal.xyz + 4.0 * time + atan( vPositionShaft.x, vPositionShaft.z ); - float noise = cyclicNoise( 4.0 * noisep ).x; - - if ( noise < 0.0 ) { discard; } - - #ifdef FORWARD - fragColor = vec4( 8.0 * vec3( 0.1, 0.4, 1.0 ), 1.0 ); - #endif - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( normalize( vNormal ), 1.0 ); - fragColor = vec4( vec3( 0.5 ), 1.0 ); - fragWTF = vec4( vec3( 0.99, 0.01, 0.0 ), MTL_PBR ); - #endif - - #ifdef DEPTH - float depth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - vPosition.xyz ) - ); - fragColor = vec4( depth, depth * depth, depth, 1.0 ); - #endif -} diff --git a/src/shaders/chaos-torus.vert b/src/shaders/chaos-torus.vert deleted file mode 100644 index 5d938eb..0000000 --- a/src/shaders/chaos-torus.vert +++ /dev/null @@ -1,41 +0,0 @@ -#version 300 es - -const float TAU = 6.283185307; - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; - -out vec4 vPositionShaft; -out vec4 vPosition; -out vec3 vNormal; - -uniform float time; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -mat2 rotate2D( float t ) { - return mat2( cos( t ), sin( t ), -sin( t ), cos( t ) ); -} - -void main() { - vNormal = normalize( ( normalMatrix * vec4( normal, 1.0 ) ).xyz ); - - vPosition = vPositionShaft = vec4( 3.0 * position, 1.0 ); - vPosition.xyz += 0.3 * normal; - - vec3 noisep = vNormal.xyz + time + atan( vPositionShaft.x, vPositionShaft.z ); - vPosition.xyz += 0.5 * cyclicNoise( noisep + 3.0 ); - - vPosition = modelMatrix * vPosition; - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/color.frag b/src/shaders/color.frag deleted file mode 100644 index 16d8754..0000000 --- a/src/shaders/color.frag +++ /dev/null @@ -1,11 +0,0 @@ -#version 300 es - -precision highp float; - -out vec4 fragColor; - -uniform vec4 color; - -void main() { - fragColor = color; -} diff --git a/src/shaders/condition.frag b/src/shaders/condition.frag deleted file mode 100644 index 84cacf6..0000000 --- a/src/shaders/condition.frag +++ /dev/null @@ -1,75 +0,0 @@ -#version 300 es - -precision highp float; - -const float RADIUS_CULL_SPHERE = 1.5; - -const int MTL_UNLIT = 1; - -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -in float vScale; -in float vPhase; -in float vFade; -in vec3 vNormal; -in vec4 vPosition; -in vec4 vHuh; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -#ifdef SHADOW - out vec4 fragColor; - - uniform vec2 cameraNearFar; - uniform vec3 cameraPos; -#endif - -uniform float time; -uniform float phaseOffset; -uniform float phaseWidth; - -void main() { - float phase = fract( 2.0 * vPhase + vHuh.z + 0.1 * time + vHuh.y + phaseOffset / vScale ); - if ( phase > phaseWidth ) { discard; } - - float lenFromCenter = length( vPosition.xyz ); - if ( lenFromCenter < RADIUS_CULL_SPHERE ) { discard; } - - float colorPhase = exp( -4.0 * ( lenFromCenter - RADIUS_CULL_SPHERE ) ); - colorPhase = max( colorPhase, vFade ); - vec3 color = mix( - vec3( 2.0 ), - vec3( 0.0 ), - colorPhase - ); - - #ifdef FORWARD - fragColor = vec4( color, 1.0 ); - #endif - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( vNormal, 1.0 ); - fragColor = vec4( color, 1.0 ); - fragWTF = vec4( vec3( 0.0, 0.0, 0.0 ), MTL_UNLIT ); - #endif - - #ifdef SHADOW - float depth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - vPosition.xyz ) - ); - fragColor = vec4( depth, depth * depth, depth, 1.0 ); - #endif -} diff --git a/src/shaders/condition.vert b/src/shaders/condition.vert deleted file mode 100644 index c5c759d..0000000 --- a/src/shaders/condition.vert +++ /dev/null @@ -1,65 +0,0 @@ -#version 300 es - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) - -const float TAU = 6.283185307; - -layout (location = 0) in vec2 what; -layout (location = 1) in vec4 huh; - -out float vPhase; -out float vScale; -out float vFade; -out vec3 vNormal; -out vec4 vPosition; -out vec4 vHuh; - -uniform float time; -uniform float hahaRatio; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; -uniform sampler2D samplerSvg; - -#pragma glslify: orthBasis = require( ./modules/orthBasis ); - -void main() { - vPhase = what.x; - vHuh = huh; - - vec3 randomPos = fs( vec3( 5.0, 8.6, 1.9 ) + huh.z + 2.56 * huh.y ) - 0.5; - randomPos.z = mod( randomPos.z + 0.1 * time, 1.0 ) - 0.5; - randomPos *= vec3( 5.0, 5.0, 20.0 ); - - vFade = smoothstep( 9.0, 10.0, abs( randomPos.z ) ); - - float haha = hahaRatio * smoothstep( 1.0, 2.0, randomPos.z ); - - vec4 tex = texture( samplerSvg, vec2( what.x, huh.x ) ); - - vPosition = vec4( tex.xy, 0.0, 1.0 ); - - mat3 basis = orthBasis( vec3( tex.zw, 0.0 ) ); - float theta = what.y / 3.0 * TAU; - vec3 tube = 0.1 * basis * vec3( sin( theta ), cos( theta ), 0.0 ); - vNormal = ( normalMatrix * vec4( tube, 1.0 ) ).xyz; - - vScale = exp( 2.0 * fs( huh.z + 2.56 * huh.y ) ); - vPosition.xyz *= mix( vScale, 1.0, haha ); - - vPosition.x += mix( 0.0, huh.y, haha ); - - vPosition.xyz += tube; - - vPosition = modelMatrix * vPosition; - - vPosition.xyz += mix( randomPos, vec3( 0.0, 0.0, 3.0 ), haha ); - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/crystal.frag b/src/shaders/crystal.frag deleted file mode 100644 index 7fe66b2..0000000 --- a/src/shaders/crystal.frag +++ /dev/null @@ -1,142 +0,0 @@ -#version 300 es - -precision highp float; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const float PI = 3.14159265; -const float TAU = PI * 2.0; -const float foldcos = cos( PI / 5.0 ); -const float foldrem = sqrt( 0.75 - foldcos * foldcos ); -const vec3 foldvec = vec3( -0.5, -foldcos, foldrem ); -const vec3 foldface = vec3( 0.0, foldrem, foldcos ); - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform float deformAmp; -uniform float deformFreq; -uniform float deformTime; -uniform float time; -uniform float noiseOffset; -uniform vec2 resolution; -uniform vec2 size; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -// https://www.iquilezles.org/www/articles/smin/smin.htm -float smin( float a, float b, float k ) { - float h = max( k - abs( a - b ), 0.0 ) / k; - return min( a, b ) - h * h * h * k * ( 1.0 / 6.0 ); -} - -mat2 rot2d( float t ) { - float c = cos( t ); - float s = sin( t ); - return mat2( c, -s, s, c ); -} - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -vec3 fold( vec3 p ) { - for ( int i = 0; i < 5; i ++ ) { - p.xy = abs( p.xy ); - p -= 2.0 * min( dot( foldvec, p ), 0.0 ) * foldvec; - } - return p; -} - -float distFunc( vec3 p ) { - p.zx = rot2d( 0.5 * time ) * p.zx; - p -= size.xyx * vec3( 0.02, 0.2, 0.02 ) * cyclicNoise( vec3( 1.0, 0.1, 1.0 ) / size.xyx * p + noiseOffset ); - p.y -= min( 0.8 * size.y - size.x, abs( p.y ) ) * sign( p.y ); - p = fold( p ); - return dot( p, foldface ) - size.x; -} - -vec3 normalFunc( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - distFunc( p + d.yxx ) - distFunc( p - d.yxx ), - distFunc( p + d.xyx ) - distFunc( p - d.xyx ), - distFunc( p + d.xxy ) - distFunc( p - d.xxy ) - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - float dist; - - int MARCH_ITER; - - #ifdef DEFERRED - MARCH_ITER = 60; - #endif - - #ifdef DEPTH - MARCH_ITER = 30; - #endif - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - dist = distFunc( rayPos ); - rayLen += 0.5 * dist; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( dist ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < dist ) { - discard; - } - - vec3 modelNormal = normalize( normalMatrix * vec4( normalFunc( rayPos, 1E-2 ), 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - fragColor = vec4( vec3( 0.5 ), 1.0 ); - fragWTF = vec4( vec3( 0.08, 0.9, 0.0 ), 3 ); - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/shaders/cube.frag b/src/shaders/cube.frag deleted file mode 100644 index fd36dd2..0000000 --- a/src/shaders/cube.frag +++ /dev/null @@ -1,49 +0,0 @@ -#version 300 es - -#define lofi(i,m) (floor((i)/(m))*(m)) - -precision highp float; - -const int MTL_PBR = 2; - -in float vInstanceId; -in vec3 vNormal; -in vec4 vPosition; -in vec4 vPositionWithoutModel; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -uniform float time; - -#pragma glslify: orthBasis = require( ./modules/orthBasis ); - -vec3 cyclicNoise( vec3 p ) { - vec3 sum = vec3( 0.0 ); - float amp = 0.5; - - for ( int i = 0; i < 8; i ++ ) { - p = p.zxy * 1.4 + vInstanceId; - vec3 pt = lofi( p, 0.5 ); - sum += sin( cross( cos( pt ), sin( pt.yzx ) ) ) * amp; - p += sum; - amp *= 0.5; - } - - return sum; -} - -void main() { - float rough = 0.5 + 0.5 * sin( 34.0 * cyclicNoise( vPositionWithoutModel.xyz ).x ); - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( normalize( vNormal ), 1.0 ); - fragColor = vec4( vec3( 0.1 ), 1.0 ); - fragWTF = vec4( vec3( 0.2 + 0.5 * rough, 0.77, 0.0 ), MTL_PBR ); - #endif -} diff --git a/src/shaders/cube.vert b/src/shaders/cube.vert deleted file mode 100644 index c632801..0000000 --- a/src/shaders/cube.vert +++ /dev/null @@ -1,48 +0,0 @@ -#version 300 es - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; -layout (location = 2) in float instanceId; - -out float vInstanceId; -out vec3 vNormal; -out vec4 vPositionWithoutModel; -out vec4 vPosition; - -uniform float clap; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -void main() { - vInstanceId = instanceId; - - vNormal = normalize( ( normalMatrix * vec4( normal, 1.0 ) ).xyz ); - - vPositionWithoutModel = vec4( position, 1.0 ); - - vec3 clapScale = fs( vec3( 14.0, 5.2, 8.7 ) + 100.0 * instanceId ); - vPositionWithoutModel.xyz *= clapScale; - - vPosition = vPositionWithoutModel; - - vec3 clapPositionSeed = vec3( 5.0, 8.6, 1.9 ) + 100.0 * instanceId; - vec3 clapPosition = 2.0 - 4.0 * mix( - fs( clapPositionSeed + floor( clap ) ), - fs( clapPositionSeed + floor( clap + 1.0 ) ), - fract( clap ) - ); - vPosition.xyz += clapPosition; - - vPosition = modelMatrix * vPosition; - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/cyclic-board.frag b/src/shaders/cyclic-board.frag deleted file mode 100644 index a772164..0000000 --- a/src/shaders/cyclic-board.frag +++ /dev/null @@ -1,195 +0,0 @@ -#version 300 es - -precision highp float; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const float PI = 3.14159265; -const float TAU = PI * 2.0; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform int lightCount; -uniform float deformAmp; -uniform float deformFreq; -uniform float deformTime; -uniform float time; -uniform float noiseOffset; -uniform vec2 lightNearFar[ 8 ]; -uniform vec2 resolution; -uniform vec2 size; -uniform vec2 cameraNearFar; -uniform vec3 lightPos[ 8 ]; -uniform vec3 lightColor[ 8 ]; -uniform vec3 cameraPos; -uniform vec4 lightParams[ 8 ]; -uniform mat4 lightPV[ 8 ]; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; -uniform sampler2D samplerRandom; -uniform sampler2D samplerRandomStatic; -uniform sampler2D samplerCapture; -uniform sampler2D samplerShadow[ 8 ]; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); -#pragma glslify: doAnalyticLighting = require( ./modules/doAnalyticLighting.glsl ); -#pragma glslify: doShadowMapping = require( ./modules/doShadowMapping.glsl ); - -vec4 fetchShadowMap( int iLight, vec2 uv ) { - if ( iLight == 0 ) { - return texture( samplerShadow[ 0 ], uv ); - } else if ( iLight == 1 ) { - return texture( samplerShadow[ 1 ], uv ); - } else if ( iLight == 2 ) { - return texture( samplerShadow[ 2 ], uv ); - } else if ( iLight == 3 ) { - return texture( samplerShadow[ 3 ], uv ); - } else if ( iLight == 4 ) { - return texture( samplerShadow[ 4 ], uv ); - } else if ( iLight == 5 ) { - return texture( samplerShadow[ 5 ], uv ); - } else if ( iLight == 6 ) { - return texture( samplerShadow[ 6 ], uv ); - } else if ( iLight == 7 ) { - return texture( samplerShadow[ 7 ], uv ); - } -} - -float distFunc( vec3 p ) { - float d = p.y; - d += 0.2 * cyclicNoise( p ).x; - return d; -} - -vec3 normalFunc( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - distFunc( p + d.yxx ) - distFunc( p - d.yxx ), - distFunc( p + d.xyx ) - distFunc( p - d.xyx ), - distFunc( p + d.xxy ) - distFunc( p - d.xxy ) - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - float dist; - - int MARCH_ITER; - - #ifdef FORWARD - MARCH_ITER = 30; - #endif - - #ifdef DEFERRED - MARCH_ITER = 60; - #endif - - #ifdef DEPTH - MARCH_ITER = 10; - #endif - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - dist = distFunc( rayPos ); - rayLen += 0.5 * dist; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( dist ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < dist ) { - discard; - } - - vec3 modelNormal = normalize( normalMatrix * vec4( normalFunc( rayPos, 1E-2 ), 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef FORWARD - vec3 color = vec3( 0.0 ); - - // for each lights - for ( int iLight = 0; iLight < 8; iLight ++ ) { - if ( iLight >= lightCount ) { break; } - - vec3 V = cameraPos - modelPos.xyz; - vec3 L = lightPos[ iLight ] - modelPos.xyz; - - // shading - vec3 shade = doAnalyticLighting( - V, - L, - modelNormal, - vec3( 0.6, 0.5, 0.4 ), - 0.5, - 0.2 - ) * lightColor[ iLight ]; - - // fetch shadowmap + spot lighting - vec4 lightProj = lightPV[ iLight ] * modelPos; - vec2 lightP = lightProj.xy / lightProj.w; - - shade *= doShadowMapping( - L, - modelNormal, - fetchShadowMap( iLight, 0.5 + 0.5 * lightP ), - lightP, - lightNearFar[ iLight ], - lightParams[ iLight ].x - ); - - color += shade; - } - - fragColor = vec4( color, 1.0 ); - #endif - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - fragColor = vec4( vec3( 0.6, 0.5, 0.4 ), 1.0 ); - fragWTF = vec4( vec3( 0.5, 0.2, 0.0 ), 2 ); - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/shaders/depth.frag b/src/shaders/depth.frag deleted file mode 100644 index c8b08ce..0000000 --- a/src/shaders/depth.frag +++ /dev/null @@ -1,22 +0,0 @@ -#version 300 es - -precision highp float; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -in vec4 vPosition; - -out vec4 fragColor; - -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; - -void main() { - float depth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - vPosition.xyz ) - ); - fragColor = vec4( depth, depth * depth, depth, 1.0 ); -} diff --git a/src/shaders/discard.frag b/src/shaders/discard.frag deleted file mode 100644 index a236549..0000000 --- a/src/shaders/discard.frag +++ /dev/null @@ -1,2 +0,0 @@ -#version 300 es -void main(){discard;} diff --git a/src/shaders/dvi.frag b/src/shaders/dvi.frag deleted file mode 100644 index 3280155..0000000 --- a/src/shaders/dvi.frag +++ /dev/null @@ -1,103 +0,0 @@ -#version 300 es - -precision highp float; - -const float PI = 3.14159265; -const vec3 LUMA = vec3( 0.2126, 0.7152, 0.0722 ); - -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) -#define lofi(i,m) (floor((i)/(m))*(m)) - -in vec2 vUv; - -out vec4 fragColor; - -uniform float time; -uniform float amp; -uniform float offset; -uniform vec2 resolution; -uniform sampler2D sampler0; - -mat2 r2d( float t ) { - return mat2( cos( t ), sin( t ), -sin( t ), cos( t ) ); -} - -float smin(float a,float b,float k){ - float h = linearstep( k, 0.0, abs( a - b ) ); - return min( a, b ) - h * h * h * k / 6.0; -} - -float dRadial( - vec2 p, - float offr, - float repr, - float exr, - float offx, - float exx, - float r -) { - p = r2d( offr ) * p; - float a = atan( p.y, p.x ); - p = r2d( -lofi( a + repr / 2.0, repr ) ) * p; - a = atan( p.y, p.x ); - p = r2d( -sign( a ) * min( abs( a ), exr ) ) * p; - p.x -= offx; - p.x -= sign( p.x ) * min( abs( p.x ), exx ); - float d = length( p ) - r; - return d; -} - -float sdbox( vec2 p,vec2 d ) { - vec2 pt = abs( p ) - d; - return min( max( pt.x, pt.y ), 0.0 ) + length( max( pt, 0.0 ) ); -} - -float dCirc( vec2 p ) { - return max( length( p ) - 0.02, 0.018 - length( p ) ); -} - -float dOverlay( vec2 p ) { - float d = 1E9; - float t = time + offset; - - // rings - { - float d2 = 1E9; - d2 = smin( d2, dRadial( p, 0.1 * t, PI / 2.0, PI / 8.0, 0.7, 0.0, 0.02 ), 0.05 ); - d2 = smin( d2, dRadial( p, 0.1 * t + PI / 4.0, PI / 2.0, PI / 8.0, 0.72, 0.0, 0.02 ), 0.05 ); - d = min( d2, d ); - } - - d = min( d, dRadial( p, 0.1 * t, PI / 8.0, PI / 19.0, 0.76, 0.002, 0.0 ) ); - d = min( d, dRadial( p, -0.1 * t, PI / 8.0, PI / 9.0, 0.79, 0.01, 0.0 ) ); - d = min( d, dRadial( p, 0.04 * t, PI / 48.0, 0.002, 0.82, 0.008, 0.0 ) ); - d = min( d, dRadial( p, 0.04 * t, PI / 192.0, 0.002, 0.82, 0.002, 0.0 ) ); - - { - float d2 = 1E9; - d2 = smin( d2, dRadial( p, 0.1 * t, PI / 1.5, PI / 8.0, 0.87, 0.0, 0.02 ), 0.05 ); - d2 = smin( d2, dRadial( p, 0.1 * t + PI / 4.0, PI / 1.5, PI, 0.89, 0.0, 0.02 ), 0.05 ); - d = min( d2, d ); - } - - d = min( d, dRadial( p, 0.2 * t, PI / 2.0, PI / 4.2, 0.925, 0.002, 0.0 ) ); - d = min( d, dRadial( p, -.1 * t, PI / 4.0, PI / 8.5, 0.95, 0.007, 0.0 ) ); - d = min( d, dRadial( p, 0.04 * t, PI / 96.0, 0.002, 1.0, 0.03, 0.0 ) ); - - return d; -} - -void main() { - vec2 uv = vUv; - vec2 p = ( uv * resolution * 2.0 - resolution ) / resolution.y; - - vec3 dry = texture( sampler0, uv ).rgb; - vec3 wet = dry; - - float d = dOverlay( p * 0.65 ); - float shape = linearstep( 2.0 / resolution.y, 0.0, d ); - wet = mix( wet, saturate( 0.5 - 0.3 * wet.gbr ), shape ); - - fragColor = vec4( mix( dry, wet, amp ), 1.0 ); -} diff --git a/src/shaders/environment-map-merge.frag b/src/shaders/environment-map-merge.frag deleted file mode 100644 index 471ab7e..0000000 --- a/src/shaders/environment-map-merge.frag +++ /dev/null @@ -1,38 +0,0 @@ -#version 300 es - -precision highp float; - -const float PI = 3.14159265; -const float TAU = 6.283185307; - -in vec2 vUv; - -out vec4 fragColor; - -uniform float head; -uniform vec2 resolution; -uniform sampler2D sampler0; - -void main() { - float lv = floor( -log( 1.0 - max( vUv.x, vUv.y ) ) / log( 2.0 ) ); - - if ( lv >= 5.0 ) { discard; } - - fragColor = texture( sampler0, vUv ); - - if ( lv != floor( -log( 1.0 - min( vUv.x, vUv.y ) ) / log( 2.0 ) ) ) { return; } - if ( lv < 1.0 ) { return; } - - float p = pow( 0.5, lv + 1.0 ); - vec2 uvt; - - for ( int i = 1; i < 31; i ++ ) { - uvt = vUv - p * vec2( i, 0.0 ); - if ( uvt.x < 0.0 ) { break; } - fragColor += texture( sampler0, uvt ); - uvt = vUv - p * vec2( 0.0, i ); - fragColor += texture( sampler0, uvt ); - } - - fragColor = fragColor / fragColor.w; -} diff --git a/src/shaders/environment-map.frag b/src/shaders/environment-map.frag deleted file mode 100644 index 7e86c0d..0000000 --- a/src/shaders/environment-map.frag +++ /dev/null @@ -1,94 +0,0 @@ -#version 300 es - -precision highp float; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -#pragma glslify: prng = require( ./-prng ); - -const int SAMPLES = 4; -const float UV_MARGIN = 0.9375; -const float PI = 3.14159265; -const float TAU = 6.283185307; - -in vec2 vUv; - -out vec4 fragColor; - -uniform float accumulate; -uniform float head; -uniform vec2 resolution; -uniform vec4 uniformSeed; -uniform sampler2D sampler0; -uniform samplerCube samplerCubemap; - -vec4 seed; - -float vdc( float i, float base ) { - float r = 0.0; - float denom = 1.0; - - for ( int j = 0; j < 32; j ++ ) { - denom *= base; - r += mod( i, base ) / denom; - i = floor( i / base ); - - if ( i <= 0.0 ) { break; } - } - - return r; -} - -#pragma glslify: importanceSampleGGX = require( ./modules/importanceSampleGGX ); - -void main() { - vec2 halfTexel = 1.0 / resolution; // * 0.5; - - float lv = floor( -log( 1.0 - max( vUv.x, vUv.y ) ) / log( 2.0 ) ); - - if ( lv >= 5.0 ) { discard; } - - float p = pow( 0.5, lv + 1.0 ); - vec2 uv00 = floor( vUv / p ) * p; - vec2 uv11 = uv00 + p; - vec2 uv = clamp( vUv, uv00 + halfTexel, uv11 - halfTexel ); - uv = linearstep( uv00, uv11, uv ); - uv = ( uv - 0.5 ) / UV_MARGIN + 0.5; - - vec3 tex = texture( sampler0, vUv ).xyz; - float roughness = lv * 0.333; - - float a = TAU * uv.x; - float b = PI * ( uv.y - 0.5 ); - vec3 N = vec3( -sin( a ) * cos( b ), -sin( b ), -cos( a ) * cos( b ) ); - vec3 R = N; - vec3 V = R; - - seed = uniformSeed + 10.0 + 500.0 * vec4( uv00, N.xy ); - prng( seed ); - - vec4 col = vec4( 0.0 ); - for ( int i = 0; i < SAMPLES; i ++ ) { - vec2 Xi = vec2( prng( seed ), prng( seed ) ); - vec3 H = importanceSampleGGX( Xi, roughness, N ); - vec3 L = normalize( 2.0 * dot( V, H ) * H - V ); - - float NoL = dot( N, L ); - - if ( NoL > 0.0 ) { - col += texture( samplerCubemap, L ) * NoL; - } - } - - col.xyz = col.w <= 0.001 ? vec3( 0.0 ) : ( col.xyz / col.w ); - - if ( lv >= 4.0 ) { - // lambert - col *= PI; - } - - tex = mix( tex.xyz, col.xyz, accumulate ); - - fragColor = vec4( tex, 1.0 ); -} diff --git a/src/shaders/flashy-ball.frag b/src/shaders/flashy-ball.frag deleted file mode 100644 index d7ca6a0..0000000 --- a/src/shaders/flashy-ball.frag +++ /dev/null @@ -1,33 +0,0 @@ -#version 300 es - -precision highp float; - -const float TAU = 6.283185307; - -in float vInstanceId; -in vec3 vNormal; -in vec4 vPosition; -in vec4 vPositionWithoutModel; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -uniform float time; - -#pragma glslify: orthBasis = require( ./modules/orthBasis ); -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -void main() { - float roughness = 0.3 + 0.1 * cyclicNoise( 4.0 * vPositionWithoutModel.xyz ).x; - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( vNormal, 1.0 ); - fragColor = vec4( vec3( 0.2 ), 1.0 ); - fragWTF = vec4( roughness, 0.9, 0.0, 2 ); - #endif -} diff --git a/src/shaders/flashy-ball.vert b/src/shaders/flashy-ball.vert deleted file mode 100644 index b5a8b7f..0000000 --- a/src/shaders/flashy-ball.vert +++ /dev/null @@ -1,33 +0,0 @@ -#version 300 es - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; - -out vec3 vNormal; -out vec4 vPosition; -out vec4 vPositionWithoutModel; - -uniform float time; -uniform float distort; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -void main() { - vNormal = normalize( ( normalMatrix * vec4( normal, 1.0 ) ).xyz ); - - vPositionWithoutModel = vec4( position, 1.0 ); - vPosition = modelMatrix * vPositionWithoutModel; - vPosition.xyz -= distort * cyclicNoise( 0.3 * vPosition.xyz + 0.3 * time ); - vNormal = normalize( vNormal + distort * cyclicNoise( 1.0 + 0.3 * vPosition.xyz + 0.3 * time ) ); - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/flicky-particles-compute.frag b/src/shaders/flicky-particles-compute.frag deleted file mode 100644 index dc3b9b7..0000000 --- a/src/shaders/flicky-particles-compute.frag +++ /dev/null @@ -1,114 +0,0 @@ -#version 300 es - -precision highp float; - -const float PARTICLE_LIFE_LENGTH = 1.0; -const float HUGE = 9E16; -const float PI = 3.14159265; -const float TAU = 6.283185307; - -#define saturate(i) clamp(i,0.,1.) -#define lofi(i,m) (floor((i)/(m))*(m)) -#define lofir(i,m) (floor((i)/(m)+.5)*(m)) - -out vec4 fragCompute0; - -uniform bool init; -uniform float time; -uniform float beat; -uniform float particlesSqrt; -uniform float totalFrame; -uniform float deltaTime; -uniform float noiseScale; -uniform float noisePhase; -uniform vec2 resolution; -uniform sampler2D samplerCompute0; -uniform sampler2D samplerRandom; - -vec4 sampleRandom( vec2 _uv ) { - return texture( samplerRandom, _uv ); -} - -#pragma glslify: prng = require( ./-prng ); - -vec3 randomSphere( inout vec4 seed ) { - vec3 v; - for ( int i = 0; i < 10; i ++ ) { - v = vec3( - prng( seed ), - prng( seed ), - prng( seed ) - ) * 2.0 - 1.0; - if ( length( v ) < 1.0 ) { break; } - } - return v; -} - -vec2 randomCircle( inout vec4 seed ) { - vec2 v; - for ( int i = 0; i < 10; i ++ ) { - v = vec2( - prng( seed ), - prng( seed ) - ) * 2.0 - 1.0; - if ( length( v ) < 1.0 ) { break; } - } - return v; -} - -vec3 randomBox( inout vec4 seed ) { - vec3 v; - v = vec3( - prng( seed ), - prng( seed ), - prng( seed ) - ) * 2.0 - 1.0; - return v; -} - -// ------ - -void main() { - vec2 uv = gl_FragCoord.xy / resolution; - - float dt = deltaTime; - - // == prepare some vars ========================================================================== - vec4 seed = texture( samplerRandom, uv ); - prng( seed ); - - vec4 tex0 = texture( samplerCompute0, uv ); - - vec3 pos = tex0.xyz; - float life = tex0.w; - - float timing = mix( - 0.0, - PARTICLE_LIFE_LENGTH, - ( floor( uv.x * particlesSqrt ) / particlesSqrt + floor( uv.y * particlesSqrt ) ) / particlesSqrt - ); - timing += lofi( time, PARTICLE_LIFE_LENGTH ); - - if ( time - deltaTime + PARTICLE_LIFE_LENGTH < timing ) { - timing -= PARTICLE_LIFE_LENGTH; - } - - // == initialize particles ======================================================================= - if ( - time - deltaTime < timing && timing <= time - ) { - dt = time - timing; - - pos = 3.0 * randomSphere( seed ); - - life = 1.0; - } else { - // do nothing - // if you want to remove init frag from the particle, do at here - } - - // == update particles =========================================================================== - life -= dt / PARTICLE_LIFE_LENGTH; - - fragCompute0 = vec4( pos, life ); -} diff --git a/src/shaders/flicky-particles-render.frag b/src/shaders/flicky-particles-render.frag deleted file mode 100644 index 971d757..0000000 --- a/src/shaders/flicky-particles-render.frag +++ /dev/null @@ -1,189 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_UNLIT = 1; - -const int MODE_RECT = 0; -const int MODE_GRID = 1; -const int MODE_CIRCLE = 2; -const int MODE_SLASHER = 3; -const int MODE_TAMBO = 4; -const int MODE_C = 5; -const int MODE_THEREFORE = 6; -const int MODE_SPEEN = 7; -const int MODES = 8; -const float PI = 3.14159265; -const float TAU = 6.28318531; - -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) -#define lofi(i,m) (floor((i)/(m))*(m)) - -// == varings / uniforms =========================================================================== -in float vLife; -in float vMode; -in vec2 vUv; -in vec2 vSize; -in vec3 vNormal; -in vec4 vPosition; -in vec4 vDice; - -uniform float time; -uniform sampler2D samplerRandomStatic; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; - -// == utils ======================================================================================== -mat2 rotate2D( float t ) { - return mat2( cos( t ), sin( t ), -sin( t ), cos( t ) ); -} - -vec4 random( vec2 uv ) { - return texture( samplerRandomStatic, uv ); -} - -vec2 yflip( vec2 uv ) { - return vec2( 0.0, 1.0 ) + vec2( 1.0, -1.0 ) * uv; -} - -// == main procedure =============================================================================== -void main() { - if ( vLife < 0.0 ) { discard; } - if ( vLife < 0.1 && 0.5 < fract( 30.0 * vLife ) ) { discard; } - - int mode = int( vMode + 0.5 ); - - vec2 uv = vUv; - vec2 deltaUv = abs( vec2( dFdx( uv.x ), dFdy( uv.y ) ) ); - vec2 p = ( uv * 2.0 - 1.0 ) * vSize; - - vec3 color = vec3( 0.0 ); - - if ( mode == MODE_RECT ) { - vec2 deltaUv = abs( vec2( dFdx( uv.x ), dFdy( uv.y ) ) ); - vec2 folded = ( vec2( 0.5 ) - abs( uv - 0.5 ) ) / deltaUv; - bool isVert = false; - - if ( folded.x < folded.y ) { - uv.xy = vec2( uv.y, uv.x ); - folded.xy = folded.yx; - deltaUv.xy = deltaUv.yx; - isVert = true; - } - - float spinUvx = uv.y < 0.5 ? uv.x : ( 1.0 - uv.x ); - spinUvx = isVert ? ( 1.0 - spinUvx ) : spinUvx; - - float border = step( 0.0, folded.y ) * step( folded.y, 2.0 ); - border *= step( 0.0, sin( 12.0 * time + 0.5 * spinUvx / deltaUv.x ) ); // dashed - - if ( border < 0.5 ) { discard; } - - color = vec3( 1.0 ); - - } else if ( mode == MODE_GRID ) { - vec2 folded = mod( 8.0 * uv, 1.0 ); - - float shape = step( length( folded - 0.5 ), 0.1 ); - - if ( shape < 0.5 ) { discard; } - - color = vec3( 1.0 ); - - } else if ( mode == MODE_CIRCLE ) { - float r = length( uv - 0.5 ); - float shape = step( r, 0.5 ); - shape *= step( 0.5, r + length( deltaUv ) ); - - if ( shape < 0.5 ) { discard; } - - color = vec3( 1.0 ); - - } else if ( mode == MODE_SLASHER ) { - float shape = step( 0.0, sin( 40.0 * ( p.x + p.y + 0.3 * time ) ) ); - - if ( shape < 0.5 ) { discard; } - - color = vec3( 1.0 ); - - } else if ( mode == MODE_TAMBO ) { // 田 - if ( vLife < 0.7 ) { discard; } - - if ( any( lessThan( abs( uv - 0.5 ), vec2( 0.1 ) ) ) ) { discard; } - - float ptn = mod( floor( 4.0 * vDice.x + 30.0 * time ), 4.0 ); - float pos = floor( 2.0 * uv.x ) + 2.0 * floor( 2.0 * uv.y ); - if ( ptn != pos ) { discard; } - - color = vec3( 1.0 ); - - } else if ( mode == MODE_C ) { // c - if ( vLife < 0.7 ) { discard; } - - vec2 p = 2.0 * vUv - 1.0; - if ( 0.2 < abs( length( p ) - 0.8 ) ) { discard; } - - float ptn = floor( mod( 8.0 * vDice.x - 30.0 * time, 8.0 ) ); - vec2 pp = rotate2D( ptn * TAU / 8.0 ) * p; - float th = atan( pp.y, pp.x ); - if ( th < 0.0 ) { discard; } - - color = vec3( 1.0 ); - - } else if ( mode == MODE_THEREFORE ) { // ∴ - if ( vLife < 0.7 ) { discard; } - - vec2 p = uv * 2.0 - 1.0; - float ptn = floor( mod( 3.0 * vDice.x + 30.0 * time, 3.0 ) ); - p = rotate2D( -PI / 2.0 + ptn * TAU / 3.0 ) * p; - - float d = lofi( atan( p.y, p.x ) + TAU / 6.0, TAU / 3.0 ); - p = rotate2D( -d ) * p; - p -= vec2( 0.5, 0.0 ); - - if ( 0.5 < length( p ) ) { discard; } - if ( d != 0.0 && length( p ) < 0.32 ) { discard; } - - color = vec3( 1.0 ); - - } else if ( mode == MODE_SPEEN ) { // | - if ( vLife < 0.7 ) { discard; } - - vec2 p = uv * 2.0 - 1.0; - float ptn = floor( mod( 4.0 * vDice.x + 30.0 * time, 4.0 ) ); - vec2 pp = rotate2D( ptn * TAU / 8.0 ) * p; - - if ( 0.2 < abs( pp.x ) || 0.9 < abs( pp.y ) ) { discard; } - - color = vec3( 1.0 ); - - } - - #ifdef FORWARD - vec3 color = vec3( 1.0 ); - - float lenV = length( cameraPos - vPosition.xyz ); - color *= exp( -0.4 * max( lenV - 3.0, 0.0 ) ); - - fragColor = vec4( color, 1.0 ); - #endif - - #ifdef DEPTH - float depth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - vPosition.xyz ) - ); - fragColor = vec4( depth, depth * depth, depth, 1.0 ); - #endif -} diff --git a/src/shaders/flicky-particles-render.vert b/src/shaders/flicky-particles-render.vert deleted file mode 100644 index 85ea932..0000000 --- a/src/shaders/flicky-particles-render.vert +++ /dev/null @@ -1,96 +0,0 @@ -#version 300 es - -const int MODE_RECT = 0; -const int MODE_GRID = 1; -const int MODE_CIRCLE = 2; -const int MODE_SLASHER = 3; -const int MODE_TAMBO = 4; -const int MODE_C = 5; -const int MODE_THEREFORE = 6; -const int MODE_SPEEN = 7; -const int MODES = 8; -const float HUGE = 9E16; -const float PI = 3.14159265; -const float TAU = 6.283185307; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(i) clamp(i,0.,1.) -#define lofi(i,m) (floor((i)/(m))*(m)) -#define lofir(i,m) (floor((i+0.5)/(m))*(m)) - -// ------------------------------------------------------------------------------------------------- - -layout (location = 0) in vec2 position; -layout (location = 1) in vec2 computeUV; - -out float vLife; -out float vMode; -out vec2 vUv; -out vec2 vSize; -out vec4 vPosition; -out vec4 vDice; - -uniform vec2 resolution; -uniform vec2 resolutionCompute; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform sampler2D samplerCompute0; -uniform sampler2D samplerRandomStatic; - -// == utils ======================================================================================== -vec4 random( vec2 uv ) { - return texture( samplerRandomStatic, uv ); -} - -mat2 rotate2D( float _t ) { - return mat2( cos( _t ), sin( _t ), -sin( _t ), cos( _t ) ); -} - -// == main procedure =============================================================================== -void main() { - vec4 tex0 = texture( samplerCompute0, computeUV ); - - // == assign varying variables =================================================================== - vDice = fs( random( computeUV.xy * 88.92 + 0.42 ) ); // precision matters,,,? - - vec4 dice = fs( random( computeUV.xy * 182.92 ) ); - int mode = int( float( MODES ) * dice.w ); - vMode = float( mode ); - - vUv = 0.5 + 0.5 * position; - - vLife = tex0.w; - - // == compute size =============================================================================== - vPosition = vec4( tex0.xyz, 1.0 ); - - if ( mode == MODE_RECT ) { - vSize = 1.0 * dice.xy; - - } else if ( mode == MODE_GRID ) { - vSize = vec2( 0.25 ); - - } else if ( mode == MODE_CIRCLE ) { - vSize = vec2( 3.0 * dice.x * dice.x ); - - } else if ( mode == MODE_SLASHER ) { - vSize = vec2( 0.6, 0.2 ) * dice.xy; - - } else if ( mode == MODE_TAMBO || mode == MODE_C || mode == MODE_THEREFORE || mode == MODE_SPEEN ) { - vSize = vec2( 0.2 * dice.x ); - - } - - vec2 shape = position * vSize; - - vPosition.xy += shape; - - // == send the vertex position =================================================================== - vPosition = modelMatrix * vPosition; - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/fxaa.frag b/src/shaders/fxaa.frag deleted file mode 100644 index f1fc2b9..0000000 --- a/src/shaders/fxaa.frag +++ /dev/null @@ -1,69 +0,0 @@ -#version 300 es - -precision highp float; - -const float FXAA_REDUCE_MIN = 1.0 / 128.0; -const float FXAA_REDUCE_MUL = 1.0 / 8.0; -const float FXAA_SPAN_MAX = 16.0; - -in vec2 vUv; - -out vec4 fragColor; - -uniform vec2 resolution; -uniform sampler2D sampler0; - -void main() { - vec2 uv = vUv; - vec4 neighbor = vec4( -1.0, -1.0, 1.0, 1.0 ) / resolution.xyxy; - - vec3 rgb11 = texture( sampler0, vUv ).rgb; - vec3 rgb00 = texture( sampler0, vUv + neighbor.xy ).rgb; - vec3 rgb02 = texture( sampler0, vUv + neighbor.xw ).rgb; - vec3 rgb20 = texture( sampler0, vUv + neighbor.zy ).rgb; - vec3 rgb22 = texture( sampler0, vUv + neighbor.zw ).rgb; - - vec3 luma = vec3( 0.299, 0.587, 0.114 ); - float luma11 = dot( luma, rgb11 ); - float luma00 = dot( luma, rgb00 ); - float luma02 = dot( luma, rgb02 ); - float luma20 = dot( luma, rgb20 ); - float luma22 = dot( luma, rgb22 ); - - float lumaMin = min( luma00, min( min( luma00, luma02 ), min( luma20, luma22 ) ) ); - float lumaMax = max( luma00, max( max( luma00, luma02 ), max( luma20, luma22 ) ) ); - - vec2 dir = vec2( - -( ( luma00 + luma20 ) - ( luma02 + luma22 ) ), - ( ( luma00 + luma02 ) - ( luma20 + luma22 ) ) - ); - - float dirReduce = max( - ( luma00 + luma02 + luma20 + luma22 ) * 0.25 * FXAA_REDUCE_MUL, - FXAA_REDUCE_MIN - ); - float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce ); - dir = min( - vec2( FXAA_SPAN_MAX ), - max( - vec2( -FXAA_SPAN_MAX ), - dir * rcpDirMin - ) - ) / resolution; - - vec3 rgbA = 0.5 * ( - texture( sampler0, uv + dir * ( 1.0 / 3.0 - 0.5 ) ).xyz + - texture( sampler0, uv + dir * ( 2.0 / 3.0 - 0.5 ) ).xyz - ); - vec3 rgbB = rgbA * 0.5 + 0.25 * ( - texture( sampler0, uv - dir * 0.5 ).xyz + - texture( sampler0, uv + dir * 0.5 ).xyz - ); - - float lumaB = dot( rgbB, luma ); - fragColor = ( - ( ( lumaB < lumaMin ) || ( lumaMax < lumaB ) ) ? - vec4( rgbA, 1.0 ) : - vec4( rgbB, 1.0 ) - ); -} diff --git a/src/shaders/glitch.frag b/src/shaders/glitch.frag deleted file mode 100644 index da27ef5..0000000 --- a/src/shaders/glitch.frag +++ /dev/null @@ -1,63 +0,0 @@ -#version 300 es - -precision highp float; - -const int BARREL_ITER = 10; - -#define saturate(i) clamp(i,0.,1.) -#define lofi(i,m) (floor((i)/(m))*(m)) - -in vec2 vUv; - -out vec4 fragColor; - -uniform float time; -uniform float amp; -uniform float barrelAmp; -uniform float barrelOffset; -uniform vec2 resolution; -uniform sampler2D sampler0; - -// == common ======================================================================================= -float fractSin( float v ) { - return fract( 17.351 * sin( 27.119 * v ) ); -} - -// == glitch ======================================================================================= -vec2 displace( vec2 uv, float threshold ) { - float seed = fractSin( lofi( uv.y, 0.0625 ) + fractSin( lofi( uv.x, 0.25 ) ) ); - if ( seed < threshold ) { return vec2( 0.0 ); } - - vec2 d = vec2( 0.0 ); - seed = fractSin( seed ); - d.x = seed - 0.5; - - return d; -} - -// == fetch ======================================================================================== -vec4 fetch( vec2 uv ) { - vec2 uvt = saturate( uv ); - vec4 color = texture( sampler0, uvt ); - return color; -} - -// == main procedure =============================================================================== -void main() { - vec2 uv = vUv.xy; - - vec2 d = vec2( 0.0 ); - for ( int i = 0; i < 3; i ++ ) { - float p = pow( 2.4, float( i ) ); - float thr = 1.0 - pow( amp, 6.0 ); - thr = thr * pow( thr, float( i ) ); - d += displace( uv * p + 50.0 * fractSin( 0.1 * time ), thr ) * 0.4 / p; - } - - vec4 col = vec4( 0.0 ); - col += fetch( uv + d * 0.60 ) * vec4( 1.0, 0.0, 0.0, 1.0 ); - col += fetch( uv + d * 0.90 ) * vec4( 0.0, 1.0, 0.0, 1.0 ); - col += fetch( uv + d * 1.20 ) * vec4( 0.0, 0.0, 1.0, 1.0 ); - - fragColor = col; -} diff --git a/src/shaders/greetings-pre-beatmania.frag b/src/shaders/greetings-pre-beatmania.frag deleted file mode 100644 index 37bd42f..0000000 --- a/src/shaders/greetings-pre-beatmania.frag +++ /dev/null @@ -1,13 +0,0 @@ -#version 300 es - -precision highp float; - -in vec2 vUv; - -out vec4 fragColor; - -uniform sampler2D sampler0; - -void main() { - fragColor = step( 0.9, texture( sampler0, vUv ) ); -} diff --git a/src/shaders/greetings-pre-lain.frag b/src/shaders/greetings-pre-lain.frag deleted file mode 100644 index 178cd08..0000000 --- a/src/shaders/greetings-pre-lain.frag +++ /dev/null @@ -1,18 +0,0 @@ -#version 300 es - -precision highp float; - -in vec2 vUv; - -out vec4 fragColor; - -uniform sampler2D sampler0; - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -void main() { - vec2 uv = vUv; - uv += 0.001 * sin( 20.0 * cyclicNoise( vec3( 4.0 * uv, 1.0 ) ).xy ); - - fragColor = texture( sampler0, uv ); -} diff --git a/src/shaders/greetings.frag b/src/shaders/greetings.frag deleted file mode 100644 index fdb01c6..0000000 --- a/src/shaders/greetings.frag +++ /dev/null @@ -1,41 +0,0 @@ -#version 300 es - -precision highp float; - -in float vTime; -in vec2 vUv; -in vec4 vCharParams; - -out vec4 fragColor; - -uniform sampler2D samplerSpriteSheets[ 8 ]; - - -// this is BAD -vec4 fetchSpriteSheet( int iFont ) { - if ( iFont == 0 ) { - return texture( samplerSpriteSheets[ 0 ], vUv ); - } else if ( iFont == 1 ) { - return texture( samplerSpriteSheets[ 1 ], vUv ); - } else if ( iFont == 2 ) { - return texture( samplerSpriteSheets[ 2 ], vUv ); - } else if ( iFont == 3 ) { - return texture( samplerSpriteSheets[ 3 ], vUv ); - } else if ( iFont == 4 ) { - return texture( samplerSpriteSheets[ 4 ], vUv ); - } else if ( iFont == 5 ) { - return texture( samplerSpriteSheets[ 5 ], vUv ); - } else if ( iFont == 6 ) { - return texture( samplerSpriteSheets[ 6 ], vUv ); - } else if ( iFont == 7 ) { - return texture( samplerSpriteSheets[ 7 ], vUv ); - } -} - -// gl.ONE, gl.ONE -void main() { - if ( vTime < 0.0 ) { discard; } - - int font = int( vCharParams.z ) % 8; - fragColor = exp( -17.0 * vTime ) * fetchSpriteSheet( font ) * vec4( 3.0, 0.4, 7.0, 1.0 ); -} diff --git a/src/shaders/greetings.vert b/src/shaders/greetings.vert deleted file mode 100644 index ae3ceb4..0000000 --- a/src/shaders/greetings.vert +++ /dev/null @@ -1,52 +0,0 @@ -#version 300 es - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(i) clamp(i,0.,1.) - -// ------------------------------------------------------------------------------------------------- - -layout (location = 0) in vec2 position; -layout (location = 1) in vec4 charParams; -layout (location = 2) in vec4 charParams2; - -out float vTime; -out vec2 vUv; -out vec4 vCharParams; -out vec4 vPosition; - -uniform float time; -uniform vec2 resolution; - -// == utils ======================================================================================== -vec2 yflip( vec2 uv ) { - return vec2( 0.0, 1.0 ) + vec2( 1.0, -1.0 ) * uv; -} - -// == main procedure =============================================================================== -void main() { - vCharParams = charParams; - - float char = vCharParams.x; - - vUv = yflip( 0.5 + 0.499 * position ); - vUv = ( vUv + floor( mod( vec2( char / vec2( 1.0, 16.0 ) ), 16.0 ) ) ) / 16.0; - - vTime = time - vCharParams.w; - - // == compute size =============================================================================== - vPosition = vec4( 0.0, 0.0, 0.0, 1.0 ); - - vec2 shape = 0.5 * position; - shape.y *= charParams2.y; - - vec2 offset = ( 0.6 - 0.2 * exp( -5.0 * vTime ) ) * vec2( vCharParams.y, 0.0 ); - vPosition.xy += ( offset + shape ) * min( 500.0 / charParams2.x, 1.0 ); - - // == send the vertex position =================================================================== - vPosition = vPosition; - vec4 outPos = vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/hooperball.frag b/src/shaders/hooperball.frag deleted file mode 100644 index 2b7afaa..0000000 --- a/src/shaders/hooperball.frag +++ /dev/null @@ -1,214 +0,0 @@ -#version 300 es - -// rip of https://www.shadertoy.com/view/tsyBWD - -precision highp float; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define lofi(i,j) (floor((i)/(j))*(j)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const int MARCH_ITER = 90; -const float PI = 3.14159265; -const float TAU = PI * 2.0; -const float foldcos = cos( PI / 5.0 ); -const float foldrem = sqrt( 0.75 - foldcos * foldcos ); -const vec3 foldvec = vec3( -0.5, -foldcos, foldrem ); -const vec3 foldface = vec3( 0.0, foldrem, foldcos ); -const vec3 foldu = vec3( 1.0, 0.0, 0.0 ); -const vec3 foldv = normalize( cross( foldu, foldface ) ); - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform float deformSeed; -uniform float time; -uniform vec2 resolution; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -struct Heck{ - vec2 coord; - vec2 cell; - float len; -}; - -vec2 uv2heck( vec2 v ) { - v.y *= 2.0 / sqrt( 3.0 ); - v.x += v.y * 0.5; - return v; -} - -vec2 heck2uv( vec2 v ) { - v.y /= 2.0 / sqrt( 3.0 ); - v.x -= v.y * 0.5; - return v; -} - -Heck doHeck( vec2 v, float scale ) { - Heck heck; - - v = uv2heck( v ) * scale; - - heck.cell.x = floor( v.x ); - heck.cell.y = lofi( v.y + heck.cell.x + 2.0, 3.0 ) - heck.cell.x - 2.0; - heck.coord = v - heck.cell - vec2( 0.0, 1.0 ); - - bool a = heck.coord.x < heck.coord.y; - heck.cell += a ? vec2( 0.0, 2.0 ) : vec2( 1.0, 1.0 ); - heck.coord += a ? vec2( 0.0, -1.0 ) : vec2( -1.0, 0.0 ); - - heck.cell = heck2uv( heck.cell / scale ); - - heck.len = max( abs( heck.coord.x ), abs( heck.coord.y ) ); - heck.len = max( heck.len, abs( heck.coord.y - heck.coord.x ) ); - - return heck; -} - - -// https://www.iquilezles.org/www/articles/smin/smin.htm -float smin( float a, float b, float k ) { - float h = max( k - abs( a - b ), 0.0 ) / k; - return min( a, b ) - h * h * h * k * ( 1.0 / 6.0 ); -} - -mat2 rot2d( float t ) { - float c = cos( t ); - float s = sin( t ); - return mat2( c, -s, s, c ); -} - -#pragma glslify: noise = require( ./-simplex4d ); - -vec3 fold( vec3 p ) { - for ( int i = 0; i < 5; i ++ ) { - p.xy = abs( p.xy ); - p -= 2.0 * min( dot( foldvec, p ), 0.0 ) * foldvec; - } - return p; -} - -vec4 mapIcosa(vec3 p){ - p.zx = rot2d( 0.8 * time ) * p.zx; - p.xy = rot2d( 1.8 * time ) * p.xy; - p = fold( p ); - - vec3 isect = p / dot( foldface, p ); - vec2 uv = vec2( dot( isect, foldu ), dot( isect, foldv ) ); - - float phase = deformSeed; - float scale = 5.0 + 4.0 * sin( 1.8 * phase ); - Heck heck = doHeck( uv, scale ); - vec3 point = normalize( foldface + heck.cell.x * foldu + heck.cell.y * foldv ); - - phase += 4.7 * length( heck.cell ); - float height = 1.0 + 0.1 * sin( 4.9 * phase ); - - float dotPointP = dot( point, p ); - float d = max( dotPointP - height, ( heck.len - 0.4 / dotPointP ) / scale * dotPointP * dotPointP ); - vec4 ia = vec4( d, 1, 0, 0 ); - - float width = 0.8 + 0.2 * sin( 7.6 * phase ); - float haha = abs( dotPointP - height ) - 0.02; - float haha2 = ( heck.len - width ) / scale * dotPointP; - d = max( haha, haha2 ); - vec4 ib = vec4( d, 2, step( -0.03, heck.len - width ) * step( -haha, 0.03 ), 0 ); - - ia = ib.x < ia.x ? ib : ia; - - return ia; -} - -vec4 map( vec3 p ) { - vec3 pt = p; - return mapIcosa( pt ); -} - -vec3 normalFunc( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - map( p + d.yxx ).x - map( p - d.yxx ).x, - map( p + d.xyx ).x - map( p - d.xyx ).x, - map( p + d.xxy ).x - map( p - d.xxy ).x - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - vec4 isect; - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - isect = map( rayPos ); - rayLen += 0.5 * isect.x; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( isect.x ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < isect.x ) { - discard; - } - - vec3 modelNormal = normalize( normalMatrix * vec4( normalFunc( rayPos, 1E-3 ), 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - - if ( isect.y == 1.0 ) { - fragColor = vec4( vec3( 0.1 ), 1.0 ); - fragWTF = vec4( vec3( 0.8, 0.7, 0.0 ), 2 ); - } else if ( isect.y == 2.0 ) { - if ( isect.z > 0.99 ) { - fragColor = vec4( 0.1, 0.5, 0.4, 1.0 ); - fragWTF = vec4( vec3( 0.8, 0.1, 1.0 ), 2 ); - } else { - fragColor = vec4( vec3( 0.1 ), 1.0 ); - fragWTF = vec4( vec3( 0.7, 0.8, 0.0 ), 2 ); - } - } - - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/shaders/ibl-lut.frag b/src/shaders/ibl-lut.frag deleted file mode 100644 index fdf6b5c..0000000 --- a/src/shaders/ibl-lut.frag +++ /dev/null @@ -1,90 +0,0 @@ -#version 300 es - -precision highp float; - -const float TAU = 6.283185307; - -in vec2 vUv; - -out vec4 fragColor; - -uniform float samples; -uniform float vdc; -uniform sampler2D sampler0; - -vec3 ImportanceSampleGGX( vec2 Xi, float roughness, vec3 N ) { - float a = roughness * roughness; - - float phi = TAU * Xi.x; - float cosTheta = sqrt( ( 1.0 - Xi.y ) / ( 1.0 + ( a * a - 1.0 ) * Xi.y ) ); - float sinTheta = sqrt( 1.0 - cosTheta * cosTheta ); - - // from spherical coordinates to cartesian coordinates - vec3 H = vec3( - cos( phi ) * sinTheta, - sin( phi ) * sinTheta, - cosTheta - ); - - // from tangent-space vector to world-space sample vector - vec3 up = abs( N.y ) < 0.999 ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); - vec3 tangent = normalize( cross( up, N ) ); - vec3 bitangent = cross( N, tangent ); - - vec3 sampleVec = tangent * H.x + bitangent * H.y + N * H.z; - return normalize( sampleVec ); -} - -float GeometrySchlickGGX( float NdotV, float roughness ) { - float a = roughness; - float k = ( a * a ) / 2.0; - - float nom = NdotV; - float denom = NdotV * ( 1.0 - k ) + k; - - return nom / denom; -} - -float GeometrySmith( float roughness, float NoV, float NoL ) { - float ggx2 = GeometrySchlickGGX( NoV, roughness ); - float ggx1 = GeometrySchlickGGX( NoL, roughness ); - - return ggx1 * ggx2; -} - -// https://github.com/HectorMF/BRDFGenerator/blob/master/BRDFGenerator/BRDFGenerator.cpp -vec2 IntegrateBRDF( float NdotV, float roughness ) { - vec3 V = vec3( sqrt( 1.0 - NdotV * NdotV ), 0.0, NdotV ); - vec3 N = vec3( 0.0, 0.0, 1.0 ); - - vec2 Xi = vec2( samples / 1024.0, vdc ); - vec3 H = ImportanceSampleGGX( Xi, roughness, N ); - vec3 L = normalize( 2.0 * dot( V, H ) * H - V ); - - float NoL = max( L.z, 0.0 ); - float NoH = max( H.z, 0.0 ); - float VoH = max( dot( V, H ), 0.0 ); - float NoV = max( dot( N, V ), 0.0 ); - - if ( NoL > 0.0 ) { - float G = GeometrySmith( roughness, NoV, NoL ); - - float G_Vis = ( G * VoH ) / ( NoH * NoV ); - float Fc = pow( 1.0 - VoH, 5.0 ); - - return vec2( ( 1.0 - Fc ) * G_Vis, Fc * G_Vis ); - } - - return vec2( 0.0 ); -} - -void main() { - vec2 tex = texture( sampler0, vUv ).xy; - - float NdotV = vUv.y; - float roughness = vUv.x; - - tex = mix( tex, IntegrateBRDF( NdotV, roughness ), 1.0 / samples ); - - fragColor = vec4( tex, 0.0, 1.0 ); -} diff --git a/src/shaders/ifs-as-usual.frag b/src/shaders/ifs-as-usual.frag deleted file mode 100644 index 9952c1f..0000000 --- a/src/shaders/ifs-as-usual.frag +++ /dev/null @@ -1,153 +0,0 @@ -#version 300 es - -precision highp float; - -#define lofi(i,j) (floor((i)/(j))*(j)) -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const int MARCH_ITER = 90; -const float PI = 3.14159265; -const float TAU = PI * 2.0; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform float ifsSeed; -uniform vec2 resolution; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -// https://www.iquilezles.org/www/articles/smin/smin.htm -float smin( float a, float b, float k ) { - float h = max( k - abs( a - b ), 0.0 ) / k; - return min( a, b ) - h * h * h * k * ( 1.0 / 6.0 ); -} - -mat2 rot2d( float t ) { - float c = cos( t ); - float s = sin( t ); - return mat2( c, -s, s, c ); -} - -#pragma glslify: orthBasis = require( ./modules/orthBasis ); -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -vec3 ifs( vec3 p, vec3 r, vec3 t ) { - vec3 s = t; - mat3 bas = orthBasis( r ); - - for ( int i = 0; i < 5; i ++ ) { - p = abs( p ) - abs( s ) * pow( 1.8, -float( i ) ); - - s = bas * s; - - p.xy = p.x < p.y ? p.yx : p.xy; - p.yz = p.y < p.z ? p.zy : p.yz; - } - - return p; -} - -float box( vec3 p, vec3 s ) { - vec3 d = abs( p ) - s; - return min( 0.0, max( d.x, max( d.y, d.z ) ) ) + length( max( vec3( 0.0 ), d ) ); -} - -float map( vec3 p ) { - vec4 isect; - - vec3 pt = p; - - float clampbox = box( pt, vec3( 1.0 ) ); - - vec3 r = mix( - fs( vec3( 4.7, 3.2, 4.3 ) + floor( ifsSeed ) ), - fs( vec3( 4.7, 3.2, 4.3 ) + floor( ifsSeed + 1.0 ) ), - fract( ifsSeed ) - ); - vec3 t = vec3( 4.8, 3.8, 4.2 ); - pt = ifs( pt, r, 0.2 * t ); - pt = ifs( pt, r.yzx, 0.1 * t.yzx ); - - float d = max( box( pt, vec3( 0.09 ) ), clampbox ); - - return d; -} - -vec3 normalFunc( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - map( p + d.yxx ) - map( p - d.yxx ), - map( p + d.xyx ) - map( p - d.xyx ), - map( p + d.xxy ) - map( p - d.xxy ) - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - float isect; - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - isect = map( rayPos ); - rayLen += 0.8 * isect; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( isect ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < isect ) { - discard; - } - - vec3 modelNormal = normalize( normalMatrix * vec4( normalFunc( rayPos, 1E-3 ), 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - - fragColor = vec4( vec3( 0.2 ), 1.0 ); - fragWTF = vec4( vec3( 0.6, 0.8, 0.0 ), 2 ); - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/shaders/ifs-piston.frag b/src/shaders/ifs-piston.frag deleted file mode 100644 index ca56bc1..0000000 --- a/src/shaders/ifs-piston.frag +++ /dev/null @@ -1,227 +0,0 @@ -#version 300 es - -precision highp float; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const int MARCH_ITER = 90; -const float PI = 3.14159265; -const float TAU = PI * 2.0; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform float time; -uniform float ifsSeed; -uniform vec2 resolution; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; -uniform sampler2D samplerRandom; -uniform sampler2D samplerRandomStatic; -uniform sampler2D samplerCapture; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -// https://www.iquilezles.org/www/articles/smin/smin.htm -float smin( float a, float b, float k ) { - float h = max( k - abs( a - b ), 0.0 ) / k; - return min( a, b ) - h * h * h * k * ( 1.0 / 6.0 ); -} - -mat2 rot2d( float t ) { - float c = cos( t ); - float s = sin( t ); - return mat2( c, -s, s, c ); -} - -#pragma glslify: orthBasis = require( ./modules/orthBasis ); -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -vec3 ifs( vec3 p, vec3 r, vec3 t ) { - vec3 s = t; - mat3 bas = orthBasis( r ); - - for ( int i = 0; i < 5; i ++ ) { - p = abs( p ) - abs( s ) * pow( 1.8, -float( i ) ); - - s = bas * s; - - p.xy = p.x < p.y ? p.yx : p.xy; - p.yz = p.y < p.z ? p.zy : p.yz; - } - - return p; -} - -float box( vec3 p, vec3 s ) { - vec3 d = abs( p ) - s; - return min( 0.0, max( d.x, max( d.y, d.z ) ) ) + length( max( vec3( 0.0 ), d ) ); -} - -vec4 map( vec3 p ) { - vec4 isect; - - { - vec3 pt = p; - - float clampbox = box( pt, vec3( 1.0, 10.0, 1.0 ) ); - - pt.y += 10.0; - - vec3 r = mix( - fs( vec3( 4.7, 3.2, 4.3 ) + floor( ifsSeed ) ), - fs( vec3( 4.7, 3.2, 4.3 ) + floor( ifsSeed + 1.0 ) ), - fract( ifsSeed ) - ); - vec3 t = 0.1 * vec3( 4.2, 3.5, 2.2 ); - pt = ifs( pt, r, t ); - - pt = mod( pt - 0.1, 0.2 ) - 0.1; - - float d = max( box( pt, vec3( 0.05 ) ), clampbox ); - - isect = vec4( d, 2, 0, 0 ); - } - - { - vec3 pt = p; - - float clampbox = box( pt, vec3( 1.0, 10.0, 1.0 ) - 0.03 ); - - pt.y += 10.0; - - vec3 r = mix( - fs( vec3( 5.3, 1.9, 3.9 ) + floor( ifsSeed ) ), - fs( vec3( 5.3, 1.9, 3.9 ) + floor( ifsSeed + 1.0 ) ), - fract( ifsSeed ) - ); - vec3 t = 0.2 * vec3( 3.0, 2.3, 3.5 ); - pt = ifs( pt, r, t ); - - pt = mod( pt - 0.1, 0.2 ) - 0.1; - - float d = max( box( pt, vec3( 0.07 ) ), clampbox ); - - float gorge = step( 0.0, 0.005 - abs( pt.x ) ); - - vec4 isectb = vec4( d, 1.0 + 2.0 * gorge, 0, 0 ); - isect = isectb.x < isect.x ? isectb : isect; - } - - { - vec3 pt = abs( p ); - - float d = box( pt - vec3( 1.0, 0.0, 1.0 ), vec3( 0.02, 10.0, 0.02 ) ); - - vec4 isectb = vec4( d, 4, 0, 0 ); - isect = isectb.x < isect.x ? isectb : isect; - } - - return isect; -} - -vec3 normalFunc( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - map( p + d.yxx ).x - map( p - d.yxx ).x, - map( p + d.xyx ).x - map( p - d.xyx ).x, - map( p + d.xxy ).x - map( p - d.xxy ).x - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - vec4 isect; - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - isect = map( rayPos ); - rayLen += 0.5 * isect.x; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( isect.x ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < isect.x ) { - discard; - } - - vec3 modelNormal = normalize( normalMatrix * vec4( normalFunc( rayPos, 1E-3 ), 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - - if ( isect.y < 2.5 ) { - vec3 noise = cyclicNoise( 3.0 * rayPos ); - vec3 noiseDetail = cyclicNoise( vec3( 38.0, 1.0, 1.0 ) * ( orthBasis( vec3( 1 ) ) * rayPos ) ); - - if ( isect.y == 1.0 ) { - float roughness = ( - 0.6 + - 0.1 * noise.x + - 0.2 * smoothstep( -0.2, 0.4, noise.y ) * ( 0.8 + 0.2 * sin( 17.0 * noiseDetail.x ) ) - ); - - fragColor = vec4( vec3( 0.1 ), 1.0 ); - fragWTF = vec4( vec3( roughness, 0.9, 0.0 ), 2 ); - } else { - float roughness = ( - 0.2 + - 0.2 * ( 0.5 + 0.5 * sin( 17.0 * noiseDetail.x ) ) - ); - - fragColor = vec4( vec3( 0.3 ), 1.0 ); - fragWTF = vec4( vec3( roughness, 0.1, 0.0 ), 2 ); - } - } else if ( isect.y == 3.0 ) { - float amp = 20.0 * exp( -5.0 * fract( abs( rayPos.x ) - rayPos.y + abs( rayPos.z ) + time ) ); - - fragColor = vec4( 0.2 * vec3( 1.0, 0.002, 0.03 ), 1.0 ); - fragWTF = vec4( vec3( 0.1, 0.1, amp ), 2 ); - } else if ( isect.y == 4.0 ) { - fragColor = vec4( 0.2 * vec3( 1.0, 0.002, 0.03 ), 1.0 ); - fragWTF = vec4( vec3( 0.1, 0.1, 20.0 ), 2 ); - } - - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/shaders/inspector.frag b/src/shaders/inspector.frag deleted file mode 100644 index 2d410f7..0000000 --- a/src/shaders/inspector.frag +++ /dev/null @@ -1,122 +0,0 @@ -#version 300 es - -precision highp float; - -const float RADIUS = 40.0; -const vec3 CIRCLE_COLOR = vec3( 1.0, 1.0, 1.0 ); - -in vec2 vUv; - -out vec4 fragColor; - -uniform vec2 resolution; -uniform vec2 mouse; -uniform sampler2D sampler0; - -bool print( in vec2 _coord, float _in ) { - vec2 coord = _coord; - - // vertical restriction - if ( coord.y <= 0.0 || 5.0 <= coord.y ) { return false; } - - // dot - if ( 0.0 < coord.x && coord.x < 2.0 ) { - return coord.x < 1.0 && coord.y < 1.0; - } - - // padded by dot - if ( 2.0 < coord.x ) { coord.x -= 2.0; } - - // determine digit - float ci = floor( coord.x / 5.0 ) + 1.0; - - // too low / too high - if ( 4.0 < ci ) { return false; } - if ( ci < -4.0 ) { return false; } - - // x of char - float cfx = floor( mod( coord.x, 5.0 ) ); - - // width is 4 - if ( 4.0 == cfx ) { return false; } - - // y of char - float cfy = floor( coord.y ); - - // bit of char - float cf = cfx + 4.0 * cfy; - - // determine char - float num = 0.0; - if ( 0.0 < ci ) { - float n = abs( _in ); - for ( int i = 0; i < 6; i ++ ) { - if ( ci < float( i ) ) { break; } - - num = mod( floor( n ), 10.0 ); - n -= num; - n *= 10.0; - } - } else { - float n = abs( _in ); - for ( int i = 0; i < 6; i ++ ) { - if ( -ci < float( i ) ) { break; } - - if ( ci != 0.0 && n < 1.0 ) { - // minus - return float( i ) == -ci && _in < 0.0 && cfy == 2.0 && 0.0 < cfx; - } - num = mod( floor( n ), 10.0 ); - n -= num; - n /= 10.0; - } - } - - bool a; - a = 1.0 == mod( floor( ( - num == 0.0 ? 432534.0 : - num == 1.0 ? 410692.0 : - num == 2.0 ? 493087.0 : - num == 3.0 ? 493191.0 : - num == 4.0 ? 630408.0 : - num == 5.0 ? 989063.0 : - num == 6.0 ? 399254.0 : - num == 7.0 ? 1016898.0 : - num == 8.0 ? 431766.0 : - 433798.0 - ) / pow( 2.0, cf ) ), 2.0 ); - - return a ? true : false; -} - -void main() { - vec2 uv = vUv; - vec2 coord = vUv * resolution; - - vec2 center = floor( mouse * resolution + vec2( 1.0, 0.7 ) * RADIUS ); - float circle = length( coord.xy - center ) - RADIUS; - - vec4 col = texture( sampler0, uv ); - vec4 mcol = texture( sampler0, mouse ); - float mcolb = dot( mcol.rgb, vec3( 0.299, 0.587, 0.114 ) ); - vec4 bcol = vec4( vec3( step( mcolb, 0.5 ) ), 1.0 ); - - col = mix( - col, - mix( - bcol, - mcol, - smoothstep( 1.0, 0.0, circle + 5.0 ) - ), - smoothstep( 1.0, 0.0, circle ) - ); - - if ( circle < 0.0 ) { - col = print( coord.xy - center - vec2( 0.0, 8.0 ), mcol.x ) ? bcol : col; - col = print( coord.xy - center - vec2( 0.0, 0.0 ), mcol.y ) ? bcol : col; - col = print( coord.xy - center - vec2( 0.0, -8.0 ), mcol.z ) ? bcol : col; - col = print( coord.xy - center - vec2( 0.0, -16.0 ), mcol.w ) ? bcol : col; - } - - fragColor = col; -} diff --git a/src/shaders/light-shaft.frag b/src/shaders/light-shaft.frag deleted file mode 100644 index 5cd8dd6..0000000 --- a/src/shaders/light-shaft.frag +++ /dev/null @@ -1,106 +0,0 @@ -#version 300 es - -precision highp float; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const int MARCH_ITER = 20; -const float INV_MARCH_ITER = 1.0 / float( MARCH_ITER ); -const float PI = 3.14159265; -const float TAU = PI * 2.0; - -in float vFrustumZ; -in vec4 vPosition; - -out vec4 fragColor; - -uniform float time; -uniform float intensity; -uniform vec2 lightNearFar; -uniform vec2 resolution; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform vec3 lightColor; -uniform vec3 lightPos; -uniform mat4 lightPV; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform sampler2D samplerDeferred0; -uniform sampler2D samplerRandom; -uniform sampler2D samplerShadow; - -float cameraDepth; - -#pragma glslify: prng = require( ./-prng ); - -float map( vec3 p ) { - float l = length( p - lightPos ); - float tooNear = smoothstep( 0.0, 0.1, l ); - - vec4 lightProj = lightPV * vec4( p, 1.0 ); - vec3 lightP = lightProj.xyz / lightProj.w; - - if ( lightP.z < 0.0 || 1.0 < lightP.z ) { - return 0.0; - } - - float depth = linearstep( - lightNearFar.x, - lightNearFar.y, - l - ); - - vec4 tex = texture( samplerShadow, 0.5 + 0.5 * lightP.xy ); - - float variance = saturate( tex.y - tex.x * tex.x ); - float md = depth - tex.x; - - float softShadow = md < 0.0 ? 1.0 : linearstep( 0.2, 1.0, variance / ( variance + md * md ) ); - - // spot - float spot = smoothstep( 1.0, 0.5, length( lightP.xy ) ); - - return tooNear * softShadow * spot * 1.0 / l / l; -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - vec4 seed = texture( samplerRandom, p ); - prng( seed ); - - vec4 texDeferred0 = texture( samplerDeferred0, gl_FragCoord.xy / resolution.xy ); - cameraDepth = 2.0 * texDeferred0.w - 1.0; - - vec3 rayOri = cameraPos; - vec3 rayDir = normalize( vPosition.xyz - rayOri ); - float rayLen = gl_FrontFacing - ? 1E-2 - : length( vPosition.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - - // this is terrible - // There definitely are better ways to do this - float stepLen = gl_FrontFacing - ? 1.0 - : 0.1; - - float accum = 0.0; - float isect; - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - isect = map( rayPos ); - accum += isect * INV_MARCH_ITER; - rayLen += stepLen * ( 0.5 + 0.5 * prng( seed ) ); - rayPos = rayOri + rayDir * rayLen; - - // kill me - vec4 pt = projectionMatrix * viewMatrix * vec4( rayPos, 1.0 ); - float depth = pt.z / pt.w; - if ( depth > cameraDepth ) { - break; - } - } - - fragColor = vec4( intensity * lightColor * accum, 1.0 ); -} diff --git a/src/shaders/light-shaft.vert b/src/shaders/light-shaft.vert deleted file mode 100644 index 9fd363f..0000000 --- a/src/shaders/light-shaft.vert +++ /dev/null @@ -1,33 +0,0 @@ -#version 300 es - -const float PI = 3.14159265; - -layout (location = 0) in vec3 position; - -out float vFrustumZ; -out vec4 vPosition; - -uniform float lightFov; -uniform vec2 lightNearFar; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; - -// ------ - -void main() { - float vFrustumZ = 0.5 + 0.5 * position.z; - - vec3 pos = mix( - vec3( position.xy * lightNearFar.x * tan( lightFov / 360.0 * PI ), -lightNearFar.x ), - vec3( position.xy * lightNearFar.y * tan( lightFov / 360.0 * PI ), -lightNearFar.y ), - vFrustumZ - ); - - vPosition = modelMatrix * vec4( pos, 1.0 ); - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; -} diff --git a/src/shaders/modules/brdfLambert.glsl b/src/shaders/modules/brdfLambert.glsl deleted file mode 100644 index db5b212..0000000 --- a/src/shaders/modules/brdfLambert.glsl +++ /dev/null @@ -1,14 +0,0 @@ -// Ref: https://github.com/KhronosGroup/glTF-Sample-Viewer/blob/38b88e365728d7b2e28a78a57d84be2675fdb70d/source/Renderer/shaders/brdf.glsl - -const float PI = 3.14159265; -const vec3 DIELECTRIC_SPECULAR = vec3( 0.04 ); -const vec3 ONE_SUB_DIELECTRIC_SPECULAR = 1.0 - DIELECTRIC_SPECULAR; - -vec3 brdfLambert( vec3 f0, vec3 albedo, float VdotH ) { - // F_Schlick - vec3 F = f0 + ( 1.0 - f0 ) * pow( max( 0.0, 1.0 - VdotH ), 5.0 ); - - return ( 1.0 - F ) * albedo / PI; -} - -#pragma glslify: export(brdfLambert) diff --git a/src/shaders/modules/brdfSpecularGGX.glsl b/src/shaders/modules/brdfSpecularGGX.glsl deleted file mode 100644 index 96b8e8a..0000000 --- a/src/shaders/modules/brdfSpecularGGX.glsl +++ /dev/null @@ -1,26 +0,0 @@ -// Ref: https://github.com/KhronosGroup/glTF-Sample-Viewer/blob/38b88e365728d7b2e28a78a57d84be2675fdb70d/source/Renderer/shaders/brdf.glsl - -const float PI = 3.14159265; -const vec3 DIELECTRIC_SPECULAR = vec3( 0.04 ); - -vec3 brdfSpecularGGX( vec3 f0, float roughness, float VdotH, float NdotL, float NdotV, float NdotH ) { - // F_Schlick - vec3 F = f0 + ( 1.0 - f0 ) * pow( max( 0.0, 1.0 - VdotH ), 5.0 ); - - // V_GGX - float roughnessSq = roughness * roughness; - - float GGXV = NdotL * sqrt( NdotV * NdotV * ( 1.0 - roughnessSq ) + roughnessSq ); - float GGXL = NdotV * sqrt( NdotL * NdotL * ( 1.0 - roughnessSq ) + roughnessSq ); - - float GGX = GGXV + GGXL; - float Vis = ( 0.0 < GGX ) ? ( 0.5 / GGX ) : 0.0; - - // D_GGX - float f = ( NdotH * NdotH ) * ( roughnessSq - 1.0 ) + 1.0; - float D = roughnessSq / ( PI * f * f ); - - return F * Vis * D; -} - -#pragma glslify: export(brdfSpecularGGX) diff --git a/src/shaders/modules/cyclicNoise.glsl b/src/shaders/modules/cyclicNoise.glsl deleted file mode 100644 index 13ac8b0..0000000 --- a/src/shaders/modules/cyclicNoise.glsl +++ /dev/null @@ -1,20 +0,0 @@ -#pragma glslify: orthBasis = require( ./orthBasis ); - -vec3 cyclicNoise( vec3 p ) { - vec3 sum = vec3( 0.0 ); - float amp = 0.5; - float warp = 1.1; - mat3 rot = orthBasis( vec3( 0.8,-.5,-.2 ) ); - - for ( int i = 0; i < 8; i ++ ) { - p *= rot * 2.0; - p += sin( p.zxy * warp ); - sum += sin( cross( cos( p ), sin( p.yzx ) ) ) * amp; - amp *= 0.5; - warp *= 1.3; - } - - return sum; -} - -#pragma glslify: export(cyclicNoise) diff --git a/src/shaders/modules/doAnalyticLighting.glsl b/src/shaders/modules/doAnalyticLighting.glsl deleted file mode 100644 index b9f747f..0000000 --- a/src/shaders/modules/doAnalyticLighting.glsl +++ /dev/null @@ -1,38 +0,0 @@ -const float PI = 3.14159265359; -const float EPSILON = 1E-3; -const vec3 DIELECTRIC_SPECULAR = vec3( 0.04 ); -const vec3 ONE_SUB_DIELECTRIC_SPECULAR = 1.0 - DIELECTRIC_SPECULAR; - -#pragma glslify: brdfLambert = require( ./brdfLambert.glsl ); -#pragma glslify: brdfSpecularGGX = require( ./brdfSpecularGGX.glsl ); - -vec3 doAnalyticLighting( - vec3 V, - vec3 L, // MUST NOT be normalized - vec3 N, - vec3 color, - float roughness, - float metallic -) { - vec3 albedo = mix( color * ONE_SUB_DIELECTRIC_SPECULAR, vec3( 0.0 ), metallic ); - vec3 f0 = mix( DIELECTRIC_SPECULAR, color, metallic ); - - V = normalize( V ); - float lenL = length( L ); - L = normalize( L ); - vec3 H = normalize( V + L ); - - float NdotL = clamp( dot( N, L ), EPSILON, 1.0 ); - float NdotH = clamp( dot( N, H ), EPSILON, 1.0 ); - float VdotH = clamp( dot( V, H ), EPSILON, 1.0 ); - float NdotV = clamp( dot( N, V ), EPSILON, 1.0 ); - - float decayL = 1.0 / ( lenL * lenL ); - - vec3 diffuse = brdfLambert( f0, albedo, VdotH ); - vec3 spec = brdfSpecularGGX( f0, roughness, VdotH, NdotL, NdotV, NdotH ); - - return PI * decayL * NdotL * ( diffuse + spec ); -} - -#pragma glslify: export(doAnalyticLighting) diff --git a/src/shaders/modules/doShadowMapping.glsl b/src/shaders/modules/doShadowMapping.glsl deleted file mode 100644 index 7ed9a36..0000000 --- a/src/shaders/modules/doShadowMapping.glsl +++ /dev/null @@ -1,40 +0,0 @@ -const float PI = 3.14159265359; -const float EPSILON = 1E-3; - -float doShadowMapping( - vec3 L, // MUST NOT be normalized - vec3 N, // have to be normalized - vec4 tex, - vec2 lightP, // lightPV * vec4( isect.position, 1.0 ), then its xy / w - vec2 lightNearFar, - float spotness -) { - float depth = clamp( ( length( L ) - lightNearFar.x ) / ( lightNearFar.y - lightNearFar.x ), 0.0, 1.0 ); // linearstep - - L = normalize( L ); - float NdotL = clamp( dot( N, L ), EPSILON, 1.0 ); - - float shadow = mix( - 1.0, - smoothstep( 1.0, 0.5, length( lightP ) ), - spotness - ); - - float bias = 0.0001 + 0.0001 * ( 1.0 - NdotL ); - depth -= bias; - - float variance = clamp( tex.y - tex.x * tex.x, 0.0, 1.0 ); - float md = depth - tex.x; - float p = variance / ( variance + md * md ); - p = clamp( ( p - 0.2 ) / 0.8, 0.0, 1.0 ); // linearstep - - shadow *= mix( - md < 0.0 ? 1.0 : p, - 1.0, - smoothstep( 0.8, 1.0, max( abs( lightP.x ), abs( lightP.y ) ) ) // edgeclip - ); - - return shadow; -} - -#pragma glslify: export(doShadowMapping) diff --git a/src/shaders/modules/fractSin.glsl b/src/shaders/modules/fractSin.glsl deleted file mode 100644 index 601fa53..0000000 --- a/src/shaders/modules/fractSin.glsl +++ /dev/null @@ -1,5 +0,0 @@ -float fractSin( float s ) { - return fract( sin( s * 114.514 ) * 1919.810 ); -} - -#pragma glslify: export(fractSin) diff --git a/src/shaders/modules/importanceSampleGGX.glsl b/src/shaders/modules/importanceSampleGGX.glsl deleted file mode 100644 index 5fdb252..0000000 --- a/src/shaders/modules/importanceSampleGGX.glsl +++ /dev/null @@ -1,30 +0,0 @@ -// Ref: https://learnopengl.com/PBR/IBL/Specular-IBL - -const float TAU = 6.28318530718; - -vec3 importanceSampleGGX( vec2 Xi, float roughness, vec3 N ) { - float a = roughness * roughness; - - float phi = TAU * Xi.x; - float cosTheta = roughness > 1.0 // use lambert ??? - ? cos( asin( sqrt( Xi.y ) ) ) - : sqrt( ( 1.0 - Xi.y ) / ( 1.0 + ( a * a - 1.0 ) * Xi.y ) ); - float sinTheta = sqrt( 1.0 - cosTheta * cosTheta ); - - // from spherical coordinates to cartesian coordinates - vec3 H = vec3( - cos( phi ) * sinTheta, - sin( phi ) * sinTheta, - cosTheta - ); - - // from tangent-space vector to world-space sample vector - vec3 up = abs( N.y ) < 0.999 ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); - vec3 tangent = normalize( cross( up, N ) ); - vec3 bitangent = cross( N, tangent ); - - vec3 sampleVec = tangent * H.x + bitangent * H.y + N * H.z; - return normalize( sampleVec ); -} - -#pragma glslify: export(importanceSampleGGX) diff --git a/src/shaders/modules/orthBasis.glsl b/src/shaders/modules/orthBasis.glsl deleted file mode 100644 index f6dccbc..0000000 --- a/src/shaders/modules/orthBasis.glsl +++ /dev/null @@ -1,9 +0,0 @@ -mat3 orthBasis( vec3 z ) { - z = normalize( z ); - vec3 up = abs( z.y ) > 0.999 ? vec3( 0.0, 0.0, 1.0 ) : vec3( 0.0, 1.0, 0.0 ); - vec3 x = normalize( cross( up, z ) ); - vec3 y = cross( z, x ); - return mat3( x, y, z ); -} - -#pragma glslify: export(orthBasis) diff --git a/src/shaders/modules/uniformHemisphere.glsl b/src/shaders/modules/uniformHemisphere.glsl deleted file mode 100644 index b1f3e0e..0000000 --- a/src/shaders/modules/uniformHemisphere.glsl +++ /dev/null @@ -1,8 +0,0 @@ -#pragma glslify: uniformSphere = require( ./uniformSphere ); - -vec3 uniformHemisphere( vec2 Xi, vec3 n ) { - vec3 d = uniformSphere( Xi ); - return dot( n, d ) < 0.0 ? -d : d; -} - -#pragma glslify: export(uniformHemisphere) diff --git a/src/shaders/modules/uniformSphere.glsl b/src/shaders/modules/uniformSphere.glsl deleted file mode 100644 index 495ca92..0000000 --- a/src/shaders/modules/uniformSphere.glsl +++ /dev/null @@ -1,7 +0,0 @@ -vec3 uniformSphere( vec2 Xi ) { - float p = 2.0 * PI * Xi.x; - float t = acos( 1.0 - 2.0 * Xi.y ); - return vec3( cos( p ) * sin( t ), cos( t ), sin( p ) * sin( t ) ); -} - -#pragma glslify: export(uniformSphere) diff --git a/src/shaders/noise-voxels.frag b/src/shaders/noise-voxels.frag deleted file mode 100644 index 9e3e3b8..0000000 --- a/src/shaders/noise-voxels.frag +++ /dev/null @@ -1,29 +0,0 @@ -#version 300 es - -precision highp float; - -in vec3 vNormal; -in vec3 vPositionForNoise; -in vec4 vPosition; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -uniform float time; - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -void main() { - float roughness = 0.6 + 0.1 * cyclicNoise( 1.0 * vPositionForNoise.xyz ).x; - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( normalize( vNormal ), 1.0 ); - fragColor = vec4( vec3( 0.1, 0.1, 0.12 ), 1.0 ); - fragWTF = vec4( vec3( roughness, 0.77, 0.0 ), 2 ); - #endif -} diff --git a/src/shaders/noise-voxels.vert b/src/shaders/noise-voxels.vert deleted file mode 100644 index 8c60faa..0000000 --- a/src/shaders/noise-voxels.vert +++ /dev/null @@ -1,41 +0,0 @@ -#version 300 es - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; -layout (location = 2) in vec3 instancePos; - -out vec3 vNormal; -out vec3 vPositionForNoise; -out vec4 vPosition; - -uniform float phase; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -#pragma glslify: noise = require( ./-simplex4d ); - -void main() { - vNormal = normalize( ( normalMatrix * vec4( normal, 1.0 ) ).xyz ); - - float good = clamp( - 0.5 + noise( vec4( 0.3 * instancePos, phase ) ), - 0.0, - 1.0 - ); - vPosition = vec4( good * position / 8.0, 1.0 ); - vPosition.xyz += mix( vec3( -1.0 ), vec3( 1.0 ), instancePos / 7.0 ); - vPosition = modelMatrix * vPosition; - - vPositionForNoise = position + 2.0 * instancePos; - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/nop.frag b/src/shaders/nop.frag deleted file mode 100644 index 130c64b..0000000 --- a/src/shaders/nop.frag +++ /dev/null @@ -1,13 +0,0 @@ -#version 300 es - -precision highp float; - -in vec2 vUv; - -out vec4 fragColor; - -uniform sampler2D sampler0; - -void main() { - fragColor = texture( sampler0, vUv ); -} diff --git a/src/shaders/normal.frag b/src/shaders/normal.frag deleted file mode 100644 index 69f71da..0000000 --- a/src/shaders/normal.frag +++ /dev/null @@ -1,23 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_UNLIT = 1; - -in float vLife; -in vec4 vPosition; -in vec3 vNormal; - -layout (location = 0) out vec4 fragPosition; -layout (location = 1) out vec4 fragNormal; -layout (location = 2) out vec4 fragColor; -layout (location = 3) out vec4 fragWTF; - -uniform float time; - -void main() { - fragPosition = vPosition; - fragNormal = vec4( vNormal, 1.0 ); - fragColor = vec4( 0.5 + 0.5 * vNormal, 1.0 ); - fragWTF = vec4( vec3( 0.0, 0.0, 0.0 ), MTL_UNLIT ); -} diff --git a/src/shaders/object-inflate.vert b/src/shaders/object-inflate.vert deleted file mode 100644 index 1c64a62..0000000 --- a/src/shaders/object-inflate.vert +++ /dev/null @@ -1,27 +0,0 @@ -#version 300 es - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; - -out vec4 vPosition; -out vec3 vNormal; - -uniform float inflate; -uniform vec3 scale; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -// ------ - -void main() { - vNormal = normalize( ( normalMatrix * vec4( normal, 1.0 ) ).xyz ); - - vPosition = modelMatrix * vec4( scale * position + inflate * normal, 1.0 ); - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; -} diff --git a/src/shaders/object.vert b/src/shaders/object.vert deleted file mode 100644 index d2f93c7..0000000 --- a/src/shaders/object.vert +++ /dev/null @@ -1,25 +0,0 @@ -#version 300 es - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; - -out vec4 vPosition; -out vec3 vNormal; - -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -// ------ - -void main() { - vNormal = normalize( ( normalMatrix * vec4( normal, 1.0 ) ).xyz ); - - vPosition = modelMatrix * vec4( position, 1.0 ); - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; -} diff --git a/src/shaders/phantom.frag b/src/shaders/phantom.frag deleted file mode 100644 index 9161c6e..0000000 --- a/src/shaders/phantom.frag +++ /dev/null @@ -1,99 +0,0 @@ -#version 300 es - -precision highp float; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const int MARCH_ITER = 20; -const float INV_MARCH_ITER = 1.0 / float( MARCH_ITER ); -const float PI = 3.14159265; -const float TAU = PI * 2.0; - -out vec4 fragColor; - -uniform float time; -uniform float amp; -uniform vec2 resolution; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; -uniform sampler2D samplerDeferred0; -uniform sampler2D samplerRandom; -uniform sampler2D samplerShadow; - -float cameraDepth; - -#pragma glslify: prng = require( ./-prng ); -#pragma glslify: orthBasis = require( ./modules/orthBasis ); - -mat2 r2d( float t ) { - return mat2( cos( t ), sin( t ), -sin( t ), cos( t ) ); -} - -vec3 cyclicNoise( vec3 p, vec3 b ) { - vec3 sum = vec3( 0.0 ); - float amp = 0.5; - float warp = 1.3; - mat3 rot = orthBasis( b ); - - for ( int i = 0; i < 8; i ++ ) { - p *= rot * 2.0; - p += sin( p.zxy * warp ); - sum += sin( cross( cos( p ), sin( p.yzx ) ) ) * amp; - amp *= 0.5; - warp *= 1.3; - } - - return sum; -} - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -float map( vec3 p ) { - p.zx = r2d( 0.2 * p.y ) * p.zx; - vec3 b = vec3( sin( 0.3 * time ), 0.2, cos( 0.3 * time ) ); - float d = cyclicNoise( 0.1 * p, b ).x; - // d += max( d, 5.0 - length( p ) ); - return d; -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - vec4 seed = texture( samplerRandom, p ); - prng( seed ); - - vec4 texDeferred0 = texture( samplerDeferred0, gl_FragCoord.xy / resolution.xy ); - cameraDepth = 2.0 * texDeferred0.w - 1.0; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = 1E-2; - vec3 rayPos = rayOri + rayDir * rayLen; - - float accum = 0.0; - float isect; - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - isect = map( rayPos ); - accum += exp( -10.0 * abs( isect ) ) * INV_MARCH_ITER; - rayLen += max( prng( seed ) * 0.1, abs( isect ) ); - rayPos = rayOri + rayDir * rayLen; - - // kill me - vec4 pt = projectionMatrix * viewMatrix * vec4( rayPos, 1.0 ); - float depth = pt.z / pt.w; - if ( depth > cameraDepth ) { - break; - } - } - - float flicker = step( 0.5, fract( 30.0 * time ) ); - vec3 col = 0.3 + 0.3 * sin( 3.5 + 1.0 * accum + vec3( 0.0, 2.0, 4.0 ) ); - col *= amp * ( 0.5 + 0.1 * flicker ) * accum; - - fragColor = vec4( col, 1.0 ); -} diff --git a/src/shaders/pixel-sorter-index.frag b/src/shaders/pixel-sorter-index.frag deleted file mode 100644 index e0972f3..0000000 --- a/src/shaders/pixel-sorter-index.frag +++ /dev/null @@ -1,41 +0,0 @@ -#version 300 es - -precision highp float; - -const vec3 RGB = vec3( 0.299, 0.587, 0.114 ); - -in vec2 vUv; - -out vec4 fragColor; - -uniform float threshold; -uniform float mul; -uniform vec2 resolution; -uniform sampler2D sampler0; -uniform sampler2D sampler1; - -vec2 getValue( vec2 uv ) { - // distance to the nearest wall, width of its current section, vec2( left, right ) - return ( ( uv.x < 0.0 ) || ( 1.0 < uv.x ) ) - ? vec2( 0.0 ) - : ( mul == 1.0 ) - ? vec2( 1E9 * step( dot( texture( sampler0, uv ).xyz, RGB ), threshold ) ) - : texture( sampler1, uv ).xy; -} - -void main() { - vec2 uv = vUv; - - vec4 tex = vec4( texture( sampler0, uv ).xyz, 1.0 ); - fragColor = vec4( getValue( uv ), 0.0, 1.0 ); - - for ( int i = 1; i < 8; i ++ ) { - vec2 uvc = uv - vec2( i, 0 ) / resolution * mul; - float texc = getValue( uvc ).x; - fragColor.x = min( fragColor.x, texc + mul * float( i ) ); - - uvc = uv + vec2( i, 0 ) / resolution * mul; - texc = getValue( uvc ).y; - fragColor.y = min( fragColor.y, texc + mul * float( i ) ); - } -} diff --git a/src/shaders/pixel-sorter.frag b/src/shaders/pixel-sorter.frag deleted file mode 100644 index 642e353..0000000 --- a/src/shaders/pixel-sorter.frag +++ /dev/null @@ -1,59 +0,0 @@ -#version 300 es - -precision highp float; - -#define lofi(i,m) (floor((i)/(m))*(m)) - -const vec3 RGB = vec3( 0.299, 0.587, 0.114 ); - -in vec2 vUv; - -out vec4 fragColor; - -uniform bool reverse; -uniform float dir; -uniform float comp; -uniform vec2 resolution; -uniform sampler2D sampler0; -uniform sampler2D sampler1; - -float positiveOrHuge( float i ) { - return 0.0 < i ? i : 1E9; -} - -// not accurate! it's just for aesthetics -void main() { - vec2 uv = vUv; - - fragColor = texture( sampler0, uv ); - vec4 texIndex = texture( sampler1, uv ); - - if ( texIndex.x < 0.5 ) { - return; - } - - float index = ( reverse ? texIndex.y : texIndex.x ) - 1.0; - float width = texIndex.x + texIndex.y - 2.0; - - bool isCompHigher = mod( index, 2.0 * comp * width ) < comp * width; - float offset = floor( ( ( isCompHigher ^^ reverse ) ? comp : -comp ) * width + 0.5 ); - - vec2 uvc = uv; - uvc.x += offset / resolution.x; - vec4 cColor = texture( sampler0, uvc ); - vec4 cClamp = texture( sampler1, uvc ); - - if ( uvc.x < 0.0 || 1.0 < uvc.x ) { - return; - } - - float vp = dot( fragColor.xyz, RGB ); - float vc = dot( cColor.xyz, RGB ); - - bool shouldSwap = mod( index / ( 2.0 * dir * width ), 2.0 ) < 1.0; - shouldSwap = shouldSwap ^^ isCompHigher; - shouldSwap = shouldSwap ^^ ( vc < vp ); - if ( shouldSwap ) { - fragColor = cColor; - } -} diff --git a/src/shaders/post.frag b/src/shaders/post.frag deleted file mode 100644 index 02f9372..0000000 --- a/src/shaders/post.frag +++ /dev/null @@ -1,106 +0,0 @@ -#version 300 es - -precision highp float; - -const int BARREL_ITER = 10; -const float BARREL_OFFSET = 0.05; -const float BARREL_AMP = 0.05; -const float HUGE = 9E16; -const float PI = 3.14159265; -const vec3 LUMA = vec3( 0.2126, 0.7152, 0.0722 ); - -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) -#define lofi(i,m) (floor((i)/(m))*(m)) - -in vec2 vUv; - -out vec4 fragColor; - -uniform float time; -uniform float mosaicAmp; -uniform float mixInvert; -uniform vec2 resolution; -uniform vec4 colorLift; -uniform vec4 colorGamma; -uniform vec4 colorGain; -uniform sampler2D sampler0; -uniform sampler2D samplerRandom; - -#pragma glslify: prng = require( ./-prng ); - -vec3 barrel( float amp, vec2 uv ) { - float corn = length( vec2( 0.5 ) ); - float a = min( 3.0 * sqrt( amp ), corn * PI ); - float zoom = corn / ( tan( corn * a ) + corn ); - vec2 p = saturate( - ( uv + normalize( uv - 0.5 ) * tan( length( uv - 0.5 ) * a ) ) * zoom + - 0.5 * ( 1.0 - zoom ) - ); - return texture( sampler0, vec2( p.x, p.y ) ).xyz; -} - -vec3 aces( vec3 x ) { - return saturate( ( x * ( 0.45 * x + 0.02 ) ) / ( x * ( 0.45 * x + 0.07 ) + 0.2 ) ); -} - -vec3 liftGammaGain( vec3 rgb ) { - vec4 liftt = 1.0 - pow( 1.0 - colorLift, log2( colorGain + 1.0 ) ); - - vec4 gammat = colorGamma.rgba - vec4( 0.0, 0.0, 0.0, dot( LUMA, colorGamma.rgb ) ); - vec4 gammatTemp = 1.0 + 4.0 * abs( gammat ); - gammat = mix( gammatTemp, 1.0 / gammatTemp, step( 0.0, gammat ) ); - - vec3 col = rgb; - float luma = dot( LUMA, col ); - - col = pow( col, gammat.rgb ); - col *= pow( colorGain.rgb, gammat.rgb ); - col = max( mix( 2.0 * liftt.rgb, vec3( 1.0 ), col ), 0.0 ); - - luma = pow( luma, gammat.a ); - luma *= pow( colorGain.a, gammat.a ); - luma = max( mix( 2.0 * liftt.a, 1.0, luma ), 0.0 ); - - col += luma - dot( LUMA, col ); - - return saturate( col ); -} - -void main() { - vec2 uv = vUv; - - float mosaic = mosaicAmp * resolution.y; - if ( mosaic > 1.0 ) { - uv = lofi( uv - 0.5, mosaic / resolution ) + mosaic * 0.5 / resolution + 0.5; - } - - vec2 p = ( uv * resolution * 2.0 - resolution ) / resolution.y; - float vig = 1.0 - length( p ) * 0.2; - - vec3 tex = vec3( 0.0 ); - - for ( int i = 0; i < BARREL_ITER; i ++ ) { - float fi = ( float( i ) + 0.5 ) / float( BARREL_ITER ); - vec3 a = saturate( vec3( - 1.0 - 3.0 * abs( 1.0 / 6.0 - fi ), - 1.0 - 3.0 * abs( 1.0 / 2.0 - fi ), - 1.0 - 3.0 * abs( 5.0 / 6.0 - fi ) - ) ) / float( BARREL_ITER ) * 4.0; - tex += a * barrel( BARREL_OFFSET + BARREL_AMP * fi, uv ); - } - - tex = mix( vec3( 0.0 ), tex, vig ); - - vec3 col = tex.xyz; - vec4 seed = texture( samplerRandom, uv ); - prng( seed ); - prng( seed ); - col = aces( max( 2.0 * col, 0.0 ) ) / aces( vec3( 11.2 ) ); - col += ( pow( prng( seed ), 2.2 ) - 0.25 ) * 0.002; - col = pow( saturate( col ), vec3( 0.4545 ) ); - col = mix( col, 1.0 - 1.0 * col, mixInvert ); - col = liftGammaGain( col ); - - fragColor = vec4( col, 1.0 ); -} diff --git a/src/shaders/psy-field.frag b/src/shaders/psy-field.frag deleted file mode 100644 index 7a0e1f8..0000000 --- a/src/shaders/psy-field.frag +++ /dev/null @@ -1,237 +0,0 @@ -#version 300 es - -precision highp float; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const float PI = 3.14159265; -const float TAU = PI * 2.0; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform int lightCount; -uniform float deformAmp; -uniform float deformFreq; -uniform float deformTime; -uniform float time; -uniform float noiseOffset; -uniform vec2 lightNearFar[ 8 ]; -uniform vec2 resolution; -uniform vec2 size; -uniform vec2 cameraNearFar; -uniform vec3 lightPos[ 8 ]; -uniform vec3 lightColor[ 8 ]; -uniform vec3 cameraPos; -uniform vec4 lightParams[ 8 ]; -uniform mat4 lightPV[ 8 ]; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; -uniform sampler2D samplerRandom; -uniform sampler2D samplerRandomStatic; -uniform sampler2D samplerCapture; -uniform sampler2D samplerShadow[ 8 ]; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -#pragma glslify: doAnalyticLighting = require( ./modules/doAnalyticLighting.glsl ); -#pragma glslify: doShadowMapping = require( ./modules/doShadowMapping.glsl ); - -vec4 fetchShadowMap( int iLight, vec2 uv ) { - if ( iLight == 0 ) { - return texture( samplerShadow[ 0 ], uv ); - } else if ( iLight == 1 ) { - return texture( samplerShadow[ 1 ], uv ); - } else if ( iLight == 2 ) { - return texture( samplerShadow[ 2 ], uv ); - } else if ( iLight == 3 ) { - return texture( samplerShadow[ 3 ], uv ); - } else if ( iLight == 4 ) { - return texture( samplerShadow[ 4 ], uv ); - } else if ( iLight == 5 ) { - return texture( samplerShadow[ 5 ], uv ); - } else if ( iLight == 6 ) { - return texture( samplerShadow[ 6 ], uv ); - } else if ( iLight == 7 ) { - return texture( samplerShadow[ 7 ], uv ); - } -} - -#pragma glslify: orthBasis = require( ./modules/orthBasis ); - -vec3 ifs( vec3 p, vec3 r, vec3 t ) { - vec3 s = t; - mat3 bas = orthBasis( r ); - - for ( int i = 0; i < 5; i ++ ) { - p = abs( p ) - abs( s ) * pow( 1.8, -float( i ) ); - - s = bas * s; - - p.xy = p.x < p.y ? p.yx : p.xy; - p.yz = p.y < p.z ? p.zy : p.yz; - } - - return p; -} - -float box( vec3 p, vec3 s ) { - vec3 d = abs( p ) - s; - return min( 0.0, max( d.x, max( d.y, d.z ) ) ) + length( max( vec3( 0.0 ), d ) ); -} - -float map( vec3 p ) { - vec4 isect; - - vec3 pt = p; - pt.z -= 4.0 * time; - pt.zx = mod( pt.zx - 5.0, 10.0 ) - 5.0; - - vec3 r = vec3( 1.6, 0.5, -0.8 ); - vec3 t = vec3( 4.8, 3.7, 2.1 ); - pt = ifs( pt, r, t ); - pt = ifs( pt, r.yzx, 0.4 * t.yzx ); - - float d = box( pt, vec3( 0.14 ) ); - d = max( d, abs( p.y ) - 1.0 ); - - return d; -} - -vec3 nMap( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - map( p + d.yxx ) - map( p - d.yxx ), - map( p + d.xyx ) - map( p - d.xyx ), - map( p + d.xxy ) - map( p - d.xxy ) - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - float dist; - - int MARCH_ITER; - - #ifdef FORWARD - MARCH_ITER = 10; - #endif - - #ifdef DEFERRED - MARCH_ITER = 40; - #endif - - #ifdef DEPTH - MARCH_ITER = 10; - #endif - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - dist = map( rayPos ); - rayLen += 0.5 * dist; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( dist ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < dist ) { - discard; - } - - vec3 normal = nMap( rayPos, 1E-3 ); - vec3 modelNormal = normalize( normalMatrix * vec4( normal, 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef FORWARD - vec3 color = vec3( 0.0 ); - - // for each lights - for ( int iLight = 0; iLight < 8; iLight ++ ) { - if ( iLight >= lightCount ) { break; } - - vec3 V = cameraPos - modelPos.xyz; - vec3 L = lightPos[ iLight ] - modelPos.xyz; - - // shading - vec3 shade = doAnalyticLighting( - V, - L, - modelNormal, - vec3( 0.6, 0.5, 0.4 ), - 0.5, - 0.2 - ) * lightColor[ iLight ]; - - // fetch shadowmap + spot lighting - vec4 lightProj = lightPV[ iLight ] * modelPos; - vec2 lightP = lightProj.xy / lightProj.w; - - shade *= doShadowMapping( - L, - modelNormal, - fetchShadowMap( iLight, 0.5 + 0.5 * lightP ), - lightP, - lightNearFar[ iLight ], - lightParams[ iLight ].x - ); - - color += shade; - } - - vec3 gradient = 0.5 + 0.5 * cos( - 3.0 + 1.5 * exp( -0.4 * max( rayLen - 3.0, 0.0 ) ) + vec3( 0.0, 2.0, 4.0 ) - ); - float edge = step( 0.1, length( normal - nMap( rayPos, 1E-2 ) ) ); - - color += gradient * edge; - - fragColor = vec4( color, 1.0 ); - #endif - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - fragColor = vec4( vec3( 0.0 ), 1.0 ); - fragWTF = vec4( vec3( 1.0, 0.0, 0.0 ), 4 ); - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/shaders/quad.vert b/src/shaders/quad.vert deleted file mode 100644 index 3920910..0000000 --- a/src/shaders/quad.vert +++ /dev/null @@ -1,12 +0,0 @@ -#version 300 es - -layout (location = 0) in vec2 p; - -out vec2 vUv; - -uniform vec4 range; - -void main() { - vUv = 0.5 + 0.5 * p; - gl_Position = vec4( mix( range.xy, range.zw, vUv ), 0.0, 1.0 ); -} diff --git a/src/shaders/racer-compute.frag b/src/shaders/racer-compute.frag deleted file mode 100644 index f3ec1dc..0000000 --- a/src/shaders/racer-compute.frag +++ /dev/null @@ -1,146 +0,0 @@ -#version 300 es - -precision highp float; - -const float PARTICLE_LIFE_LENGTH = 5.0; -const float HUGE = 9E16; -const float INTERVAL = 0.03125; -const float PI = 3.14159265; -const float TAU = 6.283185307; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(i) clamp(i,0.,1.) -#define lofi(i,m) (floor((i)/(m))*(m)) - -layout (location = 0) out vec4 fragCompute0; -layout (location = 1) out vec4 fragCompute1; - -uniform bool init; -uniform bool shouldUpdate; -uniform float time; -uniform float trails; -uniform float trailLength; -uniform float deltaTime; -uniform vec2 resolution; -uniform sampler2D samplerCompute0; -uniform sampler2D samplerCompute1; -uniform sampler2D samplerRandom; - -float fractSin( float i ) { - return fract( sin( i ) * 1846.42 ); -} - -#pragma glslify: prng = require( ./-prng ); -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -vec3 randomSphere( inout vec4 seed ) { - vec3 v; - for ( int i = 0; i < 10; i ++ ) { - v = vec3( - prng( seed ), - prng( seed ), - prng( seed ) - ) * 2.0 - 1.0; - if ( length( v ) < 1.0 ) { break; } - } - return v; -} - -void main() { - vec2 uv = gl_FragCoord.xy / resolution; - - float dt = deltaTime; - - // == if it is not head of particles ============================================================= - if ( 1.0 < gl_FragCoord.x ) { - if ( shouldUpdate ) { - uv.x -= 1.0 / resolution.x; - } - - vec4 tex0 = texture( samplerCompute0, uv ); - vec4 tex1 = texture( samplerCompute1, uv ); - - tex0.z += 4.0 * deltaTime; // camera - if ( shouldUpdate ) { - tex0.w = tex0.w + 1.0 / trailLength; // update the life - } - - // quick patch! - if ( init ) { - tex0.w = 1E9; - } - - fragCompute0 = tex0; - fragCompute1 = tex1; - - return; - } - - // == prepare some vars ========================================================================== - vec4 seed = texture( samplerRandom, uv ); - prng( seed ); - - vec4 tex0 = texture( samplerCompute0, uv ); - vec4 tex1 = texture( samplerCompute1, uv ); - - vec3 pos = tex0.xyz; - float life = tex0.w; - vec3 vel = tex1.xyz; - float jumpFlag = tex1.w; - - float timing = mix( 0.0, PARTICLE_LIFE_LENGTH, floor( uv.y * trails ) / trails ); - timing += lofi( time, PARTICLE_LIFE_LENGTH ); - - if ( time - dt + PARTICLE_LIFE_LENGTH < timing ) { - timing -= PARTICLE_LIFE_LENGTH; - } - - if ( shouldUpdate ) { - // == initialize particles ===================================================================== - if ( - time - dt < timing && timing <= time - ) { - dt = time - timing; - - pos = lofi( 5.0 * randomSphere( seed ), INTERVAL ); - pos.z -= 4.0; - - vel = 1.0 * randomSphere( seed ); - - life = 0.0; - - jumpFlag = 1.0; - } else { - jumpFlag = 0.0; // remove jumping flag - } - - // == update particles ========================================================================= - // noise field - vel += 4.0 * cyclicNoise( pos ) * dt; - - // resistance - // vel *= exp( -10.0 * dt ); - // vel.z += 10.0 * dt; - - vec3 v = vel; - float vmax = max( abs( v.x ), max( abs( v.y ), abs( v.z ) ) ); - v = INTERVAL * sign( v ) * ( - abs( v.x ) == vmax ? vec3( 1.0, 0.0, 0.0 ) : - abs( v.y ) == vmax ? vec3( 0.0, 1.0, 0.0 ) : - vec3( 0.0, 0.0, 1.0 ) - ) / dt; - - pos += v * dt; - life += dt / PARTICLE_LIFE_LENGTH; - } - - pos.z += 4.0 * deltaTime; // camera - - // quick patch! - if ( init ) { - life = 1E9; - } - - fragCompute0 = vec4( pos, life ); - fragCompute1 = vec4( vel, jumpFlag ); -} diff --git a/src/shaders/racer-render.frag b/src/shaders/racer-render.frag deleted file mode 100644 index e792b31..0000000 --- a/src/shaders/racer-render.frag +++ /dev/null @@ -1,55 +0,0 @@ -#version 300 es - -precision highp float; - -in float vLife; -in vec4 vPosition; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -uniform vec3 cameraPos; -uniform vec4 color; - -void main() { - if ( length( gl_PointCoord - 0.5 ) > 0.5 ) { discard; } - - float lenV = length( vPosition.xyz - cameraPos ); - - vec3 gradient = 0.5 + 0.5 * cos( - 3.0 + 1.5 * exp( -0.4 * max( lenV - 3.0, 0.0 ) ) + vec3( 0.0, 2.0, 4.0 ) - ); - - vec3 color = 10.0 * gradient * exp( -5.0 * vLife ); - - // too near! - color *= smoothstep( 0.5, 1.0, lenV ); - - #ifdef FORWARD - #ifndef CUBEMAP - if ( length( color.xyz ) >= 1.0 ) { discard; } - #endif - - // decay - color *= exp( -0.4 * max( lenV - 3.0, 0.0 ) ); - - fragColor.xyz = vec3( color ); - #endif - - #ifdef DEFERRED - if ( length( color.xyz ) < 1.0 ) { discard; } - - fragPosition = vPosition; - fragNormal = vec4( 0.0, 0.0, 1.0, 1.0 ); - fragColor = vec4( color.xyz, 1.0 ); - fragWTF = vec4( vec3( 0.0 ), 1 ); - #endif -} diff --git a/src/shaders/racer-render.vert b/src/shaders/racer-render.vert deleted file mode 100644 index bdb5306..0000000 --- a/src/shaders/racer-render.vert +++ /dev/null @@ -1,46 +0,0 @@ -#version 300 es - -const float PI = 3.14159265; -const float TAU = 6.283185307; -const float COLOR_VAR = 0.1; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -layout (location = 0) in vec2 computeUV; - -out float vLife; -out vec4 vPosition; - -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform sampler2D samplerCompute0; -uniform sampler2D samplerCompute1; - -mat2 rotate2D( float _t ) { - return mat2( cos( _t ), sin( _t ), -sin( _t ), cos( _t ) ); -} - -void main() { - vec2 uv = computeUV; - - vec4 pos = texture( samplerCompute0, uv ); - - vLife = pos.w; - - vPosition = modelMatrix * vec4( pos.xyz, 1.0 ); - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; - - #ifdef CUBEMAP - // ???? - gl_PointSize = 2.0; - #else - gl_PointSize = resolution.y * 0.01 / outPos.z; - #endif -} diff --git a/src/shaders/raymarch-object.vert b/src/shaders/raymarch-object.vert deleted file mode 100644 index 04e3f2c..0000000 --- a/src/shaders/raymarch-object.vert +++ /dev/null @@ -1,22 +0,0 @@ -#version 300 es - -layout (location = 0) in vec3 position; - -out vec4 vPositionWithoutModel; -out vec4 vPosition; - -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; - -// ------ - -void main() { - vPositionWithoutModel = vec4( position, 1.0 ); - vPosition = modelMatrix * vPositionWithoutModel; - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; -} diff --git a/src/shaders/rect-torus.frag b/src/shaders/rect-torus.frag deleted file mode 100644 index dcab252..0000000 --- a/src/shaders/rect-torus.frag +++ /dev/null @@ -1,33 +0,0 @@ -#version 300 es - -#define lofi(i,m) (floor((i)/(m))*(m)) - -precision highp float; - -const int MTL_PBR = 2; - -in vec3 vNormal; -in vec4 vPosition; -in vec4 vPositionWithoutModel; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -uniform float time; - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -void main() { - float rough = 0.2 + 0.2 * cyclicNoise( 4.0 * vPositionWithoutModel.xyz ).x; - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( normalize( vNormal ), 1.0 ); - fragColor = vec4( vec3( 0.1 ), 1.0 ); - fragWTF = vec4( vec3( 0.2 + 0.5 * rough, 0.9, 0.0 ), MTL_PBR ); - #endif -} diff --git a/src/shaders/rect-torus.vert b/src/shaders/rect-torus.vert deleted file mode 100644 index 2b34aaa..0000000 --- a/src/shaders/rect-torus.vert +++ /dev/null @@ -1,43 +0,0 @@ -#version 300 es - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) - -const float PI = 3.14159265; -const float TAU = 6.28318531; - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; -layout (location = 2) in float instanceId; - -out vec3 vNormal; -out vec4 vPositionWithoutModel; -out vec4 vPosition; - -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -mat2 rotate2D( float t ) { - return mat2( cos( t ), sin( t ), -sin( t ), cos( t ) ); -} - -void main() { - mat2 rot = rotate2D( 0.25 * instanceId * TAU ); - - vNormal = normal; - vNormal.zx = rot * vNormal.zx; - vNormal = normalize( ( normalMatrix * vec4( vNormal, 1.0 ) ).xyz ); - - vPositionWithoutModel = vec4( vec3( 3.1, 0.1, 0.1 ) * position + vec3( 0.0, 0.0, 3.0 ), 1.0 ); - vPositionWithoutModel.zx = rot * vPositionWithoutModel.zx; - - vPosition = modelMatrix * vPositionWithoutModel; - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/rings.frag b/src/shaders/rings.frag deleted file mode 100644 index fb674ea..0000000 --- a/src/shaders/rings.frag +++ /dev/null @@ -1,35 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_PBR = 2; - -in float vLife; -in vec4 vPosition; -in vec3 vNormal; - -#ifdef FORWARD - out vec4 fragColor; -#endif - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -uniform float time; - -void main() { - #ifdef FORWARD - fragColor = vec4( 5.0 * vec3( 0.1, 0.4, 1.0 ), 1.0 ); - #endif - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( normalize( vNormal ), 1.0 ); - fragColor = vec4( 0.1, 0.4, 1.0, 1.0 ); - fragWTF = vec4( vec3( 0.2, 0.2, 5.0 ), MTL_PBR ); - #endif -} diff --git a/src/shaders/rings.vert b/src/shaders/rings.vert deleted file mode 100644 index 834e1e9..0000000 --- a/src/shaders/rings.vert +++ /dev/null @@ -1,56 +0,0 @@ -#version 300 es - -const float TAU = 6.283185307; - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; -layout (location = 2) in float instanceId; - -out vec4 vPosition; -out vec3 vNormal; - -uniform float begin; -uniform float time; -uniform vec2 resolution; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; - -float seed; - -mat2 rotate2D( float t ) { - return mat2( cos( t ), sin( t ), -sin( t ), cos( t ) ); -} - -float fs( float s ) { - return fract( sin( s * 114.514 ) * 1919.810 ); -} - -float random() { - seed = fs( seed ); - return seed; -} - -void main() { - seed = instanceId; - - vNormal = normalize( ( normalMatrix * vec4( normal, 1.0 ) ).xyz ); - - float radius = mix( 2.0, 2.7, random() ); - radius *= 1.0 - exp( -10.0 * max( 0.0, begin - 0.2 * random() ) ); - - vPosition = vec4( radius * position, 1.0 ); - vPosition.xyz += mix( 0.005, 0.01, random() ) * normal; - vPosition.y += sin( random() * time + random() * vPosition.x + TAU * random() ) * 0.2 * random(); - vPosition.y += sin( random() * time + random() * vPosition.z + TAU * random() ) * 0.2 * random(); - vPosition.xy = rotate2D( 0.2 * ( random() - 0.5 ) ) * vPosition.xy; - vPosition.yz = rotate2D( 0.2 * ( random() - 0.5 ) ) * vPosition.yz; - vPosition = modelMatrix * vPosition; - - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/serial-decode.frag b/src/shaders/serial-decode.frag deleted file mode 100644 index 04a7d01..0000000 --- a/src/shaders/serial-decode.frag +++ /dev/null @@ -1,49 +0,0 @@ -#version 300 es - -precision highp float; - -const int DECODE_ITER = 10; -const float INV_DECODE_ITER = 1.0 / float( DECODE_ITER ); -const float DECODE_PERIOD = 2.0; -const float CHROMA_AMP = 0.4; -const float PI = 3.14159265; -const float TAU = PI * 2.0; -const vec2 CHROMA_FREQ = vec2( 227.5, 120.0 ); -const mat3 YCBCR_TO_RGB = mat3( 1.0, 1.0, 1.0, 0.0, -0.344136, 1.772, 1.402, -0.714136, 0.0 ); - -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) -#define lofi(i,m) (floor((i)/(m))*(m)) - -in vec2 vUv; - -out vec4 fragColor; - -uniform float time; -uniform vec2 resolution; -uniform sampler2D sampler0; - -// https://www.shadertoy.com/view/3sKSzW -void main() { - // YCbCr - float y = 0.0; - vec2 cbcr = vec2( 0.0 ); - - // sample - vec2 sampleOffset = vec2( 1.0, 0.0 ) / CHROMA_FREQ.x * DECODE_PERIOD * INV_DECODE_ITER; - for ( int i = -DECODE_ITER / 2; i < DECODE_ITER / 2; i ++ ) { - vec2 uvt = vUv - float( i ) * sampleOffset; - float tex = texture( sampler0, uvt ).x * INV_DECODE_ITER; - y += tex; - float phase = TAU * dot( CHROMA_FREQ, uvt ); - cbcr += tex * vec2( cos( phase ), sin( phase ) ); - } - - // back to rgb - vec3 col = YCBCR_TO_RGB * vec3( - saturate( 0.07 + 1.2 * ( linearstep( CHROMA_AMP, 1.0 - CHROMA_AMP, y ) - 0.5 ) + 0.5 ), - PI * cbcr / CHROMA_AMP - ); - - fragColor = vec4( col, 1.0 ); -} diff --git a/src/shaders/serial-encode.frag b/src/shaders/serial-encode.frag deleted file mode 100644 index 2f6f81b..0000000 --- a/src/shaders/serial-encode.frag +++ /dev/null @@ -1,81 +0,0 @@ -#version 300 es - -precision highp float; - -const int LPF_ITER = 10; -const float INV_LPF_ITER = 1.0 / float( LPF_ITER ); -const float LPF_WIDTH = 0.04; -const float CHROMA_AMP = 0.4; -const float DECODE_PERIOD = 2.0; -const float PI = 3.14159265; -const float TAU = PI * 2.0; -const float NOISE_CLUTCH = 0.1; -const vec2 CHROMA_FREQ = vec2( 227.5, 120.0 ); -const mat3 RGB_TO_YCBCR = mat3( 0.299, -0.168736, 0.5, 0.587, -0.331264, -0.418688, 0.114, 0.5, -0.081312 ); - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) -#define lofi(i,m) (floor((i)/(m))*(m)) - -in vec2 vUv; - -out vec4 fragColor; - -uniform float time; -uniform vec2 resolution; -uniform sampler2D sampler0; - -#pragma glslify: cyclicNoise = require( ./modules/cyclicNoise ); - -// https://www.shadertoy.com/view/3sKSzW -void main() { - vec2 uv = vUv; - - // prepare random noises - vec3 noise = cyclicNoise( vec3( uv, time ) ); - vec3 hnoise = cyclicNoise( vec3( vec2( 1.0, 320.0 ) * uv, 100.0 * fract( time ) ) ); - - // offsync noise - vec3 offsyncPos = vec3( vec2( 0.02, 1.0 ) * uv, 0.0 ); - offsyncPos -= vec3( 0.03, 0.2, 1.0 ) * time; - vec3 offsyncNoise = cyclicNoise( offsyncPos ); - float offsyncAmp = offsyncNoise.y * linearstep( 0.5, 1.0, offsyncNoise.x ); - offsyncAmp *= 1.0 - uv.y; - float offsyncChromaSup = 1.0 - linearstep( 0.0, 0.1, abs( offsyncAmp ) ); - - float phase = TAU * dot( CHROMA_FREQ, uv ); - - uv.x += 0.2 * offsyncAmp; - phase += CHROMA_FREQ.x * 0.05 * offsyncAmp; - - vec4 tex = saturate( texture( sampler0, uv ) ); - vec3 ycbcr = RGB_TO_YCBCR * tex.xyz; - - // chroma signal will be filtered using LPF, this time we're gonna use cheap LPF - ycbcr.yz *= 0.0; - for ( int i = 1; i < LPF_ITER; i ++ ) { - vec2 uvt = uv - vec2( INV_LPF_ITER * LPF_WIDTH * float( i ), 0.0 ); - vec4 tex = saturate( texture( sampler0, uvt ) ); - ycbcr.yz += INV_LPF_ITER * ( RGB_TO_YCBCR * tex.xyz ).yz; - } - - float signal = ycbcr.x; // y as base level - signal = mix( CHROMA_AMP, 1.0 - CHROMA_AMP, signal ); - signal += CHROMA_AMP * offsyncChromaSup * ( - ycbcr.y * cos( phase ) + - ycbcr.z * sin( phase ) - ); // cb as cosine of subcarrier - - // static noise - signal += 0.01 * ( fs( noise.x ) - 0.5 ); - - // high peak noise - float bump = exp( -2.0 * fract( 10.0 * hnoise.z * ( 1.0 * hnoise.x + uv.x ) ) ); - signal += 4.0 * pow( - ( 0.5 + 0.5 * hnoise.y ) * bump, - mix( 20.0, 8.0, linearstep( 0.0, 0.01, abs( offsyncAmp ) ) ) - ); - - fragColor = vec4( signal, 0.0, 0.0, 1.0 ); -} \ No newline at end of file diff --git a/src/shaders/shading.frag b/src/shaders/shading.frag deleted file mode 100644 index b7be76c..0000000 --- a/src/shaders/shading.frag +++ /dev/null @@ -1,318 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_NONE = 0; -const int MTL_UNLIT = 1; -const int MTL_PBR = 2; -const int MTL_REFRACT = 3; -const int MTL_PSY = 4; -const float ENV_UV_MARGIN = 0.9375; -const float AO_BIAS = 0.0; -const float AO_RADIUS = 0.5; -const float PI = 3.14159265359; -const float TAU = 6.28318530718; -const float EPSILON = 1E-3; -const vec3 BLACK = vec3( 0.0 ); -const vec3 DIELECTRIC_SPECULAR = vec3( 0.04 ); -const vec3 ONE_SUB_DIELECTRIC_SPECULAR = 1.0 - DIELECTRIC_SPECULAR; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -vec4 seed; - -in vec2 vUv; - -out vec4 fragColor; - -uniform int lightCount; -uniform vec2 resolution; -uniform vec2 lightNearFar[8]; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform vec3 lightPos[8]; -uniform vec3 lightColor[8]; -uniform vec4 lightParams[8]; -uniform mat4 lightPV[8]; -uniform mat4 cameraView; -uniform mat4 cameraPV; -uniform sampler2D sampler0; // position.xyz, depth -uniform sampler2D sampler1; // normal.xyz (yes, this is not good) -uniform sampler2D sampler2; // color.rgba (what is a though????) -uniform sampler2D sampler3; // materialParams.xyz, materialId -uniform sampler2D samplerShadow[8]; -uniform sampler2D samplerIBLLUT; -uniform sampler2D samplerEnv; -uniform sampler2D samplerAo; -uniform sampler2D samplerRandom; - -// == commons ====================================================================================== -#pragma glslify: prng = require( ./-prng ); -#pragma glslify: importanceSampleGGX = require( ./modules/importanceSampleGGX.glsl ); -#pragma glslify: doAnalyticLighting = require( ./modules/doAnalyticLighting.glsl ); -#pragma glslify: doShadowMapping = require( ./modules/doShadowMapping.glsl ); - -vec3 catColor( float _p ) { - return 0.5 + 0.5 * vec3( - cos( _p ), - cos( _p + PI / 3.0 * 4.0 ), - cos( _p + PI / 3.0 * 2.0 ) - ); -} - -vec4 sampleEnvNearest( vec2 uv, float lv ) { - float p = pow( 0.5, float( lv ) ); - vec2 uvt = ENV_UV_MARGIN * ( uv - 0.5 ) + 0.5; - uvt = mix( vec2( 1.0 - p ), vec2( 1.0 - 0.5 * p ), uvt ); - return texture( samplerEnv, uvt ); -} - -vec4 sampleEnvLinear( vec2 uv, float lv ) { - return mix( - sampleEnvNearest( uv, floor( lv ) ), - sampleEnvNearest( uv, floor( lv + 1.0 ) ), - fract( lv ) - ); -} - -// == structs ====================================================================================== -struct Isect { - vec2 screenUv; - vec3 color; - vec3 position; - float depth; - vec3 normal; - int materialId; - vec3 materialParams; -}; - -// == this is BAD ================================================================================== -vec4 fetchShadowMap( int iLight, vec2 uv ) { - if ( iLight == 0 ) { - return texture( samplerShadow[ 0 ], uv ); - } else if ( iLight == 1 ) { - return texture( samplerShadow[ 1 ], uv ); - } else if ( iLight == 2 ) { - return texture( samplerShadow[ 2 ], uv ); - } else if ( iLight == 3 ) { - return texture( samplerShadow[ 3 ], uv ); - } else if ( iLight == 4 ) { - return texture( samplerShadow[ 4 ], uv ); - } else if ( iLight == 5 ) { - return texture( samplerShadow[ 5 ], uv ); - } else if ( iLight == 6 ) { - return texture( samplerShadow[ 6 ], uv ); - } else if ( iLight == 7 ) { - return texture( samplerShadow[ 7 ], uv ); - } -} - -// == features ===================================================================================== -float castShadow( int iLight, vec2 lightUv, Isect isect, float NdotL ) { - float depth = linearstep( - lightNearFar[ iLight ].x, - lightNearFar[ iLight ].y, - length( isect.position - lightPos[ iLight ] ) - ); - - float bias = 0.0001 + 0.0001 * ( 1.0 - NdotL ); - depth -= bias; - - vec4 tex = fetchShadowMap( iLight, lightUv ); - - float edgeClip = smoothstep( 0.4, 0.5, max( abs( lightUv.x - 0.5 ), abs( lightUv.y - 0.5 ) ) ); - - float variance = saturate( tex.y - tex.x * tex.x ); - float md = depth - tex.x; - float p = linearstep( 0.2, 1.0, variance / ( variance + md * md ) ); - - float softShadow = md < 0.0 ? 1.0 : p; - - return mix( - softShadow, - 1.0, - edgeClip - ); -} - -float calcDepth( vec3 pos ) { - float dist = length( cameraPos - pos ); - float near = cameraNearFar.x; - float far = cameraNearFar.y; - return linearstep( near, far, dist ); -} - -// == shading functions ============================================================================ -vec3 shadePBR( Isect isect ) { - // ref: https://github.com/KhronosGroup/glTF-Sample-Viewer/blob/master/src/shaders/metallic-roughness.frag - - // from isect - vec3 V = cameraPos - isect.position; - float lenV = length( V ); - V = normalize( V ); - - float NdotV = clamp( dot( isect.normal, V ), EPSILON, 1.0 ); - - float roughness = isect.materialParams.x; - float metallic = isect.materialParams.y; - float emissive = isect.materialParams.z; - - // calc material stuff - vec3 albedo = mix( isect.color * ONE_SUB_DIELECTRIC_SPECULAR, vec3( 0.0 ), metallic ); - vec3 f0 = mix( DIELECTRIC_SPECULAR, isect.color, metallic ); - - float ao = texture( samplerAo, isect.screenUv ).x; - - // begin lighting - vec3 color = vec3( 0.0 ); - - // for each lights - for ( int iLight = 0; iLight < 8; iLight ++ ) { - if ( iLight >= lightCount ) { break; } - - vec3 L = lightPos[ iLight ] - isect.position; - - // shading - vec3 shade = doAnalyticLighting( - V, - L, - isect.normal, - isect.color, - roughness, - metallic - ) * lightColor[ iLight ] * ao; - - // fetch shadowmap + spot lighting - vec4 lightProj = lightPV[ iLight ] * vec4( isect.position, 1.0 ); - vec2 lightP = lightProj.xy / lightProj.w; - - shade *= doShadowMapping( - L, - isect.normal, - fetchShadowMap( iLight, 0.5 + 0.5 * lightP ), - lightP, - lightNearFar[ iLight ], - lightParams[ iLight ].x - ); - - color += shade; - } - - // cheat the texture seam using noise! - vec3 nEnvDiffuse = importanceSampleGGX( vec2( prng( seed ), prng( seed ) * 0.05 ), 2.0, isect.normal ); - - // diffuse ibl - vec2 uvEnvDiffuse = vec2( - 0.5 + atan( nEnvDiffuse.x, nEnvDiffuse.z ) / TAU, - 0.5 + atan( nEnvDiffuse.y, length( nEnvDiffuse.zx ) ) / PI - ); - vec3 texEnvDiffuse = sampleEnvNearest( uvEnvDiffuse, 4.0 ).rgb; - color += ao * texEnvDiffuse * albedo; - - // reflective ibl - vec3 reflEnvReflective = reflect( -V, isect.normal ); - vec2 uvEnvReflective = vec2( - 0.5 + atan( reflEnvReflective.x, reflEnvReflective.z ) / TAU, - 0.5 + atan( reflEnvReflective.y, length( reflEnvReflective.zx ) ) / PI - ); - vec2 brdfEnvReflective = texture( samplerIBLLUT, vec2( NdotV, roughness ) ).xy; - vec3 texEnvReflective = sampleEnvLinear( uvEnvReflective, 3.0 * roughness ).rgb; - color += ao * texEnvReflective * ( brdfEnvReflective.x * f0 + brdfEnvReflective.y ); - - // emissive - color += emissive * NdotV * isect.color; - - return color; - -} - -// == main procedure =============================================================================== -void main() { - vec4 tex0 = texture( sampler0, vUv ); - vec4 tex1 = texture( sampler1, vUv ); - vec4 tex2 = texture( sampler2, vUv ); - vec4 tex3 = texture( sampler3, vUv ); - - seed = texture( samplerRandom, vUv ) * 1919.810; - prng( seed ); - - Isect isect; - isect.screenUv = vUv; - isect.position = tex0.xyz; - isect.depth = tex0.w; - isect.normal = normalize( tex1.xyz ); - isect.color = tex2.rgb; - isect.materialId = int( tex3.w + 0.5 ); - isect.materialParams = tex3.xyz; - - // from isect - vec3 V = cameraPos - isect.position; - float lenV = length( V ); - V = normalize( V ); - - float NdotV = clamp( dot( isect.normal, V ), EPSILON, 1.0 ); - - vec3 color = vec3( 0.0 ); - - if ( isect.materialId == MTL_NONE ) { - // do nothing - - } else if ( isect.materialId == MTL_UNLIT ) { - color = isect.color; - - } else if ( isect.materialId == MTL_PBR ) { - color = shadePBR( isect ); - - } else if ( isect.materialId == MTL_REFRACT ) { - color = shadePBR( isect ); - - // really really cheap full spectrum - vec3 refrEnvRefractive = refract( -V, isect.normal, 1.0 / 2.56 ); - vec2 uvEnvRefractive = vec2( - 0.5 + atan( refrEnvRefractive.x, refrEnvRefractive.z ) / TAU, - 0.5 + atan( refrEnvRefractive.y, length( refrEnvRefractive.zx ) ) / PI - ); - vec3 texEnvRefractive = sampleEnvLinear( uvEnvRefractive, 0.5 ).rgb; - - color += isect.color * texEnvRefractive; - - } else if ( isect.materialId == MTL_PSY ) { - color = 0.02 * smoothstep( 0.9, 1.0, texture( samplerAo, isect.screenUv ).xyz ); - - // vec2 f = ( 1.0 - 2.0 * prng( seed ) ) / resolution; - vec2 f = 1.0 / resolution; - vec4 tex0x = texture( sampler0, vUv + f ); - vec4 tex1x = texture( sampler1, vUv + f ); - vec4 tex3x = texture( sampler3, vUv + f ); - - float valid = MTL_PSY == int( tex3x.w ) ? 1.0 : 0.0; - - float edge = saturate( - step( 0.1, abs( length( cameraPos - tex0x.xyz ) - lenV ) ) + - step( 0.1, length( tex1x.xyz - tex1.xyz ) ) - ) * valid; - - vec3 gradient = 0.5 + 0.5 * cos( - 3.0 + 1.5 * exp( -0.4 * max( lenV - 3.0, 0.0 ) ) + vec3( 0.0, 2.0, 4.0 ) - ); - color += 0.4 * gradient * edge; - - } - - color *= exp( -0.4 * max( lenV - 3.0, 0.0 ) ); - - // color = 0.5 + 0.5 * isect.normal; - // color = vec3( calcDepth( tex0.xyz ) ); - // color = vec3( 0.5, 0.2, 0.9 ) * ( 1.0 - texture( samplerAo, isect.screenUv ).xyz ); - // color = mix( - // color, - // vec3( 0.96 ) * smoothstep( 0.5, 0.9, texture( samplerAo, isect.screenUv ).xyz ), - // 1.0 - // ); - - fragColor = vec4( color, 1.0 ); - // fragColor.xyz *= smoothstep( 1.0, 0.7, calcDepth( tex0.xyz ) ); - - gl_FragDepth = 0.5 + 0.5 * isect.depth; -} diff --git a/src/shaders/shadow-blur.frag b/src/shaders/shadow-blur.frag deleted file mode 100644 index b673637..0000000 --- a/src/shaders/shadow-blur.frag +++ /dev/null @@ -1,38 +0,0 @@ -#version 300 es - -precision highp float; - -const int SAMPLES = 30; -const float PI = 3.14159265; -const float MUL_THR = 1E-4; - -#define saturate(i) clamp(i,0.,1.) - -in vec2 vUv; - -out vec4 fragColor; - -uniform bool isVert; -uniform vec2 resolution; -uniform sampler2D sampler0; - -float gaussian( float _x, float _v ) { - return 1.0 / sqrt( 2.0 * PI * _v ) * exp( - _x * _x / 2.0 / _v ); -} - -void main() { - vec2 texel = 1.0 / resolution; - - vec2 bv = texel * ( isVert ? vec2( 0.0, 1.0 ) : vec2( 1.0, 0.0 ) ); - vec4 sum = vec4( 0.0 ); - - vec4 tex = texture( sampler0, vUv ); - - sum += 0.29411764705882354 * tex; - vec2 suv = vUv - bv * 1.3333333333333333; - sum += 0.35294117647058826 * texture( sampler0, suv ); - suv = vUv + bv * 1.3333333333333333; - sum += 0.35294117647058826 * texture( sampler0, suv ); - - fragColor = vec4( sum.xy, tex.z, 1.0 ); -} diff --git a/src/shaders/sphere-particles-compute.frag b/src/shaders/sphere-particles-compute.frag deleted file mode 100644 index 84e795c..0000000 --- a/src/shaders/sphere-particles-compute.frag +++ /dev/null @@ -1,157 +0,0 @@ -#version 300 es - -precision highp float; - -const float PARTICLE_LIFE_LENGTH = 1.0; -const float HUGE = 9E16; -const float PI = 3.14159265; -const float TAU = 6.283185307; - -#define saturate(i) clamp(i,0.,1.) -#define lofi(i,m) (floor((i)/(m))*(m)) -#define lofir(i,m) (floor((i)/(m)+.5)*(m)) - -layout (location = 0) out vec4 fragCompute0; -layout (location = 1) out vec4 fragCompute1; - -uniform bool init; -uniform float time; -uniform float beat; -uniform float particlesSqrt; -uniform float totalFrame; -uniform float deltaTime; -uniform float noiseScale; -uniform float noisePhase; -uniform vec2 resolution; -uniform sampler2D samplerCompute0; -uniform sampler2D samplerCompute1; -uniform sampler2D samplerRandom; -// uniform float velScale; -// uniform float genRate; - -// ------ - -vec2 uvInvT( vec2 _uv ) { - return vec2( 0.0, 1.0 ) + vec2( 1.0, -1.0 ) * _uv; -} - -// ------ - -mat2 rotate2D( float _t ) { - return mat2( cos( _t ), sin( _t ), -sin( _t ), cos( _t ) ); -} - -float fractSin( float i ) { - return fract( sin( i ) * 1846.42 ); -} - -vec4 sampleRandom( vec2 _uv ) { - return texture( samplerRandom, _uv ); -} - -#pragma glslify: prng = require( ./-prng ); -#pragma glslify: noise = require( ./-simplex4d ); - -vec3 randomSphere( inout vec4 seed ) { - vec3 v; - for ( int i = 0; i < 10; i ++ ) { - v = vec3( - prng( seed ), - prng( seed ), - prng( seed ) - ) * 2.0 - 1.0; - if ( length( v ) < 1.0 ) { break; } - } - return v; -} - -vec2 randomCircle( inout vec4 seed ) { - vec2 v; - for ( int i = 0; i < 10; i ++ ) { - v = vec2( - prng( seed ), - prng( seed ) - ) * 2.0 - 1.0; - if ( length( v ) < 1.0 ) { break; } - } - return v; -} - -vec3 randomBox( inout vec4 seed ) { - vec3 v; - v = vec3( - prng( seed ), - prng( seed ), - prng( seed ) - ) * 2.0 - 1.0; - return v; -} - -// ------ - -void main() { - vec2 uv = gl_FragCoord.xy / resolution; - - float dt = deltaTime; - - // == prepare some vars ========================================================================== - vec4 seed = texture( samplerRandom, uv ); - prng( seed ); - - vec4 tex0 = texture( samplerCompute0, uv ); - vec4 tex1 = texture( samplerCompute1, uv ); - - vec3 pos = tex0.xyz; - float life = tex0.w; - vec3 vel = tex1.xyz; - - float timing = mix( - 0.0, - PARTICLE_LIFE_LENGTH, - ( floor( uv.x * particlesSqrt ) / particlesSqrt + floor( uv.y * particlesSqrt ) ) / particlesSqrt - ); - timing += lofi( time, PARTICLE_LIFE_LENGTH ); - - if ( time - deltaTime + PARTICLE_LIFE_LENGTH < timing ) { - timing -= PARTICLE_LIFE_LENGTH; - } - - // == initialize particles ======================================================================= - if ( - time - deltaTime < timing && timing <= time - ) { - dt = time - timing; - - pos = 10.0 * randomSphere( seed ); - - vel = 1.0 * randomSphere( seed ); - - life = 1.0; - } else { - // do nothing - // if you want to remove init frag from the particle, do at here - } - - // == update particles =========================================================================== - // spin around center - // vel.zx += dt * 20.0 * vec2( -1.0, 1.0 ) * normalize( nor.xz ); - - // noise field - vel += 40.0 * vec3( - noise( vec4( 0.1 * pos.xyz, 1.485 + sin( time * 0.1 ) + noisePhase ) ), - noise( vec4( 0.1 * pos.xyz, 3.485 + sin( time * 0.1 ) + noisePhase ) ), - noise( vec4( 0.1 * pos.xyz, 5.485 + sin( time * 0.1 ) + noisePhase ) ) - ) * dt; - - // resistance - vel *= exp( -10.0 * dt ); - - vec3 v = vel; - float vmax = max( abs( v.x ), max( abs( v.y ), abs( v.z ) ) ); - - pos += vel * dt; - life -= dt / PARTICLE_LIFE_LENGTH; - - fragCompute0 = vec4( pos, life ); - fragCompute1 = vec4( vel, 1.0 ); -} diff --git a/src/shaders/sphere-particles-render.frag b/src/shaders/sphere-particles-render.frag deleted file mode 100644 index e540bf0..0000000 --- a/src/shaders/sphere-particles-render.frag +++ /dev/null @@ -1,46 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_UNLIT = 1; -const int MTL_PBR = 2; -const int MTL_IRIDESCENT = 4; - -const float PI = 3.14159265; -const float TAU = 6.28318531; - -#define saturate(i) clamp(i,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -// == varings / uniforms =========================================================================== -in float vLife; -in vec4 vPosition; -in vec3 vNormal; -in vec4 vColor; -in vec4 vRandom; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -uniform float time; - -// == common ======================================================================================= -mat2 rotate2D( float _t ) { - return mat2( cos( _t ), sin( _t ), -sin( _t ), cos( _t ) ); -} - -// == main procedure =============================================================================== -void main() { - if ( vColor.a < 0.0 ) { discard; } - - #ifdef DEFERRED - fragPosition = vPosition; - fragNormal = vec4( vNormal, 1.0 ); - fragColor = vec4( 0.01 * vColor.xyz, 1.0 ); - fragWTF = vec4( vec3( 0.9, 0.1, 100.0 ), MTL_PBR ); - #endif -} diff --git a/src/shaders/sphere-particles-render.vert b/src/shaders/sphere-particles-render.vert deleted file mode 100644 index 7495cf4..0000000 --- a/src/shaders/sphere-particles-render.vert +++ /dev/null @@ -1,103 +0,0 @@ -#version 300 es - -const int MODE_RECT = 0; -const int MODE_GRID = 1; -const int MODE_CIRCLE = 2; -const int MODE_CHAR = 3; -const int MODE_BUTTON = 4; -const int MODE_ICON = 5; -const int MODES = 6; - -const float HUGE = 9E16; -const float PI = 3.14159265; -const float TAU = 6.283185307; - -#define saturate(i) clamp(i,0.,1.) -#define lofi(i,m) (floor((i)/(m))*(m)) -#define lofir(i,m) (floor((i+0.5)/(m))*(m)) - -// ------------------------------------------------------------------------------------------------- - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; -layout (location = 2) in vec2 computeUV; - -out float vLife; -out vec2 vUv; -out vec3 vNormal; -out vec4 vPosition; -out vec4 vColor; -out vec4 vDice; - -uniform bool isShadow; -uniform float ppp; -uniform float trailShaker; -uniform float colorVar; -uniform float colorOffset; -uniform vec2 resolution; -uniform vec2 resolutionCompute; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; -uniform sampler2D samplerCompute0; -uniform sampler2D samplerCompute1; -uniform sampler2D samplerRandomStatic; - -// ------------------------------------------------------------------------------------------------- - -vec3 catColor( float _p ) { - return 0.5 + 0.5 * vec3( - cos( _p ), - cos( _p + PI / 3.0 * 4.0 ), - cos( _p + PI / 3.0 * 2.0 ) - ); -} - -vec4 random( vec2 _uv ) { - return texture( samplerRandomStatic, _uv ); -} - -mat2 rotate2D( float _t ) { - return mat2( cos( _t ), sin( _t ), -sin( _t ), cos( _t ) ); -} - -// ------------------------------------------------------------------------------------------------- - -void main() { - // == fetch texture ============================================================================== - vec4 tex0 = texture( samplerCompute0, computeUV ); - vec4 tex1 = texture( samplerCompute1, computeUV ); - - // == assign varying variables =================================================================== - vDice = random( computeUV.xy * 182.92 ); - - vColor.xyz = vec3( 0.8 ); - - vLife = tex0.w; - - // == compute size =============================================================================== - vPosition = vec4( tex0.xyz, 1.0 ); - - float size = vDice.x * 0.01; - size *= sin( PI * saturate( vLife ) ); - - vec3 shape = position * size; - shape.yz = rotate2D( 7.0 * ( vPosition.x + vDice.z ) ) * shape.yz; - shape.zx = rotate2D( 7.0 * ( vPosition.y + vDice.w ) ) * shape.zx; - - vPosition.xyz += shape; - - // == compute normals ============================================================================ - vNormal = ( normalMatrix * vec4( normal, 1.0 ) ).xyz; - vNormal.yz = rotate2D( 7.0 * ( vPosition.x + vDice.z ) ) * vNormal.yz; - vNormal.zx = rotate2D( 7.0 * ( vPosition.y + vDice.w ) ) * vNormal.zx; - - // == send the vertex position =================================================================== - vPosition = modelMatrix * vPosition; - vec4 outPos = projectionMatrix * viewMatrix * vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/ssr.frag b/src/shaders/ssr.frag deleted file mode 100644 index 74e3eb3..0000000 --- a/src/shaders/ssr.frag +++ /dev/null @@ -1,96 +0,0 @@ -#version 300 es - -precision highp float; - -const float PI = 3.14159265359; -const float TAU = 6.28318530718; - -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -vec4 seed; - -in vec2 vUv; - -out vec4 fragColor; - -uniform vec2 resolution; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform mat4 cameraView; -uniform mat4 cameraPV; -uniform sampler2D sampler0; // position.xyz, depth -uniform sampler2D sampler1; // normal.xyz -uniform sampler2D sampler2; // color.rgba -uniform sampler2D sampler3; // materialParams.xyz, materialId -uniform sampler2D samplerShaded; -uniform sampler2D samplerRandom; - -#pragma glslify: prng = require( ./-prng ); - -// == structs ====================================================================================== -struct Isect { - vec2 screenUv; - vec3 color; - vec3 position; - float depth; - vec3 normal; - int materialId; - vec3 materialParams; -}; - -// == main procedure =============================================================================== -void main() { - vec4 tex0 = texture( sampler0, vUv ); - vec4 tex1 = texture( sampler1, vUv ); - vec4 tex2 = texture( sampler2, vUv ); - vec4 tex3 = texture( sampler3, vUv ); - vec4 shaded = texture( samplerShaded, vUv ); - - Isect isect; - isect.screenUv = vUv; - isect.position = tex0.xyz; - isect.depth = tex0.w; - isect.normal = normalize( tex1.xyz ); - isect.color = tex2.rgb; - isect.materialId = int( tex3.w + 0.5 ); - isect.materialParams = tex3.xyz; - - vec3 ssr = vec3( 0.0 ); - - if ( isect.materialId != 1 ) { - seed = texture( samplerRandom, vUv ) * 1919.810; - prng( seed ); - - // from isect - vec3 V = cameraPos - isect.position; - float lenV = length( V ); - V = normalize( V ); - - // ssr - vec3 refl = reflect( -V, clamp( isect.normal, -1.0, 1.0 ) ); - float reflLen = 0.0; - - for ( int i = 0; i < 9; i ++ ) { - reflLen += 0.1 + 0.01 * prng( seed ); - - vec3 reflP = isect.position + reflLen * refl; - vec4 reflSP = cameraPV * vec4( reflP, 1.0 ); - reflSP.x *= resolution.y / resolution.x; - reflSP /= reflSP.w; - - vec2 reflUv = 0.5 + 0.5 * reflSP.xy; - float outOfScreenMul = smoothstep( 0.5, 0.4, abs( reflUv.x - 0.5 ) ); - outOfScreenMul *= smoothstep( 0.5, 0.4, abs( reflUv.y - 0.5 ) ); - - vec4 reflTexPos = texture( sampler0, reflUv ); - if ( reflSP.z > reflTexPos.w ) { - float diff = length( reflP.xyz - reflTexPos.xyz ); - ssr += texture( samplerShaded, reflUv ).xyz * outOfScreenMul * exp( -3.0 * reflLen ) * exp( -10.0 * diff ); - break; - } - } - } - - fragColor = vec4( shaded.xyz + ssr, 1.0 ); -} diff --git a/src/shaders/suffer-texts-compute.frag b/src/shaders/suffer-texts-compute.frag deleted file mode 100644 index 1a1f285..0000000 --- a/src/shaders/suffer-texts-compute.frag +++ /dev/null @@ -1,24 +0,0 @@ -#version 300 es - -precision highp float; - -out vec4 fragCompute0; - -uniform float time; -uniform float deltaTime; -uniform vec2 resolution; -uniform vec4 logInit; -uniform sampler2D samplerCompute0; - -void main() { - vec2 uv = gl_FragCoord.xy / resolution; - - fragCompute0 = texture( samplerCompute0, uv ); - - if ( logInit.w == uv.x ) { - fragCompute0 = logInit; - fragCompute0.w = 0.0; // life - } - - fragCompute0.w += deltaTime; // life -} diff --git a/src/shaders/suffer-texts-render.frag b/src/shaders/suffer-texts-render.frag deleted file mode 100644 index 9227422..0000000 --- a/src/shaders/suffer-texts-render.frag +++ /dev/null @@ -1,37 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_UNLIT = 1; - -// == varings / uniforms =========================================================================== -in float vLife; -in float vMode; -in vec2 vUv; -in vec2 vSize; -in vec3 vNormal; -in vec4 vPosition; -in vec4 vDice; - -uniform float time; -uniform sampler2D samplerRandomStatic; -uniform sampler2D samplerTinyChar; - -out vec4 fragColor; - -// == main procedure =============================================================================== -void main() { - if ( vLife > 1.3 ) { discard; } - - float tex = texture( samplerTinyChar, vUv ).x; - if ( tex < 0.5 ) { discard; } - - vec3 color = vec3( 1.0 ); - color = mix( - 2.0 * step( 2.0, mod( 40.0 * vLife + vec3( 0.0, 1.0, 2.0 ), 3.0 ) ), - color, - smoothstep( 0.0, 0.3, vLife ) * smoothstep( 1.3, 1.0, vLife ) - ); - - fragColor = vec4( color, 1.0 ); -} diff --git a/src/shaders/suffer-texts-render.vert b/src/shaders/suffer-texts-render.vert deleted file mode 100644 index 315f121..0000000 --- a/src/shaders/suffer-texts-render.vert +++ /dev/null @@ -1,66 +0,0 @@ -#version 300 es - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(i) clamp(i,0.,1.) -#define lofi(i,m) (floor((i)/(m))*(m)) -#define lofir(i,m) (floor((i+0.5)/(m))*(m)) - -// ------------------------------------------------------------------------------------------------- - -layout (location = 0) in vec2 position; -layout (location = 1) in float computeX; - -out float vLife; -out vec2 vUv; -out vec2 vSize; -out vec3 vNormal; -out vec4 vPosition; - -uniform vec2 resolution; -uniform vec2 resolutionCompute; -uniform mat4 projectionMatrix; -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 normalMatrix; -uniform sampler2D samplerCompute0; -uniform sampler2D samplerRandomStatic; - -// == utils ======================================================================================== -vec2 yflip( vec2 uv ) { - return vec2( 0.0, 1.0 ) + vec2( 1.0, -1.0 ) * uv; -} - -// == main procedure =============================================================================== -void main() { - vec2 computeUV = vec2( computeX, 0.5 ); - vec4 tex0 = texture( samplerCompute0, computeUV ); - - // == assign varying variables =================================================================== - vLife = tex0.w; - - float char = tex0.z; - char += 64.0 * ( min( vLife, 0.3 ) + max( vLife, 1.0 ) - 1.3 ); - - vUv = yflip( 0.5 + 0.499 * position ); - vUv = ( vUv + floor( mod( vec2( char / vec2( 1.0, 16.0 ) ), 16.0 ) ) ) / 16.0; - - vNormal = normalize( ( normalMatrix * vec4( 0.0, 0.0, 1.0, 1.0 ) ).xyz ); - - // == compute size =============================================================================== - float scale = 0.0625; - - vPosition = vec4( scale * 1.2 * tex0.xy, 0.0, 1.0 ); - vPosition.y = -vPosition.y; - - vec2 shape = position * scale * 0.5; - - vPosition.xy += shape; - - // == send the vertex position =================================================================== - vPosition = vPosition; - vec4 outPos = vPosition; - outPos.x *= resolution.y / resolution.x; - gl_Position = outPos; - - vPosition.w = outPos.z / outPos.w; -} diff --git a/src/shaders/test-screen.frag b/src/shaders/test-screen.frag deleted file mode 100644 index 173222d..0000000 --- a/src/shaders/test-screen.frag +++ /dev/null @@ -1,30 +0,0 @@ -#version 300 es - -#define saturate(i) clamp(i, 0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) -#define fs(i) (fract(sin((i)*114.514)*1919.810)) - -precision highp float; - -in vec2 vUv; - -out vec4 fragColor; - -uniform float time; -uniform float fade; -uniform float circle; -uniform float mode; -uniform vec2 resolution; -uniform sampler2D samplerRandom; - -void main() { - if ( mode == 1.0 ) { - fragColor = vec4( vUv, fade, 1.0 ); - } else if ( mode == 2.0 ) { - vec2 p = vUv * 2.0 - 1.0; - p.x *= resolution.x / resolution.y; - - float shape = linearstep( 2.0 / resolution.y, 0.0, length( p ) - 0.3 * circle ); - fragColor = vec4( vec3( shape ), 1.0 ); - } -} diff --git a/src/shaders/tetrahedron.frag b/src/shaders/tetrahedron.frag deleted file mode 100644 index 6a6a5e2..0000000 --- a/src/shaders/tetrahedron.frag +++ /dev/null @@ -1,134 +0,0 @@ -#version 300 es - -precision highp float; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const float PI = 3.14159265; -const float TAU = PI * 2.0; -const float foldcos = cos( PI / 3.0 ); -const float foldrem = sqrt( 0.75 - foldcos * foldcos ); -const vec3 foldvec = vec3( -0.5, -foldcos, foldrem ); -const vec3 foldface = vec3( 0.0, foldrem, foldcos ); - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform float distort; -uniform float time; -uniform vec2 resolution; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; -uniform sampler2D samplerRandom; -uniform sampler2D samplerRandomStatic; -uniform sampler2D samplerCapture; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -#pragma glslify: noise = require( ./-simplex4d ); -#pragma glslify: orthBasis = require( ./modules/orthBasis ); - -vec3 fold( vec3 p ) { - for ( int i = 0; i < 5; i ++ ) { - p.xy = abs( p.xy ); - p -= 2.0 * min( dot( foldvec, p ), 0.0 ) * foldvec; - } - return p; -} - -float distFunc( vec3 p ) { - vec3 pt = p; - pt = fold( pt ); - float d = dot( pt, foldface ) - 0.36; - - d += ( 0.001 + 0.02 * distort ) * noise( - vec4( 8.0 * p.xyz, 8.0 * time ) - ); - - return d; -} - -vec3 normalFunc( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - distFunc( p + d.yxx ) - distFunc( p - d.yxx ), - distFunc( p + d.xyx ) - distFunc( p - d.xyx ), - distFunc( p + d.xxy ) - distFunc( p - d.xxy ) - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - float dist; - - int MARCH_ITER; - - #ifdef DEFERRED - MARCH_ITER = 50; - #endif - - #ifdef DEPTH - MARCH_ITER = 30; - #endif - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - dist = distFunc( rayPos ); - rayLen += 0.5 * dist; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( dist ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < dist ) { - discard; - } - - vec3 modelNormal = normalize( normalMatrix * vec4( normalFunc( rayPos, 1E-3 ), 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - fragColor = vec4( vec3( 0.2 ), 1.0 ); - fragWTF = vec4( vec3( 0.05 , 0.93, 0.0 ), 2 ); - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/shaders/text-overlay.frag b/src/shaders/text-overlay.frag deleted file mode 100644 index be9b141..0000000 --- a/src/shaders/text-overlay.frag +++ /dev/null @@ -1,28 +0,0 @@ -#version 300 es - -precision highp float; - -in vec2 vUv; - -out vec4 fragColor; - -uniform float amp; -uniform vec2 resolution; -uniform sampler2D sampler0; - -void main() { - vec2 uv = vUv; - uv.y = 1.0 - uv.y; - - float shape = texture( sampler0, uv ).w; - shape = pow( shape, 2.2 ); - - float blur = 0.0; - - for ( int i = -10; i < 10; i ++ ) { - float t = texture( sampler0, uv + vec2( 4 * i, 0.0 ) / resolution ).w; - blur += exp( -0.2 * abs( float( i ) ) ) * pow( t, 2.2 ); - } - - fragColor = amp * vec4( shape + 0.03 * blur ); -} diff --git a/src/shaders/white.frag b/src/shaders/white.frag deleted file mode 100644 index 28aa562..0000000 --- a/src/shaders/white.frag +++ /dev/null @@ -1,20 +0,0 @@ -#version 300 es - -precision highp float; - -const int MTL_UNLIT = 1; - -in vec4 vPosition; -in vec3 vNormal; - -layout (location = 0) out vec4 fragPosition; -layout (location = 1) out vec4 fragNormal; -layout (location = 2) out vec4 fragColor; -layout (location = 3) out vec4 fragWTF; - -void main() { - fragPosition = vPosition; - fragNormal = vec4( vNormal, 1.0 ); - fragColor = vec4( 1.0 ); - fragWTF = vec4( vec3( 0.0, 0.0, 0.0 ), MTL_UNLIT ); -} diff --git a/src/shaders/wobbleball.frag b/src/shaders/wobbleball.frag deleted file mode 100644 index df5fe33..0000000 --- a/src/shaders/wobbleball.frag +++ /dev/null @@ -1,153 +0,0 @@ -#version 300 es - -precision highp float; - -#define fs(i) (fract(sin((i)*114.514)*1919.810)) -#define saturate(x) clamp(x,0.,1.) -#define linearstep(a,b,x) saturate(((x)-(a))/((b)-(a))) - -const int MARCH_ITER = 90; -const float PI = 3.14159265; -const float TAU = PI * 2.0; - -#ifdef DEFERRED - layout (location = 0) out vec4 fragPosition; - layout (location = 1) out vec4 fragNormal; - layout (location = 2) out vec4 fragColor; - layout (location = 3) out vec4 fragWTF; -#endif - -in vec4 vPositionWithoutModel; - -#ifdef DEPTH - out vec4 fragColor; -#endif - -uniform float deformAmp; -uniform float deformFreq; -uniform float deformTime; -uniform float time; -uniform vec2 resolution; -uniform vec2 cameraNearFar; -uniform vec3 cameraPos; -uniform mat4 normalMatrix; -uniform mat4 modelMatrix; -uniform mat4 viewMatrix; -uniform mat4 projectionMatrix; -uniform mat4 inversePVM; -uniform sampler2D samplerRandom; -uniform sampler2D samplerRandomStatic; -uniform sampler2D samplerCapture; - -vec3 divideByW( vec4 v ) { - return v.xyz / v.w; -} - -// https://www.iquilezles.org/www/articles/smin/smin.htm -float smin( float a, float b, float k ) { - float h = max( k - abs( a - b ), 0.0 ) / k; - return min( a, b ) - h * h * h * k * ( 1.0 / 6.0 ); -} - -mat2 rot2d( float t ) { - float c = cos( t ); - float s = sin( t ); - return mat2( c, -s, s, c ); -} - -#pragma glslify: noise = require( ./-simplex4d ); - -float box( vec3 p, vec3 s ) { - vec3 d = abs( p ) - s; - return min( 0.0, max( d.x, max( d.y, d.z ) ) ) + length( max( vec3( 0.0 ), d ) ); -} - -float distFunc( vec3 p ) { - // if ( length( p ) > 2.0 ) { return length( p ) - 1.8; } - - float distSlasher; - { - vec3 pt = p; - - pt.xy = rot2d( 0.5 ) * pt.xy; - pt.yz = rot2d( 0.5 ) * pt.yz; - - pt.y = mod( pt.y - 0.02, 0.04 ) - 0.02; - distSlasher = box( pt, vec3( 1E1, 0.015, 1E1 ) ); - } - - float distMetaball; - { - distMetaball = length( p ) - 0.4; - for ( int i = 0; i < 3; i ++ ) { - float fi = float( i ); - vec3 offset = fs( fi * vec3( 2.8, 4.55, 3.12 ) ); - vec3 freq = 1.0 + 3.0 * fs( fi * vec3( 4.14, 2.15, 0.18 ) ); - vec3 trans = 0.5 * sin( 6.0 * offset + time * freq ); - distMetaball = smin( distMetaball, length( p - trans ) - 0.4, 1.0 ); - distMetaball = smin( distMetaball, length( p + trans ) - 0.4, 1.0 ); - } - } - - distMetaball += 0.5 * deformAmp / deformFreq * noise( - vec4( deformFreq * p.xyz, 4.0 * deformFreq * deformTime ) - ); - - return max( distSlasher, distMetaball ); -} - -vec3 normalFunc( vec3 p, float dd ) { - vec2 d = vec2( 0.0, dd ); - return normalize( vec3( - distFunc( p + d.yxx ) - distFunc( p - d.yxx ), - distFunc( p + d.xyx ) - distFunc( p - d.xyx ), - distFunc( p + d.xxy ) - distFunc( p - d.xxy ) - ) ); -} - -void main() { - vec2 p = ( gl_FragCoord.xy * 2.0 - resolution ) / resolution.y; - - vec3 rayOri = divideByW( inversePVM * vec4( p, 0.0, 1.0 ) ); - vec3 farPos = divideByW( inversePVM * vec4( p, 1.0, 1.0 ) ); - vec3 rayDir = normalize( farPos - rayOri ); - float rayLen = length( vPositionWithoutModel.xyz - rayOri ); - vec3 rayPos = rayOri + rayDir * rayLen; - float dist; - - for ( int i = 0; i < MARCH_ITER; i ++ ) { - dist = distFunc( rayPos ); - rayLen += 0.5 * dist; - rayPos = rayOri + rayDir * rayLen; - - if ( abs( dist ) < 1E-3 ) { break; } - if ( rayLen > cameraNearFar.y ) { break; } - } - - if ( 0.01 < dist ) { - discard; - } - - vec3 modelNormal = normalize( normalMatrix * vec4( normalFunc( rayPos, 1E-2 ), 1.0 ) ).xyz; - - vec4 modelPos = modelMatrix * vec4( rayPos, 1.0 ); - vec4 projPos = projectionMatrix * viewMatrix * modelPos; // terrible - float depth = projPos.z / projPos.w; - gl_FragDepth = 0.5 + 0.5 * depth; - - #ifdef DEFERRED - fragPosition = vec4( modelPos.xyz, depth ); - fragNormal = vec4( modelNormal, 1.0 ); - fragColor = vec4( vec3( 0.3 ), 1.0 ); - fragWTF = vec4( vec3( 1.0, 0.1, 0.0 ), 2 ); - #endif - - #ifdef DEPTH - float shadowDepth = linearstep( - cameraNearFar.x, - cameraNearFar.y, - length( cameraPos - modelPos.xyz ) - ); - fragColor = vec4( shadowDepth, shadowDepth * shadowDepth, shadowDepth, 1.0 ); - #endif -} diff --git a/src/utils/Pool.ts b/src/utils/Pool.ts deleted file mode 100644 index 87621b6..0000000 --- a/src/utils/Pool.ts +++ /dev/null @@ -1,18 +0,0 @@ -export class Pool { - public array: T[]; - - public index = 0; - - public get current(): T { - return this.array[ this.index ]; - } - - public constructor( array: T[] ) { - this.array = array; - } - - public next(): T { - this.index = ( this.index + 1 ) % this.array.length; - return this.current; - } -} diff --git a/src/utils/RandomTexture.ts b/src/utils/RandomTexture.ts deleted file mode 100644 index 9d2df4c..0000000 --- a/src/utils/RandomTexture.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Xorshift } from '@fms-cat/experimental'; -import { gl } from '../globals/canvas'; -import GLCat, { GLCatTexture } from '@fms-cat/glcat-ts'; - -export class RandomTexture { - private __texture: GLCatTexture; - private __array: Uint8Array; - private __rng: Xorshift; - private __width: number; - private __height: number; - - public constructor( - glCat: GLCat, - width: number, - height: number, - ) { - this.__width = width; - this.__height = height; - this.__rng = new Xorshift(); - this.__array = new Uint8Array( width * height * 4 ); - this.__texture = glCat.createTexture()!; - this.__texture.textureFilter( gl.LINEAR ); - this.__texture.textureWrap( gl.REPEAT ); - } - - public get texture(): GLCatTexture { - return this.__texture; - } - - public dispose(): void { - this.__texture.dispose(); - } - - public resize( width: number, height: number, seed?: number ): void { - this.__width = width; - this.__height = height; - this.__array = new Uint8Array( width * height * 4 ); - - this.update( seed ); - } - - public update( seed?: number ): void { - if ( seed ) { this.__rng.seed = seed; } - - for ( let i = 0; i < this.__array.length; i ++ ) { - this.__array[ i ] = Math.floor( this.__rng.gen() * 256.0 ); - } - - this.__texture.setTextureFromArray( - this.__width, - this.__height, - this.__array - ); - } -} diff --git a/src/utils/arraySetDelete.ts b/src/utils/arraySetDelete.ts deleted file mode 100644 index eabe999..0000000 --- a/src/utils/arraySetDelete.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function arraySetDelete( array: Array, element: T ): boolean { - const index = array.indexOf( element ); - if ( index !== -1 ) { - array.splice( index, 1 ); - return true; - } - return false; -} diff --git a/src/utils/calcCharPos.ts b/src/utils/calcCharPos.ts deleted file mode 100644 index 8f30b6f..0000000 --- a/src/utils/calcCharPos.ts +++ /dev/null @@ -1,30 +0,0 @@ -const canvas = document.createElement( 'canvas' ); -const context = canvas.getContext( '2d' )!; - -export function calcCharPos( - text: string, - font: string, -): { - totalWidth: number; - chars: { - char: string; - x: number; - }[]; - } { - let totalWidth = 0; - let currentText = ''; - - context.font = font; - - const chars = text.split( '' ).map( ( char ) => { - const charWidth = context.measureText( char ).width; - - currentText += char; - totalWidth = context.measureText( currentText ).width; - const x = totalWidth - 0.5 * charWidth; - - return { x, char }; - } ); - - return { totalWidth, chars }; -} diff --git a/src/utils/createFontSpriteSheet.ts b/src/utils/createFontSpriteSheet.ts deleted file mode 100644 index 18f95d4..0000000 --- a/src/utils/createFontSpriteSheet.ts +++ /dev/null @@ -1,42 +0,0 @@ -// yoinked from https://github.com/mapbox/tiny-sdf (BSD 2-Clause) - -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { glCat } from '../globals/canvas'; - -const SPRITE_SIZE = 128; -export const SPRITE_SHEET_SIZE = 16 * SPRITE_SIZE; - -const CHARS = [ ...new Array( 256 ).keys() ].map( ( i ) => String.fromCharCode( i ) ); - -export function createFontSpriteSheet( { font, baseline }: { - font: string; - - /** - * 0.8 is recommended - */ - baseline?: number; -} ): GLCatTexture { - const texture = glCat.createTexture(); - - const canvas = document.createElement( 'canvas' ); - canvas.width = SPRITE_SHEET_SIZE; - canvas.height = SPRITE_SHEET_SIZE; - - const context = canvas.getContext( '2d' )!; - context.textAlign = 'center'; - context.fillStyle = '#fff'; - - context.font = font; - - for ( let i = 0; i < 256; i ++ ) { - const char = CHARS[ i ]; - const x = ( ( i % 16 ) + 0.5 ) * SPRITE_SIZE; - const y = ( Math.floor( i / 16 ) + ( baseline ?? 0.7 ) ) * SPRITE_SIZE; - - context.fillText( char, x, y ); - } - - texture.setTexture( canvas ); - - return texture; -} diff --git a/src/utils/createSVGTableTexture.ts b/src/utils/createSVGTableTexture.ts deleted file mode 100644 index a2219c6..0000000 --- a/src/utils/createSVGTableTexture.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { GLCatTexture } from '@fms-cat/glcat-ts'; -import { gl, glCat } from '../globals/canvas'; - -export function createSVGTableTexture( pathStrs: string[], width = 1024 ): GLCatTexture { - const table: number[] = []; // x, y, dx, dy - - pathStrs.map( ( pathStr ) => { - const svgNamespaceURI = 'http://www.w3.org/2000/svg'; - const path = document.createElementNS( svgNamespaceURI, 'path' ); - path.setAttribute( 'd', pathStr ); - - const pathLength = path.getTotalLength(); - const eps = 0.25 / width * pathLength; - - for ( let i = 0; i < width; i ++ ) { - const phase = ( ( i + 0.5 ) / width ) * pathLength; - - const point = path.getPointAtLength( phase ); - - const pointdn = path.getPointAtLength( phase - eps ); - const pointdp = path.getPointAtLength( phase + eps ); - - const dx = pointdp.x - pointdn.x; - const dy = pointdp.y - pointdn.y; - const dl = Math.sqrt( dx * dx + dy * dy ); - - table.push( point.x, point.y, dx / dl, dy / dl ); - } - } ); - - const texture = glCat.createTexture(); - texture.setTextureFromArray( - width, - pathStrs.length, - new Float32Array( table ), - { internalformat: gl.RGBA32F, format: gl.RGBA, type: gl.FLOAT }, - ); - texture.textureWrap( gl.REPEAT ); - - return texture; -} diff --git a/src/utils/injectCodeToShader.ts b/src/utils/injectCodeToShader.ts deleted file mode 100644 index 937cbde..0000000 --- a/src/utils/injectCodeToShader.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Assuming the first line is #version... - * @param code The original shader code - * @param inject The code you want to inject - */ -export function injectCodeToShader( code: string, inject: string ): string { - const lines = code.split( '\n' ); - lines.splice( 1, 0, inject ); - return lines.join( '\n' ); -} diff --git a/src/utils/iterateOverMap.ts b/src/utils/iterateOverMap.ts deleted file mode 100644 index 4ed5970..0000000 --- a/src/utils/iterateOverMap.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function iterateOverMap( - map: Map, - func: ( value: TValue, key: TKey ) => TReturn, -): TReturn[] { - return Array.from( map.entries() ).map( ( [ key, value ] ) => func( value, key ) ); -} diff --git a/src/utils/mod.ts b/src/utils/mod.ts deleted file mode 100644 index 51f946a..0000000 --- a/src/utils/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function mod( value: number, divisor: number ): number { - return value - Math.floor( value / divisor ) * divisor; -} diff --git a/src/utils/objectEntriesMap.ts b/src/utils/objectEntriesMap.ts deleted file mode 100644 index b8d1b6b..0000000 --- a/src/utils/objectEntriesMap.ts +++ /dev/null @@ -1,13 +0,0 @@ -export function objectEntriesMap( - object: { [ key: string ]: TValue }, - func: ( entry: [ string, TValue ] ) => TReturn, -): TReturn[] { - return Object.entries( object ).map( func ); -} - -export function objectValuesMap( - object: { [ key: string ]: TValue }, - func: ( entry: TValue ) => TReturn, -): TReturn[] { - return Object.values( object ).map( func ); -} diff --git a/src/utils/quatFromUnitVectors.ts b/src/utils/quatFromUnitVectors.ts deleted file mode 100644 index 73ac1ed..0000000 --- a/src/utils/quatFromUnitVectors.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Quaternion, Vector3 } from '@fms-cat/experimental'; - -// https://github.com/mrdoob/three.js/blob/94f043c4e105eb73236529231388402da2b07cba/src/math/Quaternion.js#L362 -export function quatFromUnitVectors( a: Vector3, b: Vector3 ): Quaternion { - const r = a.dot( b ) + 1.0; - - if ( r < 1E-4 ) { - if ( Math.abs( a.x ) > Math.abs( a.z ) ) { - return new Quaternion( [ -a.y, a.x, 0.0, r ] ).normalized; - } else { - return new Quaternion( [ 0.0, -a.z, a.y, r ] ).normalized; - } - } else { - return new Quaternion( [ - a.y * b.z - a.z * b.y, - a.z * b.x - a.x * b.z, - a.x * b.y - a.y * b.x, - r, - ] ).normalized; - } -} diff --git a/src/utils/setLightUniforms.ts b/src/utils/setLightUniforms.ts deleted file mode 100644 index 57eba50..0000000 --- a/src/utils/setLightUniforms.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { LightEntity } from '../entities/LightEntity'; -import { Material } from '../heck/Material'; - -export function setLightUniforms( - material: Material, - lights: LightEntity[], - frameCount: number, -): void { - const activeLights = lights.filter( ( light ) => ( - frameCount === light.lastUpdateFrame - ) ); - - material.addUniform( - 'lightCount', - '1i', - activeLights.length, - ); - - material.addUniformVector( - 'lightNearFar', - '2fv', - activeLights.map( ( light ) => [ light.camera.near, light.camera.far ] ).flat(), - ); - - material.addUniformVector( - 'lightPos', - '3fv', - activeLights.map( ( light ) => light.globalTransformCache.position.elements ).flat(), - ); - - material.addUniformVector( - 'lightColor', - '3fv', - activeLights.map( ( light ) => light.color ).flat(), - ); - - material.addUniformVector( - 'lightParams', - '4fv', - activeLights.map( ( light ) => [ light.spotness, 0.0, 0.0, 0.0 ] ).flat(), - ); - - material.addUniformMatrixVector( - 'lightPV', - 'Matrix4fv', - activeLights.map( ( light ) => ( - light.camera.projectionMatrix.multiply( - light.globalTransformCache.matrix.inverse! - ).elements - ) ).flat(), - ); - - material.addUniformTextures( - 'samplerShadow', - ...activeLights.map( ( light ) => light.shadowMap.texture ), - ); -} diff --git a/src/utils/vdc.ts b/src/utils/vdc.ts deleted file mode 100644 index 85313c0..0000000 --- a/src/utils/vdc.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generate a number using Van der Corput sequence. - * e.g. vdc(i, 2) = 1/2, 1/4, 3/4, 1/8, 5/8, 3/8, 7/8, 1/16, ... - * @param i Index of the sequence - * @param base Base of the sequence - */ -export function vdc( i: number, base: number ): number { - let r = 0; - let denom = 1; - - while ( 0 < i ) { - denom *= base; - r += ( i % base ) / denom; - i = Math.floor( i / base ); - } - - return r; -} diff --git a/src/vert.d.ts b/src/vert.d.ts deleted file mode 100644 index 2046fd1..0000000 --- a/src/vert.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.vert' { - const code: string; - export default code; -} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 90c03ca..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "target": "esnext", - "module": "esnext", - "strict": true, - "sourceMap": true, - "moduleResolution": "node", - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "resolveJsonModule": false, - "forceConsistentCasingInFileNames": true - }, - "include": [ - "src/**/*" - ] -} diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index a1d38e8..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,124 +0,0 @@ -/* eslint-env node */ -/* eslint-disable @typescript-eslint/no-var-requires */ - -const TerserPlugin = require( 'terser-webpack-plugin' ); -const HtmlWebpackPlugin = require( 'html-webpack-plugin' ); -const packageJson = require( './package.json' ); -const path = require( 'path' ); -const webpack = require( 'webpack' ); - -/** - * @type TerserPlugin.TerserPluginOptions[ 'terserOptions' ] - */ -const terserOptions = { - compress: { - arguments: true, - booleans_as_integers: true, - drop_console: true, - keep_fargs: false, - passes: 2, - unsafe_arrows: true, - unsafe_math: true, - }, - mangle: { - properties: { - regex: /.+/, - keep_quoted: true, - reserved: [ - // material tags - 'forward', - 'deferred', - 'cubemap', - 'depth', - ] - }, - }, - format: { - ascii_only: true, - ecma: 2020, - }, - module: true, - toplevel: true, -}; - -module.exports = ( env, argv ) => { - const VERSION = packageJson.version; - const DEV = argv.mode === 'development'; - // console.info( `Webpack: Building ${ packageJson.name } v${ VERSION } under ${ argv.mode } settings...` ); - - return { - entry: path.resolve( __dirname, 'src/main.ts' ), - output: { - path: path.join( __dirname, 'dist' ), - filename: 'bundle.js', - }, - resolve: { - extensions: [ '.js', '.ts' ], - }, - module: { - rules: [ - { - test: /automaton\.json$/, - use: [ - { - loader: path.resolve( __dirname, './loaders/automaton-json-loader.js' ), - options: { - minimize: DEV ? false : { - precisionTime: 3, - precisionValue: 3, - } - } - }, - ], - type: 'javascript/auto', - }, - { - test: /\.(glsl|frag|vert)$/, - type: 'asset/source', - use: [ - // shader minifier is kinda jej - // want to try it works well in development phase - { - loader: path.resolve( __dirname, './loaders/shader-minifier-loader.js' ), - options: { - preserveExternals: true, - }, - }, - 'glslify-loader', - ], - }, - { - test: /\.(opus|png)$/, - type: 'asset/inline', - }, - { - test: /\.tsx?$/, - exclude: /node_modules/, - use: [ - 'ts-loader', - ], - }, - ], - }, - optimization: { - minimize: !DEV, - minimizer: [ new TerserPlugin( { terserOptions } ) ], - moduleIds: DEV ? 'named' : undefined, - usedExports: !DEV, - }, - devServer: { - inline: true, - hot: true - }, - devtool: DEV ? 'inline-source-map' : 'source-map', - plugins: [ - new webpack.DefinePlugin( { - 'process.env': { - DEV, - VERSION: `"${ VERSION }"` - }, - } ), - new HtmlWebpackPlugin(), - ], - }; -}; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 95906cd..0000000 --- a/yarn.lock +++ /dev/null @@ -1,4438 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/helper-validator-identifier@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" - integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== - -"@babel/highlight@^7.10.4": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" - integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@choojs/findup@^0.2.0": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@choojs/findup/-/findup-0.2.1.tgz#ac13c59ae7be6e1da64de0779a0a7f03d75615a3" - integrity sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw== - dependencies: - commander "^2.15.1" - -"@discoveryjs/json-ext@^0.5.0": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" - integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg== - -"@eslint/eslintrc@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.0.tgz#99cc0a0584d72f1df38b900fb062ba995f395547" - integrity sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog== - dependencies: - ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^12.1.0" - ignore "^4.0.6" - import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - strip-json-comments "^3.1.1" - -"@fms-cat/automaton-fxs@^4.2.0-beta.0": - version "4.2.0-beta.0" - resolved "https://registry.yarnpkg.com/@fms-cat/automaton-fxs/-/automaton-fxs-4.2.0-beta.0.tgz#6ef97022466720a55719d04e3b587d234a1ddd0e" - integrity sha512-sJuF+qdjqH4nMAtqjI/qTFYHo9IZLAMmEvzGkBpM7YKfy/p9p4tjLeOKD8CEhqnWibYDsIuXr0Q4ythS7m+BTw== - dependencies: - "@fms-cat/automaton" "^4.2.0-beta.0" - -"@fms-cat/automaton-with-gui@^4.2.0-beta.0": - version "4.2.0-beta.0" - resolved "https://registry.yarnpkg.com/@fms-cat/automaton-with-gui/-/automaton-with-gui-4.2.0-beta.0.tgz#95dbd32370e100164add649bc95bdcaee3882605" - integrity sha512-baWEwEbqPbGSi98LQsAgy5fh4kRr8LYY6ZueJIZUOtu+MgaBsRfuW7vTO+ALxfZPxyMS/RsYIdbBNCZLpqepAA== - dependencies: - "@fms-cat/automaton" "^4.2.0-beta.0" - -"@fms-cat/automaton@^4.2.0-beta.0": - version "4.2.0-beta.0" - resolved "https://registry.yarnpkg.com/@fms-cat/automaton/-/automaton-4.2.0-beta.0.tgz#ea45190b9b9592981a3d95d21a391c37a352ccb7" - integrity sha512-2shfqT4zo/LDV0mpBkLG8lZfgLSHsljXjXC0p/it4YfRZagZmZKEPDxmFpHgb6DfAmmO9o4sX5iWB0tcib9qfg== - -"@fms-cat/experimental@^0.6.1": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@fms-cat/experimental/-/experimental-0.6.1.tgz#c13e69db4d7faca3fed3cc29e75cbe3ac465f6c0" - integrity sha512-qgpn2ITe2hR79BUPVnU3w9JqGGcmmKAvknYLK+yqPfCAIhPy5Gh+LKpT20Jx3Vp/jmbRhDghHfRbFIA9S4NrmA== - -"@fms-cat/glcat-ts@^0.15.0": - version "0.15.0" - resolved "https://registry.yarnpkg.com/@fms-cat/glcat-ts/-/glcat-ts-0.15.0.tgz#6540ea16d6c5e36dea1a87bc1ccc7c4f7a5a21ac" - integrity sha512-qdBgZfDLJWomZewadhhdZ1Aq81quYQSVSy6cim/czhbfAzf+468dqt9q1mV0v71J3B29Qyxg1omu+i12BLseeA== - -"@nodelib/fs.scandir@2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" - integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== - dependencies: - "@nodelib/fs.stat" "2.0.4" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" - integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" - integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== - dependencies: - "@nodelib/fs.scandir" "2.1.4" - fastq "^1.6.0" - -"@types/audiobuffer-to-wav@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/audiobuffer-to-wav/-/audiobuffer-to-wav-1.0.0.tgz#4b974f50b96f3f760231b11b2e22dac33b2d2fbf" - integrity sha512-SbhLEr/BOWStZ0w9mPJLjUc6REGl+lUsf8M/opXy1jvAFfm+Ontt/8c0KZEvNY+TWy9NO1j/V+32uPCBNExpRg== - -"@types/eslint-scope@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.0.tgz#4792816e31119ebd506902a482caec4951fabd86" - integrity sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "7.2.7" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.7.tgz#f7ef1cf0dceab0ae6f9a976a0a9af14ab1baca26" - integrity sha512-EHXbc1z2GoQRqHaAT7+grxlTJ3WE2YNeD6jlpPoRc83cCoThRY+NUWjCUZaYmk51OICkPXn2hhphcWcWXgNW0Q== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^0.0.46": - version "0.0.46" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" - integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== - -"@types/glob@^7.1.1": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/html-minifier-terser@^5.0.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#3c9ee980f1a10d6021ae6632ca3e79ca2ec4fb50" - integrity sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA== - -"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.6": - version "7.0.7" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" - integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== - -"@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/node@*": - version "14.14.32" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.32.tgz#90c5c4a8d72bbbfe53033f122341343249183448" - integrity sha512-/Ctrftx/zp4m8JOujM5ZhwzlWLx22nbQJiVqz8/zE15gOeEW+uly3FSX4fGFpcfEvFzXcMCJwq9lGVWgyARXhg== - -"@types/webpack-env@^1.16.0": - version "1.16.0" - resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.16.0.tgz#8c0a9435dfa7b3b1be76562f3070efb3f92637b4" - integrity sha512-Fx+NpfOO0CpeYX2g9bkvX8O5qh9wrU1sOF4g8sft4Mu7z+qfe387YlyY8w8daDyDsKY5vUxM0yxkAYnbkRbZEw== - -"@typescript-eslint/eslint-plugin@^4.17.0": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.17.0.tgz#6f856eca4e6a52ce9cf127dfd349096ad936aa2d" - integrity sha512-/fKFDcoHg8oNan39IKFOb5WmV7oWhQe1K6CDaAVfJaNWEhmfqlA24g+u1lqU5bMH7zuNasfMId4LaYWC5ijRLw== - dependencies: - "@typescript-eslint/experimental-utils" "4.17.0" - "@typescript-eslint/scope-manager" "4.17.0" - debug "^4.1.1" - functional-red-black-tree "^1.0.1" - lodash "^4.17.15" - regexpp "^3.0.0" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/experimental-utils@4.17.0": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.17.0.tgz#762c44aaa1a6a3c05b6d63a8648fb89b89f84c80" - integrity sha512-ZR2NIUbnIBj+LGqCFGQ9yk2EBQrpVVFOh9/Kd0Lm6gLpSAcCuLLe5lUCibKGCqyH9HPwYC0GIJce2O1i8VYmWA== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.17.0" - "@typescript-eslint/types" "4.17.0" - "@typescript-eslint/typescript-estree" "4.17.0" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" - -"@typescript-eslint/parser@^4.17.0": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.17.0.tgz#141b647ffc72ebebcbf9b0fe6087f65b706d3215" - integrity sha512-KYdksiZQ0N1t+6qpnl6JeK9ycCFprS9xBAiIrw4gSphqONt8wydBw4BXJi3C11ywZmyHulvMaLjWsxDjUSDwAw== - dependencies: - "@typescript-eslint/scope-manager" "4.17.0" - "@typescript-eslint/types" "4.17.0" - "@typescript-eslint/typescript-estree" "4.17.0" - debug "^4.1.1" - -"@typescript-eslint/scope-manager@4.17.0": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.17.0.tgz#f4edf94eff3b52a863180f7f89581bf963e3d37d" - integrity sha512-OJ+CeTliuW+UZ9qgULrnGpPQ1bhrZNFpfT/Bc0pzNeyZwMik7/ykJ0JHnQ7krHanFN9wcnPK89pwn84cRUmYjw== - dependencies: - "@typescript-eslint/types" "4.17.0" - "@typescript-eslint/visitor-keys" "4.17.0" - -"@typescript-eslint/types@4.17.0": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.17.0.tgz#f57d8fc7f31b348db946498a43050083d25f40ad" - integrity sha512-RN5z8qYpJ+kXwnLlyzZkiJwfW2AY458Bf8WqllkondQIcN2ZxQowAToGSd9BlAUZDB5Ea8I6mqL2quGYCLT+2g== - -"@typescript-eslint/typescript-estree@4.17.0": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.17.0.tgz#b835d152804f0972b80dbda92477f9070a72ded1" - integrity sha512-lRhSFIZKUEPPWpWfwuZBH9trYIEJSI0vYsrxbvVvNyIUDoKWaklOAelsSkeh3E2VBSZiNe9BZ4E5tYBZbUczVQ== - dependencies: - "@typescript-eslint/types" "4.17.0" - "@typescript-eslint/visitor-keys" "4.17.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/visitor-keys@4.17.0": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.17.0.tgz#9c304cfd20287c14a31d573195a709111849b14d" - integrity sha512-WfuMN8mm5SSqXuAr9NM+fItJ0SVVphobWYkWOwQ1odsfC014Vdxk/92t4JwS1Q6fCA/ABfCKpa3AVtpUKTNKGQ== - dependencies: - "@typescript-eslint/types" "4.17.0" - eslint-visitor-keys "^2.0.0" - -"@webassemblyjs/ast@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" - integrity sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - -"@webassemblyjs/floating-point-hex-parser@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz#34d62052f453cd43101d72eab4966a022587947c" - integrity sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA== - -"@webassemblyjs/helper-api-error@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz#aaea8fb3b923f4aaa9b512ff541b013ffb68d2d4" - integrity sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w== - -"@webassemblyjs/helper-buffer@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz#d026c25d175e388a7dbda9694e91e743cbe9b642" - integrity sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA== - -"@webassemblyjs/helper-numbers@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz#7ab04172d54e312cc6ea4286d7d9fa27c88cd4f9" - integrity sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.0" - "@webassemblyjs/helper-api-error" "1.11.0" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz#85fdcda4129902fe86f81abf7e7236953ec5a4e1" - integrity sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA== - -"@webassemblyjs/helper-wasm-section@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz#9ce2cc89300262509c801b4af113d1ca25c1a75b" - integrity sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - -"@webassemblyjs/ieee754@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz#46975d583f9828f5d094ac210e219441c4e6f5cf" - integrity sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.0.tgz#f7353de1df38aa201cba9fb88b43f41f75ff403b" - integrity sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.0.tgz#86e48f959cf49e0e5091f069a709b862f5a2cadf" - integrity sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw== - -"@webassemblyjs/wasm-edit@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz#ee4a5c9f677046a210542ae63897094c2027cb78" - integrity sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/helper-wasm-section" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - "@webassemblyjs/wasm-opt" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - "@webassemblyjs/wast-printer" "1.11.0" - -"@webassemblyjs/wasm-gen@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz#3cdb35e70082d42a35166988dda64f24ceb97abe" - integrity sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/ieee754" "1.11.0" - "@webassemblyjs/leb128" "1.11.0" - "@webassemblyjs/utf8" "1.11.0" - -"@webassemblyjs/wasm-opt@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz#1638ae188137f4bb031f568a413cd24d32f92978" - integrity sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - -"@webassemblyjs/wasm-parser@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz#3e680b8830d5b13d1ec86cc42f38f3d4a7700754" - integrity sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-api-error" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/ieee754" "1.11.0" - "@webassemblyjs/leb128" "1.11.0" - "@webassemblyjs/utf8" "1.11.0" - -"@webassemblyjs/wast-printer@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz#680d1f6a5365d6d401974a8e949e05474e1fab7e" - integrity sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@xtuc/long" "4.2.2" - -"@webpack-cli/configtest@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.0.1.tgz#241aecfbdc715eee96bed447ed402e12ec171935" - integrity sha512-B+4uBUYhpzDXmwuo3V9yBH6cISwxEI4J+NO5ggDaGEEHb0osY/R7MzeKc0bHURXQuZjMM4qD+bSJCKIuI3eNBQ== - -"@webpack-cli/info@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.2.2.tgz#ef3c0cd947a1fa083e174a59cb74e0b6195c236c" - integrity sha512-5U9kUJHnwU+FhKH4PWGZuBC1hTEPYyxGSL5jjoBI96Gx8qcYJGOikpiIpFoTq8mmgX3im2zAo2wanv/alD74KQ== - dependencies: - envinfo "^7.7.3" - -"@webpack-cli/serve@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.3.0.tgz#2730c770f5f1f132767c63dcaaa4ec28f8c56a6c" - integrity sha512-k2p2VrONcYVX1wRRrf0f3X2VGltLWcv+JzXRBDmvCxGlCeESx4OXw91TsWeKOkp784uNoVQo313vxJFHXPPwfw== - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -acorn-jsx@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" - integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== - -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -acorn@^8.0.4: - version "8.1.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.0.tgz#52311fd7037ae119cbb134309e901aa46295b3fe" - integrity sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA== - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0, ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^7.0.2: - version "7.2.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.2.1.tgz#a5ac226171912447683524fa2f1248fcf8bac83d" - integrity sha512-+nu0HDv7kNSOua9apAVc979qd932rrZeb3WOvoiD31A/p1mIE5/9bN2027pE2rOPYEdS3UHzsvof4hY+lM9/WQ== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@^3.0.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" - integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== - -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-html@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" - integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4= - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-flatten@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - dependencies: - array-uniq "^1.0.1" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -audiobuffer-to-wav@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/audiobuffer-to-wav/-/audiobuffer-to-wav-1.0.0.tgz#d5b432271455e7fee56b111cd0f8d620d7f9e105" - integrity sha1-1bQyJxRV5/7laxEc0PjWINf54QU= - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -body-parser@1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - -bonjour@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" - integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= - dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" - dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" - multicast-dns-service-types "^1.1.0" - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browserslist@^4.14.5: - version "4.16.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717" - integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== - dependencies: - caniuse-lite "^1.0.30001181" - colorette "^1.2.1" - electron-to-chromium "^1.3.649" - escalade "^3.1.1" - node-releases "^1.1.70" - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camel-case@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -caniuse-lite@^1.0.30001181: - version "1.0.30001197" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001197.tgz#47ad15b977d2f32b3ec2fe2b087e0c50443771db" - integrity sha512-8aE+sqBqtXz4G8g35Eg/XEaFr2N7rd/VQ6eABGBmNtcB8cN6qNJhMi6oSFy4UWWZgqgL3filHT8Nha4meu3tsw== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -clean-css@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" - integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA== - dependencies: - source-map "~0.6.0" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colorette@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== - -commander@^2.15.1, commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - -commander@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" - integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -compressible@~2.0.16: - version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -connect-history-api-fallback@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypto-random-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" - integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== - -css-select@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" - integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== - dependencies: - boolbase "^1.0.0" - css-what "^3.2.1" - domutils "^1.7.0" - nth-check "^1.0.2" - -css-what@^3.2.1: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" - integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.1.1, debug@^3.2.6: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -deep-equal@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" - integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== - dependencies: - is-arguments "^1.0.4" - is-date-object "^1.0.1" - is-regex "^1.0.4" - object-is "^1.0.1" - object-keys "^1.1.1" - regexp.prototype.flags "^1.2.0" - -deep-is@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -default-gateway@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" - integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== - dependencies: - execa "^1.0.0" - ip-regex "^2.1.0" - -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -del@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" - integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== - dependencies: - "@types/glob" "^7.1.1" - globby "^6.1.0" - is-path-cwd "^2.0.0" - is-path-in-cwd "^2.0.0" - p-map "^2.0.0" - pify "^4.0.1" - rimraf "^2.6.3" - -del@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" - integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== - dependencies: - globby "^11.0.1" - graceful-fs "^4.2.4" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.2" - p-map "^4.0.0" - rimraf "^3.0.2" - slash "^3.0.0" - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - -dns-packet@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" - integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg== - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" - -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" - integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= - dependencies: - buffer-indexof "^1.0.0" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dom-converter@^0.2: - version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" - integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== - dependencies: - utila "~0.4" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -domelementtype@1, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e" - integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domutils@^1.5.1, domutils@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -dot-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" - integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.3.649: - version "1.3.683" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.683.tgz#2c9ab53ff5275cf3dd49278af714d0f8975204f7" - integrity sha512-8mFfiAesXdEdE0DhkMKO7W9U6VU/9T3VTWwZ+4g84/YMP4kgwgFtQgUxuu7FUMcvSeKSNhFQNU+WZ68BQTLT5A== - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" - integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -enhanced-resolve@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz#525c5d856680fbd5052de453ac83e32049958b5c" - integrity sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enquirer@^2.3.5, enquirer@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -entities@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - -envinfo@^7.7.3: - version "7.7.4" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320" - integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ== - -errno@^0.1.3: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -es-module-lexer@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.4.1.tgz#dda8c6a14d8f340a24e34331e0fab0cb50438e0e" - integrity sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA== - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -eslint-plugin-sort-imports-es6-autofix@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-sort-imports-es6-autofix/-/eslint-plugin-sort-imports-es6-autofix-0.6.0.tgz#b8cd8639d7a54cefce6b17898b102fd5ec31e52b" - integrity sha512-2NVaBGF9NN+727Fyq+jJYihdIeegjXeUUrZED9Q8FVB8MsV3YQEyXG96GVnXqWt0pmn7xfCZOZf3uKnIhBrfeQ== - -eslint-scope@^5.0.0, eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-utils@^2.0.0, eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" - integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== - -eslint@^7.21.0: - version "7.21.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.21.0.tgz#4ecd5b8c5b44f5dedc9b8a110b01bbfeb15d1c83" - integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.0" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.0.1" - doctrine "^3.0.0" - enquirer "^2.3.5" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" - esutils "^2.0.2" - file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" - globals "^12.1.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash "^4.17.20" - minimatch "^3.0.4" - natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.4" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== - dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -events@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -eventsource@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" - integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== - dependencies: - original "^1.0.0" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" - integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -express@^4.17.1: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.1.1: - version "3.2.5" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" - integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fastest-levenshtein@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" - integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== - -fastq@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" - integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== - dependencies: - reusify "^1.0.4" - -faye-websocket@^0.11.3: - version "0.11.3" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" - integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== - dependencies: - websocket-driver ">=0.5.1" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" - integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== - -follow-redirects@^1.0.0: - version "1.13.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" - integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - -get-caller-file@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-stream@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" - integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.0.0, glob-parent@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@^7.0.3, glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== - dependencies: - type-fest "^0.8.1" - -globby@^11.0.1: - version "11.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" - integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -glsl-inject-defines@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/glsl-inject-defines/-/glsl-inject-defines-1.0.3.tgz#dd1aacc2c17fcb2bd3fc32411c6633d0d7b60fd4" - integrity sha1-3RqswsF/yyvT/DJBHGYz0Ne2D9Q= - dependencies: - glsl-token-inject-block "^1.0.0" - glsl-token-string "^1.0.1" - glsl-tokenizer "^2.0.2" - -glsl-resolve@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/glsl-resolve/-/glsl-resolve-0.0.1.tgz#894bef73910d792c81b5143180035d0a78af76d3" - integrity sha1-iUvvc5ENeSyBtRQxgANdCnivdtM= - dependencies: - resolve "^0.6.1" - xtend "^2.1.2" - -glsl-token-assignments@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/glsl-token-assignments/-/glsl-token-assignments-2.0.2.tgz#a5d82ab78499c2e8a6b83cb69495e6e665ce019f" - integrity sha1-pdgqt4SZwuimuDy2lJXm5mXOAZ8= - -glsl-token-defines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/glsl-token-defines/-/glsl-token-defines-1.0.0.tgz#cb892aa959936231728470d4f74032489697fa9d" - integrity sha1-y4kqqVmTYjFyhHDU90AySJaX+p0= - dependencies: - glsl-tokenizer "^2.0.0" - -glsl-token-depth@^1.1.0, glsl-token-depth@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/glsl-token-depth/-/glsl-token-depth-1.1.2.tgz#23c5e30ee2bd255884b4a28bc850b8f791e95d84" - integrity sha1-I8XjDuK9JViEtKKLyFC495HpXYQ= - -glsl-token-descope@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/glsl-token-descope/-/glsl-token-descope-1.0.2.tgz#0fc90ab326186b82f597b2e77dc9e21efcd32076" - integrity sha1-D8kKsyYYa4L1l7LnfcniHvzTIHY= - dependencies: - glsl-token-assignments "^2.0.0" - glsl-token-depth "^1.1.0" - glsl-token-properties "^1.0.0" - glsl-token-scope "^1.1.0" - -glsl-token-inject-block@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/glsl-token-inject-block/-/glsl-token-inject-block-1.1.0.tgz#e1015f5980c1091824adaa2625f1dfde8bd00034" - integrity sha1-4QFfWYDBCRgkraomJfHf3ovQADQ= - -glsl-token-properties@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/glsl-token-properties/-/glsl-token-properties-1.0.1.tgz#483dc3d839f0d4b5c6171d1591f249be53c28a9e" - integrity sha1-SD3D2Dnw1LXGFx0VkfJJvlPCip4= - -glsl-token-scope@^1.1.0, glsl-token-scope@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/glsl-token-scope/-/glsl-token-scope-1.1.2.tgz#a1728e78df24444f9cb93fd18ef0f75503a643b1" - integrity sha1-oXKOeN8kRE+cuT/RjvD3VQOmQ7E= - -glsl-token-string@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/glsl-token-string/-/glsl-token-string-1.0.1.tgz#59441d2f857de7c3449c945666021ece358e48ec" - integrity sha1-WUQdL4V958NEnJRWZgIezjWOSOw= - -glsl-token-whitespace-trim@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/glsl-token-whitespace-trim/-/glsl-token-whitespace-trim-1.0.0.tgz#46d1dfe98c75bd7d504c05d7d11b1b3e9cc93b10" - integrity sha1-RtHf6Yx1vX1QTAXX0RsbPpzJOxA= - -glsl-tokenizer@^2.0.0, glsl-tokenizer@^2.0.2: - version "2.1.5" - resolved "https://registry.yarnpkg.com/glsl-tokenizer/-/glsl-tokenizer-2.1.5.tgz#1c2e78c16589933c274ba278d0a63b370c5fee1a" - integrity sha512-XSZEJ/i4dmz3Pmbnpsy3cKh7cotvFlBiZnDOwnj/05EwNp2XrhQ4XKJxT7/pDt4kp4YcpRSKz8eTV7S+mwV6MA== - dependencies: - through2 "^0.6.3" - -glslify-bundle@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glslify-bundle/-/glslify-bundle-5.1.1.tgz#30d2ddf2e6b935bf44d1299321e3b729782c409a" - integrity sha512-plaAOQPv62M1r3OsWf2UbjN0hUYAB7Aph5bfH58VxJZJhloRNbxOL9tl/7H71K7OLJoSJ2ZqWOKk3ttQ6wy24A== - dependencies: - glsl-inject-defines "^1.0.1" - glsl-token-defines "^1.0.0" - glsl-token-depth "^1.1.1" - glsl-token-descope "^1.0.2" - glsl-token-scope "^1.1.1" - glsl-token-string "^1.0.1" - glsl-token-whitespace-trim "^1.0.0" - glsl-tokenizer "^2.0.2" - murmurhash-js "^1.0.0" - shallow-copy "0.0.1" - -glslify-deps@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/glslify-deps/-/glslify-deps-1.3.2.tgz#c09ee945352bfc07ac2d8a1cc9e3de776328c72b" - integrity sha512-7S7IkHWygJRjcawveXQjRXLO2FTjijPDYC7QfZyAQanY+yGLCFHYnPtsGT9bdyHiwPTw/5a1m1M9hamT2aBpag== - dependencies: - "@choojs/findup" "^0.2.0" - events "^3.2.0" - glsl-resolve "0.0.1" - glsl-tokenizer "^2.0.0" - graceful-fs "^4.1.2" - inherits "^2.0.1" - map-limit "0.0.1" - resolve "^1.0.0" - -glslify-loader@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glslify-loader/-/glslify-loader-2.0.0.tgz#f864adc2baea195054532a5aebfba6f898ac31eb" - integrity sha512-oOdmTX1BSPG75o3gNZToemfbbuN5dgi4Pco/aRfjbwGxPIfflYLuok6JCf2kDBPHjP+tV+imNsj6YRJg9gKJ1A== - dependencies: - glslify-bundle "^5.0.0" - glslify-deps "^1.3.0" - loader-utils "^1.1.0" - resolve "^1.3.3" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.2.4: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== - -handle-thing@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" - integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbols@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -he@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -html-entities@^1.3.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" - integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== - -html-minifier-terser@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054" - integrity sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg== - dependencies: - camel-case "^4.1.1" - clean-css "^4.2.3" - commander "^4.1.1" - he "^1.2.0" - param-case "^3.0.3" - relateurl "^0.2.7" - terser "^4.6.3" - -html-webpack-plugin@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.3.0.tgz#9d93a547db34ac1f28b9f41fd8fe38a5d56770f3" - integrity sha512-BjtSQCy5J0e9EDV+NZ4i+w36N9avXfQDF4QoAV9YAECG50x6/2tfJkFb0ws9eTcszLdyg4vs6FI6hMgVzVoQqw== - dependencies: - "@types/html-minifier-terser" "^5.0.0" - html-minifier-terser "^5.0.1" - lodash "^4.17.20" - pretty-error "^2.1.1" - tapable "^2.0.0" - -htmlparser2@^3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-parser-js@>=0.5.1: - version "0.5.3" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" - integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== - -http-proxy-middleware@0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" - integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== - dependencies: - http-proxy "^1.17.0" - is-glob "^4.0.0" - lodash "^4.17.11" - micromatch "^3.1.10" - -http-proxy@^1.17.0: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.1.4: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - -import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" - integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -internal-ip@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" - integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== - dependencies: - default-gateway "^4.2.0" - ipaddr.js "^1.9.0" - -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== - -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" - integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= - -ip@^1.1.0, ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - -ipaddr.js@1.9.1, ipaddr.js@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-absolute-url@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" - integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== - dependencies: - call-bind "^1.0.0" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-core-module@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== - dependencies: - has "^1.0.3" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-cwd@^2.0.0, is-path-cwd@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-in-cwd@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" - integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== - dependencies: - is-path-inside "^2.1.0" - -is-path-inside@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" - integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== - dependencies: - path-is-inside "^1.0.2" - -is-path-inside@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-regex@^1.0.4: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" - integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== - dependencies: - call-bind "^1.0.2" - has-symbols "^1.0.1" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -jest-worker@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -json3@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" - integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" - integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== - dependencies: - minimist "^1.2.5" - -killable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" - integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -loader-runner@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" - integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== - -loader-utils@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -loader-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" - integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -loglevel@^1.6.8: - version "1.7.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197" - integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== - -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-limit@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/map-limit/-/map-limit-0.0.1.tgz#eb7961031c0f0e8d001bf2d56fab685d58822f38" - integrity sha1-63lhAxwPDo0AG/LVb6toXViCLzg= - dependencies: - once "~1.3.0" - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^4.0.0, micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -mime-db@1.46.0, "mime-db@>= 1.43.0 < 2": - version "1.46.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" - integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== - -mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.24: - version "2.1.29" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" - integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== - dependencies: - mime-db "1.46.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@^2.4.4: - version "2.5.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" - integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimalistic-assert@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.1, mkdirp@^0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" - integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= - -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== - dependencies: - dns-packet "^1.3.1" - thunky "^1.0.2" - -murmurhash-js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/murmurhash-js/-/murmurhash-js-1.0.0.tgz#b06278e21fc6c37fa5313732b0412bcb6ae15f51" - integrity sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E= - -nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - -node-forge@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" - integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== - -node-releases@^1.1.70: - version "1.1.71" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" - integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -nth-check@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-is@^1.0.1: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -obuf@^1.0.0, obuf@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -once@~1.3.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" - integrity sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA= - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -opn@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" - integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== - dependencies: - is-wsl "^1.1.0" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -original@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" - integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== - dependencies: - url-parse "^1.4.3" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-retry@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" - integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w== - dependencies: - retry "^0.12.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -param-case@^3.0.3: - version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" - integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -portfinder@^1.0.26: - version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -pretty-error@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.2.tgz#be89f82d81b1c86ec8fdfbc385045882727f93b6" - integrity sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw== - dependencies: - lodash "^4.17.20" - renderkid "^2.0.4" - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" - integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -queue-microtask@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.2.tgz#abf64491e6ecf0f38a6502403d4cda04f372dfd3" - integrity sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -range-parser@^1.2.1, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -"readable-stream@>=1.0.33-1 <1.1.0-0": - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.1, readable-stream@^2.0.2: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.0.6, readable-stream@^3.1.1: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -rechoir@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca" - integrity sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q== - dependencies: - resolve "^1.9.0" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" - integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -regexpp@^3.0.0, regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== - -relateurl@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -renderkid@^2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.5.tgz#483b1ac59c6601ab30a7a596a5965cabccfdd0a5" - integrity sha512-ccqoLg+HLOHq1vdfYNm4TBeaCDIi1FLt3wGojTDSvdewUv65oTmI3cnT2E4hRjl1gzKZIPK+KZrXzlUYKnR+vQ== - dependencies: - css-select "^2.0.2" - dom-converter "^0.2" - htmlparser2 "^3.10.1" - lodash "^4.17.20" - strip-ansi "^3.0.0" - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@^0.6.1: - version "0.6.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.6.3.tgz#dd957982e7e736debdf53b58a4dd91754575dd46" - integrity sha1-3ZV5gufnNt699TtYpN2RdUV13UY= - -resolve@^1.0.0, resolve@^1.3.3, resolve@^1.9.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - -schema-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" - integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== - dependencies: - "@types/json-schema" "^7.0.6" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= - -selfsigned@^1.10.8: - version "1.10.8" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.8.tgz#0d17208b7d12c33f8eac85c41835f27fc3d81a30" - integrity sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w== - dependencies: - node-forge "^0.10.0" - -semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serialize-javascript@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== - dependencies: - randombytes "^2.1.0" - -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - -shallow-copy@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" - integrity sha1-QV9CcC1z2BAzApLMXuhurhoRoXA= - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.0, signal-exit@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sockjs-client@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.0.tgz#2f8ff5d4b659e0d092f7aba0b7c386bd2aa20add" - integrity sha512-8Dt3BDi4FYNrCFGTL/HtwVzkARrENdwOUf1ZoW/9p3M8lZdFT35jVdrHza+qgxuG9H3/shR4cuX/X9umUrjP8Q== - dependencies: - debug "^3.2.6" - eventsource "^1.0.7" - faye-websocket "^0.11.3" - inherits "^2.0.4" - json3 "^3.3.3" - url-parse "^1.4.7" - -sockjs@^0.3.21: - version "0.3.21" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.21.tgz#b34ffb98e796930b60a0cfa11904d6a339a7d417" - integrity sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw== - dependencies: - faye-websocket "^0.11.3" - uuid "^3.4.0" - websocket-driver "^0.7.4" - -source-list-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@~0.5.12, source-map-support@~0.5.19: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@~0.7.2: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - -spdy-transport@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" - integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - dependencies: - debug "^4.1.0" - detect-node "^2.0.4" - hpack.js "^2.1.6" - obuf "^1.1.2" - readable-stream "^3.0.6" - wbuf "^1.7.3" - -spdy@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" - integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - dependencies: - debug "^4.1.0" - handle-thing "^2.0.0" - http-deceiver "^1.2.7" - select-hose "^2.0.0" - spdy-transport "^3.0.0" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -table@^6.0.4: - version "6.0.7" - resolved "https://registry.yarnpkg.com/table/-/table-6.0.7.tgz#e45897ffbcc1bcf9e8a87bf420f2c9e5a7a52a34" - integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== - dependencies: - ajv "^7.0.2" - lodash "^4.17.20" - slice-ansi "^4.0.0" - string-width "^4.2.0" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" - integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== - -temp-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" - integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== - -tempy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tempy/-/tempy-1.0.0.tgz#4f192b3ee3328a2684d0e3fc5c491425395aab65" - integrity sha512-eLXG5B1G0mRPHmgH2WydPl5v4jH35qEn3y/rA/aahKhIa91Pn119SsU7n7v/433gtT9ONzC8ISvNHIh2JSTm0w== - dependencies: - del "^6.0.0" - is-stream "^2.0.0" - temp-dir "^2.0.0" - type-fest "^0.16.0" - unique-string "^2.0.0" - -terser-webpack-plugin@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673" - integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q== - dependencies: - jest-worker "^26.6.2" - p-limit "^3.1.0" - schema-utils "^3.0.0" - serialize-javascript "^5.0.1" - source-map "^0.6.1" - terser "^5.5.1" - -terser@^4.6.3: - version "4.8.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -terser@^5.5.1: - version "5.6.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.6.0.tgz#138cdf21c5e3100b1b3ddfddf720962f88badcd2" - integrity sha512-vyqLMoqadC1uR0vywqOZzriDYzgEkNJFK4q9GeyOBHIbiECHiWLKcWfbQWAUaPfxkjDhapSlZB9f7fkMrvkVjA== - dependencies: - commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.19" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -through2@^0.6.3: - version "0.6.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" - integrity sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg= - dependencies: - readable-stream ">=1.0.33-1 <1.1.0-0" - xtend ">=4.0.0 <4.1.0-0" - -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - -ts-loader@^8.0.17: - version "8.0.17" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.0.17.tgz#98f2ccff9130074f4079fd89b946b4c637b1f2fc" - integrity sha512-OeVfSshx6ot/TCxRwpBHQ/4lRzfgyTkvi7ghDVrLXOHzTbSK413ROgu/xNqM72i3AFeAIJgQy78FwSMKmOW68w== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^4.0.0" - loader-utils "^2.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - -tslib@^1.8.1, tslib@^1.9.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" - integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== - -tsutils@^3.17.1: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" - integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typescript@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" - integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -unique-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" - integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== - dependencies: - crypto-random-string "^2.0.0" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse@^1.4.3, url-parse@^1.4.7: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.3.2, uuid@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -v8-compile-cache@^2.0.3, v8-compile-cache@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -watchpack@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7" - integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -wbuf@^1.1.0, wbuf@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - dependencies: - minimalistic-assert "^1.0.0" - -webpack-cli@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.5.0.tgz#b5213b84adf6e1f5de6391334c9fa53a48850466" - integrity sha512-wXg/ef6Ibstl2f50mnkcHblRPN/P9J4Nlod5Hg9HGFgSeF8rsqDGHJeVe4aR26q9l62TUJi6vmvC2Qz96YJw1Q== - dependencies: - "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.0.1" - "@webpack-cli/info" "^1.2.2" - "@webpack-cli/serve" "^1.3.0" - colorette "^1.2.1" - commander "^7.0.0" - enquirer "^2.3.6" - execa "^5.0.0" - fastest-levenshtein "^1.0.12" - import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" - v8-compile-cache "^2.2.0" - webpack-merge "^5.7.3" - -webpack-dev-middleware@^3.7.2: - version "3.7.3" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" - integrity sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== - dependencies: - memory-fs "^0.4.1" - mime "^2.4.4" - mkdirp "^0.5.1" - range-parser "^1.2.1" - webpack-log "^2.0.0" - -webpack-dev-server@^3.11.2: - version "3.11.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz#695ebced76a4929f0d5de7fd73fafe185fe33708" - integrity sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ== - dependencies: - ansi-html "0.0.7" - bonjour "^3.5.0" - chokidar "^2.1.8" - compression "^1.7.4" - connect-history-api-fallback "^1.6.0" - debug "^4.1.1" - del "^4.1.1" - express "^4.17.1" - html-entities "^1.3.1" - http-proxy-middleware "0.19.1" - import-local "^2.0.0" - internal-ip "^4.3.0" - ip "^1.1.5" - is-absolute-url "^3.0.3" - killable "^1.0.1" - loglevel "^1.6.8" - opn "^5.5.0" - p-retry "^3.0.1" - portfinder "^1.0.26" - schema-utils "^1.0.0" - selfsigned "^1.10.8" - semver "^6.3.0" - serve-index "^1.9.1" - sockjs "^0.3.21" - sockjs-client "^1.5.0" - spdy "^4.0.2" - strip-ansi "^3.0.1" - supports-color "^6.1.0" - url "^0.11.0" - webpack-dev-middleware "^3.7.2" - webpack-log "^2.0.0" - ws "^6.2.1" - yargs "^13.3.2" - -webpack-log@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" - integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - dependencies: - ansi-colors "^3.0.0" - uuid "^3.3.2" - -webpack-merge@^5.7.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.7.3.tgz#2a0754e1877a25a8bbab3d2475ca70a052708213" - integrity sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA== - dependencies: - clone-deep "^4.0.1" - wildcard "^2.0.0" - -webpack-sources@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.2.0.tgz#058926f39e3d443193b6c31547229806ffd02bac" - integrity sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w== - dependencies: - source-list-map "^2.0.1" - source-map "^0.6.1" - -webpack@^5.24.4: - version "5.24.4" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.24.4.tgz#37d8cf95841dd23c809ea02931294b3455d74a59" - integrity sha512-RXOdxF9hFFFhg47BryCgyFrEyyu7Y/75/uiI2DoUiTMqysK+WczVSTppvkR47oZcmI/DPaXCiCiaXBP8QjkNpA== - dependencies: - "@types/eslint-scope" "^3.7.0" - "@types/estree" "^0.0.46" - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/wasm-edit" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - acorn "^8.0.4" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.7.0" - es-module-lexer "^0.4.0" - eslint-scope "^5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.4" - json-parse-better-errors "^1.0.2" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.0.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.1" - watchpack "^2.0.0" - webpack-sources "^2.1.1" - -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -ws@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" - integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== - dependencies: - async-limiter "~1.0.0" - -"xtend@>=4.0.0 <4.1.0-0": - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -xtend@^2.1.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.2.0.tgz#eef6b1f198c1c8deafad8b1765a04dad4a01c5a9" - integrity sha1-7vax8ZjByN6vrYsXZaBNrUoBxak= - -y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs@^13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==