diff --git a/manual/config/_default/privacy.json b/manual/config/_default/privacy.json index 818e8e9cd..c7c7fdfc7 100644 --- a/manual/config/_default/privacy.json +++ b/manual/config/_default/privacy.json @@ -8,7 +8,7 @@ "instagram": { "disable": true }, - "twitter": { + "x": { "disable": true }, "vimeo": { diff --git a/package.json b/package.json index c9628fb27..95535ebef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postprocessing", - "version": "6.37.7", + "version": "6.37.8", "description": "A post processing library for three.js.", "homepage": "https://github.com/pmndrs/postprocessing", "license": "Zlib", @@ -79,7 +79,7 @@ "lint": "run-p lint:*", "lint:css": "stylelint --fix manual/assets/css/src", "lint:js": "eslint --fix src demo/src manual/assets/js/src", - "lint:dts": "tsc types/index.d.ts --noEmit", + "lint:dts": "tsc --project tsconfig.types.json", "postcss": "postcss manual/assets/css/dist/index.css -o manual/assets/css/dist/index.css -c manual", "prepublishOnly": "npm test", "prewatch": "run-s clean copy build:css build:js", @@ -90,7 +90,7 @@ "watch:js": "node esbuild -w" }, "peerDependencies": { - "three": ">= 0.157.0 < 0.180.0" + "three": ">= 0.157.0 < 0.181.0" }, "devDependencies": { "@tweakpane/core": "2.x.x", @@ -100,7 +100,7 @@ "@typescript-eslint/parser": "8.x.x", "autoprefixer": "10.x.x", "ava": "6.x.x", - "cpy-cli": "5.x.x", + "cpy-cli": "6.x.x", "cssnano": "7.x.x", "dat.gui": "0.x.x", "del-cli": "6.x.x", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e1fa1e818..39519be22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,16 +13,16 @@ importers: version: 2.0.5 '@types/node': specifier: 24.x.x - version: 24.2.0 + version: 24.3.1 '@types/three': specifier: 0.x.x - version: 0.179.0 + version: 0.180.0 '@typescript-eslint/eslint-plugin': specifier: 8.x.x - version: 8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2) + version: 8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0)(typescript@5.9.2))(eslint@9.35.0)(typescript@5.9.2) '@typescript-eslint/parser': specifier: 8.x.x - version: 8.39.0(eslint@9.32.0)(typescript@5.9.2) + version: 8.43.0(eslint@9.35.0)(typescript@5.9.2) autoprefixer: specifier: 10.x.x version: 10.4.21(postcss@8.5.6) @@ -30,11 +30,11 @@ importers: specifier: 6.x.x version: 6.4.1 cpy-cli: - specifier: 5.x.x - version: 5.0.0 + specifier: 6.x.x + version: 6.0.0 cssnano: specifier: 7.x.x - version: 7.1.0(postcss@8.5.6) + version: 7.1.1(postcss@8.5.6) dat.gui: specifier: 0.x.x version: 0.7.9 @@ -43,10 +43,10 @@ importers: version: 6.0.0 esbuild: specifier: 0.25.x - version: 0.25.8 + version: 0.25.9 esbuild-plugin-glsl: specifier: 1.x.x - version: 1.4.0(esbuild@0.25.8) + version: 1.4.0(esbuild@0.25.9) esdoc: specifier: 1.x.x version: 1.1.0 @@ -58,16 +58,16 @@ importers: version: 1.0.0 eslint: specifier: 9.x.x - version: 9.32.0 + version: 9.35.0 eslint-config-aether: specifier: 2.x.x - version: 2.0.2(eslint@9.32.0)(typescript@5.9.2) + version: 2.0.2(eslint@9.35.0)(typescript@5.9.2) gzipper: specifier: 8.x.x version: 8.2.1 hugo-bin: specifier: 0.x.x - version: 0.145.2 + version: 0.147.0 npm-run-all: specifier: 4.x.x version: 4.1.5 @@ -79,28 +79,28 @@ importers: version: 11.0.1(postcss@8.5.6) postcss-preset-env: specifier: 10.x.x - version: 10.2.4(postcss@8.5.6) + version: 10.3.1(postcss@8.5.6) sass: specifier: 1.x.x - version: 1.89.2 + version: 1.92.1 spatial-controls: specifier: 6.x.x - version: 6.2.0(three@0.179.1) + version: 6.2.1(three@0.180.0) stylelint: specifier: 16.x.x - version: 16.23.0(typescript@5.9.2) + version: 16.24.0(typescript@5.9.2) stylelint-config-standard-scss: specifier: 15.x.x - version: 15.0.1(postcss@8.5.6)(stylelint@16.23.0(typescript@5.9.2)) + version: 15.0.1(postcss@8.5.6)(stylelint@16.24.0(typescript@5.9.2)) stylelint-order: specifier: 7.x.x - version: 7.0.0(stylelint@16.23.0(typescript@5.9.2)) + version: 7.0.0(stylelint@16.24.0(typescript@5.9.2)) three: specifier: 0.x.x - version: 0.179.1 + version: 0.180.0 three-demo: specifier: 5.x.x - version: 5.1.3(dat.gui@0.7.9)(three@0.179.1) + version: 5.1.3(dat.gui@0.7.9)(three@0.180.0) tiny-glob: specifier: 0.x.x version: 0.2.9 @@ -124,6 +124,9 @@ packages: resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} + '@borewit/text-codec@0.1.1': + resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==} + '@csstools/cascade-layer-name-parser@2.0.5': resolution: {integrity: sha512-p1ko5eHgV+MgXFVa4STPKpvPxr6ReS8oS2jzTukjR74i5zJNyWO1ZM1m8YKBXnzDKWfBN1ztLYlHxbVemDD88A==} engines: {node: '>=18'} @@ -131,8 +134,8 @@ packages: '@csstools/css-parser-algorithms': ^3.0.5 '@csstools/css-tokenizer': ^3.0.4 - '@csstools/color-helpers@5.0.2': - resolution: {integrity: sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==} + '@csstools/color-helpers@5.1.0': + resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} engines: {node: '>=18'} '@csstools/css-calc@2.1.4': @@ -142,8 +145,8 @@ packages: '@csstools/css-parser-algorithms': ^3.0.5 '@csstools/css-tokenizer': ^3.0.4 - '@csstools/css-color-parser@3.0.10': - resolution: {integrity: sha512-TiJ5Ajr6WRd1r8HSiwJvZBiJOqtH86aHpUjq5aEKWHiII2Qfjqd/HCWKPOW8EP4vcspXbHnXrwIDlu5savQipg==} + '@csstools/css-color-parser@3.1.0': + resolution: {integrity: sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==} engines: {node: '>=18'} peerDependencies: '@csstools/css-parser-algorithms': ^3.0.5 @@ -166,32 +169,44 @@ packages: '@csstools/css-parser-algorithms': ^3.0.5 '@csstools/css-tokenizer': ^3.0.4 + '@csstools/postcss-alpha-function@1.0.0': + resolution: {integrity: sha512-r2L8KNg5Wriq5n8IUQcjzy2Rh37J5YjzP9iOyHZL5fxdWYHB08vqykHQa4wAzN/tXwDuCHnhQDGCtxfS76xn7g==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + '@csstools/postcss-cascade-layers@5.0.2': resolution: {integrity: sha512-nWBE08nhO8uWl6kSAeCx4im7QfVko3zLrtgWZY4/bP87zrSPpSyN/3W3TDqz1jJuH+kbKOHXg5rJnK+ZVYcFFg==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-color-function@4.0.10': - resolution: {integrity: sha512-4dY0NBu7NVIpzxZRgh/Q/0GPSz/jLSw0i/u3LTUor0BkQcz/fNhN10mSWBDsL0p9nDb0Ky1PD6/dcGbhACuFTQ==} + '@csstools/postcss-color-function-display-p3-linear@1.0.0': + resolution: {integrity: sha512-7q+OuUqfowRrP84m/Jl0wv3pfCQyUTCW5MxDIux+/yty5IkUUHOTigCjrC0Fjy3OT0ncGLudHbfLWmP7E1arNA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-color-function@4.0.11': + resolution: {integrity: sha512-AtH22zLHTLm64HLdpv5EedT/zmYTm1MtdQbQhRZXxEB6iYtS6SrS1jLX3TcmUWMFzpumK/OVylCm3HcLms4slw==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-color-mix-function@3.0.10': - resolution: {integrity: sha512-P0lIbQW9I4ShE7uBgZRib/lMTf9XMjJkFl/d6w4EMNHu2qvQ6zljJGEcBkw/NsBtq/6q3WrmgxSS8kHtPMkK4Q==} + '@csstools/postcss-color-mix-function@3.0.11': + resolution: {integrity: sha512-cQpXBelpTx0YhScZM5Ve0jDCA4RzwFc7oNafzZOGgCHt/GQVYiU8Vevz9QJcwy/W0Pyi/BneY+KMjz23lI9r+Q==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-color-mix-variadic-function-arguments@1.0.0': - resolution: {integrity: sha512-Z5WhouTyD74dPFPrVE7KydgNS9VvnjB8qcdes9ARpCOItb4jTnm7cHp4FhxCRUoyhabD0WVv43wbkJ4p8hLAlQ==} + '@csstools/postcss-color-mix-variadic-function-arguments@1.0.1': + resolution: {integrity: sha512-c7hyBtbF+jlHIcUGVdWY06bHICgguV9ypfcELU3eU3W/9fiz2dxM8PqxQk2ndXYTzLnwPvNNqu1yCmQ++N6Dcg==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-content-alt-text@2.0.6': - resolution: {integrity: sha512-eRjLbOjblXq+byyaedQRSrAejKGNAFued+LcbzT+LCL78fabxHkxYjBbxkroONxHHYu2qxhFK2dBStTLPG3jpQ==} + '@csstools/postcss-content-alt-text@2.0.7': + resolution: {integrity: sha512-cq/zWaEkpcg3RttJ5+GdNwk26NwxY5KgqgtNL777Fdd28AVGHxuBvqmK4Jq4oKhW1NX4M2LbgYAVVN0NZ+/XYQ==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -208,26 +223,26 @@ packages: peerDependencies: postcss: ^8.4 - '@csstools/postcss-gamut-mapping@2.0.10': - resolution: {integrity: sha512-QDGqhJlvFnDlaPAfCYPsnwVA6ze+8hhrwevYWlnUeSjkkZfBpcCO42SaUD8jiLlq7niouyLgvup5lh+f1qessg==} + '@csstools/postcss-gamut-mapping@2.0.11': + resolution: {integrity: sha512-fCpCUgZNE2piVJKC76zFsgVW1apF6dpYsqGyH8SIeCcM4pTEsRTWTLCaJIMKFEundsCKwY1rwfhtrio04RJ4Dw==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-gradients-interpolation-method@5.0.10': - resolution: {integrity: sha512-HHPauB2k7Oits02tKFUeVFEU2ox/H3OQVrP3fSOKDxvloOikSal+3dzlyTZmYsb9FlY9p5EUpBtz0//XBmy+aw==} + '@csstools/postcss-gradients-interpolation-method@5.0.11': + resolution: {integrity: sha512-8M3mcNTL3cGIJXDnvrJ2oWEcKi3zyw7NeYheFKePUlBmLYm1gkw9Rr/BA7lFONrOPeQA3yeMPldrrws6lqHrug==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-hwb-function@4.0.10': - resolution: {integrity: sha512-nOKKfp14SWcdEQ++S9/4TgRKchooLZL0TUFdun3nI4KPwCjETmhjta1QT4ICQcGVWQTvrsgMM/aLB5We+kMHhQ==} + '@csstools/postcss-hwb-function@4.0.11': + resolution: {integrity: sha512-9meZbsVWTZkWsSBazQips3cHUOT29a/UAwFz0AMEXukvpIGGDR9+GMl3nIckWO5sPImsadu4F5Zy+zjt8QgCdA==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-ic-unit@4.0.2': - resolution: {integrity: sha512-lrK2jjyZwh7DbxaNnIUjkeDmU8Y6KyzRBk91ZkI5h8nb1ykEfZrtIVArdIjX4DHMIBGpdHrgP0n4qXDr7OHaKA==} + '@csstools/postcss-ic-unit@4.0.3': + resolution: {integrity: sha512-RtYYm2qUIu9vAaHB0cC8rQGlOCQAUgEc2tMr7ewlGXYipBQKjoWmyVArqsk7SEr8N3tErq6P6UOJT3amaVof5Q==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -244,8 +259,8 @@ packages: peerDependencies: postcss: ^8.4 - '@csstools/postcss-light-dark-function@2.0.9': - resolution: {integrity: sha512-1tCZH5bla0EAkFAI2r0H33CDnIBeLUaJh1p+hvvsylJ4svsv2wOmJjJn+OXwUZLXef37GYbRIVKX+X+g6m+3CQ==} + '@csstools/postcss-light-dark-function@2.0.10': + resolution: {integrity: sha512-g7Lwb294lSoNnyrwcqoooh9fTAp47rRNo+ILg7SLRSMU3K9ePIwRt566sNx+pehiCelv4E1ICaU1EwLQuyF2qw==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -304,14 +319,14 @@ packages: peerDependencies: postcss: ^8.4 - '@csstools/postcss-oklab-function@4.0.10': - resolution: {integrity: sha512-ZzZUTDd0fgNdhv8UUjGCtObPD8LYxMH+MJsW9xlZaWTV8Ppr4PtxlHYNMmF4vVWGl0T6f8tyWAKjoI6vePSgAg==} + '@csstools/postcss-oklab-function@4.0.11': + resolution: {integrity: sha512-9f03ZGxZ2VmSCrM4SDXlAYP+Xpu4VFzemfQUQFL9OYxAbpvDy0FjDipZ0i8So1pgs8VIbQI0bNjFWgfdpGw8ig==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 - '@csstools/postcss-progressive-custom-properties@4.1.0': - resolution: {integrity: sha512-YrkI9dx8U4R8Sz2EJaoeD9fI7s7kmeEBfmO+UURNeL6lQI7VxF6sBE+rSqdCBn4onwqmxFdBU3lTwyYb/lCmxA==} + '@csstools/postcss-progressive-custom-properties@4.2.0': + resolution: {integrity: sha512-fWCXRasX17N1NCPTCuwC3FJDV+Wc031f16cFuuMEfIsYJ1q5ABCa59W0C6VeMGqjNv6ldf37vvwXXAeaZjD9PA==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -322,8 +337,8 @@ packages: peerDependencies: postcss: ^8.4 - '@csstools/postcss-relative-color-syntax@3.0.10': - resolution: {integrity: sha512-8+0kQbQGg9yYG8hv0dtEpOMLwB9M+P7PhacgIzVzJpixxV4Eq9AUQtQw8adMmAJU1RBBmIlpmtmm3XTRd/T00g==} + '@csstools/postcss-relative-color-syntax@3.0.11': + resolution: {integrity: sha512-oQ5fZvkcBrWR+k6arHXk0F8FlkmD4IxM+rcGDLWrF2f31tWyEM3lSraeWAV0f7BGH6LIrqmyU3+Qo/1acfoJng==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -346,8 +361,8 @@ packages: peerDependencies: postcss: ^8.4 - '@csstools/postcss-text-decoration-shorthand@4.0.2': - resolution: {integrity: sha512-8XvCRrFNseBSAGxeaVTaNijAu+FzUvjwFXtcrynmazGb/9WUdsPCpBX+mHEHShVRq47Gy4peYAoxYs8ltUnmzA==} + '@csstools/postcss-text-decoration-shorthand@4.0.3': + resolution: {integrity: sha512-KSkGgZfx0kQjRIYnpsD7X2Om9BUXX/Kii77VBifQW9Ih929hK0KNjVngHDH0bFB9GmfWcR9vJYJJRvw/NQjkrA==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -385,167 +400,167 @@ packages: '@dimforge/rapier3d-compat@0.12.0': resolution: {integrity: sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==} - '@dual-bundle/import-meta-resolve@4.1.0': - resolution: {integrity: sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==} + '@dual-bundle/import-meta-resolve@4.2.1': + resolution: {integrity: sha512-id+7YRUgoUX6CgV0DtuhirQWodeeA7Lf4i2x71JS/vtA5pRb/hIGWlw+G6MeXvsM+MXrz0VAydTGElX1rAfgPg==} - '@esbuild/aix-ppc64@0.25.8': - resolution: {integrity: sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==} + '@esbuild/aix-ppc64@0.25.9': + resolution: {integrity: sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.25.8': - resolution: {integrity: sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==} + '@esbuild/android-arm64@0.25.9': + resolution: {integrity: sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.8': - resolution: {integrity: sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==} + '@esbuild/android-arm@0.25.9': + resolution: {integrity: sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.8': - resolution: {integrity: sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==} + '@esbuild/android-x64@0.25.9': + resolution: {integrity: sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.25.8': - resolution: {integrity: sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==} + '@esbuild/darwin-arm64@0.25.9': + resolution: {integrity: sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.8': - resolution: {integrity: sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==} + '@esbuild/darwin-x64@0.25.9': + resolution: {integrity: sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.8': - resolution: {integrity: sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==} + '@esbuild/freebsd-arm64@0.25.9': + resolution: {integrity: sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.8': - resolution: {integrity: sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==} + '@esbuild/freebsd-x64@0.25.9': + resolution: {integrity: sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.8': - resolution: {integrity: sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==} + '@esbuild/linux-arm64@0.25.9': + resolution: {integrity: sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.8': - resolution: {integrity: sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==} + '@esbuild/linux-arm@0.25.9': + resolution: {integrity: sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.25.8': - resolution: {integrity: sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==} + '@esbuild/linux-ia32@0.25.9': + resolution: {integrity: sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.25.8': - resolution: {integrity: sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==} + '@esbuild/linux-loong64@0.25.9': + resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.25.8': - resolution: {integrity: sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==} + '@esbuild/linux-mips64el@0.25.9': + resolution: {integrity: sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.8': - resolution: {integrity: sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==} + '@esbuild/linux-ppc64@0.25.9': + resolution: {integrity: sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.8': - resolution: {integrity: sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==} + '@esbuild/linux-riscv64@0.25.9': + resolution: {integrity: sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.25.8': - resolution: {integrity: sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==} + '@esbuild/linux-s390x@0.25.9': + resolution: {integrity: sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.8': - resolution: {integrity: sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==} + '@esbuild/linux-x64@0.25.9': + resolution: {integrity: sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.8': - resolution: {integrity: sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==} + '@esbuild/netbsd-arm64@0.25.9': + resolution: {integrity: sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.8': - resolution: {integrity: sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==} + '@esbuild/netbsd-x64@0.25.9': + resolution: {integrity: sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.8': - resolution: {integrity: sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==} + '@esbuild/openbsd-arm64@0.25.9': + resolution: {integrity: sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.8': - resolution: {integrity: sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==} + '@esbuild/openbsd-x64@0.25.9': + resolution: {integrity: sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.8': - resolution: {integrity: sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==} + '@esbuild/openharmony-arm64@0.25.9': + resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.25.8': - resolution: {integrity: sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==} + '@esbuild/sunos-x64@0.25.9': + resolution: {integrity: sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.25.8': - resolution: {integrity: sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==} + '@esbuild/win32-arm64@0.25.9': + resolution: {integrity: sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.8': - resolution: {integrity: sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==} + '@esbuild/win32-ia32@0.25.9': + resolution: {integrity: sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.8': - resolution: {integrity: sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==} + '@esbuild/win32-x64@0.25.9': + resolution: {integrity: sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.7.0': - resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} + '@eslint-community/eslint-utils@4.9.0': + resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -558,28 +573,28 @@ packages: resolution: {integrity: sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/config-helpers@0.3.0': - resolution: {integrity: sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==} + '@eslint/config-helpers@0.3.1': + resolution: {integrity: sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.15.1': - resolution: {integrity: sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==} + '@eslint/core@0.15.2': + resolution: {integrity: sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@3.3.1': resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.32.0': - resolution: {integrity: sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==} + '@eslint/js@9.35.0': + resolution: {integrity: sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.3.4': - resolution: {integrity: sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==} + '@eslint/plugin-kit@0.3.5': + resolution: {integrity: sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@gfx/zopfli@1.0.15': @@ -590,18 +605,14 @@ packages: resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} - '@humanfs/node@0.16.6': - resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + '@humanfs/node@0.16.7': + resolution: {integrity: sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==} engines: {node: '>=18.18.0'} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.1': - resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} - engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.3': resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} @@ -614,8 +625,8 @@ packages: resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} engines: {node: '>=18.0.0'} - '@keyv/serialize@1.1.0': - resolution: {integrity: sha512-RlDgexML7Z63Q8BSaqhXdCYNBy/JQnqYIwxofUrNLGCblOMHp+xux2Q8nLMLlPpgHQPoU0Do8Z6btCpRBEqZ8g==} + '@keyv/serialize@1.1.1': + resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==} '@mapbox/node-pre-gyp@2.0.0': resolution: {integrity: sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==} @@ -720,8 +731,8 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@rollup/pluginutils@5.2.0': - resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==} + '@rollup/pluginutils@5.3.0': + resolution: {integrity: sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -769,75 +780,75 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node@24.2.0': - resolution: {integrity: sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==} + '@types/node@24.3.1': + resolution: {integrity: sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==} '@types/stats.js@0.17.4': resolution: {integrity: sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==} - '@types/three@0.179.0': - resolution: {integrity: sha512-VgbFG2Pgsm84BqdegZzr7w2aKbQxmgzIu4Dy7/75ygiD/0P68LKmp5ie08KMPNqGTQwIge8s6D1guZf1RnZE0A==} + '@types/three@0.180.0': + resolution: {integrity: sha512-ykFtgCqNnY0IPvDro7h+9ZeLY+qjgUWv+qEvUt84grhenO60Hqd4hScHE7VTB9nOQ/3QM8lkbNE+4vKjEpUxKg==} - '@types/webxr@0.5.22': - resolution: {integrity: sha512-Vr6Stjv5jPRqH690f5I5GLjVk8GSsoQSYJ2FVd/3jJF7KaqfwPi3ehfBS96mlQ2kPCwZaX6U0rG2+NGHBKkA/A==} + '@types/webxr@0.5.23': + resolution: {integrity: sha512-GPe4AsfOSpqWd3xA/0gwoKod13ChcfV67trvxaW2krUbgb9gxQjnCx8zGshzMl8LSHZlNH5gQ8LNScsDuc7nGQ==} - '@typescript-eslint/eslint-plugin@8.39.0': - resolution: {integrity: sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw==} + '@typescript-eslint/eslint-plugin@8.43.0': + resolution: {integrity: sha512-8tg+gt7ENL7KewsKMKDHXR1vm8tt9eMxjJBYINf6swonlWgkYn5NwyIgXpbbDxTNU5DgpDFfj95prcTq2clIQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.39.0 + '@typescript-eslint/parser': ^8.43.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.39.0': - resolution: {integrity: sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg==} + '@typescript-eslint/parser@8.43.0': + resolution: {integrity: sha512-B7RIQiTsCBBmY+yW4+ILd6mF5h1FUwJsVvpqkrgpszYifetQ2Ke+Z4u6aZh0CblkUGIdR59iYVyXqqZGkZ3aBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.39.0': - resolution: {integrity: sha512-CTzJqaSq30V/Z2Og9jogzZt8lJRR5TKlAdXmWgdu4hgcC9Kww5flQ+xFvMxIBWVNdxJO7OifgdOK4PokMIWPew==} + '@typescript-eslint/project-service@8.43.0': + resolution: {integrity: sha512-htB/+D/BIGoNTQYffZw4uM4NzzuolCoaA/BusuSIcC8YjmBYQioew5VUZAYdAETPjeed0hqCaW7EHg+Robq8uw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.39.0': - resolution: {integrity: sha512-8QOzff9UKxOh6npZQ/4FQu4mjdOCGSdO3p44ww0hk8Vu+IGbg0tB/H1LcTARRDzGCC8pDGbh2rissBuuoPgH8A==} + '@typescript-eslint/scope-manager@8.43.0': + resolution: {integrity: sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.39.0': - resolution: {integrity: sha512-Fd3/QjmFV2sKmvv3Mrj8r6N8CryYiCS8Wdb/6/rgOXAWGcFuc+VkQuG28uk/4kVNVZBQuuDHEDUpo/pQ32zsIQ==} + '@typescript-eslint/tsconfig-utils@8.43.0': + resolution: {integrity: sha512-ALC2prjZcj2YqqL5X/bwWQmHA2em6/94GcbB/KKu5SX3EBDOsqztmmX1kMkvAJHzxk7TazKzJfFiEIagNV3qEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.39.0': - resolution: {integrity: sha512-6B3z0c1DXVT2vYA9+z9axjtc09rqKUPRmijD5m9iv8iQpHBRYRMBcgxSiKTZKm6FwWw1/cI4v6em35OsKCiN5Q==} + '@typescript-eslint/type-utils@8.43.0': + resolution: {integrity: sha512-qaH1uLBpBuBBuRf8c1mLJ6swOfzCXryhKND04Igr4pckzSEW9JX5Aw9AgW00kwfjWJF0kk0ps9ExKTfvXfw4Qg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.39.0': - resolution: {integrity: sha512-ArDdaOllnCj3yn/lzKn9s0pBQYmmyme/v1HbGIGB0GB/knFI3fWMHloC+oYTJW46tVbYnGKTMDK4ah1sC2v0Kg==} + '@typescript-eslint/types@8.43.0': + resolution: {integrity: sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.39.0': - resolution: {integrity: sha512-ndWdiflRMvfIgQRpckQQLiB5qAKQ7w++V4LlCHwp62eym1HLB/kw7D9f2e8ytONls/jt89TEasgvb+VwnRprsw==} + '@typescript-eslint/typescript-estree@8.43.0': + resolution: {integrity: sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.39.0': - resolution: {integrity: sha512-4GVSvNA0Vx1Ktwvf4sFE+exxJ3QGUorQG1/A5mRfRNZtkBT2xrA/BCO2H0eALx/PnvCS6/vmYwRdDA41EoffkQ==} + '@typescript-eslint/utils@8.43.0': + resolution: {integrity: sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.39.0': - resolution: {integrity: sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA==} + '@typescript-eslint/visitor-keys@8.43.0': + resolution: {integrity: sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@vercel/nft@0.29.4': @@ -927,10 +938,6 @@ packages: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} - aggregate-error@4.0.1: - resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} - engines: {node: '>=12'} - ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -945,8 +952,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.1.0: - resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} engines: {node: '>=12'} ansi-styles@2.2.1: @@ -961,8 +968,8 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} anymatch@3.1.3: @@ -1050,8 +1057,13 @@ packages: aws4@1.13.2: resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} - b4a@1.6.7: - resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} + b4a@1.7.1: + resolution: {integrity: sha512-ZovbrBV0g6JxK5cGUF1Suby1vLfKjv4RWi8IxoaO/Mon8BDD9I21RxjHFtgQ+kskJqLAVyQZly3uMBui+vhc8Q==} + peerDependencies: + react-native-b4a: '*' + peerDependenciesMeta: + react-native-b4a: + optional: true babel-code-frame@6.26.0: resolution: {integrity: sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==} @@ -1084,8 +1096,8 @@ packages: balanced-match@2.0.0: resolution: {integrity: sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==} - bare-events@2.6.0: - resolution: {integrity: sha512-EKZ5BTXYExaNqi3I3f9RtEsaI/xBSGjE0XZCZilPzFAV/goswFHuPd9jEZlPIZ/iNZJwDSao9qRiScySz7MbQg==} + bare-events@2.6.1: + resolution: {integrity: sha512-AuTJkq9XmE6Vk0FJVNq5QxETrSA/vKHarWVBG5l/JbdCL1prJemiyJqUS0jrlXO0MftuPq4m3YVYhoNc5+aE/g==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -1124,8 +1136,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.25.1: - resolution: {integrity: sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==} + browserslist@4.25.4: + resolution: {integrity: sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1146,8 +1158,8 @@ packages: resolution: {integrity: sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==} engines: {node: '>=14.16'} - cacheable@1.10.3: - resolution: {integrity: sha512-M6p10iJ/VT0wT7TLIGUnm958oVrU2cUK8pQAVU21Zu7h8rbk/PeRtRWrvHJBql97Bhzk3g1N6+2VKC+Rjxna9Q==} + cacheable@1.10.4: + resolution: {integrity: sha512-Gd7ccIUkZ9TE2odLQVS+PDjIvQCdJKUlLdJRVvZu0aipj07Qfx+XIej7hhDrKGGoIxV5m5fT/kOJNJPQhQneRg==} call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} @@ -1172,14 +1184,14 @@ packages: caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} - caniuse-lite@1.0.30001731: - resolution: {integrity: sha512-lDdp2/wrOmTRWuoB5DpfNkC0rJDU8DqRa6nYL6HK6sytw70QMopt/NIc/9SM7ylItlBWfACXk0tEn37UWM/+mg==} + caniuse-lite@1.0.30001741: + resolution: {integrity: sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - cbor@10.0.10: - resolution: {integrity: sha512-EirvzAg0G4okCsdTfTjLWHU+tToQ2V2ptO3577Vyy2GOTeVJad99uCIuDqdK7ppFRRcEuigyJY6TJ59wv5JpSg==} + cbor@10.0.11: + resolution: {integrity: sha512-vIwORDd/WyB8Nc23o2zNN5RrtFGlR6Fca61TtjkUXueI3Jf2DOZDl1zsshvBntZ3wZHBM9ztjnkXSmzQDaq3WA==} engines: {node: '>=20'} chalk@1.1.3: @@ -1194,8 +1206,8 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - chalk@5.5.0: - resolution: {integrity: sha512-1tm8DTaJhPBG3bIkVeZt1iZM9GfSX2lzOeDVZH9R9ffRHpmHvxZ/QhgQH/aDTkswQVt+YHdXAdS/In/30OjCbg==} + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} cheerio@0.20.0: @@ -1232,10 +1244,6 @@ packages: ci-parallel-vars@1.0.1: resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==} - clean-stack@4.2.0: - resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} - engines: {node: '>=12'} - cli-truncate@4.0.0: resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} engines: {node: '>=18'} @@ -1308,6 +1316,10 @@ packages: resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + copy-file@11.1.0: + resolution: {integrity: sha512-X8XDzyvYaA6msMyAM575CUoygY5b44QzLcGRKsK3MFmXcOvQa518dNPLsKYwkYsn72g3EiW+LE0ytd/FlqWmyw==} + engines: {node: '>=18'} + core-js@2.6.12: resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. @@ -1327,18 +1339,14 @@ packages: typescript: optional: true - cp-file@10.0.0: - resolution: {integrity: sha512-vy2Vi1r2epK5WqxOLnskeKeZkdZvTKfFZQCplE3XWsP+SUJyd5XAUFC9lFgTjjXJF2GMne/UML14iEmkAaDfFg==} - engines: {node: '>=14.16'} - - cpy-cli@5.0.0: - resolution: {integrity: sha512-fb+DZYbL9KHc0BC4NYqGRrDIJZPXUmjjtqdw4XRRg8iV8dIfghUX/WiL+q4/B/KFTy3sK6jsbUhBaz0/Hxg7IQ==} - engines: {node: '>=16'} + cpy-cli@6.0.0: + resolution: {integrity: sha512-q7GUqTDnRymCbScJ4Ph1IUM86wWdKG8JbgrvKLgvvehH4wrbRcVN+jRwOTlxJdwm7ykdXMKSp6IESksFeHa0eA==} + engines: {node: '>=20'} hasBin: true - cpy@10.1.0: - resolution: {integrity: sha512-VC2Gs20JcTyeQob6UViBLnyP0bYHkBh6EiKzot9vi2DmeGlFT9Wd7VG3NBrkNx/jYvFBeyDOMMHdHQhbtKLgHQ==} - engines: {node: '>=16'} + cpy@12.0.1: + resolution: {integrity: sha512-hCnNla4AB27lUncMuO7KFjge0u0C5R74iKMBOajKOMB9ONGXcIek314ZTpxg16BuNYRTjPz7UW3tPXgJVLxUww==} + engines: {node: '>=20'} cross-spawn@6.0.6: resolution: {integrity: sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==} @@ -1364,8 +1372,8 @@ packages: resolution: {integrity: sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==} engines: {node: '>=12 || >=16'} - css-has-pseudo@7.0.2: - resolution: {integrity: sha512-nzol/h+E0bId46Kn2dQH5VElaknX2Sr0hFuB/1EomdC7j+OISt2ZzK7EHX9DZDY53WbIVAR7FYKSO2XnSf07MQ==} + css-has-pseudo@7.0.3: + resolution: {integrity: sha512-oG+vKuGyqe/xvEMoxAQrhi7uY16deJR3i7wwhBerVrGQKSqUC5GiOVxTpM9F9B9hw0J+eKeOWLH7E9gZ1Dr5rA==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -1397,16 +1405,16 @@ packages: resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} engines: {node: '>= 6'} - cssdb@8.3.1: - resolution: {integrity: sha512-XnDRQMXucLueX92yDe0LPKupXetWoFOgawr4O4X41l5TltgK2NVbJJVDnnOywDYfW1sTJ28AcXGKOqdRKwCcmQ==} + cssdb@8.4.0: + resolution: {integrity: sha512-lyATYGyvXwQ8h55WeQeEHXhI+47rl52pXSYkFK/ZrCbAJSgVIaPFjYc3RM8TpRHKk7W3wsAZImmLps+P5VyN9g==} cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} hasBin: true - cssnano-preset-default@7.0.8: - resolution: {integrity: sha512-d+3R2qwrUV3g4LEMOjnndognKirBZISylDZAF/TPeCWVjEwlXS2e4eN4ICkoobRe7pD3H6lltinKVyS1AJhdjQ==} + cssnano-preset-default@7.0.9: + resolution: {integrity: sha512-tCD6AAFgYBOVpMBX41KjbvRh9c2uUjLXRyV7KHSIrwHiq5Z9o0TFfUCoM3TwVrRsRteN3sVXGNvjVNxYzkpTsA==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.32 @@ -1417,8 +1425,8 @@ packages: peerDependencies: postcss: ^8.4.32 - cssnano@7.1.0: - resolution: {integrity: sha512-Pu3rlKkd0ZtlCUzBrKL1Z4YmhKppjC1H9jo7u1o4qaKqyhvixFgu5qLyNIAOjSTg9DjVPtUqdROq2EfpVMEe+w==} + cssnano@7.1.1: + resolution: {integrity: sha512-fm4D8ti0dQmFPeF8DXSAA//btEmqCOgAc/9Oa3C1LW94h5usNrJEfrON7b4FkPZgnDEn6OUs5NdxiJZmAtGOpQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.32 @@ -1586,15 +1594,15 @@ packages: ecc-jsbn@0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - electron-to-chromium@1.5.194: - resolution: {integrity: sha512-SdnWJwSUot04UR51I2oPD8kuP2VI37/CADR1OHsFOUzZIvfWJBO6q11k5P/uKNyTT3cdOsnyjkrZ+DDShqYqJA==} + electron-to-chromium@1.5.218: + resolution: {integrity: sha512-uwwdN0TUHs8u6iRgN8vKeWZMRll4gBkz+QMqdS7DDe49uiK68/UX92lFb61oiFPrpYZNeZIqa4bA7O6Aiasnzg==} emittery@1.2.0: resolution: {integrity: sha512-KxdRyyFcS85pH3dnU8Y5yFUm2YJdaHwcBZWrfG8o89ZY9a13/f9itbN+YG3ELbBo9Pg5zvIozstmuV8bX13q6g==} engines: {node: '>=14.16'} - emoji-regex@10.4.0: - resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} + emoji-regex@10.5.0: + resolution: {integrity: sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1652,8 +1660,8 @@ packages: peerDependencies: esbuild: 0.x.x - esbuild@0.25.8: - resolution: {integrity: sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==} + esbuild@0.25.9: + resolution: {integrity: sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==} engines: {node: '>=18'} hasBin: true @@ -1759,8 +1767,8 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.32.0: - resolution: {integrity: sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==} + eslint@9.35.0: + resolution: {integrity: sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1839,8 +1847,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.0.6: - resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} + fast-uri@3.1.0: + resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} @@ -1849,8 +1857,9 @@ packages: fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} - fdir@6.4.6: - resolution: {integrity: sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} peerDependencies: picomatch: ^3 || ^4 peerDependenciesMeta: @@ -1864,8 +1873,8 @@ packages: resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} engines: {node: '>=18'} - file-entry-cache@10.1.3: - resolution: {integrity: sha512-D+w75Ub8T55yor7fPgN06rkCAUbAYw2vpxJmmjv/GDAcvCnv9g7IvHhIZoxzRZThrXPFI2maeY24pPbtyYU7Lg==} + file-entry-cache@10.1.4: + resolution: {integrity: sha512-5XRUFc0WTtUbjfGzEwXc42tiGxQHBmtbUG1h9L2apu4SulCGN3Hqm//9D6FAolf8MYNL7f/YlJl9vy08pj5JuA==} file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} @@ -1906,8 +1915,8 @@ packages: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} - flat-cache@6.1.12: - resolution: {integrity: sha512-U+HqqpZPPXP5d24bWuRzjGqVqUcw64k4nZAbruniDwdRg0H10tvN7H6ku1tjhA4rg5B9GS3siEvwO2qjJJ6f8Q==} + flat-cache@6.1.13: + resolution: {integrity: sha512-gmtS2PaUjSPa4zjObEIn4WWliKyZzYljgxODBfxugpK6q6HU9ClXzgCJ+nlcPKY9Bt090ypTOLIFWkV0jbKFjw==} flatted@3.3.3: resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} @@ -1937,8 +1946,8 @@ packages: fs-extra@1.0.0: resolution: {integrity: sha512-VerQV6vEKuhDWD2HGOybV6v5I73syoc/cXAbKlgTC7M/oFVEtklWlp9QH2Ijw3IaWDOQcMkldSPa7zXy79Z/UQ==} - fs-extra@11.3.0: - resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + fs-extra@11.3.1: + resolution: {integrity: sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==} engines: {node: '>=14.14'} fs-extra@5.0.0: @@ -1963,8 +1972,8 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.3.0: - resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} + get-east-asian-width@1.4.0: + resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==} engines: {node: '>=18'} get-intrinsic@1.3.0: @@ -2033,10 +2042,6 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} - globby@13.2.2: - resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - globby@14.1.0: resolution: {integrity: sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==} engines: {node: '>=18'} @@ -2110,8 +2115,8 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - hookified@1.11.0: - resolution: {integrity: sha512-aDdIN3GyU5I6wextPplYdfmWCo+aLmjjVbntmX6HLD5RCi/xKsivYEBhnRD+d9224zFf008ZpLMPlWF0ZodYZw==} + hookified@1.12.0: + resolution: {integrity: sha512-hMr1Y9TCLshScrBbV2QxJ9BROddxZ12MX9KsCtuGGy/3SmmN5H1PllKerrVlSotur9dlE8hmUKAOSa3WDzsZmQ==} hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -2141,8 +2146,8 @@ packages: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} - hugo-bin@0.145.2: - resolution: {integrity: sha512-iI4HutM+45/xdNU8XW/mhV0QWwzuuzVzKQ0fhGZIh1e5QkqWvRGhRjE0UARUSU8pygGgkJalVJgNVIGL/lkZ9g==} + hugo-bin@0.147.0: + resolution: {integrity: sha512-8ZO/uEVbYUQzTaPGmB0Www53GeKq6A2oyQs1+0wyV9BR5jWQt7HPpl5U4sCioRTsTF73UQVQMTzIPdg9Iaw4Vw==} engines: {node: '>=18'} hasBin: true @@ -2431,8 +2436,8 @@ packages: jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jsonfile@6.2.0: + resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==} jsprim@1.4.2: resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} @@ -2445,8 +2450,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - keyv@5.5.0: - resolution: {integrity: sha512-QG7qR2tijh1ftOvClut4YKKg1iW6cx3GZsKoGyJPxHkGWK9oJhG9P3j5deP0QQOGDowBMVQFaP+Vm4NpGYvmIQ==} + keyv@5.5.1: + resolution: {integrity: sha512-eF3cHZ40bVsjdlRi/RvKAuB0+B61Q1xWvohnrJrnaQslM3h1n79IV+mc9EGag4nrA9ZOlNyr3TUzW5c8uy8vNA==} kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} @@ -2574,8 +2579,8 @@ packages: mdn-data@2.12.2: resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} - mdn-data@2.23.0: - resolution: {integrity: sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==} + mdn-data@2.24.0: + resolution: {integrity: sha512-i97fklrJl03tL1tdRVw0ZfLLvuDsdb6wxL+TrJ+PKkCbLrp2PCu2+OYdCKychIUm19nSM/35S6qz7pJpnXttoA==} memoize@10.1.0: resolution: {integrity: sha512-MMbFhJzh4Jlg/poq1si90XRlTZRDHVqdlz2mPyGJ6kqMpyHUyVpDd5gpFAvVehW64+RA1eKE9Yt8aSLY7w2Kgg==} @@ -2585,10 +2590,6 @@ packages: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} - meow@12.1.1: - resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} - engines: {node: '>=16.10'} - meow@13.2.0: resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==} engines: {node: '>=18'} @@ -2675,9 +2676,6 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - nested-error-stacks@2.1.1: - resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} - nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} @@ -2697,8 +2695,8 @@ packages: resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true - node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + node-releases@2.0.20: + resolution: {integrity: sha512-7gK6zSXEH6neM212JgfYFXe+GmZQM+fia5SsusuBIUgnPheLFBmIPhtFoAQRj8/7wASYQnbDlHPVwY0BefoFgA==} nofilter@3.1.0: resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} @@ -2720,8 +2718,8 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} - normalize-url@8.0.2: - resolution: {integrity: sha512-Ee/R3SyN4BuynXcnTaekmaVdbDAEiNrHqjQIA37mHU8G9pf7aaAD4ZX3XjBLo6rsdcxA/gtkcNYZLt30ACgynw==} + normalize-url@8.1.0: + resolution: {integrity: sha512-X06Mfd/5aKsRHc0O0J5CUedwnPmnDtLF2+nq+KN9KSDlJHkPuh0JUviWjEWMe0SW/9TDdSLVPuk7L5gGTIA1/w==} engines: {node: '>=14.16'} npm-run-all@4.1.5: @@ -2780,13 +2778,13 @@ packages: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} - p-event@5.0.1: - resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-event@6.0.1: + resolution: {integrity: sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==} + engines: {node: '>=16.17'} - p-filter@3.0.0: - resolution: {integrity: sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-filter@4.1.0: + resolution: {integrity: sha512-37/tPdZ3oJwHaS3gNJdenCDB3Tz26i9sjhnguBtvN0vYlRIiDNnvTWkuh+0hETV9rLPdJ3rlL3yVOYPIAnM8rw==} + engines: {node: '>=18'} p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} @@ -2796,21 +2794,13 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - p-map@5.5.0: - resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} - engines: {node: '>=12'} - - p-map@6.0.0: - resolution: {integrity: sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==} - engines: {node: '>=16'} - p-map@7.0.3: resolution: {integrity: sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==} engines: {node: '>=18'} - p-timeout@5.1.0: - resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} - engines: {node: '>=12'} + p-timeout@6.1.4: + resolution: {integrity: sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==} + engines: {node: '>=14.16'} package-config@5.0.0: resolution: {integrity: sha512-GYTTew2slBcYdvRHqjhwaaydVMvn/qrGC323+nKclYioNSLTDUM/lGgtGTgyHVtYcozb+XkE8CNhwcraOmZ9Mg==} @@ -2938,8 +2928,8 @@ packages: peerDependencies: postcss: ^8.0.0 - postcss-color-functional-notation@7.0.10: - resolution: {integrity: sha512-k9qX+aXHBiLTRrWoCJuUFI6F1iF6QJQUXNVWJVSbqZgj57jDhBlOvD8gNUGl35tgqDivbGLhZeW3Ongz4feuKA==} + postcss-color-functional-notation@7.0.11: + resolution: {integrity: sha512-zfqoUSaHMko/k2PA9xnaydVTHqYv5vphq5Q2AHcG/dCdv/OkHYWcVWfVTBKZ526uzT8L7NghuvSw3C9PxlKnLg==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -2962,8 +2952,8 @@ packages: peerDependencies: postcss: ^8.4.32 - postcss-convert-values@7.0.6: - resolution: {integrity: sha512-MD/eb39Mr60hvgrqpXsgbiqluawYg/8K4nKsqRsuDX9f+xN1j6awZCUv/5tLH8ak3vYp/EMXwdcnXvfZYiejCQ==} + postcss-convert-values@7.0.7: + resolution: {integrity: sha512-HR9DZLN04Xbe6xugRH6lS4ZQH2zm/bFh/ZyRkpedZozhvh+awAfbA0P36InO4fZfDhvYfNJeNvlTf1sjwGbw/A==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.32 @@ -3016,8 +3006,8 @@ packages: peerDependencies: postcss: ^8.4.32 - postcss-double-position-gradients@6.0.2: - resolution: {integrity: sha512-7qTqnL7nfLRyJK/AHSVrrXOuvDDzettC+wGoienURV8v2svNbu6zJC52ruZtHaO6mfcagFmuTGFdzRsJKB3k5Q==} + postcss-double-position-gradients@6.0.3: + resolution: {integrity: sha512-Dl0Z9sdbMwrPslgOaGBZRGo3TASmmgTcqcUODr82MTYyJk6devXZM6MlQjpQKMJqlLJ6oL1w78U7IXFdPA5+ug==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -3051,8 +3041,8 @@ packages: peerDependencies: postcss: ^8.4 - postcss-lab-function@7.0.10: - resolution: {integrity: sha512-tqs6TCEv9tC1Riq6fOzHuHcZyhg4k3gIAMB8GGY/zA1ssGdm6puHMVE7t75aOSoFg7UD2wyrFFhbldiCMyyFTQ==} + postcss-lab-function@7.0.11: + resolution: {integrity: sha512-BEA4jId8uQe1gyjZZ6Bunb6ZsH2izks+v25AxQJDBtigXCjTLmCPWECwQpLTtcxH589MVxhs/9TAmRC6lUEmXQ==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -3206,8 +3196,8 @@ packages: peerDependencies: postcss: ^8.4 - postcss-preset-env@10.2.4: - resolution: {integrity: sha512-q+lXgqmTMdB0Ty+EQ31SuodhdfZetUlwCA/F0zRcd/XdxjzI+Rl2JhZNz5US2n/7t9ePsvuhCnEN4Bmu86zXlA==} + postcss-preset-env@10.3.1: + resolution: {integrity: sha512-8ZOOWVwQ0iMpfEYkYo+U6W7fE2dJ/tP6dtEFwPJ66eB5JjnFupfYh+y6zo+vWDO72nGhKOVdxwhTjfzcSNRg4Q==} engines: {node: '>=18'} peerDependencies: postcss: ^8.4 @@ -3440,8 +3430,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.89.2: - resolution: {integrity: sha512-xCmtksBKd/jdJ9Bt9p7nPKiuqrlBMBuuGkQlkhZjjQk3Ty48lv93k5Dq6OPkKt4XwxDJ7tvlfrTa1MPA9bf+QA==} + sass@1.92.1: + resolution: {integrity: sha512-ffmsdbwqb3XeyR8jJR6KelIXARM9bFQe8A6Q3W4Klmwy5Ckd5gz7jgUNHo4UOqutU5Sk1DtKLbpDP0nLCg1xqQ==} engines: {node: '>=14.0.0'} hasBin: true @@ -3535,10 +3525,6 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - slash@5.1.0: resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} engines: {node: '>=14.16'} @@ -3571,8 +3557,8 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - spatial-controls@6.2.0: - resolution: {integrity: sha512-YwFptG1GcULqsJHE/oH/F2I/BHuy/oEPGU1lBJSxgDVXY+tXlPW5op/LGuOohb5wyI7vyT0d+W4nun2Qih1FfQ==} + spatial-controls@6.2.1: + resolution: {integrity: sha512-51aprInLtBYNNQJVj51Uv6sMmrIJQRfI4CGnf9AHxOgtszYI6aptLfB3s7YhJCMMBlpPzIdgrapcaCODTa+3dw==} peerDependencies: three: 0.x.x @@ -3585,8 +3571,8 @@ packages: spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - spdx-license-ids@3.0.21: - resolution: {integrity: sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==} + spdx-license-ids@3.0.22: + resolution: {integrity: sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==} sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -3655,8 +3641,8 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + strip-ansi@7.1.2: + resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} engines: {node: '>=12'} strip-bom@3.0.0: @@ -3728,8 +3714,8 @@ packages: peerDependencies: stylelint: ^16.0.2 - stylelint@16.23.0: - resolution: {integrity: sha512-69T5aS2LUY306ekt1Q1oaSPwz/jaG9HjyMix3UMrai1iEbuOafBe2Dh8xlyczrxFAy89qcKyZWWtc42XLx3Bbw==} + stylelint@16.24.0: + resolution: {integrity: sha512-7ksgz3zJaSbTUGr/ujMXvLVKdDhLbGl3R/3arNudH7z88+XZZGNLMTepsY28WlnvEFcuOmUe7fg40Q3lfhOfSQ==} engines: {node: '>=18.12.0'} hasBin: true @@ -3802,8 +3788,8 @@ packages: dat.gui: 0.x.x three: 0.x.x - three@0.179.1: - resolution: {integrity: sha512-5y/elSIQbrvKOISxpwXCR4sQqHtGiOI+MKLc3SsBdDXA2hz3Mdp3X59aUp8DyybMa34aeBwbFTpdoLJaUDEWSw==} + three@0.180.0: + resolution: {integrity: sha512-o+qycAMZrh+TsE01GqWUxUIKR1AL0S8pq7zDkYOQw8GqfX8b8VoCKYUoHbhiX5j+7hr8XsuHDVU6+gkQJQKg9w==} through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} @@ -3821,8 +3807,8 @@ packages: tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} - tinyglobby@0.2.14: - resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} to-fast-properties@1.0.3: @@ -3833,8 +3819,8 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - token-types@6.0.4: - resolution: {integrity: sha512-MD9MjpVNhVyH4fyd5rKphjvt/1qj+PtQUz65aFqAZA6XniWAuSFRjLk3e2VALEFlh9OwBpXUN7rfeqSnT/Fmkw==} + token-types@6.1.1: + resolution: {integrity: sha512-kh9LVIWH5CnL63Ipf0jhlBIy0UsrMj/NJDfpsy1SqOXlLKEVyXXYrnFxFT1yOOYVGBSApeVnjPw/sBz5BfEjAQ==} engines: {node: '>=14.16'} tough-cookie@2.5.0: @@ -3899,8 +3885,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - uint8array-extras@1.4.0: - resolution: {integrity: sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==} + uint8array-extras@1.5.0: + resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} engines: {node: '>=18'} unbox-primitive@1.1.0: @@ -4028,8 +4014,8 @@ packages: resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} engines: {node: '>=18'} - yaml@2.8.0: - resolution: {integrity: sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==} + yaml@2.8.1: + resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==} engines: {node: '>= 14.6'} hasBin: true @@ -4059,21 +4045,23 @@ snapshots: '@babel/helper-validator-identifier@7.27.1': {} + '@borewit/text-codec@0.1.1': {} + '@csstools/cascade-layer-name-parser@2.0.5(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/color-helpers@5.0.2': {} + '@csstools/color-helpers@5.1.0': {} '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/css-color-parser@3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': + '@csstools/css-color-parser@3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: - '@csstools/color-helpers': 5.0.2 + '@csstools/color-helpers': 5.1.0 '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 @@ -4089,44 +4077,62 @@ snapshots: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 + '@csstools/postcss-alpha-function@1.0.0(postcss@8.5.6)': + dependencies: + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) + '@csstools/utilities': 2.0.0(postcss@8.5.6) + postcss: 8.5.6 + '@csstools/postcss-cascade-layers@5.0.2(postcss@8.5.6)': dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.0) postcss: 8.5.6 postcss-selector-parser: 7.1.0 - '@csstools/postcss-color-function@4.0.10(postcss@8.5.6)': + '@csstools/postcss-color-function-display-p3-linear@1.0.0(postcss@8.5.6)': + dependencies: + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) + '@csstools/utilities': 2.0.0(postcss@8.5.6) + postcss: 8.5.6 + + '@csstools/postcss-color-function@4.0.11(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 - '@csstools/postcss-color-mix-function@3.0.10(postcss@8.5.6)': + '@csstools/postcss-color-mix-function@3.0.11(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 - '@csstools/postcss-color-mix-variadic-function-arguments@1.0.0(postcss@8.5.6)': + '@csstools/postcss-color-mix-variadic-function-arguments@1.0.1(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 - '@csstools/postcss-content-alt-text@2.0.6(postcss@8.5.6)': + '@csstools/postcss-content-alt-text@2.0.7(postcss@8.5.6)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 @@ -4143,34 +4149,34 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 - '@csstools/postcss-gamut-mapping@2.0.10(postcss@8.5.6)': + '@csstools/postcss-gamut-mapping@2.0.11(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 postcss: 8.5.6 - '@csstools/postcss-gradients-interpolation-method@5.0.10(postcss@8.5.6)': + '@csstools/postcss-gradients-interpolation-method@5.0.11(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 - '@csstools/postcss-hwb-function@4.0.10(postcss@8.5.6)': + '@csstools/postcss-hwb-function@4.0.11(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 - '@csstools/postcss-ic-unit@4.0.2(postcss@8.5.6)': + '@csstools/postcss-ic-unit@4.0.3(postcss@8.5.6)': dependencies: - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 postcss-value-parser: 4.2.0 @@ -4185,11 +4191,11 @@ snapshots: postcss: 8.5.6 postcss-selector-parser: 7.1.0 - '@csstools/postcss-light-dark-function@2.0.9(postcss@8.5.6)': + '@csstools/postcss-light-dark-function@2.0.10(postcss@8.5.6)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 @@ -4242,16 +4248,16 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 - '@csstools/postcss-oklab-function@4.0.10(postcss@8.5.6)': + '@csstools/postcss-oklab-function@4.0.11(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 - '@csstools/postcss-progressive-custom-properties@4.1.0(postcss@8.5.6)': + '@csstools/postcss-progressive-custom-properties@4.2.0(postcss@8.5.6)': dependencies: postcss: 8.5.6 postcss-value-parser: 4.2.0 @@ -4263,12 +4269,12 @@ snapshots: '@csstools/css-tokenizer': 3.0.4 postcss: 8.5.6 - '@csstools/postcss-relative-color-syntax@3.0.10(postcss@8.5.6)': + '@csstools/postcss-relative-color-syntax@3.0.11(postcss@8.5.6)': dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 @@ -4291,9 +4297,9 @@ snapshots: '@csstools/css-tokenizer': 3.0.4 postcss: 8.5.6 - '@csstools/postcss-text-decoration-shorthand@4.0.2(postcss@8.5.6)': + '@csstools/postcss-text-decoration-shorthand@4.0.3(postcss@8.5.6)': dependencies: - '@csstools/color-helpers': 5.0.2 + '@csstools/color-helpers': 5.1.0 postcss: 8.5.6 postcss-value-parser: 4.2.0 @@ -4322,89 +4328,89 @@ snapshots: '@dimforge/rapier3d-compat@0.12.0': {} - '@dual-bundle/import-meta-resolve@4.1.0': {} + '@dual-bundle/import-meta-resolve@4.2.1': {} - '@esbuild/aix-ppc64@0.25.8': + '@esbuild/aix-ppc64@0.25.9': optional: true - '@esbuild/android-arm64@0.25.8': + '@esbuild/android-arm64@0.25.9': optional: true - '@esbuild/android-arm@0.25.8': + '@esbuild/android-arm@0.25.9': optional: true - '@esbuild/android-x64@0.25.8': + '@esbuild/android-x64@0.25.9': optional: true - '@esbuild/darwin-arm64@0.25.8': + '@esbuild/darwin-arm64@0.25.9': optional: true - '@esbuild/darwin-x64@0.25.8': + '@esbuild/darwin-x64@0.25.9': optional: true - '@esbuild/freebsd-arm64@0.25.8': + '@esbuild/freebsd-arm64@0.25.9': optional: true - '@esbuild/freebsd-x64@0.25.8': + '@esbuild/freebsd-x64@0.25.9': optional: true - '@esbuild/linux-arm64@0.25.8': + '@esbuild/linux-arm64@0.25.9': optional: true - '@esbuild/linux-arm@0.25.8': + '@esbuild/linux-arm@0.25.9': optional: true - '@esbuild/linux-ia32@0.25.8': + '@esbuild/linux-ia32@0.25.9': optional: true - '@esbuild/linux-loong64@0.25.8': + '@esbuild/linux-loong64@0.25.9': optional: true - '@esbuild/linux-mips64el@0.25.8': + '@esbuild/linux-mips64el@0.25.9': optional: true - '@esbuild/linux-ppc64@0.25.8': + '@esbuild/linux-ppc64@0.25.9': optional: true - '@esbuild/linux-riscv64@0.25.8': + '@esbuild/linux-riscv64@0.25.9': optional: true - '@esbuild/linux-s390x@0.25.8': + '@esbuild/linux-s390x@0.25.9': optional: true - '@esbuild/linux-x64@0.25.8': + '@esbuild/linux-x64@0.25.9': optional: true - '@esbuild/netbsd-arm64@0.25.8': + '@esbuild/netbsd-arm64@0.25.9': optional: true - '@esbuild/netbsd-x64@0.25.8': + '@esbuild/netbsd-x64@0.25.9': optional: true - '@esbuild/openbsd-arm64@0.25.8': + '@esbuild/openbsd-arm64@0.25.9': optional: true - '@esbuild/openbsd-x64@0.25.8': + '@esbuild/openbsd-x64@0.25.9': optional: true - '@esbuild/openharmony-arm64@0.25.8': + '@esbuild/openharmony-arm64@0.25.9': optional: true - '@esbuild/sunos-x64@0.25.8': + '@esbuild/sunos-x64@0.25.9': optional: true - '@esbuild/win32-arm64@0.25.8': + '@esbuild/win32-arm64@0.25.9': optional: true - '@esbuild/win32-ia32@0.25.8': + '@esbuild/win32-ia32@0.25.9': optional: true - '@esbuild/win32-x64@0.25.8': + '@esbuild/win32-x64@0.25.9': optional: true - '@eslint-community/eslint-utils@4.7.0(eslint@9.32.0)': + '@eslint-community/eslint-utils@4.9.0(eslint@9.35.0)': dependencies: - eslint: 9.32.0 + eslint: 9.35.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -4417,9 +4423,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.3.0': {} + '@eslint/config-helpers@0.3.1': {} - '@eslint/core@0.15.1': + '@eslint/core@0.15.2': dependencies: '@types/json-schema': 7.0.15 @@ -4437,13 +4443,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.32.0': {} + '@eslint/js@9.35.0': {} '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.3.4': + '@eslint/plugin-kit@0.3.5': dependencies: - '@eslint/core': 0.15.1 + '@eslint/core': 0.15.2 levn: 0.4.1 '@gfx/zopfli@1.0.15': @@ -4452,22 +4458,20 @@ snapshots: '@humanfs/core@0.19.1': {} - '@humanfs/node@0.16.6': + '@humanfs/node@0.16.7': dependencies: '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/retry': 0.4.3 '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.3': {} '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 strip-ansi-cjs: strip-ansi@6.0.1 wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 @@ -4476,7 +4480,7 @@ snapshots: dependencies: minipass: 7.1.2 - '@keyv/serialize@1.1.0': {} + '@keyv/serialize@1.1.1': {} '@mapbox/node-pre-gyp@2.0.0': dependencies: @@ -4567,7 +4571,7 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/pluginutils@5.2.0': + '@rollup/pluginutils@5.3.0': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 @@ -4577,10 +4581,10 @@ snapshots: '@sindresorhus/merge-streams@2.3.0': {} - '@stylistic/eslint-plugin@2.13.0(eslint@9.32.0)(typescript@5.9.2)': + '@stylistic/eslint-plugin@2.13.0(eslint@9.35.0)(typescript@5.9.2)': dependencies: - '@typescript-eslint/utils': 8.39.0(eslint@9.32.0)(typescript@5.9.2) - eslint: 9.32.0 + '@typescript-eslint/utils': 8.43.0(eslint@9.35.0)(typescript@5.9.2) + eslint: 9.35.0 eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 @@ -4597,7 +4601,7 @@ snapshots: dependencies: debug: 4.4.1 fflate: 0.8.2 - token-types: 6.0.4 + token-types: 6.1.1 transitivePeerDependencies: - supports-color @@ -4613,33 +4617,33 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/node@24.2.0': + '@types/node@24.3.1': dependencies: undici-types: 7.10.0 '@types/stats.js@0.17.4': {} - '@types/three@0.179.0': + '@types/three@0.180.0': dependencies: '@dimforge/rapier3d-compat': 0.12.0 '@tweenjs/tween.js': 23.1.3 '@types/stats.js': 0.17.4 - '@types/webxr': 0.5.22 + '@types/webxr': 0.5.23 '@webgpu/types': 0.1.64 fflate: 0.8.2 meshoptimizer: 0.22.0 - '@types/webxr@0.5.22': {} + '@types/webxr@0.5.23': {} - '@typescript-eslint/eslint-plugin@8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0)(typescript@5.9.2))(eslint@9.35.0)(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.39.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/scope-manager': 8.39.0 - '@typescript-eslint/type-utils': 8.39.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/utils': 8.39.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.39.0 - eslint: 9.32.0 + '@typescript-eslint/parser': 8.43.0(eslint@9.35.0)(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.43.0 + '@typescript-eslint/type-utils': 8.43.0(eslint@9.35.0)(typescript@5.9.2) + '@typescript-eslint/utils': 8.43.0(eslint@9.35.0)(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.43.0 + eslint: 9.35.0 graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 @@ -4648,56 +4652,56 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.39.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/parser@8.43.0(eslint@9.35.0)(typescript@5.9.2)': dependencies: - '@typescript-eslint/scope-manager': 8.39.0 - '@typescript-eslint/types': 8.39.0 - '@typescript-eslint/typescript-estree': 8.39.0(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.39.0 + '@typescript-eslint/scope-manager': 8.43.0 + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.43.0 debug: 4.4.1 - eslint: 9.32.0 + eslint: 9.35.0 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.39.0(typescript@5.9.2)': + '@typescript-eslint/project-service@8.43.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.39.0(typescript@5.9.2) - '@typescript-eslint/types': 8.39.0 + '@typescript-eslint/tsconfig-utils': 8.43.0(typescript@5.9.2) + '@typescript-eslint/types': 8.43.0 debug: 4.4.1 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.39.0': + '@typescript-eslint/scope-manager@8.43.0': dependencies: - '@typescript-eslint/types': 8.39.0 - '@typescript-eslint/visitor-keys': 8.39.0 + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/visitor-keys': 8.43.0 - '@typescript-eslint/tsconfig-utils@8.39.0(typescript@5.9.2)': + '@typescript-eslint/tsconfig-utils@8.43.0(typescript@5.9.2)': dependencies: typescript: 5.9.2 - '@typescript-eslint/type-utils@8.39.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.43.0(eslint@9.35.0)(typescript@5.9.2)': dependencies: - '@typescript-eslint/types': 8.39.0 - '@typescript-eslint/typescript-estree': 8.39.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.39.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.43.0(eslint@9.35.0)(typescript@5.9.2) debug: 4.4.1 - eslint: 9.32.0 + eslint: 9.35.0 ts-api-utils: 2.1.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.39.0': {} + '@typescript-eslint/types@8.43.0': {} - '@typescript-eslint/typescript-estree@8.39.0(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.43.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/project-service': 8.39.0(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.39.0(typescript@5.9.2) - '@typescript-eslint/types': 8.39.0 - '@typescript-eslint/visitor-keys': 8.39.0 + '@typescript-eslint/project-service': 8.43.0(typescript@5.9.2) + '@typescript-eslint/tsconfig-utils': 8.43.0(typescript@5.9.2) + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/visitor-keys': 8.43.0 debug: 4.4.1 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -4708,26 +4712,26 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.39.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/utils@8.43.0(eslint@9.35.0)(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) - '@typescript-eslint/scope-manager': 8.39.0 - '@typescript-eslint/types': 8.39.0 - '@typescript-eslint/typescript-estree': 8.39.0(typescript@5.9.2) - eslint: 9.32.0 + '@eslint-community/eslint-utils': 4.9.0(eslint@9.35.0) + '@typescript-eslint/scope-manager': 8.43.0 + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2) + eslint: 9.35.0 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.39.0': + '@typescript-eslint/visitor-keys@8.43.0': dependencies: - '@typescript-eslint/types': 8.39.0 + '@typescript-eslint/types': 8.43.0 eslint-visitor-keys: 4.2.1 '@vercel/nft@0.29.4': dependencies: '@mapbox/node-pre-gyp': 2.0.0 - '@rollup/pluginutils': 5.2.0 + '@rollup/pluginutils': 5.3.0 acorn: 8.15.0 acorn-import-attributes: 1.9.5(acorn@8.15.0) async-sema: 3.1.1 @@ -4763,6 +4767,7 @@ snapshots: '@xhmikosr/os-filter-obj': 3.0.0 bin-version-check: 5.1.0 transitivePeerDependencies: + - react-native-b4a - supports-color '@xhmikosr/decompress-tar@8.1.0': @@ -4771,6 +4776,7 @@ snapshots: is-stream: 2.0.1 tar-stream: 3.1.7 transitivePeerDependencies: + - react-native-b4a - supports-color '@xhmikosr/decompress-tarbz2@8.1.0': @@ -4781,6 +4787,7 @@ snapshots: seek-bzip: 2.0.0 unbzip2-stream: 1.4.3 transitivePeerDependencies: + - react-native-b4a - supports-color '@xhmikosr/decompress-targz@8.1.0': @@ -4789,6 +4796,7 @@ snapshots: file-type: 20.5.0 is-stream: 2.0.1 transitivePeerDependencies: + - react-native-b4a - supports-color '@xhmikosr/decompress-unzip@7.1.0': @@ -4808,6 +4816,7 @@ snapshots: graceful-fs: 4.2.11 strip-dirs: 3.0.0 transitivePeerDependencies: + - react-native-b4a - supports-color '@xhmikosr/downloader@15.2.0': @@ -4822,6 +4831,7 @@ snapshots: get-stream: 6.0.1 got: 13.0.0 transitivePeerDependencies: + - react-native-b4a - supports-color '@xhmikosr/os-filter-obj@3.0.0': @@ -4857,11 +4867,6 @@ snapshots: agent-base@7.1.4: {} - aggregate-error@4.0.1: - dependencies: - clean-stack: 4.2.0 - indent-string: 5.0.0 - ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -4872,7 +4877,7 @@ snapshots: ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.6 + fast-uri: 3.1.0 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -4880,7 +4885,7 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.1.0: {} + ansi-regex@6.2.2: {} ansi-styles@2.2.1: {} @@ -4892,7 +4897,7 @@ snapshots: dependencies: color-convert: 2.0.1 - ansi-styles@6.2.1: {} + ansi-styles@6.2.3: {} anymatch@3.1.3: dependencies: @@ -4949,8 +4954,8 @@ snapshots: autoprefixer@10.4.21(postcss@8.5.6): dependencies: - browserslist: 4.25.1 - caniuse-lite: 1.0.30001731 + browserslist: 4.25.4 + caniuse-lite: 1.0.30001741 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.1.1 @@ -4962,12 +4967,12 @@ snapshots: '@vercel/nft': 0.29.4 acorn: 8.15.0 acorn-walk: 8.3.4 - ansi-styles: 6.2.1 + ansi-styles: 6.2.3 arrgv: 1.0.2 arrify: 3.0.0 callsites: 4.2.0 - cbor: 10.0.10 - chalk: 5.5.0 + cbor: 10.0.11 + chalk: 5.6.2 chunkd: 2.0.1 ci-info: 4.3.0 ci-parallel-vars: 1.0.1 @@ -4994,7 +4999,7 @@ snapshots: pretty-ms: 9.2.0 resolve-cwd: 3.0.0 stack-utils: 2.0.6 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 supertap: 3.0.1 temp-dir: 3.0.0 write-file-atomic: 6.0.0 @@ -5014,7 +5019,7 @@ snapshots: aws4@1.13.2: optional: true - b4a@1.6.7: {} + b4a@1.7.1: {} babel-code-frame@6.26.0: dependencies: @@ -5078,7 +5083,7 @@ snapshots: balanced-match@2.0.0: {} - bare-events@2.6.0: + bare-events@2.6.1: optional: true base64-js@1.5.1: {} @@ -5122,12 +5127,12 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.25.1: + browserslist@4.25.4: dependencies: - caniuse-lite: 1.0.30001731 - electron-to-chromium: 1.5.194 - node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.25.1) + caniuse-lite: 1.0.30001741 + electron-to-chromium: 1.5.218 + node-releases: 2.0.20 + update-browserslist-db: 1.1.3(browserslist@4.25.4) buffer-crc32@0.2.13: {} @@ -5147,13 +5152,13 @@ snapshots: http-cache-semantics: 4.2.0 keyv: 4.5.4 mimic-response: 4.0.0 - normalize-url: 8.0.2 + normalize-url: 8.1.0 responselike: 3.0.0 - cacheable@1.10.3: + cacheable@1.10.4: dependencies: - hookified: 1.11.0 - keyv: 5.5.0 + hookified: 1.12.0 + keyv: 5.5.1 call-bind-apply-helpers@1.0.2: dependencies: @@ -5178,17 +5183,17 @@ snapshots: caniuse-api@3.0.0: dependencies: - browserslist: 4.25.1 - caniuse-lite: 1.0.30001731 + browserslist: 4.25.4 + caniuse-lite: 1.0.30001741 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 - caniuse-lite@1.0.30001731: {} + caniuse-lite@1.0.30001741: {} caseless@0.12.0: optional: true - cbor@10.0.10: + cbor@10.0.11: dependencies: nofilter: 3.1.0 @@ -5211,7 +5216,7 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 - chalk@5.5.0: {} + chalk@5.6.2: {} cheerio@0.20.0: dependencies: @@ -5275,10 +5280,6 @@ snapshots: ci-parallel-vars@1.0.1: {} - clean-stack@4.2.0: - dependencies: - escape-string-regexp: 5.0.0 - cli-truncate@4.0.0: dependencies: slice-ansi: 5.0.0 @@ -5346,6 +5347,11 @@ snapshots: convert-to-spaces@2.0.1: {} + copy-file@11.1.0: + dependencies: + graceful-fs: 4.2.11 + p-event: 6.0.1 + core-js@2.6.12: {} core-util-is@1.0.2: @@ -5362,27 +5368,19 @@ snapshots: optionalDependencies: typescript: 5.9.2 - cp-file@10.0.0: + cpy-cli@6.0.0: dependencies: - graceful-fs: 4.2.11 - nested-error-stacks: 2.1.1 - p-event: 5.0.1 - - cpy-cli@5.0.0: - dependencies: - cpy: 10.1.0 - meow: 12.1.1 + cpy: 12.0.1 + meow: 13.2.0 - cpy@10.1.0: + cpy@12.0.1: dependencies: - arrify: 3.0.0 - cp-file: 10.0.0 - globby: 13.2.2 + copy-file: 11.1.0 + globby: 14.1.0 junk: 4.0.1 micromatch: 4.0.8 - nested-error-stacks: 2.1.1 - p-filter: 3.0.0 - p-map: 6.0.0 + p-filter: 4.1.0 + p-map: 7.0.3 cross-spawn@6.0.6: dependencies: @@ -5409,7 +5407,7 @@ snapshots: css-functions-list@3.2.3: {} - css-has-pseudo@7.0.2(postcss@8.5.6): + css-has-pseudo@7.0.3(postcss@8.5.6): dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.0) postcss: 8.5.6 @@ -5449,19 +5447,19 @@ snapshots: css-what@6.2.2: {} - cssdb@8.3.1: {} + cssdb@8.4.0: {} cssesc@3.0.0: {} - cssnano-preset-default@7.0.8(postcss@8.5.6): + cssnano-preset-default@7.0.9(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 css-declaration-sorter: 7.2.0(postcss@8.5.6) cssnano-utils: 5.0.1(postcss@8.5.6) postcss: 8.5.6 postcss-calc: 10.1.1(postcss@8.5.6) postcss-colormin: 7.0.4(postcss@8.5.6) - postcss-convert-values: 7.0.6(postcss@8.5.6) + postcss-convert-values: 7.0.7(postcss@8.5.6) postcss-discard-comments: 7.0.4(postcss@8.5.6) postcss-discard-duplicates: 7.0.2(postcss@8.5.6) postcss-discard-empty: 7.0.1(postcss@8.5.6) @@ -5491,9 +5489,9 @@ snapshots: dependencies: postcss: 8.5.6 - cssnano@7.1.0(postcss@8.5.6): + cssnano@7.1.1(postcss@8.5.6): dependencies: - cssnano-preset-default: 7.0.8(postcss@8.5.6) + cssnano-preset-default: 7.0.9(postcss@8.5.6) lilconfig: 3.1.3 postcss: 8.5.6 @@ -5676,11 +5674,11 @@ snapshots: safer-buffer: 2.1.2 optional: true - electron-to-chromium@1.5.194: {} + electron-to-chromium@1.5.218: {} emittery@1.2.0: {} - emoji-regex@10.4.0: {} + emoji-regex@10.5.0: {} emoji-regex@8.0.0: {} @@ -5780,38 +5778,38 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 - esbuild-plugin-glsl@1.4.0(esbuild@0.25.8): + esbuild-plugin-glsl@1.4.0(esbuild@0.25.9): dependencies: - esbuild: 0.25.8 + esbuild: 0.25.9 - esbuild@0.25.8: + esbuild@0.25.9: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.8 - '@esbuild/android-arm': 0.25.8 - '@esbuild/android-arm64': 0.25.8 - '@esbuild/android-x64': 0.25.8 - '@esbuild/darwin-arm64': 0.25.8 - '@esbuild/darwin-x64': 0.25.8 - '@esbuild/freebsd-arm64': 0.25.8 - '@esbuild/freebsd-x64': 0.25.8 - '@esbuild/linux-arm': 0.25.8 - '@esbuild/linux-arm64': 0.25.8 - '@esbuild/linux-ia32': 0.25.8 - '@esbuild/linux-loong64': 0.25.8 - '@esbuild/linux-mips64el': 0.25.8 - '@esbuild/linux-ppc64': 0.25.8 - '@esbuild/linux-riscv64': 0.25.8 - '@esbuild/linux-s390x': 0.25.8 - '@esbuild/linux-x64': 0.25.8 - '@esbuild/netbsd-arm64': 0.25.8 - '@esbuild/netbsd-x64': 0.25.8 - '@esbuild/openbsd-arm64': 0.25.8 - '@esbuild/openbsd-x64': 0.25.8 - '@esbuild/openharmony-arm64': 0.25.8 - '@esbuild/sunos-x64': 0.25.8 - '@esbuild/win32-arm64': 0.25.8 - '@esbuild/win32-ia32': 0.25.8 - '@esbuild/win32-x64': 0.25.8 + '@esbuild/aix-ppc64': 0.25.9 + '@esbuild/android-arm': 0.25.9 + '@esbuild/android-arm64': 0.25.9 + '@esbuild/android-x64': 0.25.9 + '@esbuild/darwin-arm64': 0.25.9 + '@esbuild/darwin-x64': 0.25.9 + '@esbuild/freebsd-arm64': 0.25.9 + '@esbuild/freebsd-x64': 0.25.9 + '@esbuild/linux-arm': 0.25.9 + '@esbuild/linux-arm64': 0.25.9 + '@esbuild/linux-ia32': 0.25.9 + '@esbuild/linux-loong64': 0.25.9 + '@esbuild/linux-mips64el': 0.25.9 + '@esbuild/linux-ppc64': 0.25.9 + '@esbuild/linux-riscv64': 0.25.9 + '@esbuild/linux-s390x': 0.25.9 + '@esbuild/linux-x64': 0.25.9 + '@esbuild/netbsd-arm64': 0.25.9 + '@esbuild/netbsd-x64': 0.25.9 + '@esbuild/openbsd-arm64': 0.25.9 + '@esbuild/openbsd-x64': 0.25.9 + '@esbuild/openharmony-arm64': 0.25.9 + '@esbuild/sunos-x64': 0.25.9 + '@esbuild/win32-arm64': 0.25.9 + '@esbuild/win32-ia32': 0.25.9 + '@esbuild/win32-x64': 0.25.9 escalade@3.2.0: {} @@ -5901,12 +5899,12 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-config-aether@2.0.2(eslint@9.32.0)(typescript@5.9.2): + eslint-config-aether@2.0.2(eslint@9.35.0)(typescript@5.9.2): dependencies: - '@stylistic/eslint-plugin': 2.13.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/eslint-plugin': 8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/parser': 8.39.0(eslint@9.32.0)(typescript@5.9.2) - eslint: 9.32.0 + '@stylistic/eslint-plugin': 2.13.0(eslint@9.35.0)(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0)(typescript@5.9.2))(eslint@9.35.0)(typescript@5.9.2) + '@typescript-eslint/parser': 8.43.0(eslint@9.35.0)(typescript@5.9.2) + eslint: 9.35.0 globals: 15.15.0 transitivePeerDependencies: - supports-color @@ -5921,17 +5919,17 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.32.0: + eslint@9.35.0: dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.35.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.21.0 - '@eslint/config-helpers': 0.3.0 - '@eslint/core': 0.15.1 + '@eslint/config-helpers': 0.3.1 + '@eslint/core': 0.15.2 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.32.0 - '@eslint/plugin-kit': 0.3.4 - '@humanfs/node': 0.16.6 + '@eslint/js': 9.35.0 + '@eslint/plugin-kit': 0.3.5 + '@humanfs/node': 0.16.7 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 '@types/estree': 1.0.8 @@ -6031,7 +6029,7 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-uri@3.0.6: {} + fast-uri@3.1.0: {} fastest-levenshtein@1.0.16: {} @@ -6039,7 +6037,7 @@ snapshots: dependencies: reusify: 1.1.0 - fdir@6.4.6(picomatch@4.0.3): + fdir@6.5.0(picomatch@4.0.3): optionalDependencies: picomatch: 4.0.3 @@ -6049,9 +6047,9 @@ snapshots: dependencies: is-unicode-supported: 2.1.0 - file-entry-cache@10.1.3: + file-entry-cache@10.1.4: dependencies: - flat-cache: 6.1.12 + flat-cache: 6.1.13 file-entry-cache@8.0.0: dependencies: @@ -6061,8 +6059,8 @@ snapshots: dependencies: '@tokenizer/inflate': 0.2.7 strtok3: 10.3.4 - token-types: 6.0.4 - uint8array-extras: 1.4.0 + token-types: 6.1.1 + uint8array-extras: 1.5.0 transitivePeerDependencies: - supports-color @@ -6094,11 +6092,11 @@ snapshots: flatted: 3.3.3 keyv: 4.5.4 - flat-cache@6.1.12: + flat-cache@6.1.13: dependencies: - cacheable: 1.10.3 + cacheable: 1.10.4 flatted: 3.3.3 - hookified: 1.11.0 + hookified: 1.12.0 flatted@3.3.3: {} @@ -6131,10 +6129,10 @@ snapshots: jsonfile: 2.4.0 klaw: 1.3.1 - fs-extra@11.3.0: + fs-extra@11.3.1: dependencies: graceful-fs: 4.2.11 - jsonfile: 6.1.0 + jsonfile: 6.2.0 universalify: 2.0.1 fs-extra@5.0.0: @@ -6161,7 +6159,7 @@ snapshots: get-caller-file@2.0.5: {} - get-east-asian-width@1.3.0: {} + get-east-asian-width@1.4.0: {} get-intrinsic@1.3.0: dependencies: @@ -6245,14 +6243,6 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 - globby@13.2.2: - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.3.3 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 4.0.0 - globby@14.1.0: dependencies: '@sindresorhus/merge-streams': 2.3.0 @@ -6329,7 +6319,7 @@ snapshots: dependencies: function-bind: 1.1.2 - hookified@1.11.0: {} + hookified@1.12.0: {} hosted-git-info@2.8.9: {} @@ -6373,11 +6363,12 @@ snapshots: transitivePeerDependencies: - supports-color - hugo-bin@0.145.2: + hugo-bin@0.147.0: dependencies: '@xhmikosr/bin-wrapper': 13.2.0 package-config: 5.0.0 transitivePeerDependencies: + - react-native-b4a - supports-color human-signals@2.1.0: {} @@ -6646,7 +6637,7 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 - jsonfile@6.1.0: + jsonfile@6.2.0: dependencies: universalify: 2.0.1 optionalDependencies: @@ -6666,9 +6657,9 @@ snapshots: dependencies: json-buffer: 3.0.1 - keyv@5.5.0: + keyv@5.5.1: dependencies: - '@keyv/serialize': 1.1.0 + '@keyv/serialize': 1.1.1 kind-of@6.0.3: {} @@ -6766,7 +6757,7 @@ snapshots: mdn-data@2.12.2: {} - mdn-data@2.23.0: {} + mdn-data@2.24.0: {} memoize@10.1.0: dependencies: @@ -6774,8 +6765,6 @@ snapshots: memorystream@0.3.1: {} - meow@12.1.1: {} - meow@13.2.0: {} merge-stream@2.0.0: {} @@ -6835,8 +6824,6 @@ snapshots: natural-compare@1.4.0: {} - nested-error-stacks@2.1.1: {} - nice-try@1.0.5: {} node-addon-api@7.1.1: @@ -6848,7 +6835,7 @@ snapshots: node-gyp-build@4.8.4: {} - node-releases@2.0.19: {} + node-releases@2.0.20: {} nofilter@3.1.0: {} @@ -6867,7 +6854,7 @@ snapshots: normalize-range@0.1.2: {} - normalize-url@8.0.2: {} + normalize-url@8.1.0: {} npm-run-all@4.1.5: dependencies: @@ -6947,13 +6934,13 @@ snapshots: p-cancelable@3.0.0: {} - p-event@5.0.1: + p-event@6.0.1: dependencies: - p-timeout: 5.1.0 + p-timeout: 6.1.4 - p-filter@3.0.0: + p-filter@4.1.0: dependencies: - p-map: 5.5.0 + p-map: 7.0.3 p-limit@3.1.0: dependencies: @@ -6963,15 +6950,9 @@ snapshots: dependencies: p-limit: 3.1.0 - p-map@5.5.0: - dependencies: - aggregate-error: 4.0.1 - - p-map@6.0.0: {} - p-map@7.0.3: {} - p-timeout@5.1.0: {} + p-timeout@6.1.4: {} package-config@5.0.0: dependencies: @@ -7003,7 +6984,7 @@ snapshots: parse5@3.0.3: dependencies: - '@types/node': 24.2.0 + '@types/node': 24.3.1 path-exists@4.0.0: {} @@ -7075,7 +7056,7 @@ snapshots: dependencies: chokidar: 3.6.0 dependency-graph: 1.0.0 - fs-extra: 11.3.0 + fs-extra: 11.3.1 picocolors: 1.1.1 postcss: 8.5.6 postcss-load-config: 5.1.0(postcss@8.5.6) @@ -7083,18 +7064,18 @@ snapshots: pretty-hrtime: 1.0.3 read-cache: 1.0.0 slash: 5.1.0 - tinyglobby: 0.2.14 + tinyglobby: 0.2.15 yargs: 17.7.2 transitivePeerDependencies: - jiti - tsx - postcss-color-functional-notation@7.0.10(postcss@8.5.6): + postcss-color-functional-notation@7.0.11(postcss@8.5.6): dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 @@ -7112,15 +7093,15 @@ snapshots: postcss-colormin@7.0.4(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 caniuse-api: 3.0.0 colord: 2.9.3 postcss: 8.5.6 postcss-value-parser: 4.2.0 - postcss-convert-values@7.0.6(postcss@8.5.6): + postcss-convert-values@7.0.7(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 postcss: 8.5.6 postcss-value-parser: 4.2.0 @@ -7171,9 +7152,9 @@ snapshots: dependencies: postcss: 8.5.6 - postcss-double-position-gradients@6.0.2(postcss@8.5.6): + postcss-double-position-gradients@6.0.3(postcss@8.5.6): dependencies: - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 postcss-value-parser: 4.2.0 @@ -7202,19 +7183,19 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 - postcss-lab-function@7.0.10(postcss@8.5.6): + postcss-lab-function@7.0.11(postcss@8.5.6): dependencies: - '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/utilities': 2.0.0(postcss@8.5.6) postcss: 8.5.6 postcss-load-config@5.1.0(postcss@8.5.6): dependencies: lilconfig: 3.1.3 - yaml: 2.8.0 + yaml: 2.8.1 optionalDependencies: postcss: 8.5.6 @@ -7233,7 +7214,7 @@ snapshots: postcss-merge-rules@7.0.6(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 caniuse-api: 3.0.0 cssnano-utils: 5.0.1(postcss@8.5.6) postcss: 8.5.6 @@ -7253,7 +7234,7 @@ snapshots: postcss-minify-params@7.0.4(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 cssnano-utils: 5.0.1(postcss@8.5.6) postcss: 8.5.6 postcss-value-parser: 4.2.0 @@ -7302,7 +7283,7 @@ snapshots: postcss-normalize-unicode@7.0.4(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 postcss: 8.5.6 postcss-value-parser: 4.2.0 @@ -7340,22 +7321,24 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 - postcss-preset-env@10.2.4(postcss@8.5.6): + postcss-preset-env@10.3.1(postcss@8.5.6): dependencies: + '@csstools/postcss-alpha-function': 1.0.0(postcss@8.5.6) '@csstools/postcss-cascade-layers': 5.0.2(postcss@8.5.6) - '@csstools/postcss-color-function': 4.0.10(postcss@8.5.6) - '@csstools/postcss-color-mix-function': 3.0.10(postcss@8.5.6) - '@csstools/postcss-color-mix-variadic-function-arguments': 1.0.0(postcss@8.5.6) - '@csstools/postcss-content-alt-text': 2.0.6(postcss@8.5.6) + '@csstools/postcss-color-function': 4.0.11(postcss@8.5.6) + '@csstools/postcss-color-function-display-p3-linear': 1.0.0(postcss@8.5.6) + '@csstools/postcss-color-mix-function': 3.0.11(postcss@8.5.6) + '@csstools/postcss-color-mix-variadic-function-arguments': 1.0.1(postcss@8.5.6) + '@csstools/postcss-content-alt-text': 2.0.7(postcss@8.5.6) '@csstools/postcss-exponential-functions': 2.0.9(postcss@8.5.6) '@csstools/postcss-font-format-keywords': 4.0.0(postcss@8.5.6) - '@csstools/postcss-gamut-mapping': 2.0.10(postcss@8.5.6) - '@csstools/postcss-gradients-interpolation-method': 5.0.10(postcss@8.5.6) - '@csstools/postcss-hwb-function': 4.0.10(postcss@8.5.6) - '@csstools/postcss-ic-unit': 4.0.2(postcss@8.5.6) + '@csstools/postcss-gamut-mapping': 2.0.11(postcss@8.5.6) + '@csstools/postcss-gradients-interpolation-method': 5.0.11(postcss@8.5.6) + '@csstools/postcss-hwb-function': 4.0.11(postcss@8.5.6) + '@csstools/postcss-ic-unit': 4.0.3(postcss@8.5.6) '@csstools/postcss-initial': 2.0.1(postcss@8.5.6) '@csstools/postcss-is-pseudo-class': 5.0.3(postcss@8.5.6) - '@csstools/postcss-light-dark-function': 2.0.9(postcss@8.5.6) + '@csstools/postcss-light-dark-function': 2.0.10(postcss@8.5.6) '@csstools/postcss-logical-float-and-clear': 3.0.0(postcss@8.5.6) '@csstools/postcss-logical-overflow': 2.0.0(postcss@8.5.6) '@csstools/postcss-logical-overscroll-behavior': 2.0.0(postcss@8.5.6) @@ -7365,39 +7348,39 @@ snapshots: '@csstools/postcss-media-queries-aspect-ratio-number-values': 3.0.5(postcss@8.5.6) '@csstools/postcss-nested-calc': 4.0.0(postcss@8.5.6) '@csstools/postcss-normalize-display-values': 4.0.0(postcss@8.5.6) - '@csstools/postcss-oklab-function': 4.0.10(postcss@8.5.6) - '@csstools/postcss-progressive-custom-properties': 4.1.0(postcss@8.5.6) + '@csstools/postcss-oklab-function': 4.0.11(postcss@8.5.6) + '@csstools/postcss-progressive-custom-properties': 4.2.0(postcss@8.5.6) '@csstools/postcss-random-function': 2.0.1(postcss@8.5.6) - '@csstools/postcss-relative-color-syntax': 3.0.10(postcss@8.5.6) + '@csstools/postcss-relative-color-syntax': 3.0.11(postcss@8.5.6) '@csstools/postcss-scope-pseudo-class': 4.0.1(postcss@8.5.6) '@csstools/postcss-sign-functions': 1.1.4(postcss@8.5.6) '@csstools/postcss-stepped-value-functions': 4.0.9(postcss@8.5.6) - '@csstools/postcss-text-decoration-shorthand': 4.0.2(postcss@8.5.6) + '@csstools/postcss-text-decoration-shorthand': 4.0.3(postcss@8.5.6) '@csstools/postcss-trigonometric-functions': 4.0.9(postcss@8.5.6) '@csstools/postcss-unset-value': 4.0.0(postcss@8.5.6) autoprefixer: 10.4.21(postcss@8.5.6) - browserslist: 4.25.1 + browserslist: 4.25.4 css-blank-pseudo: 7.0.1(postcss@8.5.6) - css-has-pseudo: 7.0.2(postcss@8.5.6) + css-has-pseudo: 7.0.3(postcss@8.5.6) css-prefers-color-scheme: 10.0.0(postcss@8.5.6) - cssdb: 8.3.1 + cssdb: 8.4.0 postcss: 8.5.6 postcss-attribute-case-insensitive: 7.0.1(postcss@8.5.6) postcss-clamp: 4.1.0(postcss@8.5.6) - postcss-color-functional-notation: 7.0.10(postcss@8.5.6) + postcss-color-functional-notation: 7.0.11(postcss@8.5.6) postcss-color-hex-alpha: 10.0.0(postcss@8.5.6) postcss-color-rebeccapurple: 10.0.0(postcss@8.5.6) postcss-custom-media: 11.0.6(postcss@8.5.6) postcss-custom-properties: 14.0.6(postcss@8.5.6) postcss-custom-selectors: 8.0.5(postcss@8.5.6) postcss-dir-pseudo-class: 9.0.1(postcss@8.5.6) - postcss-double-position-gradients: 6.0.2(postcss@8.5.6) + postcss-double-position-gradients: 6.0.3(postcss@8.5.6) postcss-focus-visible: 10.0.1(postcss@8.5.6) postcss-focus-within: 9.0.1(postcss@8.5.6) postcss-font-variant: 5.0.0(postcss@8.5.6) postcss-gap-properties: 6.0.0(postcss@8.5.6) postcss-image-set-function: 7.0.0(postcss@8.5.6) - postcss-lab-function: 7.0.10(postcss@8.5.6) + postcss-lab-function: 7.0.11(postcss@8.5.6) postcss-logical: 8.1.0(postcss@8.5.6) postcss-nesting: 13.0.2(postcss@8.5.6) postcss-opacity-percentage: 3.0.0(postcss@8.5.6) @@ -7415,7 +7398,7 @@ snapshots: postcss-reduce-initial@7.0.4(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 caniuse-api: 3.0.0 postcss: 8.5.6 @@ -7657,7 +7640,7 @@ snapshots: safer-buffer@2.1.2: optional: true - sass@1.89.2: + sass@1.92.1: dependencies: chokidar: 4.0.3 immutable: 5.1.3 @@ -7762,8 +7745,6 @@ snapshots: slash@3.0.0: {} - slash@4.0.0: {} - slash@5.1.0: {} slice-ansi@4.0.0: @@ -7774,7 +7755,7 @@ snapshots: slice-ansi@5.0.0: dependencies: - ansi-styles: 6.2.1 + ansi-styles: 6.2.3 is-fullwidth-code-point: 4.0.0 sort-keys-length@1.0.1: @@ -7792,23 +7773,23 @@ snapshots: source-map@0.6.1: optional: true - spatial-controls@6.2.0(three@0.179.1): + spatial-controls@6.2.1(three@0.180.0): dependencies: - three: 0.179.1 + three: 0.180.0 spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.21 + spdx-license-ids: 3.0.22 spdx-exceptions@2.5.0: {} spdx-expression-parse@3.0.1: dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.21 + spdx-license-ids: 3.0.22 - spdx-license-ids@3.0.21: {} + spdx-license-ids@3.0.22: {} sprintf-js@1.0.3: {} @@ -7841,7 +7822,9 @@ snapshots: fast-fifo: 1.3.2 text-decoder: 1.2.3 optionalDependencies: - bare-events: 2.6.0 + bare-events: 2.6.1 + transitivePeerDependencies: + - react-native-b4a string-width@4.2.3: dependencies: @@ -7853,13 +7836,13 @@ snapshots: dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 string-width@7.2.0: dependencies: - emoji-regex: 10.4.0 - get-east-asian-width: 1.3.0 - strip-ansi: 7.1.0 + emoji-regex: 10.5.0 + get-east-asian-width: 1.4.0 + strip-ansi: 7.1.2 string.prototype.padend@3.1.6: dependencies: @@ -7909,9 +7892,9 @@ snapshots: dependencies: ansi-regex: 5.0.1 - strip-ansi@7.1.0: + strip-ansi@7.1.2: dependencies: - ansi-regex: 6.1.0 + ansi-regex: 6.2.2 strip-bom@3.0.0: {} @@ -7930,61 +7913,61 @@ snapshots: stylehacks@7.0.6(postcss@8.5.6): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 postcss: 8.5.6 postcss-selector-parser: 7.1.0 - stylelint-config-recommended-scss@15.0.1(postcss@8.5.6)(stylelint@16.23.0(typescript@5.9.2)): + stylelint-config-recommended-scss@15.0.1(postcss@8.5.6)(stylelint@16.24.0(typescript@5.9.2)): dependencies: postcss-scss: 4.0.9(postcss@8.5.6) - stylelint: 16.23.0(typescript@5.9.2) - stylelint-config-recommended: 16.0.0(stylelint@16.23.0(typescript@5.9.2)) - stylelint-scss: 6.12.1(stylelint@16.23.0(typescript@5.9.2)) + stylelint: 16.24.0(typescript@5.9.2) + stylelint-config-recommended: 16.0.0(stylelint@16.24.0(typescript@5.9.2)) + stylelint-scss: 6.12.1(stylelint@16.24.0(typescript@5.9.2)) optionalDependencies: postcss: 8.5.6 - stylelint-config-recommended@16.0.0(stylelint@16.23.0(typescript@5.9.2)): + stylelint-config-recommended@16.0.0(stylelint@16.24.0(typescript@5.9.2)): dependencies: - stylelint: 16.23.0(typescript@5.9.2) + stylelint: 16.24.0(typescript@5.9.2) - stylelint-config-standard-scss@15.0.1(postcss@8.5.6)(stylelint@16.23.0(typescript@5.9.2)): + stylelint-config-standard-scss@15.0.1(postcss@8.5.6)(stylelint@16.24.0(typescript@5.9.2)): dependencies: - stylelint: 16.23.0(typescript@5.9.2) - stylelint-config-recommended-scss: 15.0.1(postcss@8.5.6)(stylelint@16.23.0(typescript@5.9.2)) - stylelint-config-standard: 38.0.0(stylelint@16.23.0(typescript@5.9.2)) + stylelint: 16.24.0(typescript@5.9.2) + stylelint-config-recommended-scss: 15.0.1(postcss@8.5.6)(stylelint@16.24.0(typescript@5.9.2)) + stylelint-config-standard: 38.0.0(stylelint@16.24.0(typescript@5.9.2)) optionalDependencies: postcss: 8.5.6 - stylelint-config-standard@38.0.0(stylelint@16.23.0(typescript@5.9.2)): + stylelint-config-standard@38.0.0(stylelint@16.24.0(typescript@5.9.2)): dependencies: - stylelint: 16.23.0(typescript@5.9.2) - stylelint-config-recommended: 16.0.0(stylelint@16.23.0(typescript@5.9.2)) + stylelint: 16.24.0(typescript@5.9.2) + stylelint-config-recommended: 16.0.0(stylelint@16.24.0(typescript@5.9.2)) - stylelint-order@7.0.0(stylelint@16.23.0(typescript@5.9.2)): + stylelint-order@7.0.0(stylelint@16.24.0(typescript@5.9.2)): dependencies: postcss: 8.5.6 postcss-sorting: 9.1.0(postcss@8.5.6) - stylelint: 16.23.0(typescript@5.9.2) + stylelint: 16.24.0(typescript@5.9.2) - stylelint-scss@6.12.1(stylelint@16.23.0(typescript@5.9.2)): + stylelint-scss@6.12.1(stylelint@16.24.0(typescript@5.9.2)): dependencies: css-tree: 3.1.0 is-plain-object: 5.0.0 known-css-properties: 0.36.0 - mdn-data: 2.23.0 + mdn-data: 2.24.0 postcss-media-query-parser: 0.2.3 postcss-resolve-nested-selector: 0.1.6 postcss-selector-parser: 7.1.0 postcss-value-parser: 4.2.0 - stylelint: 16.23.0(typescript@5.9.2) + stylelint: 16.24.0(typescript@5.9.2) - stylelint@16.23.0(typescript@5.9.2): + stylelint@16.24.0(typescript@5.9.2): dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.0) - '@dual-bundle/import-meta-resolve': 4.1.0 + '@dual-bundle/import-meta-resolve': 4.2.1 balanced-match: 2.0.0 colord: 2.9.3 cosmiconfig: 9.0.0(typescript@5.9.2) @@ -7993,7 +7976,7 @@ snapshots: debug: 4.4.1 fast-glob: 3.3.3 fastest-levenshtein: 1.0.16 - file-entry-cache: 10.1.3 + file-entry-cache: 10.1.4 global-modules: 2.0.0 globby: 11.1.0 globjoin: 0.1.4 @@ -8027,7 +8010,7 @@ snapshots: indent-string: 5.0.0 js-yaml: 3.14.1 serialize-error: 7.0.1 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 supports-color@2.0.0: {} @@ -8075,9 +8058,11 @@ snapshots: tar-stream@3.1.7: dependencies: - b4a: 1.6.7 + b4a: 1.7.1 fast-fifo: 1.3.2 streamx: 2.22.1 + transitivePeerDependencies: + - react-native-b4a tar@7.4.3: dependencies: @@ -8092,16 +8077,18 @@ snapshots: text-decoder@1.2.3: dependencies: - b4a: 1.6.7 + b4a: 1.7.1 + transitivePeerDependencies: + - react-native-b4a thenby@1.3.4: {} - three-demo@5.1.3(dat.gui@0.7.9)(three@0.179.1): + three-demo@5.1.3(dat.gui@0.7.9)(three@0.180.0): dependencies: dat.gui: 0.7.9 - three: 0.179.1 + three: 0.180.0 - three@0.179.1: {} + three@0.180.0: {} through2@2.0.5: dependencies: @@ -8121,9 +8108,9 @@ snapshots: globalyzer: 0.1.0 globrex: 0.1.2 - tinyglobby@0.2.14: + tinyglobby@0.2.15: dependencies: - fdir: 6.4.6(picomatch@4.0.3) + fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 to-fast-properties@1.0.3: {} @@ -8132,8 +8119,9 @@ snapshots: dependencies: is-number: 7.0.0 - token-types@6.0.4: + token-types@6.1.1: dependencies: + '@borewit/text-codec': 0.1.1 '@tokenizer/token': 0.3.0 ieee754: 1.2.1 @@ -8209,7 +8197,7 @@ snapshots: typescript@5.9.2: {} - uint8array-extras@1.4.0: {} + uint8array-extras@1.5.0: {} unbox-primitive@1.1.0: dependencies: @@ -8231,9 +8219,9 @@ snapshots: universalify@2.0.1: {} - update-browserslist-db@1.1.3(browserslist@4.25.1): + update-browserslist-db@1.1.3(browserslist@4.25.4): dependencies: - browserslist: 4.25.1 + browserslist: 4.25.4 escalade: 3.2.0 picocolors: 1.1.1 @@ -8334,9 +8322,9 @@ snapshots: wrap-ansi@8.1.0: dependencies: - ansi-styles: 6.2.1 + ansi-styles: 6.2.3 string-width: 5.1.2 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 wrappy@1.0.2: {} @@ -8359,7 +8347,7 @@ snapshots: yallist@5.0.0: {} - yaml@2.8.0: {} + yaml@2.8.1: {} yargs-parser@21.1.1: {} diff --git a/src/loaders/LUT3dlLoader.js b/src/loaders/LUT3dlLoader.js index 34a37ed31..b944b0100 100644 --- a/src/loaders/LUT3dlLoader.js +++ b/src/loaders/LUT3dlLoader.js @@ -22,7 +22,6 @@ export class LUT3dlLoader extends Loader { * @param {Function} [onLoad] - A callback that receives the loaded lookup texture. * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. * @param {Function} [onError] - An error callback that receives the URL of the file that failed to load. - * @return {Promise} A promise that returns the lookup texture. */ load(url, onLoad = () => {}, onProgress = () => {}, onError = null) { @@ -33,45 +32,50 @@ export class LUT3dlLoader extends Loader { const loader = new FileLoader(internalManager); loader.setPath(this.path); loader.setResponseType("text"); + externalManager.itemStart(url); - return new Promise((resolve, reject) => { - - internalManager.onError = (url) => { + loader.load(url, (data) => { - externalManager.itemError(url); + try { - if(onError !== null) { + const result = this.parse(data); + externalManager.itemEnd(url); + onLoad(result); - onError(`Failed to load ${url}`); - resolve(); + } catch(e) { - } else { + internalManager.onError(url); + onError(e); - reject(`Failed to load ${url}`); + } - } + }, onProgress); - }; + } - externalManager.itemStart(url); + /** + * Loads a LUT. + * + * @param {String} url - The URL of the 3dl-file. + * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. + * @return {Promise} A promise that returns the lookup texture. + */ - loader.load(url, (data) => { + loadAsync(url, onProgress = () => {}) { - try { + const externalManager = this.manager; + const internalManager = new LoadingManager(); - const result = this.parse(data); - externalManager.itemEnd(url); - onLoad(result); - resolve(result); + return new Promise((resolve, reject) => { - } catch(e) { + internalManager.onError = (url) => { - console.error(e); - internalManager.onError(url); + externalManager.itemError(url); + reject(`Failed to load ${url}`); - } + }; - }, onProgress); + this.load(url, resolve, onProgress); }); diff --git a/src/loaders/LUTCubeLoader.js b/src/loaders/LUTCubeLoader.js index a6343b17c..bd081098b 100644 --- a/src/loaders/LUTCubeLoader.js +++ b/src/loaders/LUTCubeLoader.js @@ -22,7 +22,6 @@ export class LUTCubeLoader extends Loader { * @param {Function} [onLoad] - A callback that receives the loaded lookup texture. * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. * @param {Function} [onError] - An error callback that receives the URL of the file that failed to load. - * @return {Promise} A promise that returns the lookup texture. */ load(url, onLoad = () => {}, onProgress = () => {}, onError = null) { @@ -34,44 +33,48 @@ export class LUTCubeLoader extends Loader { loader.setPath(this.path); loader.setResponseType("text"); - return new Promise((resolve, reject) => { + loader.load(url, (data) => { - internalManager.onError = (url) => { - - externalManager.itemError(url); + try { - if(onError !== null) { + const result = this.parse(data); + externalManager.itemEnd(url); + onLoad(result); - onError(`Failed to load ${url}`); - resolve(); + } catch(e) { - } else { + internalManager.onError(url); + onError(e); - reject(`Failed to load ${url}`); + } - } + }, onProgress); - }; + } - externalManager.itemStart(url); + /** + * Loads a LUT asynchronously. + * + * @param {String} url - The URL of the CUBE-file. + * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. + * @return {Promise} A promise that returns the lookup texture. + */ - loader.load(url, (data) => { + loadAsync(url, onProgress = () => {}) { - try { + const externalManager = this.manager; + const internalManager = new LoadingManager(); - const result = this.parse(data); - externalManager.itemEnd(url); - onLoad(result); - resolve(result); + return new Promise((resolve, reject) => { - } catch(e) { + internalManager.onError = (url) => { - console.error(e); - internalManager.onError(url); + externalManager.itemError(url); + reject(`Failed to load ${url}`); - } + }; - }, onProgress); + this.load(url, resolve, onProgress); }); diff --git a/src/loaders/SMAAImageLoader.js b/src/loaders/SMAAImageLoader.js index 498613728..75dd629ec 100644 --- a/src/loaders/SMAAImageLoader.js +++ b/src/loaders/SMAAImageLoader.js @@ -7,7 +7,6 @@ import areaImageDataURL from "../textures/smaa/areaImageDataURL.js"; * An SMAA image loader. * * @deprecated Preloading the SMAA lookup textures is no longer required. - * @experimental Added for testing, API might change in patch or minor releases. Requires three >= r108. */ export class SMAAImageLoader extends Loader { diff --git a/tsconfig.json b/tsconfig.json index c850a6c05..29cb9e195 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,16 +9,14 @@ "baseUrl": ".", "outDir": "./build", "moduleResolution": "bundler", - "module": "ES2022", - "target": "ES2022", + "module": "es2022", + "target": "es2022", "strict": true, "allowJs": true, "sourceMap": false, "skipLibCheck": true, - "importHelpers": true, "resolveJsonModule": true, "noImplicitOverride": true, - "allowSyntheticDefaultImports": true, "paths": { "postprocessing": ["./src/index.js"], "temp": ["./temp"] diff --git a/tsconfig.types.json b/tsconfig.types.json new file mode 100644 index 000000000..de68b4811 --- /dev/null +++ b/tsconfig.types.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "include": ["./types/index.d.ts"], + "compilerOptions": { + "noEmit": true + } +} diff --git a/types/index.d.ts b/types/index.d.ts index d66812ec1..5e0a91c47 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,9335 +1,9350 @@ -declare module "postprocessing" { - import { - Vector2, - WebGLRenderer, - Camera, - PerspectiveCamera, - Texture, - Material, - WebGLRenderTarget, - Scene, - Uniform, - Object3D, - Vector3, - ShaderMaterial, - DataTexture, - Mesh, - Points, - Loader, - DepthPackingStrategies, - DepthModes, - EventDispatcher, - Color, - ColorSpace, - Data3DTexture, - BaseEvent, - CanvasTexture - } from "three"; - - /** - * Common events. - */ - - export interface BaseEventMap { - - change: BaseEvent; - - } - - /** - * A color channel enumeration. +import { + Vector2, + WebGLRenderer, + Camera, + PerspectiveCamera, + Texture, + Material, + WebGLRenderTarget, + Scene, + Uniform, + Object3D, + Vector3, + ShaderMaterial, + DataTexture, + Mesh, + Points, + Loader, + DepthPackingStrategies, + DepthModes, + EventDispatcher, + Color, + ColorSpace, + Data3DTexture, + BaseEvent, + CanvasTexture +} from "three"; + +/** + * Common events. + */ + +export interface BaseEventMap { + + change: BaseEvent; + +} + +/** + * A color channel enumeration. + * + * @type {Object} + * @property {Number} RED - Red. + * @property {Number} GREEN - Green. + * @property {Number} BLUE - Blue. + * @property {Number} ALPHA - Alpha. + */ +export enum ColorChannel { + RED, + GREEN, + BLUE, + ALPHA +} + +/** + * The Disposable contract. + * + * Implemented by objects that can free internal resources. + * + * @interface + */ +export interface Disposable { + + /** + * Frees internal resources. + */ + dispose(): void; + +} + +/** + * The initializable contract. + * + * Implemented by objects that can be initialized. + * + * @interface + */ +export interface Initializable { + + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - A renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * A Gauss kernel. + * + * Based on https://github.com/Jam3/glsl-fast-gaussian-blur. + */ +export class GaussKernel { + + /** + * Constructs a new Gauss kernel. + * + * @param kernelSize - The kernel size. Should be an odd number in the range [3, 1020]. + * @param [edgeBias=2] - Determines how many edge coefficients should be cut off for increased accuracy. + */ + constructor(kernelSize: number, edgeBias: number); + +} +/** + * An adaptive luminance shader material. + */ +export class AdaptiveLuminanceMaterial extends ShaderMaterial { + + /** + * Constructs a new adaptive luminance material. + */ + constructor(); + /** + * The primary luminance buffer that contains the downsampled average luminance. + * + * @type {Texture} + */ + set luminanceBuffer0(arg: Texture); + /** + * Sets the primary luminance buffer that contains the downsampled average luminance. + * + * @deprecated Use luminanceBuffer0 instead. + * @param {Texture} value - The buffer. + */ + setLuminanceBuffer0(value: Texture): void; + /** + * The secondary luminance buffer. + * + * @type {Texture} + */ + set luminanceBuffer1(arg: Texture); + /** + * Sets the secondary luminance buffer. + * + * @deprecated Use luminanceBuffer1 instead. + * @param {Texture} value - The buffer. + */ + setLuminanceBuffer1(value: Texture): void; + /** + * The 1x1 mipmap level. + * + * This level is used to identify the smallest mipmap of the primary luminance buffer. + * + * @type {Number} + */ + set mipLevel1x1(arg: number); + /** + * Sets the 1x1 mipmap level. + * + * @deprecated Use mipLevel1x1 instead. + * @param {Number} value - The level. + */ + setMipLevel1x1(value: number): void; + /** + * The delta time. + * + * @type {Number} + */ + set deltaTime(arg: number); + /** + * Sets the delta time. + * + * @deprecated Use deltaTime instead. + * @param {Number} value - The delta time. + */ + setDeltaTime(value: number): void; + set minLuminance(arg: number); + /** + * The lowest possible luminance value. + * + * @type {Number} + */ + get minLuminance(): number; + /** + * Returns the lowest possible luminance value. + * + * @deprecated Use minLuminance instead. + * @return {Number} The minimum luminance. + */ + getMinLuminance(): number; + /** + * Sets the minimum luminance. + * + * @deprecated Use minLuminance instead. + * @param {Number} value - The minimum luminance. + */ + setMinLuminance(value: number): void; + set adaptationRate(arg: number); + /** + * The luminance adaptation rate. + * + * @type {Number} + */ + get adaptationRate(): number; + /** + * Returns the luminance adaptation rate. + * + * @deprecated Use adaptationRate instead. + * @return {Number} The adaptation rate. + */ + getAdaptationRate(): number; + /** + * Sets the luminance adaptation rate. + * + * @deprecated Use adaptationRate instead. + * @param {Number} value - The adaptation rate. + */ + setAdaptationRate(value: number): void; + +} + +/** + * A bokeh disc blur material. + * + * This material should be applied twice in a row, with `fill` mode enabled for the second pass. Enabling the + * `foreground` option causes the shader to combine the near and far CoC values around foreground objects. + * + * @implements {Resizable} + */ +export class BokehMaterial extends ShaderMaterial implements Resizable { + + /** + * Constructs a new bokeh material. + * + * @param {Boolean} [fill=false] - Enables or disables the bokeh highlight fill mode. + * @param {Boolean} [foreground=false] - Determines whether this material will be applied to foreground colors. + */ + constructor(fill?: boolean, foreground?: boolean); + /** + * The input buffer. + * + * @type {Texture} + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The buffer. + */ + setInputBuffer(value: Texture): void; + /** + * The circle of confusion buffer. + * + * @type {Texture} + */ + set cocBuffer(arg: Texture); + /** + * Sets the circle of confusion buffer. + * + * @deprecated Use cocBuffer instead. + * @param {Texture} value - The buffer. + */ + setCoCBuffer(value: Texture): void; + set scale(arg: number); + /** + * The blur scale. + * + * @type {Number} + */ + get scale(): number; + /** + * Returns the blur scale. + * + * @deprecated Use scale instead. + * @return {Number} The scale. + */ + getScale(value: number): number; + /** + * Sets the blur scale. + * + * @deprecated Use scale instead. + * @param {Number} value - The scale. + */ + setScale(value: number): void; + /** + * Sets the texel size. + * + * @deprecated Use setSize() instead. + * @param {Number} x - The texel width. + * @param {Number} y - The texel height. + */ + setTexelSize(x: number, y: number): void; + /** + * Sets the size of this object. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * A Circle of Confusion shader material. + */ +export class CircleOfConfusionMaterial extends ShaderMaterial { + + /** + * Constructs a new CoC material. + * + * @param {Camera} camera - A camera. + */ + constructor(camera: Camera); + /** + * The depth buffer. + * + * @type {Texture} + */ + set depthBuffer(arg: Texture); + /** + * The depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + set depthPacking(arg: DepthPackingStrategies); + /** + * Sets the depth buffer. + * + * @deprecated Use depthBuffer and depthPacking instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + set focusDistance(arg: number); + /** + * The focus distance. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get focusDistance(): number; + /** + * Returns the focus distance. + * + * @deprecated Use focusDistance instead. + * @return {Number} The focus distance. + */ + getFocusDistance(value: number): number; + /** + * Sets the focus distance. + * + * @deprecated Use focusDistance instead. + * @param {Number} value - The focus distance. + */ + setFocusDistance(value: number): void; + set focalLength(arg: number); + /** + * The focal length. + * + * @deprecated Renamed to focusRange. + * @type {Number} + */ + get focalLength(): number; + /** + * Returns the focal length. + * + * @deprecated Use focusRange instead. + * @return {Number} The focal length. + */ + getFocalLength(value: number): number; + /** + * Sets the focal length. + * + * @deprecated Use focusRange instead. + * @param {Number} value - The focal length. + */ + setFocalLength(value: number): void; + /** + * Adopts the settings of the given camera. + * + * @param {Camera} camera - A camera. + */ + adoptCameraSettings(camera: Camera): void; + + /** + * The focus distance in world units. + * + * @type {Number} + */ + get worldFocusDistance(): number; + set worldFocusDistance(value: number); + + /** + * The focus range. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get focusRange(): number; + set focusRange(value: number); + + /** + * The focus range in world units. + * + * @type {Number} + */ + get worldFocusRange(): number; + set worldFocusRange(value: number); + +} + +/** + * A blur kernel size enumeration. + * + * @type {Object} + * @property {Number} VERY_SMALL - A very small kernel that matches a 7x7 Gaussian blur kernel. + * @property {Number} SMALL - A small kernel that matches a 15x15 Gaussian blur kernel. + * @property {Number} MEDIUM - A medium sized kernel that matches a 23x23 Gaussian blur kernel. + * @property {Number} LARGE - A large kernel that matches a 35x35 Gaussian blur kernel. + * @property {Number} VERY_LARGE - A very large kernel that matches a 63x63 Gaussian blur kernel. + * @property {Number} HUGE - A huge kernel that matches a 127x127 Gaussian blur kernel. + */ +export enum KernelSize { + VERY_SMALL, + SMALL, + MEDIUM, + LARGE, + VERY_LARGE, + HUGE +} + +/** + * A simple copy shader material. + */ +export class CopyMaterial extends ShaderMaterial { + + /** + * Constructs a new copy material. + */ + constructor(); + /** + * The input buffer. + * + * @type {Texture} + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Number} value - The buffer. + */ + setInputBuffer(value: number): void; + /** + * Returns the opacity. + * + * @deprecated Use opacity instead. + * @return {Number} The opacity. + */ + getOpacity(): number; + /** + * Sets the opacity. + * + * @deprecated Use opacity instead. + * @param {Number} value - The opacity. + */ + setOpacity(value: number): void; + +} + +/** + * A depth comparison shader material. + */ +export class DepthComparisonMaterial extends ShaderMaterial { + + /** + * Constructs a new depth comparison material. + * + * @param {Texture} [depthTexture=null] - A depth texture. + * @param {PerspectiveCamera} [camera] - A camera. + */ + constructor(depthTexture?: Texture, camera?: PerspectiveCamera); + /** + * The depth buffer. + * + * @type {Texture} + */ + set depthBuffer(arg: Texture); + /** + * The depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + set depthPacking(arg: DepthPackingStrategies); + /** + * Sets the depth buffer. + * + * @deprecated Use depthBuffer and depthPacking instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=RGBADepthPacking] - The depth packing strategy. + */ + setDepthBuffer( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Adopts the settings of the given camera. + * + * @param {Camera} camera - A camera. + */ + adoptCameraSettings(camera: Camera): void; + +} + +/** + * An enumeration of depth copy modes. + * + * @type {Object} + * @property {Number} FULL - Copies the full depth texture every frame. + * @property {Number} SINGLE - Copies a single texel from the depth texture on demand. + */ +export enum DepthCopyMode { + FULL, + SINGLE +} + +/** + * A depth copy shader material. + */ +export class DepthCopyMaterial extends ShaderMaterial { + + /** + * Constructs a new depth copy material. + */ + constructor(); + /** + * The input depth buffer. + * + * @type {Texture} + */ + set depthBuffer(arg: Texture); + /** + * The input depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + set inputDepthPacking(arg: DepthPackingStrategies); + set outputDepthPacking(arg: DepthPackingStrategies); + /** + * The output depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + get outputDepthPacking(): DepthPackingStrategies; + /** + * Sets the input depth buffer. + * + * @deprecated Use depthBuffer and inputDepthPacking instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Returns the current input depth packing strategy. + * + * @deprecated + * @return {DepthPackingStrategies} The input depth packing strategy. + */ + getInputDepthPacking(): DepthPackingStrategies; + /** + * Sets the input depth packing strategy. + * + * @deprecated Use inputDepthPacking instead. + * @param {DepthPackingStrategies} value - The new input depth packing strategy. + */ + setInputDepthPacking(value: DepthPackingStrategies): void; + /** + * Returns the current output depth packing strategy. + * + * @deprecated Use outputDepthPacking instead. + * @return {DepthPackingStrategies} The output depth packing strategy. + */ + getOutputDepthPacking(): DepthPackingStrategies; + /** + * Sets the output depth packing strategy. + * + * @deprecated Use outputDepthPacking instead. + * @param {DepthPackingStrategies} value - The new output depth packing strategy. + */ + setOutputDepthPacking(value: DepthPackingStrategies): void; + /** + * The screen space position used for single-texel copy operations. + * + * @type {Vector2} + */ + get texelPosition(): Vector2; + /** + * Returns the screen space position used for single-texel copy operations. + * + * @deprecated Use texelPosition instead. + * @return {Vector2} The position. + */ + getTexelPosition(): Vector2; + /** + * Sets the screen space position used for single-texel copy operations. + * + * @deprecated + * @param {Vector2} value - The position. + */ + setTexelPosition(value: Vector2): void; + set mode(arg: DepthCopyMode); + /** + * The depth copy mode. + * + * @type {DepthCopyMode} + */ + get mode(): DepthCopyMode; + /** + * Returns the depth copy mode. + * + * @deprecated Use mode instead. + * @return {DepthCopyMode} The depth copy mode. + */ + getMode(): DepthCopyMode; + /** + * Sets the depth copy mode. + * + * @deprecated Use mode instead. + * @param {DepthCopyMode} value - The new mode. + */ + setMode(value: DepthCopyMode): void; + +} + +/** + * A depth downsampling shader material. + * + * Based on an article by Eleni Maria Stea: + * https://eleni.mutantstargoat.com/hikiko/depth-aware-upsampling-6 + * + * @implements {Resizable} + */ +export class DepthDownsamplingMaterial + extends ShaderMaterial + implements Resizable { + + /** + * Constructs a new depth downsampling material. + */ + constructor(); + /** + * The depth buffer. + * + * @type {Texture} + */ + set depthBuffer(arg: Texture); + /** + * The depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + set depthPacking(arg: DepthPackingStrategies); + /** + * Sets the depth buffer. + * + * @deprecated Use depthBuffer and depthPacking instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * The normal buffer. + * + * @type {Texture} + */ + set normalBuffer(arg: Texture); + /** + * Sets the normal buffer. + * + * @deprecated Use normalBuffer instead. + * @param {Texture} value - The normal buffer. + */ + setNormalBuffer(value: Texture): void; + /** + * Sets the texel size. + * + * @deprecated Use setSize() instead. + * @param {Number} x - The texel width. + * @param {Number} y - The texel height. + */ + setTexelSize(x: number, y: number): void; + /** + * Sets the size of this object. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * An enumeration of depth test strategies. + * + * @type {Object} + * @property {Number} DEFAULT - Perform depth test only. + * @property {Number} KEEP_MAX_DEPTH - Always keep max depth. + * @property {Number} DISCARD_MAX_DEPTH - Always discard max depth. + */ +export enum DepthTestStrategy { + DEFAULT, + KEEP_MAX_DEPTH, + DISCARD_MAX_DEPTH +} + +/** + * A depth mask shader material. + * + * This material masks a color buffer by comparing two depth textures. + */ +export class DepthMaskMaterial extends ShaderMaterial { + + /** + * Constructs a new depth mask material. + */ + constructor(); + set depthMode(arg: DepthModes); + /** + * The depth mode. + * + * @see https://threejs.org/docs/#api/en/constants/Materials + * @type {DepthModes} + */ + get depthMode(): DepthModes; + /** + * The primary depth buffer. + * + * @type {Texture} + */ + set depthBuffer0(arg: Texture); + /** + * The primary depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + set depthPacking0(arg: DepthPackingStrategies); + /** + * Sets the base depth buffer. + * + * @deprecated Use depthBuffer0 and depthPacking0 instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer0( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * The secondary depth buffer. + * + * @type {Texture} + */ + set depthBuffer1(arg: Texture); + /** + * The secondary depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + set depthPacking1(arg: DepthPackingStrategies); + /** + * Sets the depth buffer that will be compared with the base depth buffer. + * + * @deprecated Use depthBuffer1 and depthPacking1 instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer1( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + set maxDepthStrategy(arg: DepthTestStrategy); + /** + * The strategy for handling maximum depth. + * + * @type {DepthTestStrategy} + */ + get maxDepthStrategy(): DepthTestStrategy; + set keepFar(arg: boolean); + /** + * Indicates whether maximum depth values should be preserved. + * + * @type {Boolean} + * @deprecated Use maxDepthStrategy instead. + */ + get keepFar(): boolean; + /** + * Returns the strategy for dealing with maximum depth values. + * + * @deprecated Use maxDepthStrategy instead. + * @return {DepthTestStrategy} The strategy. + */ + getMaxDepthStrategy(): DepthTestStrategy; + /** + * Sets the strategy for dealing with maximum depth values. + * + * @deprecated Use maxDepthStrategy instead. + * @param {DepthTestStrategy} value - The strategy. + */ + setMaxDepthStrategy(value: DepthTestStrategy): void; + set epsilon(arg: number); + /** + * A small error threshold that is used for `EqualDepth` and `NotEqualDepth` tests. Default is `1e-5`. + * + * @type {Number} + */ + get epsilon(): number; + /** + * Returns the current error threshold for depth comparisons. Default is `1e-5`. + * + * @deprecated Use epsilon instead. + * @return {Number} The error threshold. + */ + getEpsilon(): number; + /** + * Sets the depth comparison error threshold. + * + * @deprecated Use epsilon instead. + * @param {Number} value - The new error threshold. + */ + setEpsilon(value: number): void; + /** + * Returns the current depth mode. + * + * @deprecated Use depthMode instead. + * @return {DepthModes} The depth mode. Default is `LessDepth`. + */ + getDepthMode(): DepthModes; + /** + * Sets the depth mode. + * + * @deprecated Use depthMode instead. + * @param {DepthModes} mode - The depth mode. + */ + setDepthMode(mode: DepthModes): void; + +} + +/** + * An enumeration of edge detection modes. + * + * @type {Object} + * @property {Number} DEPTH - Depth-based edge detection. + * @property {Number} LUMA - Luminance-based edge detection. + * @property {Number} COLOR - Chroma-based edge detection. + */ +export enum EdgeDetectionMode { + DEPTH, + LUMA, + COLOR +} + +/** + * An enumeration of predication modes. + * + * @type {Object} + * @property {Number} DISABLED - No predicated thresholding. + * @property {Number} DEPTH - Depth-based predicated thresholding. + * @property {Number} CUSTOM - Predicated thresholding using a custom buffer. + */ +export enum PredicationMode { + DISABLED, + DEPTH, + CUSTOM +} +/** + * An edge detection material. + * + * Mainly used for Subpixel Morphological Anti-Aliasing. + * + * @implements {Resizable} + */ +export class EdgeDetectionMaterial + extends ShaderMaterial + implements Resizable { + + /** + * Constructs a new edge detection material. + * + * TODO Remove parameters. + * @param {Vector2} [texelSize] - The screen texel size. + * @param {EdgeDetectionMode} [mode=EdgeDetectionMode.COLOR] - The edge detection mode. + */ + constructor(texelSize?: Vector2, mode?: EdgeDetectionMode); + set edgeDetectionMode(arg: EdgeDetectionMode); + /** + * The edge detection mode. + * + * @type {EdgeDetectionMode} + */ + get edgeDetectionMode(): EdgeDetectionMode; + /** + * The depth buffer. + * + * @type {Texture} + */ + set depthBuffer(arg: Texture); + /** + * The depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + set depthPacking(arg: DepthPackingStrategies); + /** + * Sets the depth buffer. + * + * @deprecated Use depthBuffer and depthPacking instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Returns the edge detection mode. + * + * @deprecated Use edgeDetectionMode instead. + * @return {EdgeDetectionMode} The mode. + */ + getEdgeDetectionMode(): EdgeDetectionMode; + /** + * Sets the edge detection mode. + * + * @deprecated Use edgeDetectionMode instead. + * @param {EdgeDetectionMode} value - The edge detection mode. + */ + setEdgeDetectionMode(value: EdgeDetectionMode): void; + set localContrastAdaptationFactor(arg: number); + /** + * The local contrast adaptation factor. Has no effect if the edge detection mode is set to DEPTH. Default is 2.0. + * + * If a neighbor edge has _factor_ times bigger contrast than the current edge, the edge will be discarded. + * + * This allows to eliminate spurious crossing edges and is based on the fact that if there is too much contrast in a + * direction, the perceptual contrast in the other neighbors will be hidden. + * + * @type {Number} + */ + get localContrastAdaptationFactor(): number; + /** + * Returns the local contrast adaptation factor. + * + * @deprecated Use localContrastAdaptationFactor instead. + * @return {Number} The factor. + */ + getLocalContrastAdaptationFactor(): number; + /** + * Sets the local contrast adaptation factor. Has no effect if the edge detection mode is set to DEPTH. + * + * @deprecated Use localContrastAdaptationFactor instead. + * @param {Number} value - The local contrast adaptation factor. Default is 2.0. + */ + setLocalContrastAdaptationFactor(value: number): void; + set edgeDetectionThreshold(arg: number); + /** + * The edge detection threshold. Range: [0.0, 0.5]. + * + * A lower value results in more edges being detected at the expense of performance. + * + * For luma- and chroma-based edge detection, 0.1 is a reasonable value and allows to catch most visible edges. 0.05 + * is a rather overkill value that allows to catch 'em all. Darker scenes may require an even lower threshold. + * + * If depth-based edge detection is used, the threshold will depend on the scene depth. + * + * @type {Number} + */ + get edgeDetectionThreshold(): number; + /** + * Returns the edge detection threshold. + * + * @deprecated Use edgeDetectionThreshold instead. + * @return {Number} The threshold. + */ + getEdgeDetectionThreshold(): number; + /** + * Sets the edge detection threshold. + * + * @deprecated Use edgeDetectionThreshold instead. + * @param {Number} value - The edge detection threshold. Range: [0.0, 0.5]. + */ + setEdgeDetectionThreshold(value: number): void; + set predicationMode(arg: PredicationMode); + /** + * The predication mode. + * + * Predicated thresholding allows to better preserve texture details and to improve edge detection using an additional + * buffer such as a light accumulation or depth buffer. + * + * @type {PredicationMode} + */ + get predicationMode(): PredicationMode; + /** + * Returns the predication mode. + * + * @deprecated Use predicationMode instead. + * @return {PredicationMode} The mode. + */ + getPredicationMode(): PredicationMode; + /** + * Sets the predication mode. + * + * @deprecated Use predicationMode instead. + * @param {PredicationMode} value - The predication mode. + */ + setPredicationMode(value: PredicationMode): void; + /** + * The predication buffer. + * + * @type {Texture} + */ + set predicationBuffer(arg: Texture); + /** + * Sets a custom predication buffer. + * + * @deprecated Use predicationBuffer instead. + * @param {Texture} value - The predication buffer. + */ + setPredicationBuffer(value: Texture): void; + set predicationThreshold(arg: number); + /** + * The predication threshold. + * + * @type {Number} + */ + get predicationThreshold(): number; + /** + * Returns the predication threshold. + * + * @deprecated Use predicationThreshold instead. + * @return {Number} The threshold. + */ + getPredicationThreshold(): number; + /** + * Sets the predication threshold. + * + * @deprecated Use predicationThreshold instead. + * @param {Number} value - The threshold. + */ + setPredicationThreshold(value: number): void; + set predicationScale(arg: number); + /** + * The predication scale. Range: [1.0, 5.0]. + * + * Determines how much the edge detection threshold should be scaled when using predication. + * + * @type {Number} + */ + get predicationScale(): number; + /** + * Returns the predication scale. + * + * @deprecated Use predicationScale instead. + * @return {Number} The scale. + */ + getPredicationScale(): number; + /** + * Sets the predication scale. + * + * @deprecated Use predicationScale instead. + * @param {Number} value - The scale. Range: [1.0, 5.0]. + */ + setPredicationScale(value: number): void; + set predicationStrength(arg: number); + /** + * The predication strength. Range: [0.0, 1.0]. + * + * Determines how much the edge detection threshold should be decreased locally when using predication. + * + * @type {Number} + */ + get predicationStrength(): number; + /** + * Returns the predication strength. + * + * @deprecated Use predicationStrength instead. + * @return {Number} The strength. + */ + getPredicationStrength(): number; + /** + * Sets the predication strength. + * + * @deprecated Use predicationStrength instead. + * @param {Number} value - The strength. Range: [0.0, 1.0]. + */ + setPredicationStrength(value: number): void; + /** + * Sets the size of this object. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +export type ColorEdgesMaterial = EdgeDetectionMaterial; + +/** + * An effect material for compound shaders. Supports dithering. + * + * @implements {Resizable} + */ +export class EffectMaterial extends ShaderMaterial implements Resizable { + + /** + * An enumeration of shader code section placeholders used by the {@link EffectPass}. + * + * @type {Object} + * @property {String} FRAGMENT_HEAD - A placeholder for function and variable declarations inside the fragment shader. + * @property {String} FRAGMENT_MAIN_UV - A placeholder for UV transformations inside the fragment shader. + * @property {String} FRAGMENT_MAIN_IMAGE - A placeholder for color calculations inside the fragment shader. + * @property {String} VERTEX_HEAD - A placeholder for function and variable declarations inside the vertex shader. + * @property {String} VERTEX_MAIN_SUPPORT - A placeholder for supporting calculations inside the vertex shader. + */ + static get Section(): { + FRAGMENT_HEAD: string; + FRAGMENT_MAIN_UV: string; + FRAGMENT_MAIN_IMAGE: string; + VERTEX_HEAD: string; + VERTEX_MAIN_SUPPORT: string; + }; + + /** + * Constructs a new effect material. + * + * @param {Map} [shaderParts] - A collection of shader snippets. See {@link Section}. + * @param {Map} [defines] - A collection of preprocessor macro definitions. + * @param {Map} [uniforms] - A collection of uniforms. + * @param {Camera} [camera] - A camera. + * @param {Boolean} [dithering=false] - Whether dithering should be enabled. + */ + constructor( + shaderParts?: Map, + defines?: Map, + uniforms?: Map, + camera?: Camera, + dithering?: boolean + ); + + /** + * The input buffer. + * + * @type {Texture} + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The input buffer. + */ + setInputBuffer(value: Texture): void; + set depthBuffer(arg: Texture); + /** + * The depth buffer. + * + * @type {Texture} + */ + get depthBuffer(): Texture; + set depthPacking(arg: DepthPackingStrategies); + /** + * The depth packing strategy. + * + * @type {DepthPackingStrategies} + */ + get depthPacking(): DepthPackingStrategies; + /** + * Sets the depth buffer. + * + * @deprecated Use depthBuffer and depthPacking instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Sets the shader parts. + * + * @param {Map} shaderParts - A collection of shader snippets. See {@link Section}. + * @return {EffectMaterial} This material. + */ + setShaderParts(shaderParts: Map): EffectMaterial; + /** + * Sets the shader macros. + * + * @param {Map} defines - A collection of preprocessor macro definitions. + * @return {EffectMaterial} This material. + */ + setDefines(defines: Map): EffectMaterial; + /** + * Sets the shader uniforms. + * + * @param {Map} uniforms - A collection of uniforms. + * @return {EffectMaterial} This material. + */ + setUniforms(uniforms: Map): EffectMaterial; + /** + * Sets the required shader extensions. + * + * @param {Set} extensions - A collection of extensions. + * @return {EffectMaterial} This material. + */ + setExtensions(extensions: Set): EffectMaterial; + set encodeOutput(arg: boolean); + /** + * Indicates whether output encoding is enabled. + * + * @type {Boolean} + */ + get encodeOutput(): boolean; + /** + * Indicates whether output encoding is enabled. + * + * @deprecated Use encodeOutput instead. + * @return {Boolean} Whether output encoding is enabled. + */ + isOutputEncodingEnabled(): boolean; + /** + * Enables or disables output encoding. + * + * @deprecated Use encodeOutput instead. + * @param {Boolean} value - Whether output encoding should be enabled. + */ + setOutputEncodingEnabled(value: boolean): void; + set time(arg: number); + /** + * The time in seconds. + * + * @type {Number} + */ + get time(): number; + /** + * Sets the delta time. + * + * @deprecated Use time instead. + * @param {Number} value - The delta time in seconds. + */ + setDeltaTime(value: number): void; + /** + * Adopts the settings of the given camera. + * + * @param {Camera} camera - A camera. + */ + adoptCameraSettings(camera: Camera): void; + /** + * Sets the resolution. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * An enumeration of shader code placeholders used by the {@link EffectPass}. + * @property FRAGMENT_HEAD - A placeholder for function and variable declarations inside the fragment shader. + * @property FRAGMENT_MAIN_UV - A placeholder for UV transformations inside the fragment shader. + * @property FRAGMENT_MAIN_IMAGE - A placeholder for color calculations inside the fragment shader. + * @property VERTEX_HEAD - A placeholder for function and variable declarations inside the vertex shader. + * @property VERTEX_MAIN_SUPPORT - A placeholder for supporting calculations inside the vertex shader. + * @deprecated Use EffectMaterial.Section instead. + */ +export const Section: { + FRAGMENT_HEAD: string; + FRAGMENT_MAIN_UV: string; + FRAGMENT_MAIN_IMAGE: string; + VERTEX_HEAD: string; + VERTEX_MAIN_SUPPORT: string; +}; + +/** + * A crepuscular rays shader material. + * + * References: + * + * Thibaut Despoulain, 2012: + * [(WebGL) Volumetric Light Approximation in Three.js]( + * http://bkcore.com/blog/3d/webgl-three-js-volumetric-light-godrays.html) + * + * Nvidia, GPU Gems 3, 2008: + * [Chapter 13. Volumetric Light Scattering as a Post-Process]( + * https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch13.html) + * + * @todo Remove dithering code from fragment shader. + */ +export class GodRaysMaterial extends ShaderMaterial { + + /** + * Constructs a new god rays material. + * + * TODO Remove lightPosition param. + * @param {Vector2} lightPosition - Deprecated. + */ + constructor(lightPosition: Vector2); + /** + * The input buffer. + * + * @type {Texture} + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The input buffer. + */ + setInputBuffer(value: Texture): void; + /** + * The screen space position of the light source. + * + * @type {Vector2} + */ + get lightPosition(): Vector2; + /** + * Returns the screen space position of the light source. + * + * @deprecated Use lightPosition instead. + * @return {Vector2} The position. + */ + getLightPosition(): Vector2; + /** + * Sets the screen space position of the light source. + * + * @deprecated Use lightPosition instead. + * @param {Vector2} value - The position. + */ + setLightPosition(value: Vector2): void; + set density(arg: number); + /** + * The density. + * + * @type {Number} + */ + get density(): number; + /** + * Returns the density. + * + * @deprecated Use density instead. + * @return {Number} The density. + */ + getDensity(): number; + /** + * Sets the density. + * + * @deprecated Use density instead. + * @param {Number} value - The density. + */ + setDensity(value: number): void; + set decay(arg: number); + /** + * The decay. + * + * @type {Number} + */ + get decay(): number; + /** + * Returns the decay. + * + * @deprecated Use decay instead. + * @return {Number} The decay. + */ + getDecay(): number; + /** + * Sets the decay. + * + * @deprecated Use decay instead. + * @param {Number} value - The decay. + */ + setDecay(value: number): void; + set weight(arg: number); + /** + * The weight. + * + * @type {Number} + */ + get weight(): number; + /** + * Returns the weight. + * + * @deprecated Use weight instead. + * @return {Number} The weight. + */ + getWeight(): number; + /** + * Sets the weight. + * + * @deprecated Use weight instead. + * @param {Number} value - The weight. + */ + setWeight(value: number): void; + set exposure(arg: number); + /** + * The exposure. + * + * @type {Number} + */ + get exposure(): number; + /** + * Returns the exposure. + * + * @deprecated Use exposure instead. + * @return {Number} The exposure. + */ + getExposure(): number; + /** + * Sets the exposure. + * + * @deprecated Use exposure instead. + * @param {Number} value - The exposure. + */ + setExposure(value: number): void; + set maxIntensity(arg: number); + /** + * The maximum light intensity. + * + * @type {Number} + */ + get maxIntensity(): number; + /** + * Returns the maximum light intensity. + * + * @deprecated Use maxIntensity instead. + * @return {Number} The maximum light intensity. + */ + getMaxIntensity(): number; + /** + * Sets the maximum light intensity. + * + * @deprecated Use maxIntensity instead. + * @param {Number} value - The maximum light intensity. + */ + setMaxIntensity(value: number): void; + set samples(arg: number); + /** + * The amount of samples per pixel. + * + * @type {Number} + */ + get samples(): number; + /** + * Returns the amount of samples per pixel. + * + * @deprecated Use samples instead. + * @return {Number} The sample count. + */ + getSamples(): number; + /** + * Sets the amount of samples per pixel. + * + * @deprecated Use samples instead. + * @param {Number} value - The sample count. + */ + setSamples(value: number): void; + +} + +/** + * A box blur material. + * + * @implements {Resizable} + */ + +export class BoxBlurMaterial extends ShaderMaterial {} + +/** + * A box blur pass. + */ + +export class BoxBlurPass extends Pass { + + /** + * Constructs a new box blur pass. + * + * @param {Object} [options] - The options. + * @param {Number} [options.kernelSize=5] - The kernel size. + * @param {Number} [options.iterations=1] - The amount of times the blur should be applied. + * @param {Number} [options.bilateral=false] - Enables or disables bilateral blurring. + * @param {Number} [options.resolutionScale=1.0] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + */ + + constructor( + { + kernelSize, + iterations, + bilateral, + resolutionScale, + resolutionX, + resolutionY + }?: { + kernelSize?: number; + iterations?: number; + bilateral?: boolean; + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + } + ); + +} + +/** + * An optimized Gaussian convolution shader material. + * + * References: + * + * Filip Strugar, Intel, 2014: [An investigation of fast real-time GPU-based image blur algorithms]( + * https://www.intel.com/content/www/us/en/developer/articles/technical/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms.html) + * + * @implements {Resizable} + */ + +export class GaussianBlurMaterial extends ShaderMaterial { + + /** + * Constructs a new convolution material. + * + * @param {Object} [options] - The options. + * @param {Number} [options.kernelSize=35] - The kernel size. + */ + constructor( + { + kernelSize + }?: { + kernelSize?: number; + } + ); + +} + +/** + * A Gaussian blur pass. + */ + +export class GaussianBlurPass extends Pass { + + /** + * Constructs a new Gaussian blur pass. + * + * @param {Object} [options] - The options. + * @param {Number} [options.kernelSize=35] - The kernel size. Should be an odd number in the range [3, 1020]. + * @param {Number} [options.iterations=1] - The amount of times the blur should be applied. + * @param {Number} [options.resolutionScale=1.0] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + */ + + constructor( + { + kernelSize, + iterations, + resolutionScale, + resolutionX, + resolutionY + }?: { + kernelSize?: number; + iterations?: number; + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + } + ); + +} + +/** + * An optimised convolution shader material. + * + * Based on the GDC2003 Presentation by Masaki Kawase, Bunkasha Games: + * Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless) + * and an article by Filip Strugar, Intel: + * An investigation of fast real-time GPU-based image blur algorithms + * + * Further modified according to Apple's [Best Practices for Shaders](https://goo.gl/lmRoM5). + * + * @todo Remove dithering code from fragment shader. + * @implements {Resizable} + */ +export class KawaseBlurMaterial extends ShaderMaterial implements Resizable { + + /** + * Constructs a new convolution material. + * + * TODO Remove texelSize param. + * @param {Vector2} [texelSize] - Deprecated. + */ + constructor(texelSize?: Vector2); + /** + * The input buffer. + * + * @type {Texture} + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The input buffer. + */ + setInputBuffer(value: Texture): void; + set scale(arg: number); + /** + * The blur scale. + * + * @type {Number} + */ + get scale(): number; + /** + * Returns the blur scale. + * + * @deprecated Use scale instead. + * @return {Number} The scale. + */ + getScale(): number; + /** + * Sets the blur scale. + * + * @deprecated Use scale instead. + * @param {Number} value - The scale. + */ + setScale(value: number): void; + /** + * Returns the kernel. + * + * @return {Float32Array} The kernel. + * @deprecated Implementation detail, removed with no replacement. + */ + getKernel(): Float32Array; + set kernel(arg: number); + /** + * The current kernel. + * + * @type {Number} + */ + get kernel(): number; + /** + * Sets the current kernel. + * + * @deprecated Use kernel instead. + * @param {Number} value - The kernel. + */ + setKernel(value: number): void; + /** + * Sets the texel size. + * + * @deprecated Use setSize() instead. + * @param {Number} x - The texel width. + * @param {Number} y - The texel height. + */ + setTexelSize(x: number, y: number): void; + /** + * Sets the size of this object. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +export type ConvolutionMaterial = KawaseBlurMaterial; + +/** + * A luminance shader material. + * + * This shader produces a greyscale luminance map that describes the absolute amount of light emitted by a scene. It can + * also be configured to output colors that are scaled with their respective luminance value. Additionally, a range may + * be provided to mask out undesired texels. + * + * The alpha channel always contains the luminance value. + * + * On luminance coefficients: + * http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9 + * + * Coefficients for different color spaces: + * https://hsto.org/getpro/habr/post_images/2ab/69d/084/2ab69d084f9a597e032624bcd74d57a7.png + * + * Luminance range reference: + * https://cycling74.com/2007/05/23/your-first-shader/#.Vty9FfkrL4Z + */ +export class LuminanceMaterial extends ShaderMaterial { + + /** + * Constructs a new luminance material. + * + * @param {Boolean} [colorOutput=false] - Defines whether the shader should output colors scaled with their luminance value. + * @param {Vector2} [luminanceRange] - If provided, the shader will mask out texels that aren't in the specified luminance range. + */ + constructor(colorOutput?: boolean, luminanceRange?: Vector2); + set colorOutput(arg: boolean); + /** + * Indicates whether color output is enabled. + * + * @type {Boolean} + */ + get colorOutput(): boolean; + set luminanceRange(arg: boolean); + /** + * The luminance range. Set to null to disable. + * + * @type {Boolean} + */ + get luminanceRange(): boolean; + /** + * The input buffer. + * + * @type {Texture} + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The input buffer. + */ + setInputBuffer(value: Texture): void; + set threshold(arg: number); + /** + * The luminance threshold. + * + * @type {Number} + */ + get threshold(): number; + /** + * Returns the luminance threshold. + * + * @deprecated Use threshold instead. + * @return {Number} The threshold. + */ + getThreshold(): number; + /** + * Sets the luminance threshold. + * + * @deprecated Use threshold instead. + * @param {Number} value - The threshold. + */ + setThreshold(value: number): void; + set smoothing(arg: number); + /** + * The luminance threshold smoothing. + * + * @type {Number} + */ + get smoothing(): number; + /** + * Returns the luminance threshold smoothing factor. + * + * @deprecated Use smoothing instead. + * @return {Number} The smoothing factor. + */ + getSmoothingFactor(): number; + /** + * Sets the luminance threshold smoothing factor. + * + * @deprecated Use smoothing instead. + * @param {Number} value - The smoothing factor. + */ + setSmoothingFactor(value: number): void; + set useThreshold(arg: boolean); + /** + * Indicates whether the luminance threshold is enabled. + * + * @type {Boolean} + * @deprecated Adjust the threshold or smoothing factor instead. + */ + get useThreshold(): boolean; + /** + * Indicates whether color output is enabled. + * + * @deprecated Use colorOutput instead. + * @return {Boolean} Whether color output is enabled. + */ + isColorOutputEnabled(): boolean; + /** + * Enables or disables color output. + * + * @deprecated Use colorOutput instead. + * @param {Boolean} value - Whether color output should be enabled. + */ + setColorOutputEnabled(value: boolean): void; + set useRange(arg: boolean); + /** + * Indicates whether luminance masking is enabled. + * + * @type {Boolean} + * @deprecated + */ + get useRange(): boolean; + /** + * Returns the current luminance range. + * + * @deprecated Use luminanceRange instead. + * @return {Vector2} The luminance range. + */ + getLuminanceRange(): Vector2; + /** + * Sets a luminance range. Set to null to disable. + * + * @deprecated Use luminanceRange instead. + * @param {Vector2} value - The luminance range. + */ + setLuminanceRange(value: Vector2): void; + +} + +/** + * A mask function enumeration. + * + * @type {Object} + * @property {Number} DISCARD - Discards elements when the respective mask value is zero. + * @property {Number} MULTIPLY - Multiplies the input buffer with the mask texture. + * @property {Number} MULTIPLY_RGB_SET_ALPHA - Multiplies the input RGB values with the mask and sets alpha to the mask value. + * @property {Number} MULTIPLY_RGB - Multiplies the input RGB values with the mask and keeps the original alpha. + */ +export enum MaskFunction { + DISCARD, + MULTIPLY, + MULTIPLY_RGB_SET_ALPHA, + MULTIPLY_RGB +} + +/** + * A mask shader material. + * + * This material applies a mask texture to a buffer. + */ +export class MaskMaterial extends ShaderMaterial { + + /** + * Constructs a new mask material. + * + * @param {Texture} [maskTexture] - The mask texture. + */ + constructor(maskTexture?: Texture); + /** + * The input buffer. + * + * @type {Texture} + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The input buffer. + */ + setInputBuffer(value: Texture): void; + /** + * The mask texture. + * + * @type {Texture} + */ + set maskTexture(arg: Texture); + /** + * Sets the mask texture. + * + * @deprecated Use maskTexture instead. + * @param {Texture} value - The texture. + */ + setMaskTexture(value: Texture): void; + /** + * Sets the color channel to use for masking. Default is `ColorChannel.RED`. + * + * @type {ColorChannel} + */ + set colorChannel(arg: ColorChannel); + /** + * Sets the color channel to use for masking. Default is `ColorChannel.RED`. + * + * @deprecated Use colorChannel instead. + * @param {ColorChannel} value - The channel. + */ + setColorChannel(value: ColorChannel): void; + /** + * The masking technique. Default is `MaskFunction.DISCARD`. + * + * @type {MaskFunction} + */ + set maskFunction(arg: MaskFunction); + /** + * Sets the masking technique. Default is `MaskFunction.DISCARD`. + * + * @deprecated Use maskFunction instead. + * @param {MaskFunction} value - The function. + */ + setMaskFunction(value: MaskFunction): void; + set inverted(arg: boolean); + /** + * Indicates whether the masking is inverted. + * + * @type {Boolean} + */ + get inverted(): boolean; + /** + * Indicates whether the masking is inverted. + * + * @deprecated Use inverted instead. + * @return {Boolean} Whether the masking is inverted. + */ + isInverted(): boolean; + /** + * Determines whether the masking should be inverted. + * + * @deprecated Use inverted instead. + * @param {Boolean} value - Whether the masking should be inverted. + */ + setInverted(value: boolean): void; + set strength(arg: number); + /** + * The current mask strength. + * + * Individual mask values will be clamped to [0.0, 1.0]. Has no effect when the mask function is set to `DISCARD`. + * + * @type {Number} + */ + get strength(): number; + /** + * Returns the current mask strength. + * + * @deprecated Use strength instead. + * @return {Number} The mask strength. + */ + getStrength(): number; + /** + * Sets the mask strength. + * + * Has no effect when the mask function is set to `DISCARD`. + * + * @deprecated Use strength instead. + * @param {Number} value - The mask strength. + */ + setStrength(value: number): void; + +} + +/** + * An outline shader material. + * + * @implements {Resizable} + */ +export class OutlineMaterial extends ShaderMaterial implements Resizable { + + /** + * Constructs a new outline material. + * + * TODO Remove texelSize param. + * @param {Vector2} [texelSize] - The screen texel size. + */ + constructor(texelSize?: Vector2); + /** + * The input buffer. + * + * @param {Texture} arg - The input buffer. + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The input buffer. + */ + setInputBuffer(value: Texture): void; + /** + * Sets the texel size. + * + * @deprecated Use setSize() instead. + * @param {Number} x - The texel width. + * @param {Number} y - The texel height. + */ + setTexelSize(x: number, y: number): void; + /** + * Sets the size of this object. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * An outline shader material. + */ +export type OutlineEdgesMaterial = OutlineMaterial; + +/** + * Subpixel Morphological Antialiasing. + * + * This material computes weights for detected edges. + * + * @implements {Resizable} + */ +export class SMAAWeightsMaterial extends ShaderMaterial implements Resizable { + + /** + * Constructs a new SMAA weights material. + * + * @param {Vector2} [texelSize] - The absolute screen texel size. + * @param {Vector2} [resolution] - The resolution. + */ + constructor(texelSize?: Vector2, resolution?: Vector2); + /** + * The input buffer. + * + * @param {Texture} arg - The input buffer. + */ + set inputBuffer(arg: Texture); + /** + * Sets the input buffer. + * + * @deprecated Use inputBuffer instead. + * @param {Texture} value - The input buffer. + */ + setInputBuffer(value: Texture): void; + set searchTexture(arg: Texture); + /** + * The search lookup texture. + * + * @type {Texture} + */ + get searchTexture(): Texture; + set areaTexture(arg: Texture); + /** + * The area lookup texture. + * + * @type {Texture} + */ + get areaTexture(): Texture; + /** + * Sets the search and area lookup textures. + * + * @deprecated Use searchTexture and areaTexture instead. + * @param {Texture} search - The search lookup texture. + * @param {Texture} area - The area lookup texture. + */ + setLookupTextures(search: Texture, area: Texture): void; + set orthogonalSearchSteps(arg: number); + /** + * The maximum amount of steps performed in the horizontal/vertical pattern searches, at each side of the pixel. + * Range: [0, 112]. + * + * In number of pixels, it's actually the double. So the maximum line length perfectly handled by, for example 16, is + * 64 (perfectly means that longer lines won't look as good, but are still antialiased). + * + * @type {Number} + */ + get orthogonalSearchSteps(): number; + /** + * Sets the maximum amount of steps performed in the horizontal/vertical pattern searches, at each side of the pixel. + * + * @deprecated Use orthogonalSearchSteps instead. + * @param {Number} value - The search steps. Range: [0, 112]. + */ + setOrthogonalSearchSteps(value: number): void; + set diagonalSearchSteps(arg: number); + /** + * The maximum steps performed in the diagonal pattern searches, at each side of the pixel. This search + * jumps one pixel at a time. Range: [0, 20]. + * + * On high-end machines this search is cheap (between 0.8x and 0.9x slower for 16 steps), but it can have a + * significant impact on older machines. + * + * @type {Number} + */ + get diagonalSearchSteps(): number; + /** + * Specifies the maximum steps performed in the diagonal pattern searches, at each side of the pixel. + * + * @deprecated Use diagonalSearchSteps instead. + * @param {Number} value - The search steps. Range: [0, 20]. + */ + setDiagonalSearchSteps(value: number): void; + set diagonalDetection(arg: boolean); + /** + * Indicates whether diagonal pattern detection is enabled. + * + * @type {Boolean} + */ + get diagonalDetection(): boolean; + /** + * Indicates whether diagonal pattern detection is enabled. + * + * @deprecated Use diagonalDetection instead. + * @return {Boolean} Whether diagonal pattern detection is enabled. + */ + isDiagonalDetectionEnabled(): boolean; + /** + * Enables or disables diagonal pattern detection. + * + * @deprecated Use diagonalDetection instead. + * @param {Boolean} value - Whether diagonal pattern detection should be enabled. + */ + setDiagonalDetectionEnabled(value: boolean): void; + set cornerRounding(arg: number); + /** + * Specifies how much sharp corners will be rounded. Range: [0, 100]. + * + * @type {Number} + */ + get cornerRounding(): number; + /** + * Specifies how much sharp corners will be rounded. + * + * @deprecated Use cornerRounding instead. + * @param {Number} value - The corner rounding amount. Range: [0, 100]. + */ + setCornerRounding(value: number): void; + set cornerDetection(arg: number); + /** + * Indicates whether corner detection is enabled. + * + * @type {Number} + */ + get cornerDetection(): number; + /** + * Indicates whether corner rounding is enabled. + * + * @deprecated Use cornerDetection instead. + * @return {Boolean} Whether corner rounding is enabled. + */ + isCornerRoundingEnabled(): boolean; + /** + * Enables or disables corner rounding. + * + * @deprecated Use cornerDetection instead. + * @param {Boolean} value - Whether corner rounding should be enabled. + */ + setCornerRoundingEnabled(value: boolean): void; + /** + * Sets the size of this object. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * A Screen Space Ambient Occlusion (SSAO) shader material. + * + * @implements {Resizable} + */ +export class SSAOMaterial extends ShaderMaterial implements Resizable { + + /** + * Constructs a new SSAO material. + * + * @param {Camera} camera - A camera. + */ + constructor(camera: Camera); + /** + * The combined normal-depth buffer. + * + * @param {Texture} arg - The buffer. + */ + set normalDepthBuffer(arg: Texture); + /** + * Sets the combined normal-depth buffer. + * + * @deprecated Use normalDepthBuffer instead. + * @param {Texture} value - The buffer. + */ + setNormalDepthBuffer(value: Texture): void; + /** + * The normal buffer. + * + * @param {Texture} arg - The buffer. + */ + set normalBuffer(arg: Texture); + /** + * Sets the normal buffer. + * + * @deprecated Use normalBuffer instead. + * @param {Texture} value - The buffer. + */ + setNormalBuffer(value: Texture): void; + /** + * The depth buffer. + * + * @param {Texture} arg - The buffer. + */ + set depthBuffer(arg: Texture); + /** + * The depth packing strategy. + * + * @param {DepthPackingStrategies} arg - The depth packing strategy. + */ + set depthPacking(arg: DepthPackingStrategies); + /** + * Sets the depth buffer. + * + * @deprecated Use depthBuffer and depthPacking instead. + * @param {Texture} buffer - The depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. + */ + setDepthBuffer( + buffer: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * The noise texture. + * + * @param {Texture} arg - The texture. + */ + set noiseTexture(arg: Texture); + /** + * Sets the noise texture. + * + * @deprecated Use noiseTexture instead. + * @param {Texture} value - The texture. + */ + setNoiseTexture(value: Texture): void; + set samples(arg: number); + /** + * The sample count. + * + * @type {Number} + */ + get samples(): number; + /** + * Returns the amount of occlusion samples per pixel. + * + * @deprecated Use samples instead. + * @return {Number} The sample count. + */ + getSamples(): number; + /** + * Sets the amount of occlusion samples per pixel. + * + * @deprecated Use samples instead. + * @param {Number} value - The sample count. + */ + setSamples(value: number): void; + set rings(arg: number); + /** + * The sampling spiral ring count. + * + * @type {Number} + */ + get rings(): number; + /** + * Returns the amount of spiral turns in the occlusion sampling pattern. + * + * @deprecated Use rings instead. + * @return {Number} The radius. + */ + getRings(): number; + /** + * Sets the amount of spiral turns in the occlusion sampling pattern. + * + * @deprecated Use rings instead. + * @param {Number} value - The radius. + */ + setRings(value: number): void; + /** + * The intensity. + * + * @type {Number} + * @deprecated Use SSAOEffect.intensity instead. + */ + get intensity(): number; + set intensity(arg: number); + /** + * Returns the intensity. + * + * @deprecated Use intensity instead. + * @return {Number} The intensity. + */ + getIntensity(): number; + /** + * Sets the intensity. + * + * @deprecated Use intensity instead. + * @param {Number} value - The intensity. + */ + setIntensity(value: number): void; + set fade(arg: number); + /** + * The depth fade factor. + * + * @type {Number} + */ + get fade(): number; + /** + * Returns the depth fade factor. + * + * @deprecated Use fade instead. + * @return {Number} The fade factor. + */ + getFade(): number; + /** + * Sets the depth fade factor. + * + * @deprecated Use fade instead. + * @param {Number} value - The fade factor. + */ + setFade(value: number): void; + set bias(arg: number); + /** + * The depth bias. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get bias(): number; + /** + * Returns the depth bias. + * + * @deprecated Use bias instead. + * @return {Number} The bias. + */ + getBias(): number; + /** + * Sets the depth bias. + * + * @deprecated Use bias instead. + * @param {Number} value - The bias. + */ + setBias(value: number): void; + set minRadiusScale(arg: number); + /** + * The minimum radius scale for distance scaling. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get minRadiusScale(): number; + /** + * Returns the minimum radius scale for distance scaling. + * + * @deprecated Use minRadiusScale instead. + * @return {Number} The minimum radius scale. + */ + getMinRadiusScale(): number; + /** + * Sets the minimum radius scale for distance scaling. + * + * @deprecated Use minRadiusScale instead. + * @param {Number} value - The minimum radius scale. + */ + setMinRadiusScale(value: number): void; + set radius(arg: number); + /** + * The occlusion sampling radius. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get radius(): number; + /** + * Returns the occlusion sampling radius. + * + * @deprecated Use radius instead. + * @return {Number} The radius. + */ + getRadius(): number; + /** + * Sets the occlusion sampling radius. + * + * @deprecated Use radius instead. + * @param {Number} value - The radius. Range [1e-6, 1.0]. + */ + setRadius(value: number): void; + set distanceScaling(arg: boolean); + /** + * Indicates whether distance-based radius scaling is enabled. + * + * @type {Boolean} + */ + get distanceScaling(): boolean; + /** + * Indicates whether distance-based radius scaling is enabled. + * + * @deprecated Use distanceScaling instead. + * @return {Boolean} Whether distance scaling is enabled. + */ + isDistanceScalingEnabled(): boolean; + /** + * Enables or disables distance-based radius scaling. + * + * @deprecated Use distanceScaling instead. + * @param {Boolean} value - Whether distance scaling should be enabled. + */ + setDistanceScalingEnabled(value: boolean): void; + set distanceThreshold(arg: number); + /** + * The occlusion distance threshold. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get distanceThreshold(): number; + + /** + * The occlusion distance falloff. + * The occlusion distance threshold in world units. + * + * @type {Number} + */ + + get worldDistanceThreshold(): number; + set worldDistanceThreshold(value: number); + + set distanceFalloff(arg: number); + /** + * The occlusion distance falloff. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get distanceFalloff(): number; + + /** + * The occlusion distance falloff in world units. + * + * @type {Number} + */ + + get worldDistanceFalloff(): number; + set worldDistanceFalloff(value: number); + + /** + * Sets the occlusion distance cutoff. + * + * @deprecated Use distanceThreshold and distanceFalloff instead. + * @param {Number} threshold - The distance threshold. Range [0.0, 1.0]. + * @param {Number} falloff - The falloff. Range [0.0, 1.0]. + */ + setDistanceCutoff(threshold: number, falloff: number): void; + set proximityThreshold(arg: number); + /** + * The occlusion proximity threshold. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get proximityThreshold(): number; + /** + * The occlusion proximity threshold in world units. + * + * @type {Number} + */ + get worldProximityThreshold(): number; + set worldProximityThreshold(value: number); + + set proximityFalloff(arg: number); + /** + * The occlusion proximity falloff. Range: [0.0, 1.0]. + * + * @type {Number} + */ + get proximityFalloff(): number; + + /** + * The occlusion proximity falloff in world units. + * + * @type {Number} + */ + + get worldProximityFalloff(): number; + set worldProximityFalloff(value: number); + + /** + * Sets the occlusion proximity cutoff. + * + * @deprecated Use proximityThreshold and proximityFalloff instead. + * @param {Number} threshold - The range threshold. Range [0.0, 1.0]. + * @param {Number} falloff - The falloff. Range [0.0, 1.0]. + */ + setProximityCutoff(threshold: number, falloff: number): void; + /** + * Sets the texel size. + * + * @deprecated Use setSize() instead. + * @param {Number} x - The texel width. + * @param {Number} y - The texel height. + */ + setTexelSize(x: number, y: number): void; + /** + * Adopts the settings of the given camera. + * + * @param {Camera} camera - A camera. + */ + adoptCameraSettings(camera: Camera): void; + /** + * Sets the size of this object. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * A resolution. + */ +export class Resolution extends EventDispatcher { + + /** + * An auto sizing constant. + * + * Can be used to automatically calculate the width or height based on the original aspect ratio. + * + * @type {Number} + */ + static get AUTO_SIZE(): number; + /** + * Constructs a new resolution. + * + * TODO Remove resizable param. + * @param {Resizable} resizable - A resizable object. + * @param {Number} [width=Resolution.AUTO_SIZE] - The preferred width. + * @param {Number} [height=Resolution.AUTO_SIZE] - The preferred height. + * @param {Number} [scale=1.0] - A resolution scale. + */ + constructor( + resizable: Resizable, + width?: number, + height?: number, + scale?: number + ); + + /** + * A resizable object. + * + * @type {Resizable} + * @deprecated Use an event listener for "change" events instead. + */ + resizable: Resizable; + /** + * The preferred resolution. + * + * @type {Vector2} + * @deprecated Added for backward-compatibility. + */ + target: Vector2; + set width(arg: number); + /** + * The effective width. + * + * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base width will be returned. + * + * @type {Number} + */ + get width(): number; + set preferredWidth(arg: number); + /** + * The preferred width. + * + * @type {Number} + */ + get preferredWidth(): number; + set height(arg: number); + /** + * The effective height. + * + * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base height will be returned. + * + * @type {Number} + */ + get height(): number; + set preferredHeight(arg: number); + /** + * The preferred height. + * + * @type {Number} + */ + get preferredHeight(): number; + /** + * Returns the effective width. + * + * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base width will be returned. + * + * @deprecated Use width instead. + * @return {Number} The effective width. + */ + getWidth(): number; + /** + * Returns the effective height. + * + * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base height will be returned. + * + * @deprecated Use height instead. + * @return {Number} The effective height. + */ + getHeight(): number; + set scale(arg: number); + /** + * The resolution scale. + * + * @type {Number} + */ + get scale(): number; + /** + * Returns the current resolution scale. + * + * @deprecated Use scale instead. + * @return {Number} The scale. + */ + getScale(): number; + /** + * Sets the resolution scale. + * + * Also sets the preferred resolution to {@link Resizer.AUTO_SIZE}. + * + * @deprecated Use scale instead. + * @param {Number} value - The scale. + */ + setScale(value: number): void; + set baseWidth(arg: number); + /** + * The base width. + * + * @type {Number} + */ + get baseWidth(): number; + /** + * Returns the base width. + * + * @deprecated Use baseWidth instead. + * @return {Number} The base width. + */ + getBaseWidth(): number; + /** + * Sets the base width. + * + * @deprecated Use baseWidth instead. + * @param {Number} value - The width. + */ + setBaseWidth(value: number): void; + set baseHeight(arg: number); + /** + * The base height. + * + * @type {Number} + */ + get baseHeight(): number; + /** + * Returns the base height. + * + * @deprecated Use baseHeight instead. + * @return {Number} The base height. + */ + getBaseHeight(): number; + /** + * Sets the base height. + * + * @deprecated Use baseHeight instead. + * @param {Number} value - The height. + */ + setBaseHeight(value: number): void; + /** + * Sets the base size. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setBaseSize(width: number, height: number): void; + /** + * Returns the preferred width. + * + * @deprecated Use preferredWidth instead. + * @return {Number} The preferred width. + */ + getPreferredWidth(): number; + /** + * Sets the preferred width. + * + * Use {@link Resizer.AUTO_SIZE} to automatically calculate the width based on the height and aspect ratio. + * + * @deprecated Use preferredWidth instead. + * @param {Number} value - The width. + */ + setPreferredWidth(value: number): void; + /** + * Returns the preferred height. + * + * @deprecated Use preferredHeight instead. + * @return {Number} The preferred height. + */ + getPreferredHeight(): number; + /** + * Sets the preferred height. + * + * Use {@link Resizer.AUTO_SIZE} to automatically calculate the height based on the width and aspect ratio. + * + * @deprecated Use preferredHeight instead. + * @param {Number} value - The height. + */ + setPreferredHeight(value: number): void; + /** + * Sets the preferred size. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setPreferredSize(width: number, height: number): void; + /** + * Copies the given resolution. + * + * @param {Resolution} resolution - The resolution. + */ + copy(resolution: Resolution): void; + +} + +export type Resizer = Resolution; + +/** + * An abstract pass. + * + * Fullscreen passes use a shared fullscreen triangle: + * https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/ + * + * @implements {Initializable} + * @implements {Resizable} + * @implements {Disposable} + */ +export class Pass implements Initializable, Resizable, Disposable { + + /** + * Constructs a new pass. + * + * @param {String} [name] - The name of this pass. Does not have to be unique. + * @param {Scene} [scene] - The scene to render. The default scene contains a single mesh that fills the screen. + * @param {Camera} [camera] - A camera. Fullscreen effect passes don't require a camera. + */ + constructor(name?: string, scene?: Scene, camera?: Camera); + /** + * The name of this pass. + * + * @type {String} + */ + name: string; + /** + * The renderer. + * + * @deprecated + * @type {WebGLRenderer} + * @protected + */ + protected renderer: WebGLRenderer; + /** + * The scene to render. + * + * @type {Scene} + * @protected + */ + protected scene: Scene; + /** + * The camera. + * + * @type {Camera} + * @protected + */ + protected camera: Camera; + /** + * Only relevant for subclassing. + * + * Indicates whether the {@link EffectComposer} should swap the frame buffers after this pass has finished + * rendering. Set this to `false` if this pass doesn't render to the output buffer or the screen. Otherwise, the + * contents of the input buffer will be lost. + * + * @type {Boolean} + */ + needsSwap: boolean; + /** + * Only relevant for subclassing. + * + * Indicates whether the {@link EffectComposer} should prepare a depth texture for this pass. + * Set this to `true` if this pass relies on depth information from a preceding {@link RenderPass}. + * + * @type {Boolean} + */ + needsDepthTexture: boolean; + /** + * Indicates whether this pass is enabled. + * + * @type {Boolean} + */ + enabled: boolean; + /** + * Sets the render to screen flag. + * + * If this flag is changed, the fullscreen material will be updated as well. + * + * @type {Boolean} + */ + set renderToScreen(arg: boolean); + /** + * Indicates whether this pass should render to screen. + * + * @type {Boolean} + */ + get renderToScreen(): boolean; + /** + * Sets the main scene. + * + * @type {Scene} + */ + set mainScene(arg: Scene); + /** + * Sets the main camera. + * + * @type {Camera} + */ + set mainCamera(arg: Camera); + /** + * Sets the renderer + * + * @deprecated + * @param {WebGLRenderer} renderer - The renderer. + */ + setRenderer(renderer: WebGLRenderer): void; + /** + * Indicates whether this pass is enabled. + * + * @deprecated Use enabled instead. + * @return {Boolean} Whether this pass is enabled. + */ + isEnabled(): boolean; + /** + * Enables or disables this pass. + * + * @deprecated Use enabled instead. + * @param {Boolean} value - Whether the pass should be enabled. + */ + setEnabled(value: boolean): void; + set fullscreenMaterial(arg: Material); + /** + * The fullscreen material. + * + * @type {Material} + */ + get fullscreenMaterial(): Material; + /** + * Returns the current fullscreen material. + * + * @deprecated Use fullscreenMaterial instead. + * @return {Material} The current fullscreen material, or null if there is none. + */ + getFullscreenMaterial(): Material; + /** + * Sets the fullscreen material. + * + * @deprecated Use fullscreenMaterial instead. + * @protected + * @param {Material} value - A fullscreen material. + */ + protected setFullscreenMaterial(value: Material): void; + /** + * Returns the current depth texture. + * + * @return {Texture} The current depth texture, or null if there is none. + */ + getDepthTexture(): Texture; + /** + * Sets the depth texture. + * + * This method will be called automatically by the {@link EffectComposer}. + * You may override this method if your pass relies on the depth information of a preceding {@link RenderPass}. + * + * @param {Texture} depthTexture - A depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. + */ + setDepthTexture( + depthTexture: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Renders this pass. + * + * This is an abstract method that must be overridden. + * + * @abstract + * @throws {Error} An error is thrown if the method is not overridden. + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + + /** + * Sets the size. + * + * You may override this method if you want to be informed about the size of the backbuffer/canvas. + * This method is called before {@link initialize} and every time the size of the {@link EffectComposer} changes. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * Performs initialization tasks. + * + * This method is called when this pass is added to an {@link EffectComposer}. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + + /** + * Performs a shallow search for disposable properties and deletes them. + * + * The {@link EffectComposer} calls this method when it is being destroyed. You can use it independently to free + * memory when you're certain that you don't need this pass anymore. + */ + dispose(): void; + +} + +/** + * A pass that renders an adaptive luminance map. + */ +export class AdaptiveLuminancePass extends Pass { + + /** + * Constructs a new adaptive luminance pass. + * + * @param {Texture} luminanceBuffer - A buffer that contains the current scene luminance. + * @param {Object} [options] - The options. + * @param {Number} [options.minLuminance=0.01] - The minimum luminance. + * @param {Number} [options.adaptationRate=1.0] - The luminance adaptation rate. + */ + constructor( + luminanceBuffer: Texture, + { + minLuminance, + adaptationRate + }?: { + minLuminance?: number; + adaptationRate?: number; + } + ); + + /** + * The adaptive luminance texture. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Returns the adaptive 1x1 luminance texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * Sets the 1x1 mipmap level. + * + * This level is used to identify the smallest mipmap of the main luminance texture which contains the downsampled + * average scene luminance. + * + * @type {Number} + * @deprecated Use fullscreenMaterial.mipLevel1x1 instead. + */ + set mipLevel1x1(arg: number); + /** + * @type {Number} + * @deprecated Use fullscreenMaterial.adaptationRate instead. + */ + set adaptationRate(arg: number); + /** + * The luminance adaptation rate. + * + * @type {Number} + * @deprecated Use fullscreenMaterial.adaptationRate instead. + */ + get adaptationRate(): number; + /** + * Renders the scene normals. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A Kawase blur pass. + */ +export class KawaseBlurPass extends Pass { + + /** + * An auto sizing flag. + * + * @type {Number} + * @deprecated Use {@link Resolution.AUTO_SIZE} instead. + */ + static get AUTO_SIZE(): number; + /** + * Constructs a new Kawase blur pass. + * + * @param {Object} [options] - The options. + * @param {Number} [options.resolutionScale=0.5] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + * @param {KernelSize} [options.kernelSize=KernelSize.MEDIUM] - The blur kernel size. + */ + constructor({ + resolutionScale, + resolutionX, + resolutionY, + width, + height, + kernelSize + }?: { + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + kernelSize?: KernelSize; + }); + + resolution: Resolution; + /** + * The blur material. + * + * @type {KawaseBlurMaterial} + */ + blurMaterial: KawaseBlurMaterial; + /** + * Indicates whether dithering is enabled. + * + * @type {Boolean} + * @deprecated + */ + dithering: boolean; + /** + * The kernel size. + * + * @type {KernelSize} + */ + kernelSize: KernelSize; + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * Sets the render width. + * + * @type {Number} + * @deprecated Use resolution.preferredWidth instead. + */ + set width(arg: number); + /** + * The current width of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.width instead. + */ + get width(): number; + /** + * Sets the render height. + * + * @type {Number} + * @deprecated Use resolution.preferredHeight instead. + */ + set height(arg: number); + /** + * The current height of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.height instead. + */ + get height(): number; + set scale(arg: number); + /** + * The current blur scale. + * + * @type {Number} + * @deprecated Use blurMaterial.scale instead. + */ + get scale(): number; + /** + * Returns the current blur scale. + * + * @deprecated Use blurMaterial.scale instead. + * @return {Number} The scale. + */ + getScale(): number; + /** + * Sets the blur scale. + * + * This value influences the overall blur strength and should not be greater than 1. For larger blurs please increase + * the kernel size via {@link setKernelSize}! + * + * Note that the blur strength is closely tied to the resolution. For a smooth transition from no blur to full blur, + * set the width or the height to a high enough value. + * + * @deprecated Use blurMaterial.scale instead. + * @param {Number} value - The scale. + */ + setScale(value: number): void; + /** + * Returns the kernel size. + * + * @deprecated Use kernelSize instead. + * @return {KernelSize} The kernel size. + */ + getKernelSize(): KernelSize; + /** + * Sets the kernel size. + * + * Larger kernels require more processing power but scale well with larger render resolutions. + * + * @deprecated Use kernelSize instead. + * @param {KernelSize} value - The kernel size. + */ + setKernelSize(value: KernelSize): void; + /** + * Returns the current resolution scale. + * + * @return {Number} The resolution scale. + * @deprecated Use resolution instead. + */ + getResolutionScale(): number; + /** + * Sets the resolution scale. + * + * @param {Number} scale - The new resolution scale. + * @deprecated Use resolution instead. + */ + setResolutionScale(scale: number): void; + /** + * Blurs the input buffer and writes the result to the output buffer. The input buffer remains intact, unless it's + * also used as the output buffer. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +export type BlurPass = KawaseBlurPass; + +/** + * A blur pass that produces a wide blur by downsampling and upsampling the input over multiple MIP levels. + * + * Based on an article by Fabrice Piquet: + * https://www.froyok.fr/blog/2021-12-ue4-custom-bloom/ + */ +export class MipmapBlurPass extends Pass { + + /** + * A texture that contains the blurred result. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * The MIP levels. Default is 8. + * + * @type {Number} + */ + get levels(): number; + set levels(value: number); + /** + * The blur radius. Default is 0.85. + * + * @type {Number} + */ + get radius(): number; + set radius(value: number); + +} + +/** + * A pass that disables the stencil test. + */ +export class ClearMaskPass extends Pass { + + /** + * Constructs a new clear mask pass. + */ + constructor(); + + /** + * Disables the global stencil test. + * @param renderer - The renderer. + * @param inputBuffer - A frame buffer that contains the result of the previous pass. + * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param [deltaTime] - The time between the last frame and the current one in seconds. + * @param [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A pass that clears the input buffer or the screen. + */ +export class ClearPass extends Pass { + + /** + * Constructs a new clear pass. + * + * @param {Boolean} [color=true] - Determines whether the color buffer should be cleared. + * @param {Boolean} [depth=true] - Determines whether the depth buffer should be cleared. + * @param {Boolean} [stencil=false] - Determines whether the stencil buffer should be cleared. + */ + constructor(color?: boolean, depth?: boolean, stencil?: boolean); + /** + * Indicates whether the color buffer should be cleared. + * + * @type {Boolean} + * @deprecated Use setClearFlags() instead. + */ + color: boolean; + /** + * Indicates whether the depth buffer should be cleared. + * + * @type {Boolean} + * @deprecated Use setClearFlags() instead. + */ + depth: boolean; + /** + * Indicates whether the stencil buffer should be cleared. + * + * @type {Boolean} + * @deprecated Use setClearFlags() instead. + */ + stencil: boolean; + /** + * An override clear color. Default is null. + * + * @type {Color} + */ + overrideClearColor: Color; + /** + * An override clear alpha. Default is -1. + * + * @type {Number} + */ + overrideClearAlpha: number; + /** + * Sets the clear flags. + * + * @param {Boolean} color - Whether the color buffer should be cleared. + * @param {Boolean} depth - Whether the depth buffer should be cleared. + * @param {Boolean} stencil - Whether the stencil buffer should be cleared. + */ + setClearFlags(color: boolean, depth: boolean, stencil: boolean): void; + /** + * Returns the override clear color. Default is null. + * + * @deprecated Use overrideClearColor instead. + * @return {Color} The clear color. + */ + getOverrideClearColor(): Color; + /** + * Sets the override clear color. + * + * @deprecated Use overrideClearColor instead. + * @param {Color} value - The clear color. + */ + setOverrideClearColor(value: Color): void; + /** + * Returns the override clear alpha. Default is -1. + * + * @deprecated Use overrideClearAlpha instead. + * @return {Number} The clear alpha. + */ + getOverrideClearAlpha(): number; + /** + * Sets the override clear alpha. + * + * @deprecated Use overrideClearAlpha instead. + * @param {Number} value - The clear alpha. + */ + setOverrideClearAlpha(value: number): void; + /** + * Clears the input buffer or the screen. + * @param renderer - The renderer. + * @param inputBuffer - A frame buffer that contains the result of the previous pass. + * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param [deltaTime] - The time between the last frame and the current one in seconds. + * @param [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A pass that copies the contents of an input buffer to another render target. + */ +export class CopyPass extends Pass { + + /** + * Constructs a new save pass. + * + * @param {WebGLRenderTarget} [renderTarget] - A render target. + * @param {Boolean} [autoResize=true] - Whether the render target size should be updated automatically. + */ + constructor(renderTarget?: WebGLRenderTarget, autoResize?: boolean); + /** + * Enables or disables auto resizing of the render target. + * + * @type {Boolean} + */ + autoResize: boolean; + set resize(arg: boolean); + /** + * Enables or disables auto resizing of the render target. + * + * @deprecated Use autoResize instead. + * @type {Boolean} + */ + get resize(): boolean; + /** + * The output texture. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Returns the output texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * Enables or disables auto resizing of the render target. + * + * @deprecated Use autoResize instead. + * @param {Boolean} value - Whether the render target size should be updated automatically. + */ + setAutoResizeEnabled(value: boolean): void; + /** + * Saves the input buffer. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +export type SavePass = CopyPass; + +/** + * A pass that copies depth into a render target. + */ +export class DepthCopyPass extends Pass { + + /** + * Constructs a new depth save pass. + * + * @param {Object} [options] - The options. + * @param {DepthPackingStrategies} [options.depthPacking=RGBADepthPacking] - The output depth packing. + */ + constructor({ depthPacking }?: { depthPacking?: DepthPackingStrategies }); + /** + * The output depth texture. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Returns the output depth texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * The output depth packing. + * + * @type {DepthPackingStrategies} + */ + get depthPacking(): DepthPackingStrategies; + /** + * Returns the output depth packing. + * + * @deprecated Use depthPacking instead. + * @return {DepthPackingStrategies} The depth packing. + */ + getDepthPacking(): DepthPackingStrategies; + /** + * Copies depth from a depth texture. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A pass that downsamples the scene depth by picking the most representative depth in 2x2 texel neighborhoods. If a + * normal buffer is provided, the corresponding normals will be stored as well. + * + * This pass requires WebGL 2. + */ +export class DepthDownsamplingPass extends Pass { + + /** + * Constructs a new depth downsampling pass. + * + * @param {Object} [options] - The options. + * @param {Texture} [options.normalBuffer=null] - A texture that contains view space normals. See {@link NormalPass}. + * @param {Number} [options.resolutionScale=0.5] - The resolution scale. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - The render width. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - The render height. + */ + constructor({ + normalBuffer, + resolutionScale, + width, + height + }?: { + normalBuffer?: Texture; + resolutionScale?: number; + width?: number; + height?: number; + }); + + resolution: Resolution; + /** + * The normal(RGB) + depth(A) texture. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Returns the normal(RGB) + depth(A) texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * Downsamples depth and scene normals. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A pass that renders a given scene into the input buffer or to screen. + * + * This pass uses a {@link ClearPass} to clear the target buffer. + */ +export class RenderPass extends Pass { + + /** + * Constructs a new render pass. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to use to render the scene. + * @param {Material} [overrideMaterial=null] - An override material. + */ + constructor(scene?: Scene, camera?: Camera, overrideMaterial?: Material); + /** + * A clear pass. + * + * @type {ClearPass} + */ + clearPass: ClearPass; + /** + * Indicates whether the scene background should be ignored. + * + * @type {Boolean} + */ + ignoreBackground: boolean; + /** + * Indicates whether the shadow map auto update should be skipped. + * + * @type {Boolean} + */ + skipShadowMapUpdate: boolean; + /** + * A selection of objects to render. + * + * @type {Selection} + */ + selection: Selection; + set overrideMaterial(arg: Material); + /** + * The current override material. + * + * @type {Material} + */ + get overrideMaterial(): Material; + /** + * Returns the current override material. + * + * @deprecated Use overrideMaterial instead. + * @return {Material} The material. + */ + getOverrideMaterial(): Material; + /** + * Sets the override material. + * + * @deprecated Use overrideMaterial instead. + * @param {Material} value - The material. + */ + setOverrideMaterial(value: Material): void; + set clear(arg: boolean); + /** + * Indicates whether the target buffer should be cleared before rendering. + * + * @type {Boolean} + * @deprecated Use clearPass.enabled instead. + */ + get clear(): boolean; + /** + * Returns the selection. Default is `null` (no restriction). + * + * @deprecated Use selection instead. + * @return {Selection} The selection. + */ + getSelection(): Selection; + /** + * Sets the selection. Set to `null` to disable. + * + * @deprecated Use selection instead. + * @param {Selection} value - The selection. + */ + setSelection(value: Selection): void; + /** + * Indicates whether the scene background is disabled. + * + * @deprecated Use ignoreBackground instead. + * @return {Boolean} Whether the scene background is disabled. + */ + isBackgroundDisabled(): boolean; + /** + * Enables or disables the scene background. + * + * @deprecated Use ignoreBackground instead. + * @param {Boolean} value - Whether the scene background should be disabled. + */ + setBackgroundDisabled(value: boolean): void; + /** + * Indicates whether the shadow map auto update is disabled. + * + * @deprecated Use skipShadowMapUpdate instead. + * @return {Boolean} Whether the shadow map update is disabled. + */ + isShadowMapDisabled(): boolean; + /** + * Enables or disables the shadow map auto update. + * + * @deprecated Use skipShadowMapUpdate instead. + * @param {Boolean} value - Whether the shadow map auto update should be disabled. + */ + setShadowMapDisabled(value: boolean): void; + /** + * Returns the clear pass. + * + * @deprecated Use clearPass.enabled instead. + * @return {ClearPass} The clear pass. + */ + getClearPass(): ClearPass; + /** + * Renders the scene. + * @param renderer - The renderer. + * @param inputBuffer - A frame buffer that contains the result of the previous pass. + * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param [deltaTime] - The time between the last frame and the current one in seconds. + * @param [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A pass that renders depth into an RGBA buffer. + */ +export class DepthPass extends Pass { + + /** + * Constructs a new depth pass. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to use to render the scene. + * @param {Object} [options] - The options. + * @param {Number} [options.resolutionScale=1.0] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + * @param {WebGLRenderTarget} [options.renderTarget] - A custom render target. + */ + constructor( + scene?: Scene, + camera?: Camera, + { + resolutionScale, + resolutionX, + resolutionY, + width, + height, + renderTarget + }?: { + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + renderTarget?: WebGLRenderTarget; + } + ); + + resolution: Resolution; + /** + * The depth texture. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Returns the depth texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * Returns the current resolution scale. + * + * @return {Number} The resolution scale. + * @deprecated Use resolution instead. + */ + getResolutionScale(): number; + /** + * Sets the resolution scale. + * + * @param {Number} scale - The new resolution scale. + * @deprecated Use resolution instead. + */ + setResolutionScale(scale: number): void; + /** + * Renders the scene depth. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A depth picking pass. + */ +export class DepthPickingPass extends DepthCopyPass { + + /** + * Constructs a new depth picking pass. + * + * @param {Object} [options] - The options. + * @param {DepthPackingStrategies} [options.depthPacking=RGBADepthPacking] - The depth packing. + * @param {Number} [options.mode=DepthCopyMode.SINGLE] - The depth copy mode. + */ + constructor({ + depthPacking, + mode + }?: { + depthPacking?: DepthPackingStrategies; + mode?: number; + }); + + /** + * Reads depth at a specific screen position. + * + * Only one depth value can be picked per frame. Calling this method multiple times per frame will overwrite the + * picking coordinates. Unresolved promises will be abandoned. + * + * @example + * const ndc = new Vector3(); + * const clientRect = myViewport.getBoundingClientRect(); + * const clientX = pointerEvent.clientX - clientRect.left; + * const clientY = pointerEvent.clientY - clientRect.top; + * ndc.x = (clientX / myViewport.clientWidth) * 2.0 - 1.0; + * ndc.y = -(clientY / myViewport.clientHeight) * 2.0 + 1.0; + * const depth = await depthPickingPass.readDepth(ndc); + * ndc.z = depth * 2.0 - 1.0; + * + * const worldPosition = ndc.unproject(camera); + * + * @param {Vector2|Vector3} ndc - Normalized device coordinates. Only X and Y are relevant. + * @return {Promise} A promise that returns the depth on the next frame. + */ + readDepth(ndc: Vector2 | Vector3): Promise; + /** + * Copies depth and resolves depth picking promises. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A blend function enumeration. + * + * Important: Do not use `BlendFunction.SKIP` to disable effects. See + * [Enabling and Disabling Effects](https://github.com/vanruesc/postprocessing/wiki/Enabling-and-Disabling-Effects) + * for more information. + * + * Based on https://www.khronos.org/registry/OpenGL/extensions/NV/NV_blend_equation_advanced.txt + * + * @type {Object} + * @property {Number} SKIP - Deprecated. Use DST instead. Warning: This blend function does NOT fully disable the effect. + * @property {Number} SET - Deprecated. Use SRC instead. + * @property {Number} ADD - Additive blending. Fast, but may produce washed out results. + * @property {Number} ALPHA - Alpha blending. Blends based on the alpha value of the new color. + * @property {Number} AVERAGE - Calculates the avarage of the new color and the base color. + * @property {Number} COLOR - Converts the colors to HSL and blends based on color. + * @property {Number} COLOR_BURN - Color burn. + * @property {Number} COLOR_DODGE - Color dodge. + * @property {Number} DARKEN - Prioritize darker colors. + * @property {Number} DIFFERENCE - Color difference. + * @property {Number} DIVIDE - Color division. + * @property {Number} DST - Overwrites the new color with the base color. Ignores opacity. + * @property {Number} EXCLUSION - Color exclusion. + * @property {Number} HARD_LIGHT - Hard light. + * @property {Number} HARD_MIX - Hard mix. + * @property {Number} HUE - Converts the colors to HSL and blends based on hue. + * @property {Number} INVERT - Overwrites the base color with the inverted new color. + * @property {Number} INVERT_RGB - Multiplies the new color with the inverted base color. + * @property {Number} LIGHTEN - Prioritize lighter colors. + * @property {Number} LINEAR_BURN - Linear burn. + * @property {Number} LINEAR_DODGE - Same as ADD but limits the result to 1. + * @property {Number} LINEAR_LIGHT - Linear light. + * @property {Number} LUMINOSITY - Converts the colors to HSL and blends based on luminosity. + * @property {Number} MULTIPLY - Color multiplication. + * @property {Number} NEGATION - Negates the base color using the new color. + * @property {Number} NORMAL - Overwrites the base color with the new one. + * @property {Number} OVERLAY - Color overlay. + * @property {Number} PIN_LIGHT - Pin light. + * @property {Number} REFLECT - Color reflection. + * @property {Number} SCREEN - Screen blending. The two colors are effectively projected on a white screen simultaneously. + * @property {Number} SRC - Overwrites the base color with the new one. Ignores opacity. + * @property {Number} SATURATION - Converts the colors to HSL and blends based on saturation. + * @property {Number} SOFT_LIGHT - Soft light. + * @property {Number} SUBTRACT - Subtracts the new color from the base color. + * @property {Number} VIVID_LIGHT - Vivid light. + */ +export enum BlendFunction { + SKIP, + SET, + ADD, + ALPHA, + AVERAGE, + COLOR, + COLOR_BURN, + COLOR_DODGE, + DARKEN, + DIFFERENCE, + DIVIDE, + DST, + EXCLUSION, + HARD_LIGHT, + HARD_MIX, + HUE, + INVERT, + INVERT_RGB, + LIGHTEN, + LINEAR_BURN, + LINEAR_DODGE, + LINEAR_LIGHT, + LUMINOSITY, + MULTIPLY, + NEGATION, + NORMAL, + OVERLAY, + PIN_LIGHT, + REFLECT, + SATURATION, + SCREEN, + SOFT_LIGHT, + SRC, + SUBTRACT, + VIVID_LIGHT +} + +/** + * A blend mode. + */ +export class BlendMode extends EventDispatcher { + + /** + * Constructs a new blend mode. + * + * @param {BlendFunction} blendFunction - The blend function. + * @param {Number} opacity - The opacity of the color that will be blended with the base color. + */ + constructor(blendFunction: BlendFunction, opacity?: number); + /** + * A uniform that controls the opacity of this blend mode. + * + * TODO Add opacity accessors for uniform value. + * @type {Uniform} + */ + opacity: Uniform; + /** + * Returns the opacity. + * + * @return {Number} The opacity. + */ + getOpacity(): number; + /** + * Sets the opacity. + * + * @param {Number} value - The opacity. + */ + setOpacity(value: number): void; + /** + * Returns the blend function. + * + * @deprecated Use blendFunction instead. + * @return {BlendFunction} The blend function. + */ + getBlendFunction(): BlendFunction; + /** + * Sets the blend function. + * + * @deprecated Use blendFunction instead. + * @param {BlendFunction} value - The blend function. + */ + setBlendFunction(value: BlendFunction): void; + /** + * Returns the blend function shader code. + * + * @return {String} The blend function shader code. + */ + getShaderCode(): string; + /** + * The blend function. + * + * @type {BlendFunction} + */ + get blendFunction(): BlendFunction; + set blendFunction(value: BlendFunction); + +} + +/** + * An abstract effect. + * + * Effects can be combined using the {@link EffectPass}. + * + * @implements {Initializable} + * @implements {Resizable} + * @implements {Disposable} + */ +export class Effect + extends EventDispatcher + implements Initializable, Resizable, Disposable { + + /** + * Constructs a new effect. + * + * @param {String} name - The name of this effect. Doesn't have to be unique. + * @param {String} fragmentShader - The fragment shader. This shader is required. + * @param {Object} [options] - Additional options. + * @param {EffectAttribute} [options.attributes=EffectAttribute.NONE] - The effect attributes that determine the execution priority and resource requirements. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. + * @param {Map} [options.defines] - Custom preprocessor macro definitions. Keys are names and values are code. + * @param {Map} [options.uniforms] - Custom shader uniforms. Keys are names and values are uniforms. + * @param {Set} [options.extensions] - WebGL extensions. + * @param {String} [options.vertexShader=null] - The vertex shader. Most effects don't need one. + */ + constructor( + name: string, + fragmentShader: string, + { + attributes, + blendFunction, + defines, + uniforms, + extensions, + vertexShader + }?: { + attributes?: EffectAttribute; + blendFunction?: BlendFunction; + defines?: Map; + uniforms?: Map; + extensions?: Set; + vertexShader?: string; + } + ); + + /** + * The name of this effect. + * + * @type {String} + */ + name: string; + /** + * The renderer. + * + * @type {WebGLRenderer} + * @protected + * @deprecated + */ + protected renderer: WebGLRenderer; + /** + * Preprocessor macro definitions. + * + * Call {@link Effect.setChanged} after changing macro definitions. + * + * @type {Map} + */ + readonly defines: Map; + /** + * Shader uniforms. + * + * Call {@link Effect.setChanged} after adding or removing uniforms. + * + * @type {Map} + */ + readonly uniforms: Map; + /** + * WebGL extensions that are required by this effect. + * + * Call {@link Effect.setChanged} after adding or removing extensions. + * + * @type {Set} + */ + readonly extensions: Set; + /** + * The blend mode of this effect. + * + * @type {BlendMode} + */ + readonly blendMode: BlendMode; + /** + * The input color space. + * + * @type {ColorSpace} + * @experimental + */ + get inputColorSpace(): ColorSpace; + /** + * @type {ColorSpace} + * @protected + * @experimental + */ + protected set inputColorSpace(arg: ColorSpace); + /** + * The output color space. + * + * Should only be changed if this effect converts the input colors to a different color space. + * + * @type {ColorSpace} + * @experimental + */ + get outputColorSpace(): ColorSpace; + /** + * @type {ColorSpace} + * @protected + * @experimental + */ + protected set outputColorSpace(arg: ColorSpace); + /** + * Sets the main scene. + * + * @type {Scene} + */ + set mainScene(arg: Scene); + /** + * Sets the main camera. + * + * @type {Camera} + */ + set mainCamera(arg: Camera); + /** + * Returns the name of this effect. + * + * @deprecated Use name instead. + * @return {String} The name. + */ + getName(): string; + /** + * Sets the renderer. + * + * @deprecated + * @param {WebGLRenderer} renderer - The renderer. + */ + setRenderer(renderer: WebGLRenderer): void; + /** + * Returns the preprocessor macro definitions. + * + * @deprecated Use defines instead. + * @return {Map} The extensions. + */ + getDefines(): Map; + /** + * Returns the uniforms of this effect. + * + * @deprecated Use uniforms instead. + * @return {Map} The extensions. + */ + getUniforms(): Map; + /** + * Returns the WebGL extensions that are required by this effect. + * + * @deprecated Use extensions instead. + * @return {Set} The extensions. + */ + getExtensions(): Set; + /** + * Returns the blend mode. + * + * The result of this effect will be blended with the result of the previous effect using this blend mode. + * + * @deprecated Use blendMode instead. + * @return {BlendMode} The blend mode. + */ + getBlendMode(): BlendMode; + /** + * Returns the effect attributes. + * + * @return {EffectAttribute} The attributes. + */ + getAttributes(): EffectAttribute; + /** + * Sets the effect attributes. + * + * Effects that have the same attributes will be executed in the order in which they were registered. Some attributes + * imply a higher priority. + * + * @protected + * @param {EffectAttribute} attributes - The attributes. + */ + protected setAttributes(attributes: EffectAttribute): void; + /** + * Returns the fragment shader. + * + * @return {String} The fragment shader. + */ + getFragmentShader(): string; + /** + * Sets the fragment shader. + * + * @protected + * @param {String} fragmentShader - The fragment shader. + */ + protected setFragmentShader(fragmentShader: string): void; + /** + * Returns the vertex shader. + * + * @return {String} The vertex shader. + */ + getVertexShader(): string; + /** + * Sets the vertex shader. + * + * @protected + * @param {String} vertexShader - The vertex shader. + */ + protected setVertexShader(vertexShader: string): void; + /** + * Informs the associated {@link EffectPass} that this effect requires a shader recompilation. + * + * Should be called after changing macros or extensions and after adding/removing uniforms. + * + * @protected + */ + protected setChanged(): void; + /** + * Sets the depth texture. + * + * You may override this method if your effect requires direct access to the depth texture that is bound to the + * associated {@link EffectPass}. + * + * @param {Texture} depthTexture - A depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. + */ + setDepthTexture( + depthTexture: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Updates this effect by performing supporting operations. + * + * This method is called by the {@link EffectPass} right before the main fullscreen render operation, even if the + * blend function is set to `SKIP`. + * + * You may override this method if you need to update custom uniforms or render additional off-screen textures. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Updates the size of this effect. + * + * You may override this method if you want to be informed about the size of the backbuffer/canvas. + * This method is called before {@link initialize} and every time the size of the {@link EffectComposer} changes. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * Performs initialization tasks. + * + * This method is called when the associated {@link EffectPass} is added to an {@link EffectComposer}. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + * @example if(!alpha && frameBufferType === UnsignedByteType) { this.myRenderTarget.texture.format = RGBFormat; } + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + + /** + * Performs a shallow search for properties that define a dispose method and deletes them. + * + * The {@link EffectComposer} calls this method when it is being destroyed. + */ + dispose(): void; + +} + +/** + * An enumeration of effect attributes. + * + * Attributes can be concatenated using the bitwise OR operator. + * + * @type {Object} + * @property {Number} NONE - No attributes. Most effects don't need to specify any attributes. + * @property {Number} DEPTH - Describes effects that require a depth texture. + * @property {Number} CONVOLUTION - Describes effects that fetch additional samples from the input buffer. There cannot be more than one effect with this attribute per {@link EffectPass}. + * @example const attributes = EffectAttribute.CONVOLUTION | EffectAttribute.DEPTH; + */ +export enum EffectAttribute { + CONVOLUTION, + DEPTH, + NONE +} + +/** + * An enumeration of WebGL extensions. + * + * @type {Object} + * @property {String} DERIVATIVES - Enables derivatives by adding the functions dFdx, dFdy and fwidth. + * @property {String} FRAG_DEPTH - Enables gl_FragDepthEXT to set a depth value of a fragment from within the fragment shader. + * @property {String} DRAW_BUFFERS - Enables multiple render targets (MRT) support. + * @property {String} SHADER_TEXTURE_LOD - Enables explicit control of texture LOD. + */ +export enum WebGLExtension { + DERIVATIVES = "derivatives", + FRAG_DEPTH = "fragDepth", + DRAW_BUFFERS = "drawBuffers", + SHADER_TEXTURE_LOD = "shaderTextureLOD" +} + +/** + * An effect pass. + * + * Use this pass to combine {@link Effect} instances. + */ +export class EffectPass extends Pass { + + /** + * Constructs a new effect pass. + * + * @param {Camera} camera - The main camera. + * @param {...Effect} effects - The effects that will be rendered by this pass. + */ + constructor(camera?: Camera, ...effects: Effect[]); + /** + * The effects. + * + * Use `updateMaterial` or `recompile` after changing the effects and consider calling `dispose` to free resources + * of unused effects. + * + * @type {Effect[]} + * @protected + */ + private effects: Effect[]; + /** + * A time offset. + * + * Elapsed time will start at this value. + * + * @type {Number} + * @deprecated + */ + minTime: number; + /** + * The maximum time. + * + * If the elapsed time exceeds this value, it will be reset. + * + * @type {Number} + * @deprecated + */ + maxTime: number; + set encodeOutput(arg: boolean); + /** + * Indicates whether this pass encodes its output when rendering to screen. + * + * @type {Boolean} + * @deprecated Use fullscreenMaterial.encodeOutput instead. + */ + get encodeOutput(): boolean; + set dithering(arg: boolean); + /** + * Indicates whether dithering is enabled. + * + * @type {Boolean} + */ + get dithering(): boolean; + /** + * Updates the compound shader material. + */ + protected updateMaterial(): void; + /** + * Rebuilds the shader material. + */ + recompile(): void; + /** + * Sets the effects. + * + * @param effects - The effects. + */ + protected setEffects(effects: Effect[]): void; + /** + * Returns the current depth texture. + * @returns The current depth texture, or null if there is none. + */ + getDepthTexture(): Texture; + /** + * Sets the depth texture. + * @param depthTexture - A depth texture. + * @param [depthPacking = 0] - The depth packing. + */ + setDepthTexture(depthTexture: Texture, depthPacking?: number): void; + /** + * Renders the effect. + * @param renderer - The renderer. + * @param inputBuffer - A frame buffer that contains the result of the previous pass. + * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param [deltaTime] - The time between the last frame and the current one in seconds. + * @param [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + + /** + * Updates the size of this pass. + * @param width - The width. + * @param height - The height. + */ + setSize(width: number, height: number): void; + /** + * Performs initialization tasks. + * @param renderer - The renderer. + * @param alpha - Whether the renderer uses the alpha channel or not. + * @param frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + + /** + * Deletes disposable objects. + * This pass will be inoperative after this method was called! + */ + dispose(): void; + /** + * Handles events. + * + * @param {Event} event - An event. + */ + handleEvent(event: Event): void; + +} + +/** + * A pass that executes a given function. + */ +export class LambdaPass extends Pass { + + /** + * Constructs a new lambda pass. + * + * @param {Function} f - A function. + */ + constructor(f: () => void); + +} + +/** + * A pass that renders luminance. + */ +export class LuminancePass extends Pass { + + /** + * Constructs a new luminance pass. + * + * @param {Object} [options] - The options. See {@link LuminanceMaterial} for additional options. + * @param {Number} [options.resolutionScale=1.0] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + * @param {WebGLRenderTarget} [options.renderTarget] - A custom render target. + */ + constructor({ + resolutionScale, + resolutionX, + resolutionY, + width, + height, + renderTarget + }?: { + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + renderTarget?: WebGLRenderTarget; + }); + + resolution: Resolution; + /** + * The luminance texture. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Returns the luminance texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * Renders the luminance. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A stencil mask pass. + * + * This pass requires that the input and output buffers have a stencil buffer. You can enable the stencil buffer via the + * {@link EffectComposer} constructor. + */ +export class MaskPass extends Pass { + + /** + * Constructs a new mask pass. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to use. + */ + constructor(scene?: Scene, camera?: Camera); + /** + * A clear pass. + * + * @type {ClearPass} + */ + clearPass: ClearPass; + /** + * Inverse flag. + * + * @type {Boolean} + * @deprecated Use inverted instead. + */ + inverse: boolean; + set inverted(arg: boolean); + /** + * Indicates whether the mask should be inverted. + * + * @type {Boolean} + */ + get inverted(): boolean; + set clear(arg: boolean); + /** + * Indicates whether this pass should clear the stencil buffer. + * + * @type {Boolean} + * @deprecated Use clearPass.enabled instead. + */ + get clear(): boolean; + /** + * Returns the internal clear pass. + * + * @deprecated Use clearPass.enabled instead. + * @return {ClearPass} The clear pass. + */ + getClearPass(): ClearPass; + /** + * Indicates whether the mask is inverted. + * + * @deprecated Use inverted instead. + * @return {Boolean} Whether the mask is inverted. + */ + isInverted(): boolean; + /** + * Enables or disable mask inversion. + * + * @deprecated Use inverted instead. + * @param {Boolean} value - Whether the mask should be inverted. + */ + setInverted(value: boolean): void; + /** + * Renders the effect. + * @param renderer - The renderer. + * @param inputBuffer - A frame buffer that contains the result of the previous pass. + * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param [deltaTime] - The time between the last frame and the current one in seconds. + * @param [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A pass that renders the normals of a given scene. + */ +export class NormalPass extends Pass { + + /** + * Constructs a new normal pass. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to use to render the scene. + * @param {Object} [options] - The options. + * @param {Number} [options.resolutionScale=1.0] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + * @param {WebGLRenderTarget} [options.renderTarget] - A custom render target. + */ + constructor( + scene?: Scene, + camera?: Camera, + { + resolutionScale, + resolutionX, + resolutionY, + width, + height, + renderTarget + }?: { + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + renderTarget?: WebGLRenderTarget; + } + ); + + resolution: Resolution; + /** + * The normal texture. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * The normal texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * Returns the current resolution scale. + * + * @return {Number} The resolution scale. + * @deprecated Use resolution.preferredWidth or resolution.preferredHeight instead. + */ + getResolutionScale(): number; + /** + * Sets the resolution scale. + * + * @param {Number} scale - The new resolution scale. + * @deprecated Use resolution.preferredWidth or resolution.preferredHeight instead. + */ + setResolutionScale(scale: number): void; + /** + * Renders the scene normals. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * A shader pass. + * + * Renders any shader material as a fullscreen effect. This pass should not be used to create multiple chained effects. + * For a more efficient solution, please refer to the {@link EffectPass}. + */ +export class ShaderPass extends Pass { + + /** + * Constructs a new shader pass. + * + * @param {ShaderMaterial} material - A shader material. + * @param {String} [input="inputBuffer"] - The name of the input buffer uniform. + */ + constructor(material: ShaderMaterial, input?: string); + /** + * Sets the name of the input buffer uniform. + * + * Most fullscreen materials modify texels from an input texture. This pass automatically assigns the main input + * buffer to the uniform identified by the given name. + * + * @param {String} input - The name of the input buffer uniform. + */ + setInput(input: string): void; + /** + * Renders the effect. + * @param renderer - The renderer. + * @param inputBuffer - A frame buffer that contains the result of the previous pass. + * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. + * @param [deltaTime] - The time between the last frame and the current one in seconds. + * @param [stencilTest] - Indicates whether a stencil mask is active. + */ + render( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget | null, + outputBuffer: WebGLRenderTarget | null, + deltaTime?: number, + stencilTest?: boolean + ): void; + +} + +/** + * The EffectComposer may be used in place of a normal WebGLRenderer. + * + * The auto clear behaviour of the provided renderer will be disabled to prevent unnecessary clear operations. + * + * It is common practice to use a {@link RenderPass} as the first pass to automatically clear the buffers and render a + * scene for further processing. + * + * @implements {Resizable} + * @implements {Disposable} + */ +export class EffectComposer implements Resizable, Disposable { + + /** + * Constructs a new effect composer. + * + * @param {WebGLRenderer} renderer - The renderer that should be used. + * @param {Object} [options] - The options. + * @param {Boolean} [options.depthBuffer=true] - Whether the main render targets should have a depth buffer. + * @param {Boolean} [options.stencilBuffer=false] - Whether the main render targets should have a stencil buffer. + * @param {Boolean} [options.alpha] - Deprecated. Buffers are always RGBA since three r137. + * @param {Number} [options.multisampling=0] - The number of samples used for multisample antialiasing. Requires WebGL 2. + * @param {Number} [options.frameBufferType] - The type of the internal frame buffers. It's recommended to use HalfFloatType if possible. + */ + constructor( + renderer?: WebGLRenderer, + { + depthBuffer, + stencilBuffer, + multisampling, + frameBufferType + }?: { + depthBuffer?: boolean; + stencilBuffer?: boolean; + alpha?: boolean; + multisampling?: number; + frameBufferType?: number; + } + ); + + /** + * The input buffer. + * + * Two identical buffers are used to avoid reading from and writing to the same render target. + * + * @type {WebGLRenderTarget} + */ + inputBuffer: WebGLRenderTarget; + /** + * The output buffer. + * + * @type {WebGLRenderTarget} + */ + outputBuffer: WebGLRenderTarget; + /** + * The passes. + * + * @type {Pass[]} + */ + passes: Pass[]; + /** + * Determines whether the last pass automatically renders to screen. + * + * @type {Boolean} + */ + autoRenderToScreen: boolean; + /** + * Sets the amount of MSAA samples. + * + * Requires WebGL 2. Set to zero to disable multisampling. + * + * @type {Number} + */ + set multisampling(arg: number); + /** + * The current amount of samples used for multisample anti-aliasing. + * + * @type {Number} + */ + get multisampling(): number; + /** + * Returns the internal timer. + * + * @return {Timer} The timer. + */ + getTimer(): Timer; + /** + * Returns the renderer. + * + * @return {WebGLRenderer} The renderer. + */ + getRenderer(): WebGLRenderer; + /** + * Sets the renderer. + * + * @param {WebGLRenderer} renderer - The renderer. + */ + setRenderer(renderer: WebGLRenderer): void; + /** + * Replaces the current renderer with the given one. + * + * The auto clear mechanism of the provided renderer will be disabled. If the new render size differs from the + * previous one, all passes will be updated. + * + * By default, the DOM element of the current renderer will automatically be removed from its parent node and the DOM + * element of the new renderer will take its place. + * + * @deprecated Use setRenderer instead. + * @param {WebGLRenderer} renderer - The new renderer. + * @param {Boolean} updateDOM - Indicates whether the old canvas should be replaced by the new one in the DOM. + * @return {WebGLRenderer} The old renderer. + */ + replaceRenderer( + renderer: WebGLRenderer, + updateDOM?: boolean + ): WebGLRenderer; + /** + * Creates a new render target. + * + * @deprecated Create buffers manually via WebGLRenderTarget instead. + * @param {Boolean} depthBuffer - Whether the render target should have a depth buffer. + * @param {Boolean} stencilBuffer - Whether the render target should have a stencil buffer. + * @param {Number} type - The frame buffer type. + * @param {Number} multisampling - The number of samples to use for antialiasing. + * @return {WebGLRenderTarget} A new render target that equals the renderer's canvas. + */ + createBuffer( + depthBuffer: boolean, + stencilBuffer: boolean, + type: number, + multisampling: number + ): WebGLRenderTarget; + /** + * Can be used to change the main scene for all registered passes and effects. + * + * @param {Scene} scene - The scene. + */ + setMainScene(scene: Scene): void; + /** + * Can be used to change the main camera for all registered passes and effects. + * + * @param {Camera} camera - The camera. + */ + setMainCamera(camera: Camera): void; + /** + * Adds a pass, optionally at a specific index. + * + * @param {Pass} pass - A new pass. + * @param {Number} [index] - An index at which the pass should be inserted. + */ + addPass(pass: Pass, index?: number): void; + /** + * Removes a pass. + * + * @param {Pass} pass - The pass. + */ + removePass(pass: Pass): void; + /** + * Removes all passes. + */ + removeAllPasses(): void; + /** + * Renders all enabled passes in the order in which they were added. + * + * @param {Number} [deltaTime] - The time since the last frame in seconds. + */ + render(deltaTime?: number): void; + /** + * Sets the size of the buffers, passes and the renderer. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + * @param {Boolean} [updateStyle] - Determines whether the style of the canvas should be updated. + */ + setSize(width: number, height: number, updateStyle?: boolean): void; + /** + * Resets this composer by deleting all passes and creating new buffers. + */ + reset(): void; + /** + * Disposes this composer and all passes. + */ + dispose(): void; + +} + +/** + * An override material manager. + * + * Includes a workaround that fixes override materials for skinned meshes and instancing. Doesn't fix uniforms such as + * normal maps and displacement maps. Using the workaround may have a negative impact on performance if the scene + * contains a lot of meshes. + * + * @implements {Disposable} + */ +export class OverrideMaterialManager implements Disposable { + + /** + * Enables or disables the override material workaround globally. + * + * This only affects post processing passes and effects. + * + * @type {Boolean} + */ + static set workaroundEnabled(arg: boolean); + /** + * Indicates whether the override material workaround is enabled. + * + * @type {Boolean} + */ + static get workaroundEnabled(): boolean; + /** + * Constructs a new override material manager. + * + * @param {Material} [material=null] - An override material. + */ + constructor(material?: Material); + /** + * Sets the override material. + * + * @param {Material} material - The material. + */ + setMaterial(material: Material): void; + /** + * Performs cleanup tasks. + */ + dispose(): void; + +} + +/** + * The Resizable contract. + * + * Implemented by objects that can be resized. + * + * @interface + */ +export interface Resizable { + + /** + * Sets the size of this object. + * + * @param {number} width - The width. + * @param {number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * A timer that provides read access to time data. + * + * @interface + */ +export interface ImmutableTimer { + + /** + * The current delta time in seconds. + * + * @type {Number} + */ + getDelta(): number; + /** + * The elapsed time in seconds. + * + * @type {Number} + */ + getElapsed(): number; + +} + +/** + * An object selection. + * + * Object selections use render layers to facilitate quick and efficient visibility changes. + */ +export class Selection extends Set { + + /** + * Constructs a new selection. + * + * @param {Iterable} [iterable] - A collection of objects that should be added to this selection. + * @param {Number} [layer=10] - A dedicated render layer for selected objects. + */ + constructor(iterable?: Iterable, layer?: number); + /** + * Controls whether objects that are added to this selection should be removed from all other layers. + * + * @type {Boolean} + */ + exclusive: boolean; + set layer(arg: number); + /** + * The render layer for selected objects. + * + * @type {Number} + */ + get layer(): number; + /** + * Returns the current render layer for selected objects. + * + * The default layer is 10. If this collides with your own custom layers, please change it before rendering! + * + * @deprecated Use layer instead. + * @return {Number} The layer. + */ + getLayer(): number; + /** + * Sets the render layer for selected objects. + * + * The current selection will be updated accordingly. + * + * @deprecated Use layer instead. + * @param {Number} value - The layer. Range is [0, 31]. + */ + setLayer(value: number): void; + /** + * Indicates whether objects that are added to this selection will be removed from all other layers. + * + * @deprecated Use exclusive instead. + * @return {Number} Whether this selection is exclusive. Default is false. + */ + isExclusive(): number; + /** + * Controls whether objects that are added to this selection should be removed from all other layers. + * + * @deprecated Use exclusive instead. + * @param {Number} value - Whether this selection should be exclusive. + */ + setExclusive(value: number): void; + /** + * Clears this selection. + * + * @return {Selection} This selection. + */ + clear(): this; + /** + * Clears this selection and adds the given objects. + * + * @param {Iterable} objects - The objects that should be selected. + * @return {Selection} This selection. + */ + set(objects: Iterable): this; + /** + * An alias for {@link has}. + * + * @param {Object3D} object - An object. + * @return {Number} Returns 0 if the given object is currently selected, or -1 otherwise. + * @deprecated Added for backward-compatibility. + */ + indexOf(object: Object3D): number; + /** + * Adds an object to this selection. + * + * If {@link exclusive} is set to `true`, the object will also be removed from all other layers. + * + * @param {Object3D} object - The object that should be selected. + * @return {Selection} This selection. + */ + add(object: Object3D): this; + /** + * Removes an existing object from the selection. If the object doesn't exist it's added instead. + * + * @param {Object3D} object - The object. + * @return {Boolean} Returns true if the object is added, false otherwise. + */ + toggle(object: Object3D): boolean; + /** + * Sets the visibility of all selected objects. + * + * This method enables or disables render layer 0 of all selected objects. + * + * @param {Boolean} visible - Whether the selected objects should be visible. + * @return {Selection} This selection. + */ + setVisible(visible: boolean): this; + +} + +/** + * A timer. + * + * Original implementation by Michael Herzog (Mugen87). + * + * @deprecated Use `three/addons/misc/Timer.js` instead. + * @implements {ImmutableTimer} + * @implements {Disposable} + * @implements {EventListenerObject} + */ +export class Timer implements Disposable, ImmutableTimer, EventListenerObject { + + handleEvent(object: Event): void; + /** + * The current delta time in seconds. + */ + get delta(): number; + /** + * The fixed delta time in seconds. + */ + get fixedDelta(): number; + set fixedDelta(value: number); + /** + * The elapsed time in seconds. + */ + get elapsed(): number; + /** + * Determines whether this timer should use a fixed time step. + */ + useFixedDelta: boolean; + /** + * The timescale. + */ + timescale: number; + /** + * Enables or disables auto reset based on page visibility. + * + * If enabled, the timer will be reset when the page becomes visible. This effectively pauses the timer when the page + * is hidden. Has no effect if the API is not supported. + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API + */ + get autoReset(): boolean; + set autoReset(value: boolean); + + getDelta(): number; + getElapsed(): number; + /** + * Updates this timer. + * + * @param {Number} [timestamp] - The current time in milliseconds. + */ + update(timestamp?: number): void; + /** + * Resets this timer. + * + * @return {Timer} This timer. + */ + reset(): Timer; + /** + * Disposes this timer. + */ + dispose(): void; + +} + +/** + * An ASCII effect. + * + * Warning: This effect cannot be merged with convolution effects. + */ +export class ASCIIEffect extends Effect { + + /** + * Constructs a new ASCII effect. + * + * @param {Object} [options] - The options. + * @param {ASCIITexture} [options.asciiTexture] - An ASCII character lookup texture. + * @param {Number} [options.cellSize=16] - The cell size. It's recommended to use even numbers. + * @param {Number} [options.color=null] - A color to use instead of the scene colors. + * @param {Boolean} [options.inverted=false] - Inverts the effect. + */ + constructor({ + asciiTexture, + cellSize, + color, + inverted + }?: { + asciiTexture?: ASCIITexture | null; + cellSize?: number; + color?: Color | string | number | null; + inverted?: boolean; + }); + + /** + * The current ASCII lookup texture. + * + * @type {ASCIITexture} + */ + get asciiTexture(): ASCIITexture | null; + set asciiTexture(value: ASCIITexture | null); + /** + * A color that overrides the scene colors. + * + * @type {Color | string | number | null} + */ + get color(): Color; + set color(value: Color | string | number | null); + /** + * Controls whether the effect should be inverted. + * + * @type {Boolean} + */ + get inverted(): boolean; + set inverted(value: boolean); + /** + * The cell size. + * + * @type {Number} + */ + get cellSize(): number; + set cellSize(value: number); + +} + +export interface BloomEffectOptions { + blendFunction?: BlendFunction; + luminanceThreshold?: number; + luminanceSmoothing?: number; + mipmapBlur?: boolean; + intensity?: number; + radius?: number; + levels?: number; + kernelSize?: KernelSize; + resolutionScale?: number; + width?: number; + height?: number; + resolutionX?: number; + resolutionY?: number; +} + +/** + * A bloom effect. + */ +export class BloomEffect extends Effect { + + /** + * Constructs a new bloom effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. + * @param {Number} [options.luminanceThreshold=1.0] - The luminance threshold. Raise this value to mask out darker elements in the scene. + * @param {Number} [options.luminanceSmoothing=0.03] - Controls the smoothness of the luminance threshold. + * @param {Boolean} [options.mipmapBlur=true] - Enables or disables mipmap blur. + * @param {Number} [options.intensity=1.0] - The bloom intensity. + * @param {Number} [options.radius=0.85] - The blur radius. Only applies to mipmap blur. + * @param {Number} [options.levels=8] - The amount of MIP levels. Only applies to mipmap blur. + * @param {KernelSize} [options.kernelSize=KernelSize.LARGE] - Deprecated. Use mipmapBlur instead. + * @param {Number} [options.resolutionScale=0.5] - Deprecated. Use mipmapBlur instead. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. + */ + constructor({ + blendFunction, + luminanceThreshold, + luminanceSmoothing, + mipmapBlur, + intensity, + radius, + levels, + kernelSize, + resolutionScale, + width, + height, + resolutionX, + resolutionY + }?: BloomEffectOptions); + + /** + * A luminance shader pass. + * + * This pass can be disabled to skip luminance filtering. + * + * @type {LuminancePass} + * @readonly + */ + readonly luminancePass: LuminancePass; + /** + * A blur pass. + * + * @type {KawaseBlurPass} + * @readonly + * @deprecated Use mipmapBlurPass instead. + */ + readonly blurPass: KawaseBlurPass; + /** + * A mipmap blur pass. + * + * @type {MipmapBlurPass} + * @readonly + */ + readonly mipmapBlurPass: MipmapBlurPass; + /** + * A texture that contains the intermediate result of this effect. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Returns the generated bloom texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * The resolution of this effect. + * + * @type {Resolution} + */ + get resolution(): Resolution; + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * Returns the blur pass. + * + * @deprecated Use blurPass instead. + * @return {KawaseBlurPass} The blur pass. + */ + getBlurPass(): KawaseBlurPass; + /** + * Returns the luminance pass. + * + * @deprecated Use luminancePass instead. + * @return {LuminancePass} The luminance pass. + */ + getLuminancePass(): LuminancePass; + /** + * The luminance material. + * + * @type {LuminanceMaterial} + */ + get luminanceMaterial(): LuminanceMaterial; + /** + * Returns the luminance material. + * + * @deprecated Use luminanceMaterial instead. + * @return {LuminanceMaterial} The material. + */ + getLuminanceMaterial(): LuminanceMaterial; + set width(arg: number); + /** + * The current width of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.width instead. + */ + get width(): number; + set height(arg: number); + /** + * The current height of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.height instead. + */ + get height(): number; + set dithering(arg: boolean); + /** + * Indicates whether dithering is enabled. + * + * @type {Boolean} + * @deprecated Use EffectPass.fullscreenMaterial.dithering instead. + */ + get dithering(): boolean; + set kernelSize(arg: KernelSize); + /** + * The blur kernel size. + * + * @type {KernelSize} + * @deprecated Use blurPass.kernelSize instead. + */ + get kernelSize(): KernelSize; + set distinction(arg: number); + /** + * @type {Number} + * @deprecated Use luminanceMaterial instead. + */ + get distinction(): number; + set intensity(arg: number); + /** + * The bloom intensity. + * + * @type {Number} + */ + get intensity(): number; + /** + * The bloom intensity. + * + * @deprecated Use intensity instead. + * @return {Number} The intensity. + */ + getIntensity(): number; + /** + * Sets the bloom intensity. + * + * @deprecated Use intensity instead. + * @param {Number} value - The intensity. + */ + setIntensity(value: number): void; + /** + * Returns the current resolution scale. + * + * @return {Number} The resolution scale. + * @deprecated Use resolution instead. + */ + getResolutionScale(): number; + /** + * Sets the resolution scale. + * + * @param {Number} scale - The new resolution scale. + * @deprecated Use resolution instead. + */ + setResolutionScale(scale: number): void; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Updates the size of internal render targets. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * A depth of field (bokeh) effect. + * + * Original shader code by Martins Upitis: + * http://artmartinsh.blogspot.com/2010/02/glsl-lens-blur-filter-with-bokeh.html + * + * @deprecated Use DepthOfFieldEffect instead. + */ +export class BokehEffect extends Effect { + + /** + * Constructs a new bokeh effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.focus=0.5] - The focus distance ratio, ranging from 0.0 to 1.0. + * @param {Number} [options.dof=0.02] - Depth of field. An area in front of and behind the focal point that still appears sharp. + * @param {Number} [options.aperture=0.015] - Camera aperture scale. Bigger values for stronger blur and shallower depth of field. + * @param {Number} [options.maxBlur=1.0] - The maximum blur strength. + */ + constructor({ + blendFunction, + focus, + dof, + aperture, + maxBlur + }?: { + blendFunction?: BlendFunction; + focus?: number; + dof?: number; + aperture?: number; + maxBlur?: number; + }); + +} + +/** + * A brightness/contrast effect. + * + * Reference: https://github.com/evanw/glfx.js + */ +export class BrightnessContrastEffect extends Effect { + + /** + * Constructs a new brightness/contrast effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.brightness=0.0] - The brightness factor, ranging from -1 to 1, where 0 means no change. + * @param {Number} [options.contrast=0.0] - The contrast factor, ranging from -1 to 1, where 0 means no change. + */ + constructor({ + blendFunction, + brightness, + contrast + }?: { + blendFunction?: BlendFunction; + brightness?: number; + contrast?: number; + }); + + set brightness(arg: number); + /** + * The brightness. + * + * @type {Number} + */ + get brightness(): number; + /** + * Returns the brightness. + * + * @deprecated Use brightness instead. + * @return {Number} The brightness. + */ + getBrightness(): number; + /** + * Sets the brightness. + * + * @deprecated Use brightness instead. + * @param {Number} value - The brightness. + */ + setBrightness(value: number): void; + set contrast(arg: number); + /** + * The contrast. + * + * @type {Number} + */ + get contrast(): number; + /** + * Returns the contrast. + * + * @deprecated Use contrast instead. + * @return {Number} The contrast. + */ + getContrast(): number; + /** + * Sets the contrast. + * + * @deprecated Use contrast instead. + * @param {Number} value - The contrast. + */ + setContrast(value: number): void; + +} + +/** + * A chromatic aberration effect. + */ +export class ChromaticAberrationEffect extends Effect { + + /** + * Constructs a new chromatic aberration effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Vector2} [options.offset] - The color offset. + * @param {Boolean} [options.radialModulation=false] - Whether the effect should be modulated with a radial gradient. + * @param {Number} [options.modulationOffset=0.15] - The modulation offset. Only applies if `radialModulation` is enabled. + */ + constructor({ + blendFunction, + offset, + radialModulation, + modulationOffset + }?: { + blendFunction?: BlendFunction; + offset?: Vector2; + radialModulation: boolean, + modulationOffset: number + }); + + set offset(arg: Vector2); + /** + * The color offset. + * + * @type {Vector2} + */ + get offset(): Vector2; + /** + * Indicates whether radial modulation is enabled. + * + * When enabled, the effect will be weaker in the middle and stronger towards the screen edges. + * + * @type {Boolean} + */ + get radialModulation(): boolean; + set radialModulation(arg: boolean); + /** + * The modulation offset. + * + * @type {Number} + */ + get modulationOffset(): number; + set modulationOffset(arg: number); + /** + * Returns the color offset vector. + * + * @deprecated Use offset instead. + * @return {Vector2} The offset. + */ + getOffset(): Vector2; + /** + * Sets the color offset vector. + * + * @deprecated Use offset instead. + * @param {Vector2} value - The offset. + */ + setOffset(value: Vector2): void; + +} + +/** + * A fast greyscale effect. + */ +export class ColorAverageEffect extends Effect { + + /** + * Constructs a new color average effect. + * + * @param {BlendFunction} [blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + */ + constructor(blendFunction?: BlendFunction); + +} + +/** + * A color depth effect. + * + * Simulates a hardware limitation to achieve a retro feel. The real color depth will not be altered by this effect. + */ +export class ColorDepthEffect extends Effect { + + /** + * Constructs a new color depth effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.bits=16] - The color bit depth. + */ + constructor({ + blendFunction, + bits + }?: { + blendFunction?: BlendFunction; + bits?: number; + }); + + set bitDepth(arg: number); + /** + * The virtual amount of color bits. + * + * Each color channel effectively uses a fourth of the total amount of bits. Alpha remains unaffected. + * + * @type {Number} + */ + get bitDepth(): number; + /** + * Returns the current color bit depth. + * + * @return {Number} The bit depth. + */ + getBitDepth(): number; + /** + * Sets the virtual amount of color bits. + * + * @param {Number} value - The bit depth. + */ + setBitDepth(value: number): void; + +} + +/** + * A depth visualization effect. + * + * Useful for debugging. + */ +export class DepthEffect extends Effect { + + /** + * Constructs a new depth effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Boolean} [options.inverted=false] - Whether the depth should be inverted. + */ + constructor({ + blendFunction, + inverted + }?: { + blendFunction?: BlendFunction; + inverted?: boolean; + }); + + set inverted(arg: boolean); + /** + * Indicates whether depth should be inverted. + * + * @type {Boolean} + */ + get inverted(): boolean; + /** + * Indicates whether the rendered depth is inverted. + * + * @deprecated Use inverted instead. + * @return {Boolean} Whether the rendered depth is inverted. + */ + isInverted(): boolean; + /** + * Enables or disables depth inversion. + * + * @deprecated Use inverted instead. + * @param {Boolean} value - Whether depth should be inverted. + */ + setInverted(value: boolean): void; + +} + +/** + * A depth of field effect. + * + * Based on a graphics study by Adrian Courrèges and an article by Steve Avery: + * https://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/ + * https://pixelmischiefblog.wordpress.com/2016/11/25/bokeh-depth-of-field/ + */ +export class DepthOfFieldEffect extends Effect { + + /** + * Constructs a new depth of field effect. + * + * @param {Camera} camera - The main camera. + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.worldFocusDistance] - The focus distance in world units. + * @param {Number} [options.worldFocusRange] - The focus distance in world units. + * @param {Number} [options.focusDistance=0.0] - The normalized focus distance. Range is [0.0, 1.0]. + * @param {Number} [options.focalLength=0.1] - The focal length. Range is [0.0, 1.0]. + * @param {Number} [options.focusRange=0.1] - The focus range. Range is [0.0, 1.0]. + * @param {Number} [options.focalLength=0.1] - Deprecated. + * @param {Number} [options.bokehScale=1.0] - The scale of the bokeh blur. + * @param {Number} [options.resolutionScale=1.0] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + */ + constructor( + camera?: Camera, + { + blendFunction, + worldFocusDistance, + worldFocusRange, + focusDistance, + focalLength, + focusRange, + bokehScale, + resolutionScale, + resolutionX, + resolutionY, + width, + height + }?: { + blendFunction?: BlendFunction; + worldFocusDistance?: number; + worldFocusRange?: number; + focusDistance?: number; + focalLength?: number; + focusRange?: number; + bokehScale?: number; + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + } + ); + + /** + * This pass blurs the foreground CoC buffer to soften edges. + * + * @type {KawaseBlurPass} + */ + readonly blurPass: KawaseBlurPass; + /** + * A target position that should be kept in focus. Set to `null` to disable auto focus. + * + * @type {Vector3} + */ + target: Vector3; + set bokehScale(arg: number); + /** + * The current bokeh scale. + * + * @type {Number} + */ + get bokehScale(): number; + /** + * The circle of confusion texture. + * + * @type {Texture} + */ + get cocTexture(): Texture; + /** + * The mask function. Default is `MULTIPLY_RGB`. + * + * @type {MaskFunction} + */ + get maskFunction(): MaskFunction; + set maskFunction(arg: MaskFunction); + /** + * The circle of confusion material. + * + * @type {CircleOfConfusionMaterial} + */ + get cocMaterial(): CircleOfConfusionMaterial; + /** + * The circle of confusion material. + * + * @deprecated Use cocMaterial instead. + * @type {CircleOfConfusionMaterial} + */ + get circleOfConfusionMaterial(): CircleOfConfusionMaterial; + /** + * Returns the circle of confusion material. + * + * @deprecated Use cocMaterial instead. + * @return {CircleOfConfusionMaterial} The material. + */ + getCircleOfConfusionMaterial(): CircleOfConfusionMaterial; + /** + * Returns the pass that blurs the foreground CoC buffer to soften edges. + * + * @deprecated Use blurPass instead. + * @return {KawaseBlurPass} The blur pass. + */ + getBlurPass(): KawaseBlurPass; + /** + * The resolution of this effect. + * + * @type {Resolution} + */ + get resolution(): Resolution; + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * Returns the current bokeh scale. + * + * @deprecated Use bokehScale instead. + * @return {Number} The scale. + */ + getBokehScale(): number; + /** + * Sets the bokeh scale. + * + * @deprecated Use bokehScale instead. + * @param {Number} value - The scale. + */ + setBokehScale(value: number): void; + /** + * Returns the current auto focus target. + * + * @deprecated Use target instead. + * @return {Vector3} The target. + */ + getTarget(): Vector3; + /** + * Sets the auto focus target. + * + * @deprecated Use target instead. + * @param {Vector3} value - The target. + */ + setTarget(value: Vector3): void; + /** + * Calculates the focus distance from the camera to the given position. + * + * @param {Vector3} target - The target. + * @return {Number} The normalized focus distance. + */ + calculateFocusDistance(target: Vector3): number; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Updates the size of internal render targets. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * A dot screen effect. + */ +export class DotScreenEffect extends Effect { + + /** + * Constructs a new dot screen effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.angle=1.57] - The angle of the dot pattern. + * @param {Number} [options.scale=1.0] - The scale of the dot pattern. + */ + constructor({ + blendFunction, + angle, + scale + }?: { + blendFunction?: BlendFunction; + angle?: number; + scale?: number; + }); + + set angle(arg: number); + /** + * The angle. + * + * @type {Number} + */ + get angle(): number; + /** + * Returns the pattern angle. + * + * @deprecated Use angle instead. + * @return {Number} The angle in radians. + */ + getAngle(): number; + /** + * Sets the pattern angle. + * + * @deprecated Use angle instead. + * @param {Number} value - The angle in radians. + */ + setAngle(value: number): void; + set scale(arg: number); + /** + * The scale. + * + * @type {Number} + */ + get scale(): number; + +} + +/** + * A gamma correction effect. + * + * @deprecated Set WebGLRenderer.outputEncoding to sRGBEncoding instead. + */ +export class GammaCorrectionEffect extends Effect { + + /** + * Constructs a new gamma correction effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.gamma=2.0] - The gamma factor. + */ + constructor({ + blendFunction, + gamma + }?: { + blendFunction?: BlendFunction; + gamma?: number; + }); + +} + +/** + * A tilt shift effect. + */ +export class TiltShiftEffect extends Effect { + + /** + * Constructs a new tilt shift Effect + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction] - The blend function of this effect. + * @param {Number} [options.offset=0.0] - The relative offset of the focus area. + * @param {Number} [options.rotation=0.0] - The rotation of the focus area in radians. + * @param {Number} [options.focusArea=0.4] - The relative size of the focus area. + * @param {Number} [options.feather=0.3] - The softness of the focus area edges. + * @param {Number} [options.bias=0.06] - Deprecated. + * @param {KernelSize} [options.kernelSize=KernelSize.MEDIUM] - The blur kernel size. + * @param {Number} [options.resolutionScale=0.5] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + */ + constructor({ + blendFunction, + offset, + rotation, + focusArea, + feather, + bias, + kernelSize, + resolutionScale, + resolutionX, + resolutionY + }?: { + blendFunction?: BlendFunction, + offset?: number, + rotation?: number, + focusArea?: number, + feather?: number, + bias?: number, + kernelSize?: KernelSize, + resolutionScale?: number, + resolutionX?: number, + resolutionY?: number + }); + + /** + * A blur pass. + * + * @type {KawaseBlurPass} + */ + readonly blurPass: KawaseBlurPass; + /** + * The resolution. + * + * @type {Resolution} + * @readonly + */ + get resolution(): Resolution; + /** + * The rotation of the focus area in radians. + * + * @type {Number} + */ + get rotation(): number; + set rotation(arg: number); + /** + * The relative offset of the focus area. + * + * @type {Number} + */ + get offset(): number; + set offset(arg: number); + /** + * The relative size of the focus area. + * + * @type {Number} + */ + + get focusArea(): number; + set focusArea(arg: number); + /** + * The softness of the focus area edges. + * + * @type {Number} + */ + get feather(): number; + set feather(arg: number); + /** + * A blend bias. + * + * @type {Number} + * @deprecated + */ + get bias(): number; + set bias(arg: number); + +} + +/** + * A glitch effect. + * + * This effect can be used in conjunction with the {@link ChromaticAberrationEffect}. + * + * Reference: https://github.com/staffantan/unityglitch + */ +export class GlitchEffect extends Effect { + + /** + * Constructs a new glitch effect. + * + * TODO Change ratio to 0.15. + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Vector2} [options.chromaticAberrationOffset] - A chromatic aberration offset. If provided, the glitch effect will influence this offset. + * @param {Vector2} [options.delay] - The minimum and maximum delay between glitch activations in seconds. + * @param {Vector2} [options.duration] - The minimum and maximum duration of a glitch in seconds. + * @param {Vector2} [options.strength] - The strength of weak and strong glitches. + * @param {Texture} [options.perturbationMap] - A perturbation map. If none is provided, a noise texture will be created. + * @param {Number} [options.dtSize=64] - The size of the generated noise map. Will be ignored if a perturbation map is provided. + * @param {Number} [options.columns=0.05] - The scale of the blocky glitch columns. + * @param {Number} [options.ratio=0.85] - The threshold for strong glitches. + */ + constructor({ + blendFunction, + chromaticAberrationOffset, + delay, + duration, + strength, + columns, + ratio, + perturbationMap, + dtSize + }?: { + blendFunction?: BlendFunction; + chromaticAberrationOffset?: Vector2; + delay?: Vector2; + duration?: Vector2; + strength?: Vector2; + perturbationMap?: Texture; + dtSize?: number; + columns?: number; + ratio?: number; + }); + + set perturbationMap(arg: Texture); + /** + * The perturbation map. + * + * @type {Texture} + */ + get perturbationMap(): Texture; + /** + * The minimum and maximum delay between glitch activations in seconds. + * + * @type {Vector2} + * @deprecated Use minDelay and maxDelay instead. + */ + delay: Vector2; + /** + * The minimum and maximum duration of a glitch in seconds. + * + * @type {Vector2} + * @deprecated Use minDuration and maxDuration instead. + */ + duration: Vector2; + /** + * The strength of weak and strong glitches. + * + * @type {Vector2} + * @deprecated Use minStrength and maxStrength instead. + */ + strength: Vector2; + /** + * The effect mode. + * + * @type {GlitchMode} + */ + mode: GlitchMode; + /** + * The ratio between weak (0.0) and strong (1.0) glitches. Range is [0.0, 1.0]. + * + * This value is currently being treated as a threshold for strong glitches, i.e. it's inverted. + * + * TODO Resolve inversion. + * @type {Number} + */ + ratio: number; + /** + * The chromatic aberration offset. + * + * @type {Vector2} + */ + chromaticAberrationOffset: Vector2; + /** + * Indicates whether the glitch effect is currently active. + * + * @type {Boolean} + */ + get active(): boolean; + /** + * Indicates whether the glitch effect is currently active. + * + * @deprecated Use active instead. + * @return {Boolean} Whether the glitch effect is active. + */ + isActive(): boolean; + set minDelay(arg: number); + /** + * The minimum delay between glitch activations. + * + * @type {Number} + */ + get minDelay(): number; + /** + * Returns the minimum delay between glitch activations. + * + * @deprecated Use minDelay instead. + * @return {Number} The minimum delay in seconds. + */ + getMinDelay(): number; + /** + * Sets the minimum delay between glitch activations. + * + * @deprecated Use minDelay instead. + * @param {Number} value - The minimum delay in seconds. + */ + setMinDelay(value: number): void; + set maxDelay(arg: number); + /** + * The maximum delay between glitch activations. + * + * @type {Number} + */ + get maxDelay(): number; + /** + * Returns the maximum delay between glitch activations. + * + * @deprecated Use maxDelay instead. + * @return {Number} The maximum delay in seconds. + */ + getMaxDelay(): number; + /** + * Sets the maximum delay between glitch activations. + * + * @deprecated Use maxDelay instead. + * @param {Number} value - The maximum delay in seconds. + */ + setMaxDelay(value: number): void; + set minDuration(arg: number); + /** + * The minimum duration of sporadic glitches. + * + * @type {Number} + */ + get minDuration(): number; + /** + * Returns the minimum duration of sporadic glitches. + * + * @deprecated Use minDuration instead. + * @return {Number} The minimum duration in seconds. + */ + getMinDuration(): number; + /** + * Sets the minimum duration of sporadic glitches. + * + * @deprecated Use minDuration instead. + * @param {Number} value - The minimum duration in seconds. + */ + setMinDuration(value: number): void; + set maxDuration(arg: number); + /** + * The maximum duration of sporadic glitches. + * + * @type {Number} + */ + get maxDuration(): number; + /** + * Returns the maximum duration of sporadic glitches. + * + * @deprecated Use maxDuration instead. + * @return {Number} The maximum duration in seconds. + */ + getMaxDuration(): number; + /** + * Sets the maximum duration of sporadic glitches. + * + * @deprecated Use maxDuration instead. + * @param {Number} value - The maximum duration in seconds. + */ + setMaxDuration(value: number): void; + set minStrength(arg: number); + /** + * The strength of weak glitches. + * + * @type {Number} + */ + get minStrength(): number; + /** + * Returns the strength of weak glitches. + * + * @deprecated Use minStrength instead. + * @return {Number} The strength. + */ + getMinStrength(): number; + /** + * Sets the strength of weak glitches. + * + * @deprecated Use minStrength instead. + * @param {Number} value - The strength. + */ + setMinStrength(value: number): void; + set maxStrength(arg: number); + /** + * The strength of strong glitches. + * + * @type {Number} + */ + get maxStrength(): number; + /** + * Returns the strength of strong glitches. + * + * @deprecated Use maxStrength instead. + * @return {Number} The strength. + */ + getMaxStrength(): number; + /** + * Sets the strength of strong glitches. + * + * @deprecated Use maxStrength instead. + * @param {Number} value - The strength. + */ + setMaxStrength(value: number): void; + /** + * Returns the current glitch mode. + * + * @deprecated Use mode instead. + * @return {GlitchMode} The mode. + */ + getMode(): GlitchMode; + /** + * Sets the current glitch mode. + * + * @deprecated Use mode instead. + * @param {GlitchMode} value - The mode. + */ + setMode(value: GlitchMode): void; + /** + * Returns the glitch ratio. + * + * @deprecated Use ratio instead. + * @return {Number} The ratio. + */ + getGlitchRatio(): number; + /** + * Sets the ratio of weak (0.0) and strong (1.0) glitches. + * + * @deprecated Use ratio instead. + * @param {Number} value - The ratio. Range is [0.0, 1.0]. + */ + setGlitchRatio(value: number): void; + set columns(arg: number); + /** + * The glitch column size. + * + * @type {Number} + */ + get columns(): number; + /** + * Returns the glitch column size. + * + * @deprecated Use columns instead. + * @return {Number} The glitch column size. + */ + getGlitchColumns(): number; + /** + * Sets the glitch column size. + * + * @deprecated Use columns instead. + * @param {Number} value - The glitch column size. + */ + setGlitchColumns(value: number): void; + /** + * Returns the chromatic aberration offset. + * + * @deprecated Use chromaticAberrationOffset instead. + * @return {Vector2} The offset. + */ + getChromaticAberrationOffset(): Vector2; + /** + * Sets the chromatic aberration offset. + * + * @deprecated Use chromaticAberrationOffset instead. + * @param {Vector2} value - The offset. + */ + setChromaticAberrationOffset(value: Vector2): void; + /** + * Returns the current perturbation map. + * + * @deprecated Use perturbationMap instead. + * @return {Texture} The current perturbation map. + */ + getPerturbationMap(): Texture; + /** + * Replaces the current perturbation map with the given one. + * + * The current map will be disposed if it was generated by this effect. + * + * @deprecated Use perturbationMap instead. + * @param {Texture} value - The new perturbation map. + */ + setPerturbationMap(value: Texture): void; + /** + * Generates a perturbation map. + * + * @deprecated Use NoiseTexture instead. + * @param {Number} [value=64] - The texture size. + * @return {DataTexture} The perturbation map. + */ + generatePerturbationMap(value?: number): DataTexture; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Deletes generated resources. + */ + dispose(): void; + +} + +/** + * A glitch mode enumeration. + * + * @type {Object} + * @property {Number} DISABLED - No glitches. + * @property {Number} SPORADIC - Sporadic glitches. + * @property {Number} CONSTANT_MILD - Constant mild glitches. + * @property {Number} CONSTANT_WILD - Constant wild glitches. + */ +export enum GlitchMode { + DISABLED, + SPORADIC, + CONSTANT_MILD, + CONSTANT_WILD +} + +/** + * A god rays effect. + */ +export class GodRaysEffect extends Effect { + + /** + * Constructs a new god rays effect. + * + * @param {Camera} [camera] - The main camera. + * @param {Mesh|Points} [lightSource] - The light source. Must not write depth and has to be flagged as transparent. + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. + * @param {Number} [options.samples=60.0] - The number of samples per pixel. + * @param {Number} [options.density=0.96] - The density of the light rays. + * @param {Number} [options.decay=0.9] - An illumination decay factor. + * @param {Number} [options.weight=0.4] - A light ray weight factor. + * @param {Number} [options.exposure=0.6] - A constant attenuation coefficient. + * @param {Number} [options.clampMax=1.0] - An upper bound for the saturation of the overall effect. + * @param {Number} [options.resolutionScale=0.5] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + * @param {KernelSize} [options.kernelSize=KernelSize.SMALL] - The blur kernel size. Has no effect if blur is disabled. + * @param {Boolean} [options.blur=true] - Whether the god rays should be blurred to reduce artifacts. + */ + constructor( + camera?: Camera, + lightSource?: Mesh | Points, + { + blendFunction, + samples, + density, + decay, + weight, + exposure, + clampMax, + resolutionScale, + resolutionX, + resolutionY, + width, + height, + kernelSize, + blur + }?: { + blendFunction?: BlendFunction; + samples?: number; + density?: number; + decay?: number; + weight?: number; + exposure?: number; + clampMax?: number; + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + kernelSize?: KernelSize; + blur?: boolean; + } + ); + + /** + * A blur pass that reduces aliasing artifacts and makes the light softer. + * + * This pass can be disabled to improve performance. + * + * @type {KawaseBlurPass} + */ + blurPass: KawaseBlurPass; + /** + * Returns the blur pass that reduces aliasing artifacts and makes the light softer. + * + * @deprecated Use blurPass instead. + * @return {KawaseBlurPass} The blur pass. + */ + getBlurPass(): KawaseBlurPass; + /** + * Sets the light source. + * + * @type {Mesh|Points} + */ + get lightSource(): Mesh | Points | null; + set lightSource(value: Mesh | Points | null); + /** + * A texture that contains the intermediate result of this effect. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * The depth mask material. + * + * @type {DepthMaskMaterial} + */ + get depthMaskMaterial(): DepthMaskMaterial; + /** + * Returns the god rays texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * The internal god rays material. + * + * @type {GodRaysMaterial} + */ + get godRaysMaterial(): GodRaysMaterial; + /** + * Returns the god rays material. + * + * @deprecated Use godRaysMaterial instead. + * @return {GodRaysMaterial} The material. + */ + getGodRaysMaterial(): GodRaysMaterial; + /** + * The resolution of this effect. + * + * @type {Resolution} + */ + get resolution(): Resolution; + /** + * Returns the resolution of this effect. + * + * @deprecated Use resolution instead. + * @return {GodRaysMaterial} The material. + */ + getResolution(): GodRaysMaterial; + set width(arg: number); + /** + * The current width of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.width instead. + */ + get width(): number; + set height(arg: number); + /** + * The current height of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.height instead. + */ + get height(): number; + set dithering(arg: boolean); + /** + * Indicates whether dithering is enabled. + * + * @type {Boolean} + * @deprecated + */ + get dithering(): boolean; + set blur(arg: boolean); + /** + * Indicates whether the god rays should be blurred to reduce artifacts. + * + * @type {Boolean} + * @deprecated Use blurPass.enabled instead. + */ + get blur(): boolean; + set kernelSize(arg: KernelSize); + /** + * The blur kernel size. + * + * @type {KernelSize} + * @deprecated Use blurPass.kernelSize instead. + */ + get kernelSize(): KernelSize; + /** + * Returns the current resolution scale. + * + * @return {Number} The resolution scale. + * @deprecated Use resolution instead. + */ + getResolutionScale(): number; + /** + * Sets the resolution scale. + * + * @param {Number} scale - The new resolution scale. + * @deprecated Use resolution instead. + */ + setResolutionScale(scale: number): void; + /** + * A higher sample count improves quality at the cost of performance. + * + * @type {Number} + * @deprecated Use godRaysMaterial.samples instead. + */ + set samples(arg: number); + /** + * The number of samples per pixel. + * + * @type {Number} + * @deprecated Use godRaysMaterial.samples instead. + */ + get samples(): number; + /** + * Sets the depth texture. + * + * @param {Texture} depthTexture - A depth texture. + * @param {Number} [depthPacking=BasicDepthPacking] - The depth packing. + */ + setDepthTexture(depthTexture: Texture, depthPacking?: number): void; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Updates the size of internal render targets. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * A grid effect. + */ +export class GridEffect extends Effect { + + /** + * Constructs a new grid effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.OVERLAY] - The blend function of this effect. + * @param {Number} [options.scale=1.0] - The scale of the grid pattern. + * @param {Number} [options.lineWidth=0.0] - The line width of the grid pattern. + */ + constructor({ + blendFunction, + scale, + lineWidth + }?: { + blendFunction?: BlendFunction; + scale?: number; + lineWidth?: number; + }); + + set scale(arg: number); + /** + * The scale. + * + * @type {Number} + */ + get scale(): number; + set lineWidth(arg: number); + /** + * The line width. + * + * @type {Number} + */ + get lineWidth(): number; + /** + * Returns the current grid scale. + * + * @deprecated Use scale instead. + * @return {Number} The grid scale. + */ + getScale(): number; + /** + * Sets the grid scale. + * + * @deprecated Use scale instead. + * @param {Number} value - The new grid scale. + */ + setScale(value: number): void; + /** + * Returns the current grid line width. + * + * @deprecated Use lineWidth instead. + * @return {Number} The grid line width. + */ + getLineWidth(): number; + /** + * Sets the grid line width. + * + * @deprecated Use lineWidth instead. + * @param {Number} value - The new grid line width. + */ + setLineWidth(value: number): void; + /** + * Updates the size of this pass. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * A hue/saturation effect. + * + * Reference: https://github.com/evanw/glfx.js + */ +export class HueSaturationEffect extends Effect { + + /** + * Constructs a new hue/saturation effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.hue=0.0] - The hue in radians. + * @param {Number} [options.saturation=0.0] - The saturation factor, ranging from -1 to 1, where 0 means no change. + */ + constructor({ + blendFunction, + hue, + saturation + }?: { + blendFunction?: BlendFunction; + hue?: number; + saturation?: number; + }); + + set hue(arg: number); + /** + * The hue. + * + * @type {Number} + */ + get hue(): number; + set saturation(arg: number); + /** + * The saturation. + * + * @type {Number} + */ + get saturation(): number; + /** + * Returns the saturation. + * + * @deprecated Use saturation instead. + * @return {Number} The saturation. + */ + getSaturation(): number; + /** + * Sets the saturation. + * + * @deprecated Use saturation instead. + * @param {Number} value - The saturation. + */ + setSaturation(value: number): void; + /** + * Returns the hue. + * + * @deprecated Use hue instead. + * @return {Number} The hue in radians. + */ + getHue(): number; + /** + * Sets the hue. + * + * @deprecated Use hue instead. + * @param {Number} value - The hue in radians. + */ + setHue(value: number): void; + +} + +/** + * A 1D LUT effect. + */ + +export class LUT1DEffect extends Effect { + + /** + * Constructs a new color grading effect. + * + * @param {Texture} lut - The lookup texture. + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SET] - The blend function of this effect. + */ + constructor( + lut: Texture, + { + blendFunction + }?: { + blendFunction?: BlendFunction; + } + ); + +} +/** + * A LUT effect. + * + * The tetrahedral interpolation algorithm was inspired by an implementation from OpenColorIO which is licensed under + * the BSD 3-Clause License. + * + * The manual trilinear interpolation algorithm is based on an implementation by Garret Johnson which is licensed under + * the MIT License. + * + * References: + * https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-quality-rendering/chapter-24-using-lookup-tables-accelerate-color + * https://www.nvidia.com/content/GTC/posters/2010/V01-Real-Time-Color-Space-Conversion-for-High-Resolution-Video.pdf + * https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/master/src/OpenColorIO/ops/lut3d/ + * https://github.com/gkjohnson/threejs-sandbox/tree/master/3d-lut + */ +export class LUT3DEffect extends Effect { + + /** + * Constructs a new color grading effect. + * + * @param {Texture} lut - The lookup texture. + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SET] - The blend function of this effect. + * @param {Boolean} [options.tetrahedralInterpolation=false] - Enables or disables tetrahedral interpolation. + * @param {ColorSpace} [options.inputColorSpace=SRGBColorSpace] - The input color space. + */ + constructor( + lut: Texture, + { + blendFunction, + tetrahedralInterpolation, + inputColorSpace + }?: { + blendFunction?: BlendFunction; + tetrahedralInterpolation?: boolean; + inputColorSpace?: ColorSpace; + } + ); + + /** + * Indicates whether tetrahedral interpolation is enabled. Requires a 3D LUT, disabled by default. + * + * Tetrahedral interpolation produces highly accurate results but is slower than hardware interpolation. + * + * @type {Boolean} + */ + get tetrahedralInterpolation(): boolean; + set tetrahedralInterpolation(arg: boolean); + /** + * The LUT. + * + * @type {Texture} + */ + get lut(): Texture; + set lut(arg: Texture); + /** + * Returns the current LUT. + * + * @deprecated Use lut instead. + * @return {Texture} The LUT. + */ + getLUT(): Texture; + /** + * Sets the LUT. + * + * @deprecated Use lut instead. + * @param {Texture} value - The LUT. + */ + setLUT(value: Texture): void; + /** + * Enables or disables tetrahedral interpolation. + * + * @deprecated Use tetrahedralInterpolation instead. + * @param {Boolean} value - Whether tetrahedral interpolation should be enabled. + */ + setTetrahedralInterpolationEnabled(value: boolean): void; + +} + +/** + * A noise effect. + */ +export class NoiseEffect extends Effect { + + /** + * Constructs a new noise effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. + * @param {Boolean} [options.premultiply=false] - Whether the noise should be multiplied with the input colors prior to blending. + */ + constructor({ + blendFunction, + premultiply + }?: { + blendFunction?: BlendFunction; + premultiply?: boolean; + }); + + set premultiply(arg: boolean); + /** + * Indicates whether noise will be multiplied with the input colors prior to blending. + * + * @type {Boolean} + */ + get premultiply(): boolean; + /** + * Indicates whether noise will be multiplied with the input colors prior to blending. + * + * @deprecated Use premultiply instead. + * @return {Boolean} Whether noise is premultiplied. + */ + isPremultiplied(): boolean; + /** + * Controls whether noise should be multiplied with the input colors prior to blending. + * + * @deprecated Use premultiply instead. + * @param {Boolean} value - Whether noise should be premultiplied. + */ + setPremultiplied(value: boolean): void; + +} + +/** + * An outline effect. + */ +export class OutlineEffect extends Effect { + + /** + * Constructs a new outline effect. + * + * @param {Scene} scene - The main scene. + * @param {Camera} camera - The main camera. + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function. Use `BlendFunction.ALPHA` for dark outlines. + * @param {Texture} [options.patternTexture=null] - A pattern texture. + * @param {Number} [options.patternScale=1.0] - The pattern scale. + * @param {Number} [options.edgeStrength=1.0] - The edge strength. + * @param {Number} [options.pulseSpeed=0.0] - The pulse speed. A value of zero disables the pulse effect. + * @param {Number} [options.visibleEdgeColor=0xffffff] - The color of visible edges. + * @param {Number} [options.hiddenEdgeColor=0x22090a] - The color of hidden edges. + * @param {KernelSize} [options.kernelSize=KernelSize.VERY_SMALL] - The blur kernel size. + * @param {Boolean} [options.blur=false] - Whether the outline should be blurred. + * @param {Boolean} [options.xRay=true] - Whether occluded parts of selected objects should be visible. + * @param {Number} [options.multisampling=0] - The number of samples used for multisample antialiasing. Requires WebGL 2. + * @param {Number} [options.resolutionScale=0.5] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + */ + constructor( + scene?: Scene, + camera?: Camera, + { + blendFunction, + patternTexture, + patternScale, + edgeStrength, + pulseSpeed, + visibleEdgeColor, + hiddenEdgeColor, + multisampling, + resolutionScale, + resolutionX, + resolutionY, + width, + height, + kernelSize, + blur, + xRay + }?: { + blendFunction?: BlendFunction; + patternTexture?: Texture; + patternScale?: number; + edgeStrength?: number; + pulseSpeed?: number; + visibleEdgeColor?: number; + hiddenEdgeColor?: number; + multisampling?: number; + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + kernelSize?: KernelSize; + blur?: boolean; + xRay?: boolean; + } + ); + + set patternTexture(arg: Texture); + /** + * The pattern texture. Set to `null` to disable. + * + * @type {Texture} + */ + get patternTexture(): Texture; + set xRay(arg: boolean); + /** + * Indicates whether X-ray mode is enabled. + * + * @type {Boolean} + */ + get xRay(): boolean; + /** + * A blur pass. + * + * @type {KawaseBlurPass} + */ + blurPass: KawaseBlurPass; + /** + * A selection of objects that will be outlined. + * + * The default layer of this selection is 10. + * + * @type {Selection} + */ + selection: Selection; + /** + * The pulse speed. Set to 0 to disable. + * + * @type {Number} + */ + pulseSpeed: number; + /** + * The resolution of this effect. + * + * @type {Resolution} + */ + get resolution(): Resolution; + /** + * Returns the resolution. + * + * @return {Resizer} The resolution. + */ + getResolution(): Resizer; + set patternScale(arg: number); + /** + * The pattern scale. + * + * @type {Number} + */ + get patternScale(): number; + set edgeStrength(arg: number); + /** + * The edge strength. + * + * @type {Number} + */ + get edgeStrength(): number; + set visibleEdgeColor(arg: Color); + /** + * The visible edge color. + * + * @type {Color} + */ + get visibleEdgeColor(): Color; + set hiddenEdgeColor(arg: Color); + /** + * The hidden edge color. + * + * @type {Color} + */ + get hiddenEdgeColor(): Color; + /** + * The amount of MSAA samples. + * + * Requires WebGL 2. Set to zero to disable multisampling. + * + * @experimental Requires three >= r138. + * @type {Number} + */ + get multisampling(): number; + set multisampling(arg: number); + /** + * Returns the blur pass. + * + * @deprecated Use blurPass instead. + * @return {KawaseBlurPass} The blur pass. + */ + getBlurPass(): KawaseBlurPass; + /** + * Returns the selection. + * + * @deprecated Use selection instead. + * @return {Selection} The selection. + */ + getSelection(): Selection; + /** + * Returns the pulse speed. + * + * @deprecated Use pulseSpeed instead. + * @return {Number} The speed. + */ + getPulseSpeed(): number; + /** + * Sets the pulse speed. Set to zero to disable. + * + * @deprecated Use pulseSpeed instead. + * @param {Number} value - The speed. + */ + setPulseSpeed(value: number): void; + set width(arg: number); + /** + * The current width of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.width instead. + */ + get width(): number; + set height(arg: number); + /** + * The current height of the internal render targets. + * + * @type {Number} + * @deprecated Use resolution.height instead. + */ + get height(): number; + set selectionLayer(arg: number); + /** + * The selection layer. + * + * @type {Number} + * @deprecated Use selection.layer instead. + */ + get selectionLayer(): number; + set dithering(arg: boolean); + /** + * Indicates whether dithering is enabled. + * + * @type {Boolean} + * @deprecated + */ + get dithering(): boolean; + set kernelSize(arg: KernelSize); + /** + * The blur kernel size. + * + * @type {KernelSize} + * @deprecated Use blurPass.kernelSize instead. + */ + get kernelSize(): KernelSize; + set blur(arg: boolean); + /** + * Indicates whether the outlines should be blurred. + * + * @type {Boolean} + * @deprecated Use blurPass.enabled instead. + */ + get blur(): boolean; + /** + * Indicates whether X-ray mode is enabled. + * + * @deprecated Use xRay instead. + * @return {Boolean} Whether X-ray mode is enabled. + */ + isXRayEnabled(): boolean; + /** + * Enables or disables X-ray outlines. + * + * @deprecated Use xRay instead. + * @param {Boolean} value - Whether X-ray should be enabled. + */ + setXRayEnabled(value: boolean): void; + /** + * Sets the pattern texture. + * + * @deprecated Use patternTexture instead. + * @param {Texture} value - The new texture. + */ + setPatternTexture(value: Texture): void; + /** + * Returns the current resolution scale. + * + * @return {Number} The resolution scale. + * @deprecated Use resolution instead. + */ + getResolutionScale(): number; + /** + * Sets the resolution scale. + * + * @param {Number} scale - The new resolution scale. + * @deprecated Use resolution instead. + */ + setResolutionScale(scale: number): void; + /** + * Clears the current selection and selects a list of objects. + * + * @param {Object3D[]} objects - The objects that should be outlined. This array will be copied. + * @return {OutlineEffect} This pass. + * @deprecated Use selection.set() instead. + */ + setSelection(objects: Object3D[]): OutlineEffect; + /** + * Clears the list of selected objects. + * + * @return {OutlineEffect} This pass. + * @deprecated Use selection.clear() instead. + */ + clearSelection(): OutlineEffect; + /** + * Selects an object. + * + * @param {Object3D} object - The object that should be outlined. + * @return {OutlineEffect} This pass. + * @deprecated Use selection.add() instead. + */ + selectObject(object: Object3D): OutlineEffect; + /** + * Deselects an object. + * + * @param {Object3D} object - The object that should no longer be outlined. + * @return {OutlineEffect} This pass. + * @deprecated Use selection.delete() instead. + */ + deselectObject(object: Object3D): OutlineEffect; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Updates the size of internal render targets. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * A pixelation effect. + * + * Warning: This effect cannot be merged with convolution effects. + */ +export class PixelationEffect extends Effect { + + /** + * Constructs a new pixelation effect. + * + * @param {Number} [granularity=30.0] - The pixel granularity. + */ + constructor(granularity?: number); + set granularity(arg: number); + /** + * The pixel granularity. + * + * A higher value yields coarser visuals. + * + * @type {Number} + */ + get granularity(): number; + /** + * Returns the pixel granularity. + * + * @deprecated Use granularity instead. + * @return {Number} The granularity. + */ + getGranularity(): number; + /** + * Sets the pixel granularity. + * + * @deprecated Use granularity instead. + * @param {Number} value - The new granularity. + */ + setGranularity(value: number): void; + /** + * Updates the granularity. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + +} + +/** + * Depth of Field shader v2.4. + * + * Yields more realistic results but is also more demanding. + * + * Original shader code by Martins Upitis: + * http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update) + * + * @deprecated Use DepthOfFieldEffect instead. + */ +export class RealisticBokehEffect extends Effect { + + /** + * Constructs a new bokeh effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.focus=1.0] - The focus distance in world units. + * @param {Number} [options.focalLength=24.0] - The focal length of the main camera. + * @param {Number} [options.fStop=0.9] - The ratio of the lens focal length to the diameter of the entrance pupil (aperture). + * @param {Number} [options.luminanceThreshold=0.5] - A luminance threshold. + * @param {Number} [options.luminanceGain=2.0] - A luminance gain factor. + * @param {Number} [options.bias=0.5] - A blur bias. + * @param {Number} [options.fringe=0.7] - A blur offset. + * @param {Number} [options.maxBlur=1.0] - The maximum blur strength. + * @param {Boolean} [options.rings=3] - The number of blur iterations. + * @param {Boolean} [options.samples=2] - The amount of samples taken per ring. + * @param {Boolean} [options.showFocus=false] - Whether the focal point should be highlighted. Useful for debugging. + * @param {Boolean} [options.manualDoF=false] - Enables manual control over the depth of field. + * @param {Boolean} [options.pentagon=false] - Enables pentagonal blur shapes. Requires a high number of rings and samples. + */ + constructor({ + blendFunction, + focus, + focalLength, + fStop, + luminanceThreshold, + luminanceGain, + bias, + fringe, + maxBlur, + rings, + samples, + showFocus, + manualDoF, + pentagon + }?: { + blendFunction?: BlendFunction; + focus?: number; + focalLength?: number; + fStop?: number; + luminanceThreshold?: number; + luminanceGain?: number; + bias?: number; + fringe?: number; + maxBlur?: number; + rings?: boolean; + samples?: boolean; + showFocus?: boolean; + manualDoF?: boolean; + pentagon?: boolean; + }); + + set rings(arg: number); + /** + * The amount of blur iterations. + * + * @type {Number} + */ + get rings(): number; + set samples(arg: number); + /** + * The amount of blur samples per ring. + * + * @type {Number} + */ + get samples(): number; + set showFocus(arg: boolean); + /** + * Indicates whether the focal point will be highlighted. + * + * @type {Boolean} + */ + get showFocus(): boolean; + set manualDoF(arg: boolean); + /** + * Indicates whether the Depth of Field should be calculated manually. + * + * If enabled, the Depth of Field can be adjusted via the `dof` uniform. + * + * @type {Boolean} + */ + get manualDoF(): boolean; + set pentagon(arg: boolean); + /** + * Indicates whether the blur shape should be pentagonal. + * + * @type {Boolean} + */ + get pentagon(): boolean; + +} + +/** + * A scanline effect. + * + * Based on an implementation by Georg 'Leviathan' Steinrohder (CC BY 3.0): + * http://www.truevision3d.com/forums/showcase/staticnoise_colorblackwhite_scanline_shaders-t18698.0.html + */ +export class ScanlineEffect extends Effect { + + /** + * Constructs a new scanline effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.OVERLAY] - The blend function of this effect. + * @param {Number} [options.density=1.25] - The scanline density. + */ + constructor({ + blendFunction, + density + }?: { + blendFunction?: BlendFunction; + density?: number; + }); + + set density(arg: number); + /** + * The scanline density. + * + * @type {Number} + */ + get density(): number; + /** + * Returns the current scanline density. + * + * @deprecated Use density instead. + * @return {Number} The scanline density. + */ + getDensity(): number; + /** + * Sets the scanline density. + * + * @deprecated Use density instead. + * @param {Number} value - The new scanline density. + */ + setDensity(value: number): void; + /** + * Updates the size of this pass. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * The scanline scroll speed. Default is 0 (disabled). + * + * @type {Number} + */ + get scrollSpeed(): number; + set scrollSpeed(value: number); + +} + +/** + * A selective bloom effect. + * + * This effect applies bloom to selected objects only. + */ +export class SelectiveBloomEffect extends BloomEffect { + + /** + * Constructs a new selective bloom effect. + * + * @param {Scene} scene - The main scene. + * @param {Camera} camera - The main camera. + * @param {BloomEffectOptions} [options] - The options. See {@link BloomEffect} for details. + */ + constructor(scene?: Scene, camera?: Camera, options?: BloomEffectOptions); + /** + * A selection of objects. + * + * The default layer of this selection is 11. + * + * @type {Selection} + */ + selection: Selection; + /** + * Returns the selection. + * + * @deprecated Use selection instead. + * @return {Selection} The selection. + */ + getSelection(): Selection; + set inverted(arg: boolean); + /** + * Indicates whether the selection should be considered inverted. + * + * @type {Boolean} + */ + get inverted(): boolean; + /** + * Indicates whether the mask is inverted. + * + * @deprecated Use inverted instead. + * @return {Boolean} Whether the mask is inverted. + */ + isInverted(): boolean; + /** + * Enables or disable mask inversion. + * + * @deprecated Use inverted instead. + * @param {Boolean} value - Whether the mask should be inverted. + */ + setInverted(value: boolean): void; + set ignoreBackground(arg: boolean); + /** + * Indicates whether the background colors will be ignored. + * + * @type {Boolean} + */ + get ignoreBackground(): boolean; + /** + * Indicates whether the background is disabled. + * + * @deprecated Use ignoreBackground instead. + * @return {Boolean} Whether the background is disabled. + */ + isBackgroundDisabled(): boolean; + /** + * Enables or disables the background. + * + * @deprecated Use ignoreBackground instead. + * @param {Boolean} value - Whether the background should be disabled. + */ + setBackgroundDisabled(value: boolean): void; + /** + * Sets the depth texture. + * + * @param {Texture} depthTexture - A depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. + */ + setDepthTexture( + depthTexture: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime: number + ): void; + + /** + * Updates the size of internal render targets. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * A sepia effect. + */ +export class SepiaEffect extends Effect { + + /** + * Constructs a new sepia effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Number} [options.intensity=1.0] - The intensity of the effect. + */ + constructor({ + blendFunction, + intensity + }?: { + blendFunction?: BlendFunction; + intensity?: number; + }); + + set intensity(arg: number); + /** + * The intensity. + * + * @deprecated Use blendMode.opacity instead. + * @type {Number} + */ + get intensity(): number; + /** + * Returns the current sepia intensity. + * + * @deprecated Use blendMode.opacity instead. + * @return {Number} The intensity. + */ + getIntensity(): number; + /** + * Sets the sepia intensity. + * + * @deprecated Use blendMode.opacity instead. + * @param {Number} value - The intensity. + */ + setIntensity(value: number): void; + +} + +/** + * A shock wave effect. + * + * Based on a Gist by Jean-Philippe Sarda: + * https://gist.github.com/jpsarda/33cea67a9f2ecb0a0eda + */ +export class ShockWaveEffect extends Effect { + + /** + * Constructs a new shock wave effect. + * + * @param {Camera} camera - The main camera. + * @param {Vector3} [position] - The world position of the shock wave. + * @param {Object} [options] - The options. + * @param {Number} [options.speed=2.0] - The animation speed. + * @param {Number} [options.maxRadius=1.0] - The extent of the shock wave. + * @param {Number} [options.waveSize=0.2] - The wave size. + * @param {Number} [options.amplitude=0.05] - The distortion amplitude. + */ + constructor( + camera?: Camera, + position?: Vector3, + { + speed, + maxRadius, + waveSize, + amplitude + }?: { + speed?: number; + maxRadius?: number; + waveSize?: number; + amplitude?: number; + } + ); + + /** + * The position of the shock wave. + * + * @type {Vector3} + */ + position: Vector3; + /** + * The speed of the shock wave animation. + * + * @type {Number} + */ + speed: number; + set amplitude(arg: number); + /** + * The amplitude. + * + * @type {Number} + */ + get amplitude(): number; + set waveSize(arg: number); + /** + * The wave size. + * + * @type {Number} + */ + get waveSize(): number; + set maxRadius(arg: number); + /** + * The maximum radius. + * + * @type {Number} + */ + get maxRadius(): number; + set epicenter(arg: Vector3); + /** + * The position of the shock wave. + * + * @type {Vector3} + * @deprecated Use position instead. + */ + get epicenter(): Vector3; + /** + * Returns the position of the shock wave. + * + * @deprecated Use position instead. + * @return {Vector3} The position. + */ + getPosition(): Vector3; + /** + * Sets the position of the shock wave. + * + * @deprecated Use position instead. + * @param {Vector3} value - The position. + */ + setPosition(value: Vector3): void; + /** + * Returns the speed of the shock wave. + * + * @deprecated Use speed instead. + * @return {Number} The speed. + */ + getSpeed(): number; + /** + * Sets the speed of the shock wave. + * + * @deprecated Use speed instead. + * @param {Number} value - The speed. + */ + setSpeed(value: number): void; + /** + * Emits the shock wave. + */ + explode(): void; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [delta] - The time between the last frame and the current one in seconds. + */ + + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + delta: number + ): void; + +} + +/** + * NVIDIA FXAA 3.11 by Timothy Lottes: + * https://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf + * + * Based on an implementation by Simon Rodriguez: + * https://github.com/kosua20/Rendu/blob/master/resources/common/shaders/screens/fxaa.frag + */ +export class FXAAEffect extends Effect { + + /** + * Constructs a new FXAA effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.SRC] - The blend function of this effect. + */ + constructor({ + blendFunction + }?: { + blendFunction?: BlendFunction + }); + + /** + * The minimum edge detection threshold. Range is [0.0, 1.0]. + * + * @type {Number} + */ + get minEdgeThreshold(): number; + set minEdgeThreshold(arg: number); + + /** + * The maximum edge detection threshold. Range is [0.0, 1.0]. + * + * @type {Number} + */ + get maxEdgeThreshold(): number; + set maxEdgeThreshold(arg: number); + + /** + * The subpixel blend quality. Range is [0.0, 1.0]. + * + * @type {Number} + */ + get subpixelQuality(): number; + set subpixelQuality(arg: number); + + /** + * The maximum amount of edge detection samples. + * + * @type {Number} + */ + get samples(): number; + set samples(arg: number); + +} + +/** + * Subpixel Morphological Antialiasing (SMAA). + * + * https://github.com/iryoku/smaa/releases/tag/v2.8 + */ +export class SMAAEffect extends Effect { + + /** + * The SMAA search image, encoded as a base64 data URL. + * + * @type {String} + * @deprecated + */ + static get searchImageDataURL(): string; + /** + * The SMAA area image, encoded as a base64 data URL. + * + * @type {String} + * @deprecated + */ + static get areaImageDataURL(): string; + /** + * Constructs a new SMAA effect. + * + * @param {Object} [options] - The options. + * @param {SMAAPreset} [options.preset=SMAAPreset.MEDIUM] - The quality preset. + * @param {EdgeDetectionMode} [options.edgeDetectionMode=EdgeDetectionMode.COLOR] - The edge detection mode. + * @param {PredicationMode} [options.predicationMode=PredicationMode.DISABLED] - The predication mode. + */ + constructor({ + preset, + edgeDetectionMode, + predicationMode + }?: { + preset?: SMAAPreset; + edgeDetectionMode?: EdgeDetectionMode; + predicationMode?: PredicationMode; + }); + + /** + * The edges texture. + * + * @type {Texture} + */ + get edgesTexture(): Texture; + /** + * Returns the edges texture. + * + * @deprecated Use edgesTexture instead. + * @return {Texture} The texture. + */ + getEdgesTexture(): Texture; + /** + * The edge weights texture. + * + * @type {Texture} + */ + get weightsTexture(): Texture; + /** + * Returns the edge weights texture. + * + * @deprecated Use weightsTexture instead. + * @return {Texture} The texture. + */ + getWeightsTexture(): Texture; + /** + * The edge detection material. + * + * @type {EdgeDetectionMaterial} + */ + get edgeDetectionMaterial(): EdgeDetectionMaterial; + /** + * The edge detection material. + * + * @type {EdgeDetectionMaterial} + * @deprecated Use edgeDetectionMaterial instead. + */ + get colorEdgesMaterial(): EdgeDetectionMaterial; + /** + * Returns the edge detection material. + * + * @deprecated Use edgeDetectionMaterial instead. + * @return {EdgeDetectionMaterial} The material. + */ + getEdgeDetectionMaterial(): EdgeDetectionMaterial; + /** + * The edge weights material. + * + * @type {SMAAWeightsMaterial} + */ + get weightsMaterial(): SMAAWeightsMaterial; + /** + * Returns the edge weights material. + * + * @deprecated Use weightsMaterial instead. + * @return {SMAAWeightsMaterial} The material. + */ + getWeightsMaterial(): SMAAWeightsMaterial; + /** + * Sets the edge detection sensitivity. + * + * See {@link EdgeDetectionMaterial#setEdgeDetectionThreshold} for more details. + * + * @deprecated Use edgeDetectionMaterial instead. + * @param {Number} threshold - The edge detection sensitivity. Range: [0.05, 0.5]. + */ + setEdgeDetectionThreshold(threshold: number): void; + /** + * Sets the maximum amount of horizontal/vertical search steps. + * + * See {@link SMAAWeightsMaterial#setOrthogonalSearchSteps} for more details. + * + * @deprecated Use weightsMaterial instead. + * @param {Number} steps - The search steps. Range: [0, 112]. + */ + setOrthogonalSearchSteps(steps: number): void; + /** + * Applies the given quality preset. + * + * @param {SMAAPreset} preset - The preset. + */ + applyPreset(preset: SMAAPreset): void; + /** + * Sets the depth texture. + * + * @param {Texture} depthTexture - A depth texture. + * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. + */ + setDepthTexture( + depthTexture: Texture, + depthPacking?: DepthPackingStrategies + ): void; + + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Updates the size of internal render targets. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * Deletes internal render targets and textures. + */ + dispose(): void; + +} + +/** + * An enumeration of SMAA presets. + * + * @type {Object} + * @property {Number} LOW - Results in around 60% of the maximum quality. + * @property {Number} MEDIUM - Results in around 80% of the maximum quality. + * @property {Number} HIGH - Results in around 95% of the maximum quality. + * @property {Number} ULTRA - Results in around 99% of the maximum quality. + */ +export enum SMAAPreset { + LOW, + MEDIUM, + HIGH, + ULTRA +} + +/** + * A Screen Space Ambient Occlusion (SSAO) effect. + * + * For high quality visuals use two SSAO effect instances in a row with different radii, one for rough AO and one for + * fine details. + * + * This effect supports depth-aware upsampling and should be rendered at a lower resolution. The resolution should match + * that of the downsampled normals and depth. If you intend to render SSAO at full resolution, do not provide a + * downsampled `normalDepthBuffer`. + * + * It's recommended to specify a relative render resolution using the `resolutionScale` constructor parameter to avoid + * undesired sampling patterns. + * + * Based on "Scalable Ambient Obscurance" by Morgan McGuire et al. and "Depth-aware upsampling experiments" by Eleni + * Maria Stea: + * https://research.nvidia.com/publication/scalable-ambient-obscurance + * https://eleni.mutantstargoat.com/hikiko/on-depth-aware-upsampling + * + * The view position calculation is based on a shader by Norbert Nopper: + * https://github.com/McNopper/OpenGL/blob/master/Example28/shader/ssao.frag.glsl + */ +export class SSAOEffect extends Effect { + + /** + * Constructs a new SSAO effect. + * + * @todo Move normalBuffer to options. + * @param {Camera} [camera] - The main camera. + * @param {Texture} [normalBuffer] - A texture that contains the scene normals. + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.MULTIPLY] - The blend function of this effect. + * @param {Boolean} [options.distanceScaling=true] - Deprecated. + * @param {Boolean} [options.depthAwareUpsampling=true] - Enables or disables depth-aware upsampling. Has no effect if WebGL 2 is not supported. + * @param {Texture} [options.normalDepthBuffer=null] - Deprecated. + * @param {Number} [options.samples=9] - The amount of samples per pixel. Should not be a multiple of the ring count. + * @param {Number} [options.rings=7] - The amount of spiral turns in the occlusion sampling pattern. Should be a prime number. + * @param {Number} [options.worldDistanceThreshold] - The world distance threshold at which the occlusion effect starts to fade out. + * @param {Number} [options.worldDistanceFalloff] - The world distance falloff. Influences the smoothness of the occlusion cutoff. + * @param {Number} [options.worldProximityThreshold] - The world proximity threshold at which the occlusion starts to fade out. + * @param {Number} [options.worldProximityFalloff] - The world proximity falloff. Influences the smoothness of the proximity cutoff. + * @param {Number} [options.distanceThreshold=0.97] - Deprecated. + * @param {Number} [options.distanceFalloff=0.03] - Deprecated. + * @param {Number} [options.rangeThreshold=0.0005] - Deprecated. + * @param {Number} [options.rangeFalloff=0.001] - Deprecated. + * @param {Number} [options.minRadiusScale=0.1] - The minimum radius scale. + * @param {Number} [options.luminanceInfluence=0.7] - Determines how much the luminance of the scene influences the ambient occlusion. + * @param {Number} [options.radius=0.1825] - The occlusion sampling radius, expressed as a scale relative to the resolution. Range [1e-6, 1.0]. + * @param {Number} [options.intensity=1.0] - The intensity of the ambient occlusion. + * @param {Number} [options.bias=0.025] - An occlusion bias. Eliminates artifacts caused by depth discontinuities. + * @param {Number} [options.fade=0.01] - Influences the smoothness of the shadows. A lower value results in higher contrast. + * @param {Color} [options.color=null] - The color of the ambient occlusion. + * @param {Number} [options.resolutionScale=1.0] - The resolution scale. + * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. + * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. + * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. + * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. + */ + constructor( + camera?: Camera, + normalBuffer?: Texture, + { + blendFunction, + distanceScaling, + depthAwareUpsampling, + normalDepthBuffer, + samples, + rings, + worldDistanceThreshold, + worldDistanceFalloff, + worldProximityThreshold, + worldProximityFalloff, + distanceThreshold, + distanceFalloff, + rangeThreshold, + rangeFalloff, + minRadiusScale, + luminanceInfluence, + radius, + intensity, + bias, + fade, + color, + resolutionScale, + resolutionX, + resolutionY, + width, + height + }?: { + blendFunction?: BlendFunction; + distanceScaling?: boolean; + depthAwareUpsampling?: boolean; + normalDepthBuffer?: Texture; + samples?: number; + rings?: number; + worldDistanceThreshold?: number; + worldDistanceFalloff?: number; + worldProximityThreshold?: number; + worldProximityFalloff?: number; + distanceThreshold?: number; + distanceFalloff?: number; + rangeThreshold?: number; + rangeFalloff?: number; + minRadiusScale?: number; + luminanceInfluence?: number; + radius?: number; + intensity?: number; + bias?: number; + fade?: number; + color?: Color; + resolutionScale?: number; + resolutionX?: number; + resolutionY?: number; + width?: number; + height?: number; + } + ); + + resolution: Resolution; + /** + * Sets the normal buffer. + * + * @type {Texture} + */ + get normalBuffer(): Texture | null; + set normalBuffer(value: Texture | null); + /** + * Indicates whether depth-aware upsampling is enabled. + * + * @type {Boolean} + */ + get depthAwareUpsampling(): boolean; + set depthAwareUpsampling(arg: boolean); + /** + * The color of the ambient occlusion. Set to `null` to disable. + * + * @type {Color} + */ + get color(): Color; + set color(arg: Color); + /** + * Returns the resolution settings. + * + * @deprecated Use resolution instead. + * @return {Resolution} The resolution. + */ + getResolution(): Resolution; + /** + * The SSAO material. + * + * @type {SSAOMaterial} + */ + get ssaoMaterial(): SSAOMaterial; + /** + * Returns the SSAO material. + * + * @deprecated Use ssaoMaterial instead. + * @return {SSAOMaterial} The material. + */ + getSSAOMaterial(): SSAOMaterial; + /** + * The amount of occlusion samples per pixel. + * + * @type {Number} + * @deprecated Use ssaoMaterial.samples instead. + */ + get samples(): number; + set samples(arg: number); + /** + * The amount of spiral turns in the occlusion sampling pattern. + * + * @type {Number} + * @deprecated Use ssaoMaterial.rings instead. + */ + get rings(): number; + set rings(arg: number); + /** + * The occlusion sampling radius. + * + * @type {Number} + * @deprecated Use ssaoMaterial.radius instead. + */ + get radius(): number; + set radius(arg: number); + /** + * The intensity. + * + * @type {Number} + */ + get intensity(): number; + set intensity(arg: number); + /** + * Indicates whether depth-aware upsampling is enabled. + * + * @deprecated Use depthAwareUpsampling instead. + * @return {Boolean} Whether depth-aware upsampling is enabled. + */ + isDepthAwareUpsamplingEnabled(): boolean; + /** + * Enables or disables depth-aware upsampling. + * + * @deprecated Use depthAwareUpsampling instead. + * @param {Boolean} value - Whether depth-aware upsampling should be enabled. + */ + setDepthAwareUpsamplingEnabled(value: boolean): void; + /** + * Indicates whether distance-based radius scaling is enabled. + * + * @type {Boolean} + * @deprecated Use ssaoMaterial.distanceScaling instead. + */ + get distanceScaling(): boolean; + set distanceScaling(arg: boolean); + /** + * Returns the color of the ambient occlusion. + * + * @deprecated Use color instead. + * @return {Color} The color. + */ + getColor(): Color; + /** + * Sets the color of the ambient occlusion. Set to `null` to disable colorization. + * + * @deprecated Use color instead. + * @param {Color} value - The color. + */ + setColor(value: Color): void; + /** + * Sets the occlusion distance cutoff. + * + * @deprecated Use ssaoMaterial instead. + * @param {Number} threshold - The distance threshold. Range [0.0, 1.0]. + * @param {Number} falloff - The falloff. Range [0.0, 1.0]. + */ + setDistanceCutoff(threshold: number, falloff: number): void; + /** + * Sets the occlusion proximity cutoff. + * + * @deprecated Use ssaoMaterial instead. + * @param {Number} threshold - The proximity threshold. Range [0.0, 1.0]. + * @param {Number} falloff - The falloff. Range [0.0, 1.0]. + */ + setProximityCutoff(threshold: number, falloff: number): void; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + /** + * Sets the size. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + */ + setSize(width: number, height: number): void; + /** + * The luminance influence factor. Range: [0.0, 1.0]. + * + * @type {Boolean} + */ + get luminanceInfluence(): boolean; + set luminanceInfluence(value: boolean); + +} + +/** + * A texture effect. + */ +export class TextureEffect extends Effect { + + /** + * Constructs a new texture effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Texture} [options.texture] - A texture. + * @param {Boolean} [options.aspectCorrection=false] - Deprecated. Adjust the texture's offset, repeat and center instead. + */ + constructor({ + blendFunction, + texture, + aspectCorrection + }?: { + blendFunction?: BlendFunction; + texture?: Texture; + aspectCorrection?: boolean; + }); + + set texture(arg: Texture); + /** + * The texture. + * + * @type {Texture} + */ + get texture(): Texture; + set aspectCorrection(arg: number); + /** + * Indicates whether aspect correction is enabled. + * + * @type {Number} + * @deprecated Adjust the texture's offset, repeat, rotation and center instead. + */ + get aspectCorrection(): number; + /** + * Returns the texture. + * + * @deprecated Use texture instead. + * @return {Texture} The texture. + */ + getTexture(): Texture; + /** + * Sets the texture. + * + * @deprecated Use texture instead. + * @param {Texture} value - The texture. + */ + setTexture(value: Texture): void; + set uvTransform(arg: boolean); + /** + * Indicates whether the texture UV coordinates will be transformed using the transformation matrix of the texture. + * + * @type {Boolean} + * @deprecated Use texture.matrixAutoUpdate instead. + */ + get uvTransform(): boolean; + /** + * Sets the swizzles that will be applied to the components of a texel before it is written to the output color. + * + * @param {ColorChannel} r - The swizzle for the `r` component. + * @param {ColorChannel} [g=r] - The swizzle for the `g` component. + * @param {ColorChannel} [b=r] - The swizzle for the `b` component. + * @param {ColorChannel} [a=r] - The swizzle for the `a` component. + */ + setTextureSwizzleRGBA( + r: ColorChannel, + g?: ColorChannel, + b?: ColorChannel, + a?: ColorChannel + ): void; + + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime: number + ): void; + + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * A tone mapping mode enumeration. + * + * @type {Object} + * @property {Number} LINEAR - No tone mapping, only exposure. + * @property {Number} REINHARD - Simple Reinhard tone mapping. + * @property {Number} REINHARD2 - Modified Reinhard tone mapping. + * @property {Number} REINHARD2_ADAPTIVE - Simulates the optic nerve responding to the amount of light it is receiving. + * @property {Number} UNCHARTED2 - Uncharted 2 tone mapping. http://filmicworlds.com/blog/filmic-tonemapping-operators. + * @property {Number} OPTIMIZED_CINEON - Deprecated. Use CINEON instead. + * @property {Number} CINEON - Optimized filmic operator by Jim Hejl and Richard Burgess-Dawson. + * @property {Number} ACES_FILMIC - ACES tone mapping with a scale of 1.0/0.6. + * @property {Number} AGX - Filmic tone mapping. Requires three r160 or higher. https://github.com/EaryChow/AgX. + * @property {Number} NEUTRAL - Neutral tone mapping by Khronos. Requires three r162 or higher. https://modelviewer.dev/examples/tone-mapping. + */ +export enum ToneMappingMode { + LINEAR, + REINHARD, + REINHARD2, + REINHARD2_ADAPTIVE, + UNCHARTED2, + OPTIMIZED_CINEON, + CINEON, + ACES_FILMIC, + AGX, + NEUTRAL +} + +/** + * A tone mapping effect. + * + * Note: `ToneMappingMode.REINHARD2_ADAPTIVE` requires support for `EXT_shader_texture_lod`. + * + * Reference: + * GDC2007 - Wolfgang Engel, Post-Processing Pipeline + * http://perso.univ-lyon1.fr/jean-claude.iehl/Public/educ/GAMA/2007/gdc07/Post-Processing_Pipeline.pdf + */ +export class ToneMappingEffect extends Effect { + + /** + * Constructs a new tone mapping effect. + * + * The additional parameters only affect the Reinhard2 operator. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {Boolean} [options.adaptive=false] - Deprecated. Use mode instead. + * @param {ToneMappingMode} [options.mode=ToneMappingMode.ACES_FILMIC] - The tone mapping mode. + * @param {Number} [options.resolution=256] - The resolution of the luminance texture. Must be a power of two. + * @param {Number} [options.maxLuminance=4.0] - Deprecated. Same as whitePoint. + * @param {Number} [options.whitePoint=4.0] - The white point. + * @param {Number} [options.middleGrey=0.6] - The middle grey factor. + * @param {Number} [options.minLuminance=0.01] - The minimum luminance. Prevents very high exposure in dark scenes. + * @param {Number} [options.averageLuminance=1.0] - The average luminance. Used for the non-adaptive Reinhard operator. + * @param {Number} [options.adaptationRate=1.0] - The luminance adaptation rate. + */ + constructor({ + blendFunction, + adaptive, + mode, + resolution, + maxLuminance, + whitePoint, + middleGrey, + minLuminance, + averageLuminance, + adaptationRate + }?: { + blendFunction?: BlendFunction; + adaptive?: boolean; + mode?: ToneMappingMode; + resolution?: number; + maxLuminance?: number; + whitePoint?: number; + middleGrey?: number; + minLuminance?: number; + averageLuminance?: number; + adaptationRate?: number; + }); + + set resolution(arg: number); + /** + * The resolution of the luminance texture. Must be a power of two. + * + * @type {Number} + */ + get resolution(): number; + set mode(arg: ToneMappingMode); + /** + * The tone mapping mode. + * + * @type {ToneMappingMode} + */ + get mode(): ToneMappingMode; + /** + * The white point. Default is `16.0`. + * + * Only applies to Reinhard2 (Modified & Adaptive). + * + * @type {Number} + */ + get whitePoint(): number; + /** + * The middle grey factor. Default is `0.6`. + * + * Only applies to Reinhard2 (Modified & Adaptive). + * + * @type {Number} + */ + get middleGrey(): number; + /** + * The average luminance. + * + * Only applies to Reinhard2 (Modified). + * + * @type {Number} + */ + get averageLuminance(): number; + /** + * Returns the current tone mapping mode. + * + * @deprecated Use mode instead. + * @return {ToneMappingMode} The tone mapping mode. + */ + getMode(): ToneMappingMode; + /** + * Sets the tone mapping mode. + * + * @deprecated Use mode instead. + * @param {ToneMappingMode} value - The tone mapping mode. + */ + setMode(value: ToneMappingMode): void; + /** + * The adaptive luminance material. + * + * @type {AdaptiveLuminanceMaterial} + */ + get adaptiveLuminanceMaterial(): AdaptiveLuminanceMaterial; + /** + * Returns the adaptive luminance material. + * + * @deprecated Use adaptiveLuminanceMaterial instead. + * @return {AdaptiveLuminanceMaterial} The material. + */ + getAdaptiveLuminanceMaterial(): AdaptiveLuminanceMaterial; + /** + * Returns the resolution of the luminance texture. + * + * @deprecated Use resolution instead. + * @return {Number} The resolution. + */ + getResolution(): number; + /** + * Sets the resolution of the luminance texture. Must be a power of two. + * + * @deprecated Use resolution instead. + * @param {Number} value - The resolution. + */ + setResolution(value: number): void; + set adaptive(arg: boolean); + /** + * Indicates whether this pass uses adaptive luminance. + * + * @type {Boolean} + * @deprecated Use mode instead. + */ + get adaptive(): boolean; + set adaptationRate(arg: number); + /** + * The luminance adaptation rate. + * + * @type {Number} + * @deprecated Use adaptiveLuminanceMaterial.adaptationRate instead. + */ + get adaptationRate(): number; + set distinction(arg: number); + /** + * @type {Number} + * @deprecated + */ + get distinction(): number; + /** + * Updates this effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. + * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. + */ + update( + renderer: WebGLRenderer, + inputBuffer: WebGLRenderTarget, + deltaTime?: number + ): void; + + /** + * Performs initialization tasks. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. + * @param {Number} frameBufferType - The type of the main frame buffers. + */ + initialize( + renderer: WebGLRenderer, + alpha: boolean, + frameBufferType: number + ): void; + +} + +/** + * An enumeration of Vignette techniques. + * + * @type {Object} + * @property {Number} DEFAULT - Produces a dusty look. + * @property {Number} ESKIL - Produces a burned look. + */ +export enum VignetteTechnique { + DEFAULT, + ESKIL +} +/** + * A Vignette effect. + */ +export class VignetteEffect extends Effect { + + /** + * Constructs a new Vignette effect. + * + * @param {Object} [options] - The options. + * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. + * @param {VignetteTechnique} [options.technique=VignetteTechnique.DEFAULT] - The Vignette technique. + * @param {Boolean} [options.eskil=false] - Deprecated. Use technique instead. + * @param {Number} [options.offset=0.5] - The Vignette offset. + * @param {Number} [options.darkness=0.5] - The Vignette darkness. + */ + constructor({ + blendFunction, + technique, + eskil, + offset, + darkness + }?: { + blendFunction?: BlendFunction; + technique?: VignetteTechnique; + eskil?: boolean; + offset?: number; + darkness?: number; + }); + + set technique(arg: VignetteTechnique); + /** + * The Vignette technique. + * + * @type {VignetteTechnique} + */ + get technique(): VignetteTechnique; + /** + * Indicates whether Eskil's Vignette technique is enabled. + * + * @type {Boolean} + * @deprecated Use technique instead. + */ + set eskil(arg: boolean); + /** + * Indicates whether Eskil's Vignette technique is enabled. + * + * @type {Boolean} + * @deprecated Use technique instead. + */ + get eskil(): boolean; + /** + * Returns the Vignette technique. + * + * @deprecated Use technique instead. + * @return {VignetteTechnique} The technique. + */ + getTechnique(): VignetteTechnique; + /** + * Sets the Vignette technique. + * + * @deprecated Use technique instead. + * @param {VignetteTechnique} value - The technique. + */ + setTechnique(value: VignetteTechnique): void; + set offset(arg: number); + /** + * The Vignette offset. + * + * @type {Number} + */ + get offset(): number; + /** + * Returns the Vignette offset. + * + * @deprecated Use offset instead. + * @return {Number} The offset. + */ + getOffset(): number; + /** + * Sets the Vignette offset. + * + * @deprecated Use offset instead. + * @param {Number} value - The offset. + */ + setOffset(value: number): void; + set darkness(arg: number); + /** + * The Vignette darkness. + * + * @type {Number} + */ + get darkness(): number; + /** + * Returns the Vignette darkness. + * + * @deprecated Use darkness instead. + * @return {Number} The darkness. + */ + getDarkness(): number; + /** + * Sets the Vignette darkness. + * + * @deprecated Use darkness instead. + * @param {Number} value - The darkness. + */ + setDarkness(value: number): void; + +} + +/** + * An enumeration of LUT worker operations. + * + * @type {Object} + * @property {String} SCALE_UP - Tetrahedral upscale operation. + */ +export enum LUTOperation { + SCALE_UP = "lut.scaleup" +} + +/** + * A tetrahedral upscaler that can be used to augment 3D LUTs. + * + * Based on an implementation by Garrett Johnson: + * https://github.com/gkjohnson/threejs-sandbox/blob/master/3d-lut/src/TetrahedralUpscaler.js + */ +export class TetrahedralUpscaler { + + /** + * Expands the given data to the target size. + * + * @param {ArrayBufferView} data - The input RGBA data. Assumed to be cubic. + * @param {Number} size - The target size. + * @return {ArrayBufferView} The new data. + */ + static expand(data: ArrayBufferView, size: number): ArrayBufferView; + +} + +/** + * SMAA area image data. + * + * This texture allows to obtain the area for a certain pattern and distances to the left and right of identified lines. + * + * Based on the official python scripts: + * https://github.com/iryoku/smaa/tree/master/Scripts + */ +export class SMAAAreaImageData { + + /** + * Creates a new area image. + * + * @return {RawImageData} The generated image data. + */ + static generate(): RawImageData; + +} + +/** + * An SMAA image generator. + * + * This class uses a worker thread to generate the search and area images. The generated data URLs will be cached using + * localStorage, if available. To disable caching use {@link SMAAImageGenerator.setCacheEnabled}. + */ +export class SMAAImageGenerator { + + /** + * Indicates whether data image caching is disabled. + * + * @type {Boolean} + * @deprecated Use setCacheEnabled() instead. + */ + disableCache: boolean; + /** + * Enables or disables caching via localStorage. + * + * @param {Boolean} value - Whether the cache should be enabled. + */ + setCacheEnabled(value: boolean): void; + /** + * Generates the SMAA data images. + * + * @example + * SMAAImageGenerator.generate().then(([search, area]) => { + * const smaaEffect = new SMAAEffect(search, area); + * }); + * @return {Promise} A promise that returns the search image and area image as a pair. + */ + generate(): Promise<(new (width?: number, height?: number) => HTMLImageElement)[]>; + +} + +/** + * SMAA search image data. + * + * This image stores information about how many pixels the line search algorithm must advance in the last step. + * + * Based on the official python scripts: + * https://github.com/iryoku/smaa/tree/master/Scripts + */ +export class SMAASearchImageData { + + /** + * Creates a new search image. + * + * @return {RawImageData} The generated image data. + */ + static generate(): RawImageData; + +} + +/** + * A 3D lookup texture (LUT). + * + * This texture can be used as-is in a WebGL 2 context. It can also be converted into a 2D texture. + */ +export class LookupTexture extends Data3DTexture { + + /** + * Creates a new 3D LUT by copying a given LUT. * - * @type {Object} - * @property {Number} RED - Red. - * @property {Number} GREEN - Green. - * @property {Number} BLUE - Blue. - * @property {Number} ALPHA - Alpha. - */ - export enum ColorChannel { - RED, - GREEN, - BLUE, - ALPHA, - } - - /** - * The Disposable contract. - * - * Implemented by objects that can free internal resources. - * - * @interface - */ - export interface Disposable { - - /** - * Frees internal resources. - */ - dispose(): void; - - } - - /** - * The initializable contract. - * - * Implemented by objects that can be initialized. - * - * @interface - */ - export interface Initializable { - - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - A renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * A Gauss kernel. - * - * Based on https://github.com/Jam3/glsl-fast-gaussian-blur. - */ - export class GaussKernel { - - /** - * Constructs a new Gauss kernel. - * - * @param kernelSize - The kernel size. Should be an odd number in the range [3, 1020]. - * @param [edgeBias=2] - Determines how many edge coefficients should be cut off for increased accuracy. - */ - constructor(kernelSize: number, edgeBias: number); - - } - /** - * An adaptive luminance shader material. - */ - export class AdaptiveLuminanceMaterial extends ShaderMaterial { - - /** - * Constructs a new adaptive luminance material. - */ - constructor(); - /** - * The primary luminance buffer that contains the downsampled average luminance. - * - * @type {Texture} - */ - set luminanceBuffer0(arg: Texture); - /** - * Sets the primary luminance buffer that contains the downsampled average luminance. - * - * @deprecated Use luminanceBuffer0 instead. - * @param {Texture} value - The buffer. - */ - setLuminanceBuffer0(value: Texture): void; - /** - * The secondary luminance buffer. - * - * @type {Texture} - */ - set luminanceBuffer1(arg: Texture); - /** - * Sets the secondary luminance buffer. - * - * @deprecated Use luminanceBuffer1 instead. - * @param {Texture} value - The buffer. - */ - setLuminanceBuffer1(value: Texture): void; - /** - * The 1x1 mipmap level. - * - * This level is used to identify the smallest mipmap of the primary luminance buffer. - * - * @type {Number} - */ - set mipLevel1x1(arg: number); - /** - * Sets the 1x1 mipmap level. - * - * @deprecated Use mipLevel1x1 instead. - * @param {Number} value - The level. - */ - setMipLevel1x1(value: number): void; - /** - * The delta time. - * - * @type {Number} - */ - set deltaTime(arg: number); - /** - * Sets the delta time. - * - * @deprecated Use deltaTime instead. - * @param {Number} value - The delta time. - */ - setDeltaTime(value: number): void; - set minLuminance(arg: number); - /** - * The lowest possible luminance value. - * - * @type {Number} - */ - get minLuminance(): number; - /** - * Returns the lowest possible luminance value. - * - * @deprecated Use minLuminance instead. - * @return {Number} The minimum luminance. - */ - getMinLuminance(): number; - /** - * Sets the minimum luminance. - * - * @deprecated Use minLuminance instead. - * @param {Number} value - The minimum luminance. - */ - setMinLuminance(value: number): void; - set adaptationRate(arg: number); - /** - * The luminance adaptation rate. - * - * @type {Number} - */ - get adaptationRate(): number; - /** - * Returns the luminance adaptation rate. - * - * @deprecated Use adaptationRate instead. - * @return {Number} The adaptation rate. - */ - getAdaptationRate(): number; - /** - * Sets the luminance adaptation rate. - * - * @deprecated Use adaptationRate instead. - * @param {Number} value - The adaptation rate. - */ - setAdaptationRate(value: number): void; - - } - - /** - * A bokeh disc blur material. - * - * This material should be applied twice in a row, with `fill` mode enabled for the second pass. Enabling the - * `foreground` option causes the shader to combine the near and far CoC values around foreground objects. - * - * @implements {Resizable} - */ - export class BokehMaterial extends ShaderMaterial implements Resizable { - - /** - * Constructs a new bokeh material. - * - * @param {Boolean} [fill=false] - Enables or disables the bokeh highlight fill mode. - * @param {Boolean} [foreground=false] - Determines whether this material will be applied to foreground colors. - */ - constructor(fill?: boolean, foreground?: boolean); - /** - * The input buffer. - * - * @type {Texture} - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The buffer. - */ - setInputBuffer(value: Texture): void; - /** - * The circle of confusion buffer. - * - * @type {Texture} - */ - set cocBuffer(arg: Texture); - /** - * Sets the circle of confusion buffer. - * - * @deprecated Use cocBuffer instead. - * @param {Texture} value - The buffer. - */ - setCoCBuffer(value: Texture): void; - set scale(arg: number); - /** - * The blur scale. - * - * @type {Number} - */ - get scale(): number; - /** - * Returns the blur scale. - * - * @deprecated Use scale instead. - * @return {Number} The scale. - */ - getScale(value: number): number; - /** - * Sets the blur scale. - * - * @deprecated Use scale instead. - * @param {Number} value - The scale. - */ - setScale(value: number): void; - /** - * Sets the texel size. - * - * @deprecated Use setSize() instead. - * @param {Number} x - The texel width. - * @param {Number} y - The texel height. - */ - setTexelSize(x: number, y: number): void; - /** - * Sets the size of this object. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * A Circle of Confusion shader material. - */ - export class CircleOfConfusionMaterial extends ShaderMaterial { - - /** - * Constructs a new CoC material. - * - * @param {Camera} camera - A camera. - */ - constructor(camera: Camera); - /** - * The depth buffer. - * - * @type {Texture} - */ - set depthBuffer(arg: Texture); - /** - * The depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - set depthPacking(arg: DepthPackingStrategies); - /** - * Sets the depth buffer. - * - * @deprecated Use depthBuffer and depthPacking instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - set focusDistance(arg: number); - /** - * The focus distance. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get focusDistance(): number; - /** - * Returns the focus distance. - * - * @deprecated Use focusDistance instead. - * @return {Number} The focus distance. - */ - getFocusDistance(value: number): number; - /** - * Sets the focus distance. - * - * @deprecated Use focusDistance instead. - * @param {Number} value - The focus distance. - */ - setFocusDistance(value: number): void; - set focalLength(arg: number); - /** - * The focal length. - * - * @deprecated Renamed to focusRange. - * @type {Number} - */ - get focalLength(): number; - /** - * Returns the focal length. - * - * @deprecated Use focusRange instead. - * @return {Number} The focal length. - */ - getFocalLength(value: number): number; - /** - * Sets the focal length. - * - * @deprecated Use focusRange instead. - * @param {Number} value - The focal length. - */ - setFocalLength(value: number): void; - /** - * Adopts the settings of the given camera. - * - * @param {Camera} camera - A camera. - */ - adoptCameraSettings(camera: Camera): void; - - /** - * The focus distance in world units. - * - * @type {Number} - */ - get worldFocusDistance(): number; - set worldFocusDistance(value: number); - - /** - * The focus range. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get focusRange(): number; - set focusRange(value: number); - - /** - * The focus range in world units. - * - * @type {Number} - */ - get worldFocusRange(): number; - set worldFocusRange(value: number); - - } - - /** - * A blur kernel size enumeration. + * Common image-based textures will be converted into 3D data textures. * - * @type {Object} - * @property {Number} VERY_SMALL - A very small kernel that matches a 7x7 Gaussian blur kernel. - * @property {Number} SMALL - A small kernel that matches a 15x15 Gaussian blur kernel. - * @property {Number} MEDIUM - A medium sized kernel that matches a 23x23 Gaussian blur kernel. - * @property {Number} LARGE - A large kernel that matches a 35x35 Gaussian blur kernel. - * @property {Number} VERY_LARGE - A very large kernel that matches a 63x63 Gaussian blur kernel. - * @property {Number} HUGE - A huge kernel that matches a 127x127 Gaussian blur kernel. - */ - export enum KernelSize { - VERY_SMALL, - SMALL, - MEDIUM, - LARGE, - VERY_LARGE, - HUGE, - } - - /** - * A simple copy shader material. - */ - export class CopyMaterial extends ShaderMaterial { - - /** - * Constructs a new copy material. - */ - constructor(); - /** - * The input buffer. - * - * @type {Texture} - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Number} value - The buffer. - */ - setInputBuffer(value: number): void; - /** - * Returns the opacity. - * - * @deprecated Use opacity instead. - * @return {Number} The opacity. - */ - getOpacity(): number; - /** - * Sets the opacity. - * - * @deprecated Use opacity instead. - * @param {Number} value - The opacity. - */ - setOpacity(value: number): void; - - } - - /** - * A depth comparison shader material. - */ - export class DepthComparisonMaterial extends ShaderMaterial { - - /** - * Constructs a new depth comparison material. - * - * @param {Texture} [depthTexture=null] - A depth texture. - * @param {PerspectiveCamera} [camera] - A camera. - */ - constructor(depthTexture?: Texture, camera?: PerspectiveCamera); - /** - * The depth buffer. - * - * @type {Texture} - */ - set depthBuffer(arg: Texture); - /** - * The depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - set depthPacking(arg: DepthPackingStrategies); - /** - * Sets the depth buffer. - * - * @deprecated Use depthBuffer and depthPacking instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=RGBADepthPacking] - The depth packing strategy. - */ - setDepthBuffer( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Adopts the settings of the given camera. - * - * @param {Camera} camera - A camera. - */ - adoptCameraSettings(camera: Camera): void; - - } - - /** - * An enumeration of depth copy modes. + * @param {Texture} texture - The LUT. Assumed to be cubic. + * @return {LookupTexture} A new 3D LUT. + */ + static from(texture: Texture): LookupTexture; + /** + * Creates a neutral 3D LUT. * - * @type {Object} - * @property {Number} FULL - Copies the full depth texture every frame. - * @property {Number} SINGLE - Copies a single texel from the depth texture on demand. - */ - export enum DepthCopyMode { - FULL, - SINGLE, - } - - /** - * A depth copy shader material. - */ - export class DepthCopyMaterial extends ShaderMaterial { - - /** - * Constructs a new depth copy material. - */ - constructor(); - /** - * The input depth buffer. - * - * @type {Texture} - */ - set depthBuffer(arg: Texture); - /** - * The input depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - set inputDepthPacking(arg: DepthPackingStrategies); - set outputDepthPacking(arg: DepthPackingStrategies); - /** - * The output depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - get outputDepthPacking(): DepthPackingStrategies; - /** - * Sets the input depth buffer. - * - * @deprecated Use depthBuffer and inputDepthPacking instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Returns the current input depth packing strategy. - * - * @deprecated - * @return {DepthPackingStrategies} The input depth packing strategy. - */ - getInputDepthPacking(): DepthPackingStrategies; - /** - * Sets the input depth packing strategy. - * - * @deprecated Use inputDepthPacking instead. - * @param {DepthPackingStrategies} value - The new input depth packing strategy. - */ - setInputDepthPacking(value: DepthPackingStrategies): void; - /** - * Returns the current output depth packing strategy. - * - * @deprecated Use outputDepthPacking instead. - * @return {DepthPackingStrategies} The output depth packing strategy. - */ - getOutputDepthPacking(): DepthPackingStrategies; - /** - * Sets the output depth packing strategy. - * - * @deprecated Use outputDepthPacking instead. - * @param {DepthPackingStrategies} value - The new output depth packing strategy. - */ - setOutputDepthPacking(value: DepthPackingStrategies): void; - /** - * The screen space position used for single-texel copy operations. - * - * @type {Vector2} - */ - get texelPosition(): Vector2; - /** - * Returns the screen space position used for single-texel copy operations. - * - * @deprecated Use texelPosition instead. - * @return {Vector2} The position. - */ - getTexelPosition(): Vector2; - /** - * Sets the screen space position used for single-texel copy operations. - * - * @deprecated - * @param {Vector2} value - The position. - */ - setTexelPosition(value: Vector2): void; - set mode(arg: DepthCopyMode); - /** - * The depth copy mode. - * - * @type {DepthCopyMode} - */ - get mode(): DepthCopyMode; - /** - * Returns the depth copy mode. - * - * @deprecated Use mode instead. - * @return {DepthCopyMode} The depth copy mode. - */ - getMode(): DepthCopyMode; - /** - * Sets the depth copy mode. - * - * @deprecated Use mode instead. - * @param {DepthCopyMode} value - The new mode. - */ - setMode(value: DepthCopyMode): void; - - } - - /** - * A depth downsampling shader material. - * - * Based on an article by Eleni Maria Stea: - * https://eleni.mutantstargoat.com/hikiko/depth-aware-upsampling-6 - * - * @implements {Resizable} - */ - export class DepthDownsamplingMaterial - extends ShaderMaterial - implements Resizable { - - /** - * Constructs a new depth downsampling material. - */ - constructor(); - /** - * The depth buffer. - * - * @type {Texture} - */ - set depthBuffer(arg: Texture); - /** - * The depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - set depthPacking(arg: DepthPackingStrategies); - /** - * Sets the depth buffer. - * - * @deprecated Use depthBuffer and depthPacking instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * The normal buffer. - * - * @type {Texture} - */ - set normalBuffer(arg: Texture); - /** - * Sets the normal buffer. - * - * @deprecated Use normalBuffer instead. - * @param {Texture} value - The normal buffer. - */ - setNormalBuffer(value: Texture): void; - /** - * Sets the texel size. - * - * @deprecated Use setSize() instead. - * @param {Number} x - The texel width. - * @param {Number} y - The texel height. - */ - setTexelSize(x: number, y: number): void; - /** - * Sets the size of this object. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * An enumeration of depth test strategies. + * @param {Number} size - The sidelength. + * @return {LookupTexture} A neutral 3D LUT. + */ + static createNeutral(size: number): LookupTexture; + /** + * Constructs a cubic 3D lookup texture. * - * @type {Object} - * @property {Number} DEFAULT - Perform depth test only. - * @property {Number} KEEP_MAX_DEPTH - Always keep max depth. - * @property {Number} DISCARD_MAX_DEPTH - Always discard max depth. - */ - export enum DepthTestStrategy { - DEFAULT, - KEEP_MAX_DEPTH, - DISCARD_MAX_DEPTH, - } - - /** - * A depth mask shader material. - * - * This material masks a color buffer by comparing two depth textures. - */ - export class DepthMaskMaterial extends ShaderMaterial { - - /** - * Constructs a new depth mask material. - */ - constructor(); - set depthMode(arg: DepthModes); - /** - * The depth mode. - * - * @see https://threejs.org/docs/#api/en/constants/Materials - * @type {DepthModes} - */ - get depthMode(): DepthModes; - /** - * The primary depth buffer. - * - * @type {Texture} - */ - set depthBuffer0(arg: Texture); - /** - * The primary depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - set depthPacking0(arg: DepthPackingStrategies); - /** - * Sets the base depth buffer. - * - * @deprecated Use depthBuffer0 and depthPacking0 instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer0( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * The secondary depth buffer. - * - * @type {Texture} - */ - set depthBuffer1(arg: Texture); - /** - * The secondary depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - set depthPacking1(arg: DepthPackingStrategies); - /** - * Sets the depth buffer that will be compared with the base depth buffer. - * - * @deprecated Use depthBuffer1 and depthPacking1 instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer1( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - set maxDepthStrategy(arg: DepthTestStrategy); - /** - * The strategy for handling maximum depth. - * - * @type {DepthTestStrategy} - */ - get maxDepthStrategy(): DepthTestStrategy; - set keepFar(arg: boolean); - /** - * Indicates whether maximum depth values should be preserved. - * - * @type {Boolean} - * @deprecated Use maxDepthStrategy instead. - */ - get keepFar(): boolean; - /** - * Returns the strategy for dealing with maximum depth values. - * - * @deprecated Use maxDepthStrategy instead. - * @return {DepthTestStrategy} The strategy. - */ - getMaxDepthStrategy(): DepthTestStrategy; - /** - * Sets the strategy for dealing with maximum depth values. - * - * @deprecated Use maxDepthStrategy instead. - * @param {DepthTestStrategy} value - The strategy. - */ - setMaxDepthStrategy(value: DepthTestStrategy): void; - set epsilon(arg: number); - /** - * A small error threshold that is used for `EqualDepth` and `NotEqualDepth` tests. Default is `1e-5`. - * - * @type {Number} - */ - get epsilon(): number; - /** - * Returns the current error threshold for depth comparisons. Default is `1e-5`. - * - * @deprecated Use epsilon instead. - * @return {Number} The error threshold. - */ - getEpsilon(): number; - /** - * Sets the depth comparison error threshold. - * - * @deprecated Use epsilon instead. - * @param {Number} value - The new error threshold. - */ - setEpsilon(value: number): void; - /** - * Returns the current depth mode. - * - * @deprecated Use depthMode instead. - * @return {DepthModes} The depth mode. Default is `LessDepth`. - */ - getDepthMode(): DepthModes; - /** - * Sets the depth mode. - * - * @deprecated Use depthMode instead. - * @param {DepthModes} mode - The depth mode. - */ - setDepthMode(mode: DepthModes): void; - - } - - /** - * An enumeration of edge detection modes. + * @param {TypedArray} data - The pixel data. The default format is RGBA. + * @param {Number} size - The sidelength. + */ + constructor(data: ArrayBufferView, size: number); + /** + * The lower bounds of the input domain. * - * @type {Object} - * @property {Number} DEPTH - Depth-based edge detection. - * @property {Number} LUMA - Luminance-based edge detection. - * @property {Number} COLOR - Chroma-based edge detection. + * @type {Vector3} */ - export enum EdgeDetectionMode { - DEPTH, - LUMA, - COLOR, - } - + domainMin: Vector3; /** - * An enumeration of predication modes. + * The upper bounds of the input domain. * - * @type {Object} - * @property {Number} DISABLED - No predicated thresholding. - * @property {Number} DEPTH - Depth-based predicated thresholding. - * @property {Number} CUSTOM - Predicated thresholding using a custom buffer. - */ - export enum PredicationMode { - DISABLED, - DEPTH, - CUSTOM, - } - /** - * An edge detection material. - * - * Mainly used for Subpixel Morphological Anti-Aliasing. - * - * @implements {Resizable} - */ - export class EdgeDetectionMaterial - extends ShaderMaterial - implements Resizable { - - /** - * Constructs a new edge detection material. - * - * TODO Remove parameters. - * @param {Vector2} [texelSize] - The screen texel size. - * @param {EdgeDetectionMode} [mode=EdgeDetectionMode.COLOR] - The edge detection mode. - */ - constructor(texelSize?: Vector2, mode?: EdgeDetectionMode); - set edgeDetectionMode(arg: EdgeDetectionMode); - /** - * The edge detection mode. - * - * @type {EdgeDetectionMode} - */ - get edgeDetectionMode(): EdgeDetectionMode; - /** - * The depth buffer. - * - * @type {Texture} - */ - set depthBuffer(arg: Texture); - /** - * The depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - set depthPacking(arg: DepthPackingStrategies); - /** - * Sets the depth buffer. - * - * @deprecated Use depthBuffer and depthPacking instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Returns the edge detection mode. - * - * @deprecated Use edgeDetectionMode instead. - * @return {EdgeDetectionMode} The mode. - */ - getEdgeDetectionMode(): EdgeDetectionMode; - /** - * Sets the edge detection mode. - * - * @deprecated Use edgeDetectionMode instead. - * @param {EdgeDetectionMode} value - The edge detection mode. - */ - setEdgeDetectionMode(value: EdgeDetectionMode): void; - set localContrastAdaptationFactor(arg: number); - /** - * The local contrast adaptation factor. Has no effect if the edge detection mode is set to DEPTH. Default is 2.0. - * - * If a neighbor edge has _factor_ times bigger contrast than the current edge, the edge will be discarded. - * - * This allows to eliminate spurious crossing edges and is based on the fact that if there is too much contrast in a - * direction, the perceptual contrast in the other neighbors will be hidden. - * - * @type {Number} - */ - get localContrastAdaptationFactor(): number; - /** - * Returns the local contrast adaptation factor. - * - * @deprecated Use localContrastAdaptationFactor instead. - * @return {Number} The factor. - */ - getLocalContrastAdaptationFactor(): number; - /** - * Sets the local contrast adaptation factor. Has no effect if the edge detection mode is set to DEPTH. - * - * @deprecated Use localContrastAdaptationFactor instead. - * @param {Number} value - The local contrast adaptation factor. Default is 2.0. - */ - setLocalContrastAdaptationFactor(value: number): void; - set edgeDetectionThreshold(arg: number); - /** - * The edge detection threshold. Range: [0.0, 0.5]. - * - * A lower value results in more edges being detected at the expense of performance. - * - * For luma- and chroma-based edge detection, 0.1 is a reasonable value and allows to catch most visible edges. 0.05 - * is a rather overkill value that allows to catch 'em all. Darker scenes may require an even lower threshold. - * - * If depth-based edge detection is used, the threshold will depend on the scene depth. - * - * @type {Number} - */ - get edgeDetectionThreshold(): number; - /** - * Returns the edge detection threshold. - * - * @deprecated Use edgeDetectionThreshold instead. - * @return {Number} The threshold. - */ - getEdgeDetectionThreshold(): number; - /** - * Sets the edge detection threshold. - * - * @deprecated Use edgeDetectionThreshold instead. - * @param {Number} value - The edge detection threshold. Range: [0.0, 0.5]. - */ - setEdgeDetectionThreshold(value: number): void; - set predicationMode(arg: PredicationMode); - /** - * The predication mode. - * - * Predicated thresholding allows to better preserve texture details and to improve edge detection using an additional - * buffer such as a light accumulation or depth buffer. - * - * @type {PredicationMode} - */ - get predicationMode(): PredicationMode; - /** - * Returns the predication mode. - * - * @deprecated Use predicationMode instead. - * @return {PredicationMode} The mode. - */ - getPredicationMode(): PredicationMode; - /** - * Sets the predication mode. - * - * @deprecated Use predicationMode instead. - * @param {PredicationMode} value - The predication mode. - */ - setPredicationMode(value: PredicationMode): void; - /** - * The predication buffer. - * - * @type {Texture} - */ - set predicationBuffer(arg: Texture); - /** - * Sets a custom predication buffer. - * - * @deprecated Use predicationBuffer instead. - * @param {Texture} value - The predication buffer. - */ - setPredicationBuffer(value: Texture): void; - set predicationThreshold(arg: number); - /** - * The predication threshold. - * - * @type {Number} - */ - get predicationThreshold(): number; - /** - * Returns the predication threshold. - * - * @deprecated Use predicationThreshold instead. - * @return {Number} The threshold. - */ - getPredicationThreshold(): number; - /** - * Sets the predication threshold. - * - * @deprecated Use predicationThreshold instead. - * @param {Number} value - The threshold. - */ - setPredicationThreshold(value: number): void; - set predicationScale(arg: number); - /** - * The predication scale. Range: [1.0, 5.0]. - * - * Determines how much the edge detection threshold should be scaled when using predication. - * - * @type {Number} - */ - get predicationScale(): number; - /** - * Returns the predication scale. - * - * @deprecated Use predicationScale instead. - * @return {Number} The scale. - */ - getPredicationScale(): number; - /** - * Sets the predication scale. - * - * @deprecated Use predicationScale instead. - * @param {Number} value - The scale. Range: [1.0, 5.0]. - */ - setPredicationScale(value: number): void; - set predicationStrength(arg: number); - /** - * The predication strength. Range: [0.0, 1.0]. - * - * Determines how much the edge detection threshold should be decreased locally when using predication. - * - * @type {Number} - */ - get predicationStrength(): number; - /** - * Returns the predication strength. - * - * @deprecated Use predicationStrength instead. - * @return {Number} The strength. - */ - getPredicationStrength(): number; - /** - * Sets the predication strength. - * - * @deprecated Use predicationStrength instead. - * @param {Number} value - The strength. Range: [0.0, 1.0]. - */ - setPredicationStrength(value: number): void; - /** - * Sets the size of this object. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - export type ColorEdgesMaterial = EdgeDetectionMaterial; - - /** - * An effect material for compound shaders. Supports dithering. - * - * @implements {Resizable} - */ - export class EffectMaterial extends ShaderMaterial implements Resizable { - - /** - * An enumeration of shader code section placeholders used by the {@link EffectPass}. - * - * @type {Object} - * @property {String} FRAGMENT_HEAD - A placeholder for function and variable declarations inside the fragment shader. - * @property {String} FRAGMENT_MAIN_UV - A placeholder for UV transformations inside the fragment shader. - * @property {String} FRAGMENT_MAIN_IMAGE - A placeholder for color calculations inside the fragment shader. - * @property {String} VERTEX_HEAD - A placeholder for function and variable declarations inside the vertex shader. - * @property {String} VERTEX_MAIN_SUPPORT - A placeholder for supporting calculations inside the vertex shader. - */ - static get Section(): { - FRAGMENT_HEAD: string; - FRAGMENT_MAIN_UV: string; - FRAGMENT_MAIN_IMAGE: string; - VERTEX_HEAD: string; - VERTEX_MAIN_SUPPORT: string; - }; - - /** - * Constructs a new effect material. - * - * @param {Map} [shaderParts] - A collection of shader snippets. See {@link Section}. - * @param {Map} [defines] - A collection of preprocessor macro definitions. - * @param {Map} [uniforms] - A collection of uniforms. - * @param {Camera} [camera] - A camera. - * @param {Boolean} [dithering=false] - Whether dithering should be enabled. - */ - constructor( - shaderParts?: Map, - defines?: Map, - uniforms?: Map, - camera?: Camera, - dithering?: boolean - ); - - /** - * The input buffer. - * - * @type {Texture} - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The input buffer. - */ - setInputBuffer(value: Texture): void; - set depthBuffer(arg: Texture); - /** - * The depth buffer. - * - * @type {Texture} - */ - get depthBuffer(): Texture; - set depthPacking(arg: DepthPackingStrategies); - /** - * The depth packing strategy. - * - * @type {DepthPackingStrategies} - */ - get depthPacking(): DepthPackingStrategies; - /** - * Sets the depth buffer. - * - * @deprecated Use depthBuffer and depthPacking instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Sets the shader parts. - * - * @param {Map} shaderParts - A collection of shader snippets. See {@link Section}. - * @return {EffectMaterial} This material. - */ - setShaderParts(shaderParts: Map): EffectMaterial; - /** - * Sets the shader macros. - * - * @param {Map} defines - A collection of preprocessor macro definitions. - * @return {EffectMaterial} This material. - */ - setDefines(defines: Map): EffectMaterial; - /** - * Sets the shader uniforms. - * - * @param {Map} uniforms - A collection of uniforms. - * @return {EffectMaterial} This material. - */ - setUniforms(uniforms: Map): EffectMaterial; - /** - * Sets the required shader extensions. - * - * @param {Set} extensions - A collection of extensions. - * @return {EffectMaterial} This material. - */ - setExtensions(extensions: Set): EffectMaterial; - set encodeOutput(arg: boolean); - /** - * Indicates whether output encoding is enabled. - * - * @type {Boolean} - */ - get encodeOutput(): boolean; - /** - * Indicates whether output encoding is enabled. - * - * @deprecated Use encodeOutput instead. - * @return {Boolean} Whether output encoding is enabled. - */ - isOutputEncodingEnabled(): boolean; - /** - * Enables or disables output encoding. - * - * @deprecated Use encodeOutput instead. - * @param {Boolean} value - Whether output encoding should be enabled. - */ - setOutputEncodingEnabled(value: boolean): void; - set time(arg: number); - /** - * The time in seconds. - * - * @type {Number} - */ - get time(): number; - /** - * Sets the delta time. - * - * @deprecated Use time instead. - * @param {Number} value - The delta time in seconds. - */ - setDeltaTime(value: number): void; - /** - * Adopts the settings of the given camera. - * - * @param {Camera} camera - A camera. - */ - adoptCameraSettings(camera: Camera): void; - /** - * Sets the resolution. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * An enumeration of shader code placeholders used by the {@link EffectPass}. - * @property FRAGMENT_HEAD - A placeholder for function and variable declarations inside the fragment shader. - * @property FRAGMENT_MAIN_UV - A placeholder for UV transformations inside the fragment shader. - * @property FRAGMENT_MAIN_IMAGE - A placeholder for color calculations inside the fragment shader. - * @property VERTEX_HEAD - A placeholder for function and variable declarations inside the vertex shader. - * @property VERTEX_MAIN_SUPPORT - A placeholder for supporting calculations inside the vertex shader. - * @deprecated Use EffectMaterial.Section instead. - */ - export const Section: { - FRAGMENT_HEAD: string; - FRAGMENT_MAIN_UV: string; - FRAGMENT_MAIN_IMAGE: string; - VERTEX_HEAD: string; - VERTEX_MAIN_SUPPORT: string; - }; - + * @type {Vector3} + */ + domainMax: Vector3; /** - * A crepuscular rays shader material. - * - * References: - * - * Thibaut Despoulain, 2012: - * [(WebGL) Volumetric Light Approximation in Three.js]( - * http://bkcore.com/blog/3d/webgl-three-js-volumetric-light-godrays.html) - * - * Nvidia, GPU Gems 3, 2008: - * [Chapter 13. Volumetric Light Scattering as a Post-Process]( - * https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch13.html) - * - * @todo Remove dithering code from fragment shader. - */ - export class GodRaysMaterial extends ShaderMaterial { - - /** - * Constructs a new god rays material. - * - * TODO Remove lightPosition param. - * @param {Vector2} lightPosition - Deprecated. - */ - constructor(lightPosition: Vector2); - /** - * The input buffer. - * - * @type {Texture} - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The input buffer. - */ - setInputBuffer(value: Texture): void; - /** - * The screen space position of the light source. - * - * @type {Vector2} - */ - get lightPosition(): Vector2; - /** - * Returns the screen space position of the light source. - * - * @deprecated Use lightPosition instead. - * @return {Vector2} The position. - */ - getLightPosition(): Vector2; - /** - * Sets the screen space position of the light source. - * - * @deprecated Use lightPosition instead. - * @param {Vector2} value - The position. - */ - setLightPosition(value: Vector2): void; - set density(arg: number); - /** - * The density. - * - * @type {Number} - */ - get density(): number; - /** - * Returns the density. - * - * @deprecated Use density instead. - * @return {Number} The density. - */ - getDensity(): number; - /** - * Sets the density. - * - * @deprecated Use density instead. - * @param {Number} value - The density. - */ - setDensity(value: number): void; - set decay(arg: number); - /** - * The decay. - * - * @type {Number} - */ - get decay(): number; - /** - * Returns the decay. - * - * @deprecated Use decay instead. - * @return {Number} The decay. - */ - getDecay(): number; - /** - * Sets the decay. - * - * @deprecated Use decay instead. - * @param {Number} value - The decay. - */ - setDecay(value: number): void; - set weight(arg: number); - /** - * The weight. - * - * @type {Number} - */ - get weight(): number; - /** - * Returns the weight. - * - * @deprecated Use weight instead. - * @return {Number} The weight. - */ - getWeight(): number; - /** - * Sets the weight. - * - * @deprecated Use weight instead. - * @param {Number} value - The weight. - */ - setWeight(value: number): void; - set exposure(arg: number); - /** - * The exposure. - * - * @type {Number} - */ - get exposure(): number; - /** - * Returns the exposure. - * - * @deprecated Use exposure instead. - * @return {Number} The exposure. - */ - getExposure(): number; - /** - * Sets the exposure. - * - * @deprecated Use exposure instead. - * @param {Number} value - The exposure. - */ - setExposure(value: number): void; - set maxIntensity(arg: number); - /** - * The maximum light intensity. - * - * @type {Number} - */ - get maxIntensity(): number; - /** - * Returns the maximum light intensity. - * - * @deprecated Use maxIntensity instead. - * @return {Number} The maximum light intensity. - */ - getMaxIntensity(): number; - /** - * Sets the maximum light intensity. - * - * @deprecated Use maxIntensity instead. - * @param {Number} value - The maximum light intensity. - */ - setMaxIntensity(value: number): void; - set samples(arg: number); - /** - * The amount of samples per pixel. - * - * @type {Number} - */ - get samples(): number; - /** - * Returns the amount of samples per pixel. - * - * @deprecated Use samples instead. - * @return {Number} The sample count. - */ - getSamples(): number; - /** - * Sets the amount of samples per pixel. - * - * @deprecated Use samples instead. - * @param {Number} value - The sample count. - */ - setSamples(value: number): void; - - } - - /** - * A box blur material. - * - * @implements {Resizable} - */ - - export class BoxBlurMaterial extends ShaderMaterial {} - - /** - * A box blur pass. - */ - - export class BoxBlurPass extends Pass { - - /** - * Constructs a new box blur pass. - * - * @param {Object} [options] - The options. - * @param {Number} [options.kernelSize=5] - The kernel size. - * @param {Number} [options.iterations=1] - The amount of times the blur should be applied. - * @param {Number} [options.bilateral=false] - Enables or disables bilateral blurring. - * @param {Number} [options.resolutionScale=1.0] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - */ - - constructor( - { - kernelSize, - iterations, - bilateral, - resolutionScale, - resolutionX, - resolutionY - }?: { - kernelSize?: number; - iterations?: number; - bilateral?: boolean; - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - } - ); - - } - - /** - * An optimized Gaussian convolution shader material. - * - * References: - * - * Filip Strugar, Intel, 2014: [An investigation of fast real-time GPU-based image blur algorithms]( - * https://www.intel.com/content/www/us/en/developer/articles/technical/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms.html) - * - * @implements {Resizable} - */ - - export class GaussianBlurMaterial extends ShaderMaterial { - - /** - * Constructs a new convolution material. - * - * @param {Object} [options] - The options. - * @param {Number} [options.kernelSize=35] - The kernel size. - */ - constructor( - { - kernelSize - }?: { - kernelSize?: number; - } - ); - - } - - /** - * A Gaussian blur pass. - */ - - export class GaussianBlurPass extends Pass { - - /** - * Constructs a new Gaussian blur pass. - * - * @param {Object} [options] - The options. - * @param {Number} [options.kernelSize=35] - The kernel size. Should be an odd number in the range [3, 1020]. - * @param {Number} [options.iterations=1] - The amount of times the blur should be applied. - * @param {Number} [options.resolutionScale=1.0] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - */ - - constructor( - { - kernelSize, - iterations, - resolutionScale, - resolutionX, - resolutionY - }?: { - kernelSize?: number; - iterations?: number; - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - } - ); - - } - - /** - * An optimised convolution shader material. - * - * Based on the GDC2003 Presentation by Masaki Kawase, Bunkasha Games: - * Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless) - * and an article by Filip Strugar, Intel: - * An investigation of fast real-time GPU-based image blur algorithms - * - * Further modified according to Apple's [Best Practices for Shaders](https://goo.gl/lmRoM5). - * - * @todo Remove dithering code from fragment shader. - * @implements {Resizable} - */ - export class KawaseBlurMaterial extends ShaderMaterial implements Resizable { - - /** - * Constructs a new convolution material. - * - * TODO Remove texelSize param. - * @param {Vector2} [texelSize] - Deprecated. - */ - constructor(texelSize?: Vector2); - /** - * The input buffer. - * - * @type {Texture} - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The input buffer. - */ - setInputBuffer(value: Texture): void; - set scale(arg: number); - /** - * The blur scale. - * - * @type {Number} - */ - get scale(): number; - /** - * Returns the blur scale. - * - * @deprecated Use scale instead. - * @return {Number} The scale. - */ - getScale(): number; - /** - * Sets the blur scale. - * - * @deprecated Use scale instead. - * @param {Number} value - The scale. - */ - setScale(value: number): void; - /** - * Returns the kernel. - * - * @return {Float32Array} The kernel. - * @deprecated Implementation detail, removed with no replacement. - */ - getKernel(): Float32Array; - set kernel(arg: number); - /** - * The current kernel. - * - * @type {Number} - */ - get kernel(): number; - /** - * Sets the current kernel. - * - * @deprecated Use kernel instead. - * @param {Number} value - The kernel. - */ - setKernel(value: number): void; - /** - * Sets the texel size. - * - * @deprecated Use setSize() instead. - * @param {Number} x - The texel width. - * @param {Number} y - The texel height. - */ - setTexelSize(x: number, y: number): void; - /** - * Sets the size of this object. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - export type ConvolutionMaterial = KawaseBlurMaterial; - - /** - * A luminance shader material. - * - * This shader produces a greyscale luminance map that describes the absolute amount of light emitted by a scene. It can - * also be configured to output colors that are scaled with their respective luminance value. Additionally, a range may - * be provided to mask out undesired texels. - * - * The alpha channel always contains the luminance value. - * - * On luminance coefficients: - * http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9 - * - * Coefficients for different color spaces: - * https://hsto.org/getpro/habr/post_images/2ab/69d/084/2ab69d084f9a597e032624bcd74d57a7.png - * - * Luminance range reference: - * https://cycling74.com/2007/05/23/your-first-shader/#.Vty9FfkrL4Z - */ - export class LuminanceMaterial extends ShaderMaterial { - - /** - * Constructs a new luminance material. - * - * @param {Boolean} [colorOutput=false] - Defines whether the shader should output colors scaled with their luminance value. - * @param {Vector2} [luminanceRange] - If provided, the shader will mask out texels that aren't in the specified luminance range. - */ - constructor(colorOutput?: boolean, luminanceRange?: Vector2); - set colorOutput(arg: boolean); - /** - * Indicates whether color output is enabled. - * - * @type {Boolean} - */ - get colorOutput(): boolean; - set luminanceRange(arg: boolean); - /** - * The luminance range. Set to null to disable. - * - * @type {Boolean} - */ - get luminanceRange(): boolean; - /** - * The input buffer. - * - * @type {Texture} - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The input buffer. - */ - setInputBuffer(value: Texture): void; - set threshold(arg: number); - /** - * The luminance threshold. - * - * @type {Number} - */ - get threshold(): number; - /** - * Returns the luminance threshold. - * - * @deprecated Use threshold instead. - * @return {Number} The threshold. - */ - getThreshold(): number; - /** - * Sets the luminance threshold. - * - * @deprecated Use threshold instead. - * @param {Number} value - The threshold. - */ - setThreshold(value: number): void; - set smoothing(arg: number); - /** - * The luminance threshold smoothing. - * - * @type {Number} - */ - get smoothing(): number; - /** - * Returns the luminance threshold smoothing factor. - * - * @deprecated Use smoothing instead. - * @return {Number} The smoothing factor. - */ - getSmoothingFactor(): number; - /** - * Sets the luminance threshold smoothing factor. - * - * @deprecated Use smoothing instead. - * @param {Number} value - The smoothing factor. - */ - setSmoothingFactor(value: number): void; - set useThreshold(arg: boolean); - /** - * Indicates whether the luminance threshold is enabled. - * - * @type {Boolean} - * @deprecated Adjust the threshold or smoothing factor instead. - */ - get useThreshold(): boolean; - /** - * Indicates whether color output is enabled. - * - * @deprecated Use colorOutput instead. - * @return {Boolean} Whether color output is enabled. - */ - isColorOutputEnabled(): boolean; - /** - * Enables or disables color output. - * - * @deprecated Use colorOutput instead. - * @param {Boolean} value - Whether color output should be enabled. - */ - setColorOutputEnabled(value: boolean): void; - set useRange(arg: boolean); - /** - * Indicates whether luminance masking is enabled. - * - * @type {Boolean} - * @deprecated - */ - get useRange(): boolean; - /** - * Returns the current luminance range. - * - * @deprecated Use luminanceRange instead. - * @return {Vector2} The luminance range. - */ - getLuminanceRange(): Vector2; - /** - * Sets a luminance range. Set to null to disable. - * - * @deprecated Use luminanceRange instead. - * @param {Vector2} value - The luminance range. - */ - setLuminanceRange(value: Vector2): void; - - } - - /** - * A mask function enumeration. + * Indicates that this is an instance of LookupTexture3D. * - * @type {Object} - * @property {Number} DISCARD - Discards elements when the respective mask value is zero. - * @property {Number} MULTIPLY - Multiplies the input buffer with the mask texture. - * @property {Number} MULTIPLY_RGB_SET_ALPHA - Multiplies the input RGB values with the mask and sets alpha to the mask value. - * @property {Number} MULTIPLY_RGB - Multiplies the input RGB values with the mask and keeps the original alpha. - */ - export enum MaskFunction { - DISCARD, - MULTIPLY, - MULTIPLY_RGB_SET_ALPHA, - MULTIPLY_RGB - } - - /** - * A mask shader material. - * - * This material applies a mask texture to a buffer. - */ - export class MaskMaterial extends ShaderMaterial { - - /** - * Constructs a new mask material. - * - * @param {Texture} [maskTexture] - The mask texture. - */ - constructor(maskTexture?: Texture); - /** - * The input buffer. - * - * @type {Texture} - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The input buffer. - */ - setInputBuffer(value: Texture): void; - /** - * The mask texture. - * - * @type {Texture} - */ - set maskTexture(arg: Texture); - /** - * Sets the mask texture. - * - * @deprecated Use maskTexture instead. - * @param {Texture} value - The texture. - */ - setMaskTexture(value: Texture): void; - /** - * Sets the color channel to use for masking. Default is `ColorChannel.RED`. - * - * @type {ColorChannel} - */ - set colorChannel(arg: ColorChannel); - /** - * Sets the color channel to use for masking. Default is `ColorChannel.RED`. - * - * @deprecated Use colorChannel instead. - * @param {ColorChannel} value - The channel. - */ - setColorChannel(value: ColorChannel): void; - /** - * The masking technique. Default is `MaskFunction.DISCARD`. - * - * @type {MaskFunction} - */ - set maskFunction(arg: MaskFunction); - /** - * Sets the masking technique. Default is `MaskFunction.DISCARD`. - * - * @deprecated Use maskFunction instead. - * @param {MaskFunction} value - The function. - */ - setMaskFunction(value: MaskFunction): void; - set inverted(arg: boolean); - /** - * Indicates whether the masking is inverted. - * - * @type {Boolean} - */ - get inverted(): boolean; - /** - * Indicates whether the masking is inverted. - * - * @deprecated Use inverted instead. - * @return {Boolean} Whether the masking is inverted. - */ - isInverted(): boolean; - /** - * Determines whether the masking should be inverted. - * - * @deprecated Use inverted instead. - * @param {Boolean} value - Whether the masking should be inverted. - */ - setInverted(value: boolean): void; - set strength(arg: number); - /** - * The current mask strength. - * - * Individual mask values will be clamped to [0.0, 1.0]. Has no effect when the mask function is set to `DISCARD`. - * - * @type {Number} - */ - get strength(): number; - /** - * Returns the current mask strength. - * - * @deprecated Use strength instead. - * @return {Number} The mask strength. - */ - getStrength(): number; - /** - * Sets the mask strength. - * - * Has no effect when the mask function is set to `DISCARD`. - * - * @deprecated Use strength instead. - * @param {Number} value - The mask strength. - */ - setStrength(value: number): void; - - } - - /** - * An outline shader material. - * - * @implements {Resizable} - */ - export class OutlineMaterial extends ShaderMaterial implements Resizable { - - /** - * Constructs a new outline material. - * - * TODO Remove texelSize param. - * @param {Vector2} [texelSize] - The screen texel size. - */ - constructor(texelSize?: Vector2); - /** - * The input buffer. - * - * @param {Texture} arg - The input buffer. - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The input buffer. - */ - setInputBuffer(value: Texture): void; - /** - * Sets the texel size. - * - * @deprecated Use setSize() instead. - * @param {Number} x - The texel width. - * @param {Number} y - The texel height. - */ - setTexelSize(x: number, y: number): void; - /** - * Sets the size of this object. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * An outline shader material. - */ - export type OutlineEdgesMaterial = OutlineMaterial; - - /** - * Subpixel Morphological Antialiasing. - * - * This material computes weights for detected edges. - * - * @implements {Resizable} - */ - export class SMAAWeightsMaterial extends ShaderMaterial implements Resizable { - - /** - * Constructs a new SMAA weights material. - * - * @param {Vector2} [texelSize] - The absolute screen texel size. - * @param {Vector2} [resolution] - The resolution. - */ - constructor(texelSize?: Vector2, resolution?: Vector2); - /** - * The input buffer. - * - * @param {Texture} arg - The input buffer. - */ - set inputBuffer(arg: Texture); - /** - * Sets the input buffer. - * - * @deprecated Use inputBuffer instead. - * @param {Texture} value - The input buffer. - */ - setInputBuffer(value: Texture): void; - set searchTexture(arg: Texture); - /** - * The search lookup texture. - * - * @type {Texture} - */ - get searchTexture(): Texture; - set areaTexture(arg: Texture); - /** - * The area lookup texture. - * - * @type {Texture} - */ - get areaTexture(): Texture; - /** - * Sets the search and area lookup textures. - * - * @deprecated Use searchTexture and areaTexture instead. - * @param {Texture} search - The search lookup texture. - * @param {Texture} area - The area lookup texture. - */ - setLookupTextures(search: Texture, area: Texture): void; - set orthogonalSearchSteps(arg: number); - /** - * The maximum amount of steps performed in the horizontal/vertical pattern searches, at each side of the pixel. - * Range: [0, 112]. - * - * In number of pixels, it's actually the double. So the maximum line length perfectly handled by, for example 16, is - * 64 (perfectly means that longer lines won't look as good, but are still antialiased). - * - * @type {Number} - */ - get orthogonalSearchSteps(): number; - /** - * Sets the maximum amount of steps performed in the horizontal/vertical pattern searches, at each side of the pixel. - * - * @deprecated Use orthogonalSearchSteps instead. - * @param {Number} value - The search steps. Range: [0, 112]. - */ - setOrthogonalSearchSteps(value: number): void; - set diagonalSearchSteps(arg: number); - /** - * The maximum steps performed in the diagonal pattern searches, at each side of the pixel. This search - * jumps one pixel at a time. Range: [0, 20]. - * - * On high-end machines this search is cheap (between 0.8x and 0.9x slower for 16 steps), but it can have a - * significant impact on older machines. - * - * @type {Number} - */ - get diagonalSearchSteps(): number; - /** - * Specifies the maximum steps performed in the diagonal pattern searches, at each side of the pixel. - * - * @deprecated Use diagonalSearchSteps instead. - * @param {Number} value - The search steps. Range: [0, 20]. - */ - setDiagonalSearchSteps(value: number): void; - set diagonalDetection(arg: boolean); - /** - * Indicates whether diagonal pattern detection is enabled. - * - * @type {Boolean} - */ - get diagonalDetection(): boolean; - /** - * Indicates whether diagonal pattern detection is enabled. - * - * @deprecated Use diagonalDetection instead. - * @return {Boolean} Whether diagonal pattern detection is enabled. - */ - isDiagonalDetectionEnabled(): boolean; - /** - * Enables or disables diagonal pattern detection. - * - * @deprecated Use diagonalDetection instead. - * @param {Boolean} value - Whether diagonal pattern detection should be enabled. - */ - setDiagonalDetectionEnabled(value: boolean): void; - set cornerRounding(arg: number); - /** - * Specifies how much sharp corners will be rounded. Range: [0, 100]. - * - * @type {Number} - */ - get cornerRounding(): number; - /** - * Specifies how much sharp corners will be rounded. - * - * @deprecated Use cornerRounding instead. - * @param {Number} value - The corner rounding amount. Range: [0, 100]. - */ - setCornerRounding(value: number): void; - set cornerDetection(arg: number); - /** - * Indicates whether corner detection is enabled. - * - * @type {Number} - */ - get cornerDetection(): number; - /** - * Indicates whether corner rounding is enabled. - * - * @deprecated Use cornerDetection instead. - * @return {Boolean} Whether corner rounding is enabled. - */ - isCornerRoundingEnabled(): boolean; - /** - * Enables or disables corner rounding. - * - * @deprecated Use cornerDetection instead. - * @param {Boolean} value - Whether corner rounding should be enabled. - */ - setCornerRoundingEnabled(value: boolean): void; - /** - * Sets the size of this object. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * A Screen Space Ambient Occlusion (SSAO) shader material. - * - * @implements {Resizable} - */ - export class SSAOMaterial extends ShaderMaterial implements Resizable { - - /** - * Constructs a new SSAO material. - * - * @param {Camera} camera - A camera. - */ - constructor(camera: Camera); - /** - * The combined normal-depth buffer. - * - * @param {Texture} arg - The buffer. - */ - set normalDepthBuffer(arg: Texture); - /** - * Sets the combined normal-depth buffer. - * - * @deprecated Use normalDepthBuffer instead. - * @param {Texture} value - The buffer. - */ - setNormalDepthBuffer(value: Texture): void; - /** - * The normal buffer. - * - * @param {Texture} arg - The buffer. - */ - set normalBuffer(arg: Texture); - /** - * Sets the normal buffer. - * - * @deprecated Use normalBuffer instead. - * @param {Texture} value - The buffer. - */ - setNormalBuffer(value: Texture): void; - /** - * The depth buffer. - * - * @param {Texture} arg - The buffer. - */ - set depthBuffer(arg: Texture); - /** - * The depth packing strategy. - * - * @param {DepthPackingStrategies} arg - The depth packing strategy. - */ - set depthPacking(arg: DepthPackingStrategies); - /** - * Sets the depth buffer. - * - * @deprecated Use depthBuffer and depthPacking instead. - * @param {Texture} buffer - The depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing strategy. - */ - setDepthBuffer( - buffer: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * The noise texture. - * - * @param {Texture} arg - The texture. - */ - set noiseTexture(arg: Texture); - /** - * Sets the noise texture. - * - * @deprecated Use noiseTexture instead. - * @param {Texture} value - The texture. - */ - setNoiseTexture(value: Texture): void; - set samples(arg: number); - /** - * The sample count. - * - * @type {Number} - */ - get samples(): number; - /** - * Returns the amount of occlusion samples per pixel. - * - * @deprecated Use samples instead. - * @return {Number} The sample count. - */ - getSamples(): number; - /** - * Sets the amount of occlusion samples per pixel. - * - * @deprecated Use samples instead. - * @param {Number} value - The sample count. - */ - setSamples(value: number): void; - set rings(arg: number); - /** - * The sampling spiral ring count. - * - * @type {Number} - */ - get rings(): number; - /** - * Returns the amount of spiral turns in the occlusion sampling pattern. - * - * @deprecated Use rings instead. - * @return {Number} The radius. - */ - getRings(): number; - /** - * Sets the amount of spiral turns in the occlusion sampling pattern. - * - * @deprecated Use rings instead. - * @param {Number} value - The radius. - */ - setRings(value: number): void; - /** - * The intensity. - * - * @type {Number} - * @deprecated Use SSAOEffect.intensity instead. - */ - get intensity(): number; - set intensity(arg: number); - /** - * Returns the intensity. - * - * @deprecated Use intensity instead. - * @return {Number} The intensity. - */ - getIntensity(): number; - /** - * Sets the intensity. - * - * @deprecated Use intensity instead. - * @param {Number} value - The intensity. - */ - setIntensity(value: number): void; - set fade(arg: number); - /** - * The depth fade factor. - * - * @type {Number} - */ - get fade(): number; - /** - * Returns the depth fade factor. - * - * @deprecated Use fade instead. - * @return {Number} The fade factor. - */ - getFade(): number; - /** - * Sets the depth fade factor. - * - * @deprecated Use fade instead. - * @param {Number} value - The fade factor. - */ - setFade(value: number): void; - set bias(arg: number); - /** - * The depth bias. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get bias(): number; - /** - * Returns the depth bias. - * - * @deprecated Use bias instead. - * @return {Number} The bias. - */ - getBias(): number; - /** - * Sets the depth bias. - * - * @deprecated Use bias instead. - * @param {Number} value - The bias. - */ - setBias(value: number): void; - set minRadiusScale(arg: number); - /** - * The minimum radius scale for distance scaling. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get minRadiusScale(): number; - /** - * Returns the minimum radius scale for distance scaling. - * - * @deprecated Use minRadiusScale instead. - * @return {Number} The minimum radius scale. - */ - getMinRadiusScale(): number; - /** - * Sets the minimum radius scale for distance scaling. - * - * @deprecated Use minRadiusScale instead. - * @param {Number} value - The minimum radius scale. - */ - setMinRadiusScale(value: number): void; - set radius(arg: number); - /** - * The occlusion sampling radius. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get radius(): number; - /** - * Returns the occlusion sampling radius. - * - * @deprecated Use radius instead. - * @return {Number} The radius. - */ - getRadius(): number; - /** - * Sets the occlusion sampling radius. - * - * @deprecated Use radius instead. - * @param {Number} value - The radius. Range [1e-6, 1.0]. - */ - setRadius(value: number): void; - set distanceScaling(arg: boolean); - /** - * Indicates whether distance-based radius scaling is enabled. - * - * @type {Boolean} - */ - get distanceScaling(): boolean; - /** - * Indicates whether distance-based radius scaling is enabled. - * - * @deprecated Use distanceScaling instead. - * @return {Boolean} Whether distance scaling is enabled. - */ - isDistanceScalingEnabled(): boolean; - /** - * Enables or disables distance-based radius scaling. - * - * @deprecated Use distanceScaling instead. - * @param {Boolean} value - Whether distance scaling should be enabled. - */ - setDistanceScalingEnabled(value: boolean): void; - set distanceThreshold(arg: number); - /** - * The occlusion distance threshold. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get distanceThreshold(): number; - - /** - * The occlusion distance falloff. - * The occlusion distance threshold in world units. - * - * @type {Number} - */ - - get worldDistanceThreshold(): number; - set worldDistanceThreshold(value: number); - - set distanceFalloff(arg: number); - /** - * The occlusion distance falloff. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get distanceFalloff(): number; - - /** - * The occlusion distance falloff in world units. - * - * @type {Number} - */ - - get worldDistanceFalloff(): number; - set worldDistanceFalloff(value: number); - - /** - * Sets the occlusion distance cutoff. - * - * @deprecated Use distanceThreshold and distanceFalloff instead. - * @param {Number} threshold - The distance threshold. Range [0.0, 1.0]. - * @param {Number} falloff - The falloff. Range [0.0, 1.0]. - */ - setDistanceCutoff(threshold: number, falloff: number): void; - set proximityThreshold(arg: number); - /** - * The occlusion proximity threshold. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get proximityThreshold(): number; - /** - * The occlusion proximity threshold in world units. - * - * @type {Number} - */ - get worldProximityThreshold(): number; - set worldProximityThreshold(value: number); - - set proximityFalloff(arg: number); - /** - * The occlusion proximity falloff. Range: [0.0, 1.0]. - * - * @type {Number} - */ - get proximityFalloff(): number; - - /** - * The occlusion proximity falloff in world units. - * - * @type {Number} - */ - - get worldProximityFalloff(): number; - set worldProximityFalloff(value: number); - - /** - * Sets the occlusion proximity cutoff. - * - * @deprecated Use proximityThreshold and proximityFalloff instead. - * @param {Number} threshold - The range threshold. Range [0.0, 1.0]. - * @param {Number} falloff - The falloff. Range [0.0, 1.0]. - */ - setProximityCutoff(threshold: number, falloff: number): void; - /** - * Sets the texel size. - * - * @deprecated Use setSize() instead. - * @param {Number} x - The texel width. - * @param {Number} y - The texel height. - */ - setTexelSize(x: number, y: number): void; - /** - * Adopts the settings of the given camera. - * - * @param {Camera} camera - A camera. - */ - adoptCameraSettings(camera: Camera): void; - /** - * Sets the size of this object. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * A resolution. - */ - export class Resolution extends EventDispatcher { - - /** - * An auto sizing constant. - * - * Can be used to automatically calculate the width or height based on the original aspect ratio. - * - * @type {Number} - */ - static get AUTO_SIZE(): number; - /** - * Constructs a new resolution. - * - * TODO Remove resizable param. - * @param {Resizable} resizable - A resizable object. - * @param {Number} [width=Resolution.AUTO_SIZE] - The preferred width. - * @param {Number} [height=Resolution.AUTO_SIZE] - The preferred height. - * @param {Number} [scale=1.0] - A resolution scale. - */ - constructor( - resizable: Resizable, - width?: number, - height?: number, - scale?: number - ); - - /** - * A resizable object. - * - * @type {Resizable} - * @deprecated Use an event listener for "change" events instead. - */ - resizable: Resizable; - /** - * The preferred resolution. - * - * @type {Vector2} - * @deprecated Added for backward-compatibility. - */ - target: Vector2; - set width(arg: number); - /** - * The effective width. - * - * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base width will be returned. - * - * @type {Number} - */ - get width(): number; - set preferredWidth(arg: number); - /** - * The preferred width. - * - * @type {Number} - */ - get preferredWidth(): number; - set height(arg: number); - /** - * The effective height. - * - * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base height will be returned. - * - * @type {Number} - */ - get height(): number; - set preferredHeight(arg: number); - /** - * The preferred height. - * - * @type {Number} - */ - get preferredHeight(): number; - /** - * Returns the effective width. - * - * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base width will be returned. - * - * @deprecated Use width instead. - * @return {Number} The effective width. - */ - getWidth(): number; - /** - * Returns the effective height. - * - * If the preferred width and height are set to {@link Resizer.AUTO_SIZE}, the base height will be returned. - * - * @deprecated Use height instead. - * @return {Number} The effective height. - */ - getHeight(): number; - set scale(arg: number); - /** - * The resolution scale. - * - * @type {Number} - */ - get scale(): number; - /** - * Returns the current resolution scale. - * - * @deprecated Use scale instead. - * @return {Number} The scale. - */ - getScale(): number; - /** - * Sets the resolution scale. - * - * Also sets the preferred resolution to {@link Resizer.AUTO_SIZE}. - * - * @deprecated Use scale instead. - * @param {Number} value - The scale. - */ - setScale(value: number): void; - set baseWidth(arg: number); - /** - * The base width. - * - * @type {Number} - */ - get baseWidth(): number; - /** - * Returns the base width. - * - * @deprecated Use baseWidth instead. - * @return {Number} The base width. - */ - getBaseWidth(): number; - /** - * Sets the base width. - * - * @deprecated Use baseWidth instead. - * @param {Number} value - The width. - */ - setBaseWidth(value: number): void; - set baseHeight(arg: number); - /** - * The base height. - * - * @type {Number} - */ - get baseHeight(): number; - /** - * Returns the base height. - * - * @deprecated Use baseHeight instead. - * @return {Number} The base height. - */ - getBaseHeight(): number; - /** - * Sets the base height. - * - * @deprecated Use baseHeight instead. - * @param {Number} value - The height. - */ - setBaseHeight(value: number): void; - /** - * Sets the base size. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setBaseSize(width: number, height: number): void; - /** - * Returns the preferred width. - * - * @deprecated Use preferredWidth instead. - * @return {Number} The preferred width. - */ - getPreferredWidth(): number; - /** - * Sets the preferred width. - * - * Use {@link Resizer.AUTO_SIZE} to automatically calculate the width based on the height and aspect ratio. - * - * @deprecated Use preferredWidth instead. - * @param {Number} value - The width. - */ - setPreferredWidth(value: number): void; - /** - * Returns the preferred height. - * - * @deprecated Use preferredHeight instead. - * @return {Number} The preferred height. - */ - getPreferredHeight(): number; - /** - * Sets the preferred height. - * - * Use {@link Resizer.AUTO_SIZE} to automatically calculate the height based on the width and aspect ratio. - * - * @deprecated Use preferredHeight instead. - * @param {Number} value - The height. - */ - setPreferredHeight(value: number): void; - /** - * Sets the preferred size. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setPreferredSize(width: number, height: number): void; - /** - * Copies the given resolution. - * - * @param {Resolution} resolution - The resolution. - */ - copy(resolution: Resolution): void; - - } - - export type Resizer = Resolution; - - /** - * An abstract pass. - * - * Fullscreen passes use a shared fullscreen triangle: - * https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/ - * - * @implements {Initializable} - * @implements {Resizable} - * @implements {Disposable} - */ - export class Pass implements Initializable, Resizable, Disposable { - - /** - * Constructs a new pass. - * - * @param {String} [name] - The name of this pass. Does not have to be unique. - * @param {Scene} [scene] - The scene to render. The default scene contains a single mesh that fills the screen. - * @param {Camera} [camera] - A camera. Fullscreen effect passes don't require a camera. - */ - constructor(name?: string, scene?: Scene, camera?: Camera); - /** - * The name of this pass. - * - * @type {String} - */ - name: string; - /** - * The renderer. - * - * @deprecated - * @type {WebGLRenderer} - * @protected - */ - protected renderer: WebGLRenderer; - /** - * The scene to render. - * - * @type {Scene} - * @protected - */ - protected scene: Scene; - /** - * The camera. - * - * @type {Camera} - * @protected - */ - protected camera: Camera; - /** - * Only relevant for subclassing. - * - * Indicates whether the {@link EffectComposer} should swap the frame buffers after this pass has finished - * rendering. Set this to `false` if this pass doesn't render to the output buffer or the screen. Otherwise, the - * contents of the input buffer will be lost. - * - * @type {Boolean} - */ - needsSwap: boolean; - /** - * Only relevant for subclassing. - * - * Indicates whether the {@link EffectComposer} should prepare a depth texture for this pass. - * Set this to `true` if this pass relies on depth information from a preceding {@link RenderPass}. - * - * @type {Boolean} - */ - needsDepthTexture: boolean; - /** - * Indicates whether this pass is enabled. - * - * @type {Boolean} - */ - enabled: boolean; - /** - * Sets the render to screen flag. - * - * If this flag is changed, the fullscreen material will be updated as well. - * - * @type {Boolean} - */ - set renderToScreen(arg: boolean); - /** - * Indicates whether this pass should render to screen. - * - * @type {Boolean} - */ - get renderToScreen(): boolean; - /** - * Sets the main scene. - * - * @type {Scene} - */ - set mainScene(arg: Scene); - /** - * Sets the main camera. - * - * @type {Camera} - */ - set mainCamera(arg: Camera); - /** - * Sets the renderer - * - * @deprecated - * @param {WebGLRenderer} renderer - The renderer. - */ - setRenderer(renderer: WebGLRenderer): void; - /** - * Indicates whether this pass is enabled. - * - * @deprecated Use enabled instead. - * @return {Boolean} Whether this pass is enabled. - */ - isEnabled(): boolean; - /** - * Enables or disables this pass. - * - * @deprecated Use enabled instead. - * @param {Boolean} value - Whether the pass should be enabled. - */ - setEnabled(value: boolean): void; - set fullscreenMaterial(arg: Material); - /** - * The fullscreen material. - * - * @type {Material} - */ - get fullscreenMaterial(): Material; - /** - * Returns the current fullscreen material. - * - * @deprecated Use fullscreenMaterial instead. - * @return {Material} The current fullscreen material, or null if there is none. - */ - getFullscreenMaterial(): Material; - /** - * Sets the fullscreen material. - * - * @deprecated Use fullscreenMaterial instead. - * @protected - * @param {Material} value - A fullscreen material. - */ - protected setFullscreenMaterial(value: Material): void; - /** - * Returns the current depth texture. - * - * @return {Texture} The current depth texture, or null if there is none. - */ - getDepthTexture(): Texture; - /** - * Sets the depth texture. - * - * This method will be called automatically by the {@link EffectComposer}. - * You may override this method if your pass relies on the depth information of a preceding {@link RenderPass}. - * - * @param {Texture} depthTexture - A depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. - */ - setDepthTexture( - depthTexture: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Renders this pass. - * - * This is an abstract method that must be overridden. - * - * @abstract - * @throws {Error} An error is thrown if the method is not overridden. - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - /** - * Sets the size. - * - * You may override this method if you want to be informed about the size of the backbuffer/canvas. - * This method is called before {@link initialize} and every time the size of the {@link EffectComposer} changes. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * Performs initialization tasks. - * - * This method is called when this pass is added to an {@link EffectComposer}. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - /** - * Performs a shallow search for disposable properties and deletes them. - * - * The {@link EffectComposer} calls this method when it is being destroyed. You can use it independently to free - * memory when you're certain that you don't need this pass anymore. - */ - dispose(): void; - - } - - /** - * A pass that renders an adaptive luminance map. - */ - export class AdaptiveLuminancePass extends Pass { - - /** - * Constructs a new adaptive luminance pass. - * - * @param {Texture} luminanceBuffer - A buffer that contains the current scene luminance. - * @param {Object} [options] - The options. - * @param {Number} [options.minLuminance=0.01] - The minimum luminance. - * @param {Number} [options.adaptationRate=1.0] - The luminance adaptation rate. - */ - constructor( - luminanceBuffer: Texture, - { - minLuminance, - adaptationRate - }?: { - minLuminance?: number; - adaptationRate?: number; - } - ); - - /** - * The adaptive luminance texture. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Returns the adaptive 1x1 luminance texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * Sets the 1x1 mipmap level. - * - * This level is used to identify the smallest mipmap of the main luminance texture which contains the downsampled - * average scene luminance. - * - * @type {Number} - * @deprecated Use fullscreenMaterial.mipLevel1x1 instead. - */ - set mipLevel1x1(arg: number); - /** - * @type {Number} - * @deprecated Use fullscreenMaterial.adaptationRate instead. - */ - set adaptationRate(arg: number); - /** - * The luminance adaptation rate. - * - * @type {Number} - * @deprecated Use fullscreenMaterial.adaptationRate instead. - */ - get adaptationRate(): number; - /** - * Renders the scene normals. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A Kawase blur pass. - */ - export class KawaseBlurPass extends Pass { - - /** - * An auto sizing flag. - * - * @type {Number} - * @deprecated Use {@link Resolution.AUTO_SIZE} instead. - */ - static get AUTO_SIZE(): number; - /** - * Constructs a new Kawase blur pass. - * - * @param {Object} [options] - The options. - * @param {Number} [options.resolutionScale=0.5] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - * @param {KernelSize} [options.kernelSize=KernelSize.MEDIUM] - The blur kernel size. - */ - constructor({ - resolutionScale, - resolutionX, - resolutionY, - width, - height, - kernelSize - }?: { - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - kernelSize?: KernelSize; - }); - - resolution: Resolution; - /** - * The blur material. - * - * @type {KawaseBlurMaterial} - */ - blurMaterial: KawaseBlurMaterial; - /** - * Indicates whether dithering is enabled. - * - * @type {Boolean} - * @deprecated - */ - dithering: boolean; - /** - * The kernel size. - * - * @type {KernelSize} - */ - kernelSize: KernelSize; - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * Sets the render width. - * - * @type {Number} - * @deprecated Use resolution.preferredWidth instead. - */ - set width(arg: number); - /** - * The current width of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.width instead. - */ - get width(): number; - /** - * Sets the render height. - * - * @type {Number} - * @deprecated Use resolution.preferredHeight instead. - */ - set height(arg: number); - /** - * The current height of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.height instead. - */ - get height(): number; - set scale(arg: number); - /** - * The current blur scale. - * - * @type {Number} - * @deprecated Use blurMaterial.scale instead. - */ - get scale(): number; - /** - * Returns the current blur scale. - * - * @deprecated Use blurMaterial.scale instead. - * @return {Number} The scale. - */ - getScale(): number; - /** - * Sets the blur scale. - * - * This value influences the overall blur strength and should not be greater than 1. For larger blurs please increase - * the kernel size via {@link setKernelSize}! - * - * Note that the blur strength is closely tied to the resolution. For a smooth transition from no blur to full blur, - * set the width or the height to a high enough value. - * - * @deprecated Use blurMaterial.scale instead. - * @param {Number} value - The scale. - */ - setScale(value: number): void; - /** - * Returns the kernel size. - * - * @deprecated Use kernelSize instead. - * @return {KernelSize} The kernel size. - */ - getKernelSize(): KernelSize; - /** - * Sets the kernel size. - * - * Larger kernels require more processing power but scale well with larger render resolutions. - * - * @deprecated Use kernelSize instead. - * @param {KernelSize} value - The kernel size. - */ - setKernelSize(value: KernelSize): void; - /** - * Returns the current resolution scale. - * - * @return {Number} The resolution scale. - * @deprecated Use resolution instead. - */ - getResolutionScale(): number; - /** - * Sets the resolution scale. - * - * @param {Number} scale - The new resolution scale. - * @deprecated Use resolution instead. - */ - setResolutionScale(scale: number): void; - /** - * Blurs the input buffer and writes the result to the output buffer. The input buffer remains intact, unless it's - * also used as the output buffer. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - export type BlurPass = KawaseBlurPass; - - /** - * A blur pass that produces a wide blur by downsampling and upsampling the input over multiple MIP levels. - * - * Based on an article by Fabrice Piquet: - * https://www.froyok.fr/blog/2021-12-ue4-custom-bloom/ - */ - export class MipmapBlurPass extends Pass { - - /** - * A texture that contains the blurred result. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * The MIP levels. Default is 8. - * - * @type {Number} - */ - get levels(): number; - set levels(value: number); - /** - * The blur radius. Default is 0.85. - * - * @type {Number} - */ - get radius(): number; - set radius(value: number); - - } - - /** - * A pass that disables the stencil test. - */ - export class ClearMaskPass extends Pass { - - /** - * Constructs a new clear mask pass. - */ - constructor(); - - /** - * Disables the global stencil test. - * @param renderer - The renderer. - * @param inputBuffer - A frame buffer that contains the result of the previous pass. - * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param [deltaTime] - The time between the last frame and the current one in seconds. - * @param [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A pass that clears the input buffer or the screen. - */ - export class ClearPass extends Pass { - - /** - * Constructs a new clear pass. - * - * @param {Boolean} [color=true] - Determines whether the color buffer should be cleared. - * @param {Boolean} [depth=true] - Determines whether the depth buffer should be cleared. - * @param {Boolean} [stencil=false] - Determines whether the stencil buffer should be cleared. - */ - constructor(color?: boolean, depth?: boolean, stencil?: boolean); - /** - * Indicates whether the color buffer should be cleared. - * - * @type {Boolean} - * @deprecated Use setClearFlags() instead. - */ - color: boolean; - /** - * Indicates whether the depth buffer should be cleared. - * - * @type {Boolean} - * @deprecated Use setClearFlags() instead. - */ - depth: boolean; - /** - * Indicates whether the stencil buffer should be cleared. - * - * @type {Boolean} - * @deprecated Use setClearFlags() instead. - */ - stencil: boolean; - /** - * An override clear color. Default is null. - * - * @type {Color} - */ - overrideClearColor: Color; - /** - * An override clear alpha. Default is -1. - * - * @type {Number} - */ - overrideClearAlpha: number; - /** - * Sets the clear flags. - * - * @param {Boolean} color - Whether the color buffer should be cleared. - * @param {Boolean} depth - Whether the depth buffer should be cleared. - * @param {Boolean} stencil - Whether the stencil buffer should be cleared. - */ - setClearFlags(color: boolean, depth: boolean, stencil: boolean): void; - /** - * Returns the override clear color. Default is null. - * - * @deprecated Use overrideClearColor instead. - * @return {Color} The clear color. - */ - getOverrideClearColor(): Color; - /** - * Sets the override clear color. - * - * @deprecated Use overrideClearColor instead. - * @param {Color} value - The clear color. - */ - setOverrideClearColor(value: Color): void; - /** - * Returns the override clear alpha. Default is -1. - * - * @deprecated Use overrideClearAlpha instead. - * @return {Number} The clear alpha. - */ - getOverrideClearAlpha(): number; - /** - * Sets the override clear alpha. - * - * @deprecated Use overrideClearAlpha instead. - * @param {Number} value - The clear alpha. - */ - setOverrideClearAlpha(value: number): void; - /** - * Clears the input buffer or the screen. - * @param renderer - The renderer. - * @param inputBuffer - A frame buffer that contains the result of the previous pass. - * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param [deltaTime] - The time between the last frame and the current one in seconds. - * @param [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A pass that copies the contents of an input buffer to another render target. - */ - export class CopyPass extends Pass { - - /** - * Constructs a new save pass. - * - * @param {WebGLRenderTarget} [renderTarget] - A render target. - * @param {Boolean} [autoResize=true] - Whether the render target size should be updated automatically. - */ - constructor(renderTarget?: WebGLRenderTarget, autoResize?: boolean); - /** - * Enables or disables auto resizing of the render target. - * - * @type {Boolean} - */ - autoResize: boolean; - set resize(arg: boolean); - /** - * Enables or disables auto resizing of the render target. - * - * @deprecated Use autoResize instead. - * @type {Boolean} - */ - get resize(): boolean; - /** - * The output texture. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Returns the output texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * Enables or disables auto resizing of the render target. - * - * @deprecated Use autoResize instead. - * @param {Boolean} value - Whether the render target size should be updated automatically. - */ - setAutoResizeEnabled(value: boolean): void; - /** - * Saves the input buffer. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - export type SavePass = CopyPass; - - /** - * A pass that copies depth into a render target. - */ - export class DepthCopyPass extends Pass { - - /** - * Constructs a new depth save pass. - * - * @param {Object} [options] - The options. - * @param {DepthPackingStrategies} [options.depthPacking=RGBADepthPacking] - The output depth packing. - */ - constructor({ depthPacking }?: { depthPacking?: DepthPackingStrategies }); - /** - * The output depth texture. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Returns the output depth texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * The output depth packing. - * - * @type {DepthPackingStrategies} - */ - get depthPacking(): DepthPackingStrategies; - /** - * Returns the output depth packing. - * - * @deprecated Use depthPacking instead. - * @return {DepthPackingStrategies} The depth packing. - */ - getDepthPacking(): DepthPackingStrategies; - /** - * Copies depth from a depth texture. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A pass that downsamples the scene depth by picking the most representative depth in 2x2 texel neighborhoods. If a - * normal buffer is provided, the corresponding normals will be stored as well. - * - * This pass requires WebGL 2. - */ - export class DepthDownsamplingPass extends Pass { - - /** - * Constructs a new depth downsampling pass. - * - * @param {Object} [options] - The options. - * @param {Texture} [options.normalBuffer=null] - A texture that contains view space normals. See {@link NormalPass}. - * @param {Number} [options.resolutionScale=0.5] - The resolution scale. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - The render width. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - The render height. - */ - constructor({ - normalBuffer, - resolutionScale, - width, - height - }?: { - normalBuffer?: Texture; - resolutionScale?: number; - width?: number; - height?: number; - }); - - resolution: Resolution; - /** - * The normal(RGB) + depth(A) texture. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Returns the normal(RGB) + depth(A) texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * Downsamples depth and scene normals. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A pass that renders a given scene into the input buffer or to screen. - * - * This pass uses a {@link ClearPass} to clear the target buffer. - */ - export class RenderPass extends Pass { - - /** - * Constructs a new render pass. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to use to render the scene. - * @param {Material} [overrideMaterial=null] - An override material. - */ - constructor(scene?: Scene, camera?: Camera, overrideMaterial?: Material); - /** - * A clear pass. - * - * @type {ClearPass} - */ - clearPass: ClearPass; - /** - * Indicates whether the scene background should be ignored. - * - * @type {Boolean} - */ - ignoreBackground: boolean; - /** - * Indicates whether the shadow map auto update should be skipped. - * - * @type {Boolean} - */ - skipShadowMapUpdate: boolean; - /** - * A selection of objects to render. - * - * @type {Selection} - */ - selection: Selection; - set overrideMaterial(arg: Material); - /** - * The current override material. - * - * @type {Material} - */ - get overrideMaterial(): Material; - /** - * Returns the current override material. - * - * @deprecated Use overrideMaterial instead. - * @return {Material} The material. - */ - getOverrideMaterial(): Material; - /** - * Sets the override material. - * - * @deprecated Use overrideMaterial instead. - * @param {Material} value - The material. - */ - setOverrideMaterial(value: Material): void; - set clear(arg: boolean); - /** - * Indicates whether the target buffer should be cleared before rendering. - * - * @type {Boolean} - * @deprecated Use clearPass.enabled instead. - */ - get clear(): boolean; - /** - * Returns the selection. Default is `null` (no restriction). - * - * @deprecated Use selection instead. - * @return {Selection} The selection. - */ - getSelection(): Selection; - /** - * Sets the selection. Set to `null` to disable. - * - * @deprecated Use selection instead. - * @param {Selection} value - The selection. - */ - setSelection(value: Selection): void; - /** - * Indicates whether the scene background is disabled. - * - * @deprecated Use ignoreBackground instead. - * @return {Boolean} Whether the scene background is disabled. - */ - isBackgroundDisabled(): boolean; - /** - * Enables or disables the scene background. - * - * @deprecated Use ignoreBackground instead. - * @param {Boolean} value - Whether the scene background should be disabled. - */ - setBackgroundDisabled(value: boolean): void; - /** - * Indicates whether the shadow map auto update is disabled. - * - * @deprecated Use skipShadowMapUpdate instead. - * @return {Boolean} Whether the shadow map update is disabled. - */ - isShadowMapDisabled(): boolean; - /** - * Enables or disables the shadow map auto update. - * - * @deprecated Use skipShadowMapUpdate instead. - * @param {Boolean} value - Whether the shadow map auto update should be disabled. - */ - setShadowMapDisabled(value: boolean): void; - /** - * Returns the clear pass. - * - * @deprecated Use clearPass.enabled instead. - * @return {ClearPass} The clear pass. - */ - getClearPass(): ClearPass; - /** - * Renders the scene. - * @param renderer - The renderer. - * @param inputBuffer - A frame buffer that contains the result of the previous pass. - * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param [deltaTime] - The time between the last frame and the current one in seconds. - * @param [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A pass that renders depth into an RGBA buffer. - */ - export class DepthPass extends Pass { - - /** - * Constructs a new depth pass. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to use to render the scene. - * @param {Object} [options] - The options. - * @param {Number} [options.resolutionScale=1.0] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - * @param {WebGLRenderTarget} [options.renderTarget] - A custom render target. - */ - constructor( - scene?: Scene, - camera?: Camera, - { - resolutionScale, - resolutionX, - resolutionY, - width, - height, - renderTarget - }?: { - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - renderTarget?: WebGLRenderTarget; - } - ); - - resolution: Resolution; - /** - * The depth texture. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Returns the depth texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * Returns the current resolution scale. - * - * @return {Number} The resolution scale. - * @deprecated Use resolution instead. - */ - getResolutionScale(): number; - /** - * Sets the resolution scale. - * - * @param {Number} scale - The new resolution scale. - * @deprecated Use resolution instead. - */ - setResolutionScale(scale: number): void; - /** - * Renders the scene depth. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A depth picking pass. - */ - export class DepthPickingPass extends DepthCopyPass { - - /** - * Constructs a new depth picking pass. - * - * @param {Object} [options] - The options. - * @param {DepthPackingStrategies} [options.depthPacking=RGBADepthPacking] - The depth packing. - * @param {Number} [options.mode=DepthCopyMode.SINGLE] - The depth copy mode. - */ - constructor({ - depthPacking, - mode - }?: { - depthPacking?: DepthPackingStrategies; - mode?: number; - }); - - /** - * Reads depth at a specific screen position. - * - * Only one depth value can be picked per frame. Calling this method multiple times per frame will overwrite the - * picking coordinates. Unresolved promises will be abandoned. - * - * @example - * const ndc = new Vector3(); - * const clientRect = myViewport.getBoundingClientRect(); - * const clientX = pointerEvent.clientX - clientRect.left; - * const clientY = pointerEvent.clientY - clientRect.top; - * ndc.x = (clientX / myViewport.clientWidth) * 2.0 - 1.0; - * ndc.y = -(clientY / myViewport.clientHeight) * 2.0 + 1.0; - * const depth = await depthPickingPass.readDepth(ndc); - * ndc.z = depth * 2.0 - 1.0; - * - * const worldPosition = ndc.unproject(camera); - * - * @param {Vector2|Vector3} ndc - Normalized device coordinates. Only X and Y are relevant. - * @return {Promise} A promise that returns the depth on the next frame. - */ - readDepth(ndc: Vector2 | Vector3): Promise; - /** - * Copies depth and resolves depth picking promises. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A blend function enumeration. - * - * Important: Do not use `BlendFunction.SKIP` to disable effects. See - * [Enabling and Disabling Effects](https://github.com/vanruesc/postprocessing/wiki/Enabling-and-Disabling-Effects) - * for more information. - * - * Based on https://www.khronos.org/registry/OpenGL/extensions/NV/NV_blend_equation_advanced.txt + * @type {Boolean} + * @deprecated + */ + get isLookupTexture3D(): boolean; + /** + * Scales this LUT up to a given target size using tetrahedral interpolation. * - * @type {Object} - * @property {Number} SKIP - Deprecated. Use DST instead. Warning: This blend function does NOT fully disable the effect. - * @property {Number} SET - Deprecated. Use SRC instead. - * @property {Number} ADD - Additive blending. Fast, but may produce washed out results. - * @property {Number} ALPHA - Alpha blending. Blends based on the alpha value of the new color. - * @property {Number} AVERAGE - Calculates the avarage of the new color and the base color. - * @property {Number} COLOR - Converts the colors to HSL and blends based on color. - * @property {Number} COLOR_BURN - Color burn. - * @property {Number} COLOR_DODGE - Color dodge. - * @property {Number} DARKEN - Prioritize darker colors. - * @property {Number} DIFFERENCE - Color difference. - * @property {Number} DIVIDE - Color division. - * @property {Number} DST - Overwrites the new color with the base color. Ignores opacity. - * @property {Number} EXCLUSION - Color exclusion. - * @property {Number} HARD_LIGHT - Hard light. - * @property {Number} HARD_MIX - Hard mix. - * @property {Number} HUE - Converts the colors to HSL and blends based on hue. - * @property {Number} INVERT - Overwrites the base color with the inverted new color. - * @property {Number} INVERT_RGB - Multiplies the new color with the inverted base color. - * @property {Number} LIGHTEN - Prioritize lighter colors. - * @property {Number} LINEAR_BURN - Linear burn. - * @property {Number} LINEAR_DODGE - Same as ADD but limits the result to 1. - * @property {Number} LINEAR_LIGHT - Linear light. - * @property {Number} LUMINOSITY - Converts the colors to HSL and blends based on luminosity. - * @property {Number} MULTIPLY - Color multiplication. - * @property {Number} NEGATION - Negates the base color using the new color. - * @property {Number} NORMAL - Overwrites the base color with the new one. - * @property {Number} OVERLAY - Color overlay. - * @property {Number} PIN_LIGHT - Pin light. - * @property {Number} REFLECT - Color reflection. - * @property {Number} SCREEN - Screen blending. The two colors are effectively projected on a white screen simultaneously. - * @property {Number} SRC - Overwrites the base color with the new one. Ignores opacity. - * @property {Number} SATURATION - Converts the colors to HSL and blends based on saturation. - * @property {Number} SOFT_LIGHT - Soft light. - * @property {Number} SUBTRACT - Subtracts the new color from the base color. - * @property {Number} VIVID_LIGHT - Vivid light. - */ - export enum BlendFunction { - SKIP, - SET, - ADD, - ALPHA, - AVERAGE, - COLOR, - COLOR_BURN, - COLOR_DODGE, - DARKEN, - DIFFERENCE, - DIVIDE, - DST, - EXCLUSION, - HARD_LIGHT, - HARD_MIX, - HUE, - INVERT, - INVERT_RGB, - LIGHTEN, - LINEAR_BURN, - LINEAR_DODGE, - LINEAR_LIGHT, - LUMINOSITY, - MULTIPLY, - NEGATION, - NORMAL, - OVERLAY, - PIN_LIGHT, - REFLECT, - SATURATION, - SCREEN, - SOFT_LIGHT, - SRC, - SUBTRACT, - VIVID_LIGHT - } - - /** - * A blend mode. - */ - export class BlendMode extends EventDispatcher { - - /** - * Constructs a new blend mode. - * - * @param {BlendFunction} blendFunction - The blend function. - * @param {Number} opacity - The opacity of the color that will be blended with the base color. - */ - constructor(blendFunction: BlendFunction, opacity?: number); - /** - * A uniform that controls the opacity of this blend mode. - * - * TODO Add opacity accessors for uniform value. - * @type {Uniform} - */ - opacity: Uniform; - /** - * Returns the opacity. - * - * @return {Number} The opacity. - */ - getOpacity(): number; - /** - * Sets the opacity. - * - * @param {Number} value - The opacity. - */ - setOpacity(value: number): void; - /** - * Returns the blend function. - * - * @deprecated Use blendFunction instead. - * @return {BlendFunction} The blend function. - */ - getBlendFunction(): BlendFunction; - /** - * Sets the blend function. - * - * @deprecated Use blendFunction instead. - * @param {BlendFunction} value - The blend function. - */ - setBlendFunction(value: BlendFunction): void; - /** - * Returns the blend function shader code. - * - * @return {String} The blend function shader code. - */ - getShaderCode(): string; - /** - * The blend function. - * - * @type {BlendFunction} - */ - get blendFunction(): BlendFunction; - set blendFunction(value: BlendFunction); - - } - - /** - * An abstract effect. - * - * Effects can be combined using the {@link EffectPass}. - * - * @implements {Initializable} - * @implements {Resizable} - * @implements {Disposable} - */ - export class Effect - extends EventDispatcher - implements Initializable, Resizable, Disposable { - - /** - * Constructs a new effect. - * - * @param {String} name - The name of this effect. Doesn't have to be unique. - * @param {String} fragmentShader - The fragment shader. This shader is required. - * @param {Object} [options] - Additional options. - * @param {EffectAttribute} [options.attributes=EffectAttribute.NONE] - The effect attributes that determine the execution priority and resource requirements. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. - * @param {Map} [options.defines] - Custom preprocessor macro definitions. Keys are names and values are code. - * @param {Map} [options.uniforms] - Custom shader uniforms. Keys are names and values are uniforms. - * @param {Set} [options.extensions] - WebGL extensions. - * @param {String} [options.vertexShader=null] - The vertex shader. Most effects don't need one. - */ - constructor( - name: string, - fragmentShader: string, - { - attributes, - blendFunction, - defines, - uniforms, - extensions, - vertexShader - }?: { - attributes?: EffectAttribute; - blendFunction?: BlendFunction; - defines?: Map; - uniforms?: Map; - extensions?: Set; - vertexShader?: string; - } - ); - - /** - * The name of this effect. - * - * @type {String} - */ - name: string; - /** - * The renderer. - * - * @type {WebGLRenderer} - * @protected - * @deprecated - */ - protected renderer: WebGLRenderer; - /** - * Preprocessor macro definitions. - * - * Call {@link Effect.setChanged} after changing macro definitions. - * - * @type {Map} - */ - readonly defines: Map; - /** - * Shader uniforms. - * - * Call {@link Effect.setChanged} after adding or removing uniforms. - * - * @type {Map} - */ - readonly uniforms: Map; - /** - * WebGL extensions that are required by this effect. - * - * Call {@link Effect.setChanged} after adding or removing extensions. - * - * @type {Set} - */ - readonly extensions: Set; - /** - * The blend mode of this effect. - * - * @type {BlendMode} - */ - readonly blendMode: BlendMode; - /** - * The input color space. - * - * @type {ColorSpace} - * @experimental - */ - get inputColorSpace(): ColorSpace; - /** - * @type {ColorSpace} - * @protected - * @experimental - */ - protected set inputColorSpace(arg: ColorSpace); - /** - * The output color space. - * - * Should only be changed if this effect converts the input colors to a different color space. - * - * @type {ColorSpace} - * @experimental - */ - get outputColorSpace(): ColorSpace; - /** - * @type {ColorSpace} - * @protected - * @experimental - */ - protected set outputColorSpace(arg: ColorSpace); - /** - * Sets the main scene. - * - * @type {Scene} - */ - set mainScene(arg: Scene); - /** - * Sets the main camera. - * - * @type {Camera} - */ - set mainCamera(arg: Camera); - /** - * Returns the name of this effect. - * - * @deprecated Use name instead. - * @return {String} The name. - */ - getName(): string; - /** - * Sets the renderer. - * - * @deprecated - * @param {WebGLRenderer} renderer - The renderer. - */ - setRenderer(renderer: WebGLRenderer): void; - /** - * Returns the preprocessor macro definitions. - * - * @deprecated Use defines instead. - * @return {Map} The extensions. - */ - getDefines(): Map; - /** - * Returns the uniforms of this effect. - * - * @deprecated Use uniforms instead. - * @return {Map} The extensions. - */ - getUniforms(): Map; - /** - * Returns the WebGL extensions that are required by this effect. - * - * @deprecated Use extensions instead. - * @return {Set} The extensions. - */ - getExtensions(): Set; - /** - * Returns the blend mode. - * - * The result of this effect will be blended with the result of the previous effect using this blend mode. - * - * @deprecated Use blendMode instead. - * @return {BlendMode} The blend mode. - */ - getBlendMode(): BlendMode; - /** - * Returns the effect attributes. - * - * @return {EffectAttribute} The attributes. - */ - getAttributes(): EffectAttribute; - /** - * Sets the effect attributes. - * - * Effects that have the same attributes will be executed in the order in which they were registered. Some attributes - * imply a higher priority. - * - * @protected - * @param {EffectAttribute} attributes - The attributes. - */ - protected setAttributes(attributes: EffectAttribute): void; - /** - * Returns the fragment shader. - * - * @return {String} The fragment shader. - */ - getFragmentShader(): string; - /** - * Sets the fragment shader. - * - * @protected - * @param {String} fragmentShader - The fragment shader. - */ - protected setFragmentShader(fragmentShader: string): void; - /** - * Returns the vertex shader. - * - * @return {String} The vertex shader. - */ - getVertexShader(): string; - /** - * Sets the vertex shader. - * - * @protected - * @param {String} vertexShader - The vertex shader. - */ - protected setVertexShader(vertexShader: string): void; - /** - * Informs the associated {@link EffectPass} that this effect requires a shader recompilation. - * - * Should be called after changing macros or extensions and after adding/removing uniforms. - * - * @protected - */ - protected setChanged(): void; - /** - * Sets the depth texture. - * - * You may override this method if your effect requires direct access to the depth texture that is bound to the - * associated {@link EffectPass}. - * - * @param {Texture} depthTexture - A depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. - */ - setDepthTexture( - depthTexture: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Updates this effect by performing supporting operations. - * - * This method is called by the {@link EffectPass} right before the main fullscreen render operation, even if the - * blend function is set to `SKIP`. - * - * You may override this method if you need to update custom uniforms or render additional off-screen textures. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Updates the size of this effect. - * - * You may override this method if you want to be informed about the size of the backbuffer/canvas. - * This method is called before {@link initialize} and every time the size of the {@link EffectComposer} changes. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * Performs initialization tasks. - * - * This method is called when the associated {@link EffectPass} is added to an {@link EffectComposer}. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - * @example if(!alpha && frameBufferType === UnsignedByteType) { this.myRenderTarget.texture.format = RGBFormat; } - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - /** - * Performs a shallow search for properties that define a dispose method and deletes them. - * - * The {@link EffectComposer} calls this method when it is being destroyed. - */ - dispose(): void; - - } - - /** - * An enumeration of effect attributes. - * - * Attributes can be concatenated using the bitwise OR operator. + * @param {Number} size - The target sidelength. + * @param {Boolean} [transferData=true] - Extra fast mode. Set to false to keep the original data intact. + * @return {Promise} A promise that resolves with a new LUT upon completion. + */ + scaleUp(size: number, transferData?: boolean): Promise; + /** + * Applies the given LUT to this one. * - * @type {Object} - * @property {Number} NONE - No attributes. Most effects don't need to specify any attributes. - * @property {Number} DEPTH - Describes effects that require a depth texture. - * @property {Number} CONVOLUTION - Describes effects that fetch additional samples from the input buffer. There cannot be more than one effect with this attribute per {@link EffectPass}. - * @example const attributes = EffectAttribute.CONVOLUTION | EffectAttribute.DEPTH; + * @param {LookupTexture} lut - A LUT. Must have the same dimensions, type and format as this LUT. + * @return {LookupTexture} This texture. + */ + applyLUT(lut: LookupTexture): LookupTexture; + /** + * Converts the LUT data into unsigned byte data. + * + * This is a lossy operation which should only be performed after all other transformations have been applied. + * + * @return {LookupTexture} This texture. + */ + convertToUint8(): LookupTexture; + /** + * Converts the LUT data into float data. + * + * @return {LookupTexture} This texture. + */ + convertToFloat(): LookupTexture; + /** + * Converts this LUT into RGBA data. + * + * @deprecated LUTs are RGBA by default since three r137. + * @return {LookupTexture} This texture. + */ + convertToRGBA(): LookupTexture; + /** + * Converts the output of this LUT into sRGB color space. + * + * @return {LookupTexture} This texture. */ - export enum EffectAttribute { - CONVOLUTION, - DEPTH, - NONE, - } + convertLinearToSRGB(): LookupTexture; + /** + * Converts the output of this LUT into linear color space. + * + * @return {LookupTexture} This texture. + */ + convertSRGBToLinear(): LookupTexture; + /** + * Converts this LUT into a 2D data texture. + * + * Please note that custom input domains are not carried over to 2D textures. + * + * @return {DataTexture} The texture. + */ + toDataTexture(): DataTexture; + +} + +export type LookupTexture3D = LookupTexture; + +/** + * A simple noise texture. + */ +export class NoiseTexture extends DataTexture { /** - * An enumeration of WebGL extensions. + * Constructs a new noise texture. * - * @type {Object} - * @property {String} DERIVATIVES - Enables derivatives by adding the functions dFdx, dFdy and fwidth. - * @property {String} FRAG_DEPTH - Enables gl_FragDepthEXT to set a depth value of a fragment from within the fragment shader. - * @property {String} DRAW_BUFFERS - Enables multiple render targets (MRT) support. - * @property {String} SHADER_TEXTURE_LOD - Enables explicit control of texture LOD. - */ - export enum WebGLExtension { - DERIVATIVES = "derivatives", - FRAG_DEPTH = "fragDepth", - DRAW_BUFFERS = "drawBuffers", - SHADER_TEXTURE_LOD = "shaderTextureLOD", - } - - /** - * An effect pass. - * - * Use this pass to combine {@link Effect} instances. - */ - export class EffectPass extends Pass { - - /** - * Constructs a new effect pass. - * - * @param {Camera} camera - The main camera. - * @param {...Effect} effects - The effects that will be rendered by this pass. - */ - constructor(camera?: Camera, ...effects: Effect[]); - /** - * The effects. - * - * Use `updateMaterial` or `recompile` after changing the effects and consider calling `dispose` to free resources - * of unused effects. - * - * @type {Effect[]} - * @protected - */ - private effects: Effect[]; - /** - * A time offset. - * - * Elapsed time will start at this value. - * - * @type {Number} - * @deprecated - */ - minTime: number; - /** - * The maximum time. - * - * If the elapsed time exceeds this value, it will be reset. - * - * @type {Number} - * @deprecated - */ - maxTime: number; - set encodeOutput(arg: boolean); - /** - * Indicates whether this pass encodes its output when rendering to screen. - * - * @type {Boolean} - * @deprecated Use fullscreenMaterial.encodeOutput instead. - */ - get encodeOutput(): boolean; - set dithering(arg: boolean); - /** - * Indicates whether dithering is enabled. - * - * @type {Boolean} - */ - get dithering(): boolean; - /** - * Updates the compound shader material. - */ - protected updateMaterial(): void; - /** - * Rebuilds the shader material. - */ - recompile(): void; - /** - * Sets the effects. - * - * @param effects - The effects. - */ - protected setEffects(effects: Effect[]): void; - /** - * Returns the current depth texture. - * @returns The current depth texture, or null if there is none. - */ - getDepthTexture(): Texture; - /** - * Sets the depth texture. - * @param depthTexture - A depth texture. - * @param [depthPacking = 0] - The depth packing. - */ - setDepthTexture(depthTexture: Texture, depthPacking?: number): void; - /** - * Renders the effect. - * @param renderer - The renderer. - * @param inputBuffer - A frame buffer that contains the result of the previous pass. - * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param [deltaTime] - The time between the last frame and the current one in seconds. - * @param [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - /** - * Updates the size of this pass. - * @param width - The width. - * @param height - The height. - */ - setSize(width: number, height: number): void; - /** - * Performs initialization tasks. - * @param renderer - The renderer. - * @param alpha - Whether the renderer uses the alpha channel or not. - * @param frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - /** - * Deletes disposable objects. - * This pass will be inoperative after this method was called! - */ - dispose(): void; - /** - * Handles events. - * - * @param {Event} event - An event. - */ - handleEvent(event: Event): void; - - } - - /** - * A pass that executes a given function. - */ - export class LambdaPass extends Pass { - - /** - * Constructs a new lambda pass. - * - * @param {Function} f - A function. - */ - constructor(f: Function); - - } - - /** - * A pass that renders luminance. - */ - export class LuminancePass extends Pass { - - /** - * Constructs a new luminance pass. - * - * @param {Object} [options] - The options. See {@link LuminanceMaterial} for additional options. - * @param {Number} [options.resolutionScale=1.0] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - * @param {WebGLRenderTarget} [options.renderTarget] - A custom render target. - */ - constructor({ - resolutionScale, - resolutionX, - resolutionY, - width, - height, - renderTarget - }?: { - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - renderTarget?: WebGLRenderTarget; - }); - - resolution: Resolution; - /** - * The luminance texture. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Returns the luminance texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * Renders the luminance. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A stencil mask pass. - * - * This pass requires that the input and output buffers have a stencil buffer. You can enable the stencil buffer via the - * {@link EffectComposer} constructor. - */ - export class MaskPass extends Pass { - - /** - * Constructs a new mask pass. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to use. - */ - constructor(scene?: Scene, camera?: Camera); - /** - * A clear pass. - * - * @type {ClearPass} - */ - clearPass: ClearPass; - /** - * Inverse flag. - * - * @type {Boolean} - * @deprecated Use inverted instead. - */ - inverse: boolean; - set inverted(arg: boolean); - /** - * Indicates whether the mask should be inverted. - * - * @type {Boolean} - */ - get inverted(): boolean; - set clear(arg: boolean); - /** - * Indicates whether this pass should clear the stencil buffer. - * - * @type {Boolean} - * @deprecated Use clearPass.enabled instead. - */ - get clear(): boolean; - /** - * Returns the internal clear pass. - * - * @deprecated Use clearPass.enabled instead. - * @return {ClearPass} The clear pass. - */ - getClearPass(): ClearPass; - /** - * Indicates whether the mask is inverted. - * - * @deprecated Use inverted instead. - * @return {Boolean} Whether the mask is inverted. - */ - isInverted(): boolean; - /** - * Enables or disable mask inversion. - * - * @deprecated Use inverted instead. - * @param {Boolean} value - Whether the mask should be inverted. - */ - setInverted(value: boolean): void; - /** - * Renders the effect. - * @param renderer - The renderer. - * @param inputBuffer - A frame buffer that contains the result of the previous pass. - * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param [deltaTime] - The time between the last frame and the current one in seconds. - * @param [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A pass that renders the normals of a given scene. - */ - export class NormalPass extends Pass { - - /** - * Constructs a new normal pass. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to use to render the scene. - * @param {Object} [options] - The options. - * @param {Number} [options.resolutionScale=1.0] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - * @param {WebGLRenderTarget} [options.renderTarget] - A custom render target. - */ - constructor( - scene?: Scene, - camera?: Camera, - { - resolutionScale, - resolutionX, - resolutionY, - width, - height, - renderTarget - }?: { - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - renderTarget?: WebGLRenderTarget; - } - ); - - resolution: Resolution; - /** - * The normal texture. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * The normal texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * Returns the current resolution scale. - * - * @return {Number} The resolution scale. - * @deprecated Use resolution.preferredWidth or resolution.preferredHeight instead. - */ - getResolutionScale(): number; - /** - * Sets the resolution scale. - * - * @param {Number} scale - The new resolution scale. - * @deprecated Use resolution.preferredWidth or resolution.preferredHeight instead. - */ - setResolutionScale(scale: number): void; - /** - * Renders the scene normals. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {WebGLRenderTarget} outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - * @param {Boolean} [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * A shader pass. - * - * Renders any shader material as a fullscreen effect. This pass should not be used to create multiple chained effects. - * For a more efficient solution, please refer to the {@link EffectPass}. - */ - export class ShaderPass extends Pass { - - /** - * Constructs a new shader pass. - * - * @param {ShaderMaterial} material - A shader material. - * @param {String} [input="inputBuffer"] - The name of the input buffer uniform. - */ - constructor(material: ShaderMaterial, input?: string); - /** - * Sets the name of the input buffer uniform. - * - * Most fullscreen materials modify texels from an input texture. This pass automatically assigns the main input - * buffer to the uniform identified by the given name. - * - * @param {String} input - The name of the input buffer uniform. - */ - setInput(input: string): void; - /** - * Renders the effect. - * @param renderer - The renderer. - * @param inputBuffer - A frame buffer that contains the result of the previous pass. - * @param outputBuffer - A frame buffer that serves as the output render target unless this pass renders to screen. - * @param [deltaTime] - The time between the last frame and the current one in seconds. - * @param [stencilTest] - Indicates whether a stencil mask is active. - */ - render( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget | null, - outputBuffer: WebGLRenderTarget | null, - deltaTime?: number, - stencilTest?: boolean - ): void; - - } - - /** - * The EffectComposer may be used in place of a normal WebGLRenderer. - * - * The auto clear behaviour of the provided renderer will be disabled to prevent unnecessary clear operations. - * - * It is common practice to use a {@link RenderPass} as the first pass to automatically clear the buffers and render a - * scene for further processing. - * - * @implements {Resizable} - * @implements {Disposable} - */ - export class EffectComposer implements Resizable, Disposable { - - /** - * Constructs a new effect composer. - * - * @param {WebGLRenderer} renderer - The renderer that should be used. - * @param {Object} [options] - The options. - * @param {Boolean} [options.depthBuffer=true] - Whether the main render targets should have a depth buffer. - * @param {Boolean} [options.stencilBuffer=false] - Whether the main render targets should have a stencil buffer. - * @param {Boolean} [options.alpha] - Deprecated. Buffers are always RGBA since three r137. - * @param {Number} [options.multisampling=0] - The number of samples used for multisample antialiasing. Requires WebGL 2. - * @param {Number} [options.frameBufferType] - The type of the internal frame buffers. It's recommended to use HalfFloatType if possible. - */ - constructor( - renderer?: WebGLRenderer, - { - depthBuffer, - stencilBuffer, - multisampling, - frameBufferType - }?: { - depthBuffer?: boolean; - stencilBuffer?: boolean; - alpha?: boolean; - multisampling?: number; - frameBufferType?: number; - } - ); - - /** - * The input buffer. - * - * Two identical buffers are used to avoid reading from and writing to the same render target. - * - * @type {WebGLRenderTarget} - */ - inputBuffer: WebGLRenderTarget; - /** - * The output buffer. - * - * @type {WebGLRenderTarget} - */ - outputBuffer: WebGLRenderTarget; - /** - * The passes. - * - * @type {Pass[]} - */ - passes: Pass[]; - /** - * Determines whether the last pass automatically renders to screen. - * - * @type {Boolean} - */ - autoRenderToScreen: boolean; - /** - * Sets the amount of MSAA samples. - * - * Requires WebGL 2. Set to zero to disable multisampling. - * - * @type {Number} - */ - set multisampling(arg: number); - /** - * The current amount of samples used for multisample anti-aliasing. - * - * @type {Number} - */ - get multisampling(): number; - /** - * Returns the internal timer. - * - * @return {Timer} The timer. - */ - getTimer(): Timer; - /** - * Returns the renderer. - * - * @return {WebGLRenderer} The renderer. - */ - getRenderer(): WebGLRenderer; - /** - * Sets the renderer. - * - * @param {WebGLRenderer} renderer - The renderer. - */ - setRenderer(renderer: WebGLRenderer): void; - /** - * Replaces the current renderer with the given one. - * - * The auto clear mechanism of the provided renderer will be disabled. If the new render size differs from the - * previous one, all passes will be updated. - * - * By default, the DOM element of the current renderer will automatically be removed from its parent node and the DOM - * element of the new renderer will take its place. - * - * @deprecated Use setRenderer instead. - * @param {WebGLRenderer} renderer - The new renderer. - * @param {Boolean} updateDOM - Indicates whether the old canvas should be replaced by the new one in the DOM. - * @return {WebGLRenderer} The old renderer. - */ - replaceRenderer( - renderer: WebGLRenderer, - updateDOM?: boolean - ): WebGLRenderer; - /** - * Creates a new render target. - * - * @deprecated Create buffers manually via WebGLRenderTarget instead. - * @param {Boolean} depthBuffer - Whether the render target should have a depth buffer. - * @param {Boolean} stencilBuffer - Whether the render target should have a stencil buffer. - * @param {Number} type - The frame buffer type. - * @param {Number} multisampling - The number of samples to use for antialiasing. - * @return {WebGLRenderTarget} A new render target that equals the renderer's canvas. - */ - createBuffer( - depthBuffer: boolean, - stencilBuffer: boolean, - type: number, - multisampling: number - ): WebGLRenderTarget; - /** - * Can be used to change the main scene for all registered passes and effects. - * - * @param {Scene} scene - The scene. - */ - setMainScene(scene: Scene): void; - /** - * Can be used to change the main camera for all registered passes and effects. - * - * @param {Camera} camera - The camera. - */ - setMainCamera(camera: Camera): void; - /** - * Adds a pass, optionally at a specific index. - * - * @param {Pass} pass - A new pass. - * @param {Number} [index] - An index at which the pass should be inserted. - */ - addPass(pass: Pass, index?: number): void; - /** - * Removes a pass. - * - * @param {Pass} pass - The pass. - */ - removePass(pass: Pass): void; - /** - * Removes all passes. - */ - removeAllPasses(): void; - /** - * Renders all enabled passes in the order in which they were added. - * - * @param {Number} [deltaTime] - The time since the last frame in seconds. - */ - render(deltaTime?: number): void; - /** - * Sets the size of the buffers, passes and the renderer. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - * @param {Boolean} [updateStyle] - Determines whether the style of the canvas should be updated. - */ - setSize(width: number, height: number, updateStyle?: boolean): void; - /** - * Resets this composer by deleting all passes and creating new buffers. - */ - reset(): void; - /** - * Disposes this composer and all passes. - */ - dispose(): void; - - } - - /** - * An override material manager. - * - * Includes a workaround that fixes override materials for skinned meshes and instancing. Doesn't fix uniforms such as - * normal maps and displacement maps. Using the workaround may have a negative impact on performance if the scene - * contains a lot of meshes. - * - * @implements {Disposable} - */ - export class OverrideMaterialManager implements Disposable { - - /** - * Enables or disables the override material workaround globally. - * - * This only affects post processing passes and effects. - * - * @type {Boolean} - */ - static set workaroundEnabled(arg: boolean); - /** - * Indicates whether the override material workaround is enabled. - * - * @type {Boolean} - */ - static get workaroundEnabled(): boolean; - /** - * Constructs a new override material manager. - * - * @param {Material} [material=null] - An override material. - */ - constructor(material?: Material); - /** - * Sets the override material. - * - * @param {Material} material - The material. - */ - setMaterial(material: Material): void; - /** - * Performs cleanup tasks. - */ - dispose(): void; - - } - - /** - * The Resizable contract. - * - * Implemented by objects that can be resized. - * - * @interface - */ - export interface Resizable { - - /** - * Sets the size of this object. - * - * @param {number} width - The width. - * @param {number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * A timer that provides read access to time data. - * - * @interface - */ - export interface ImmutableTimer { - - /** - * The current delta time in seconds. - * - * @type {Number} - */ - getDelta(): number; - /** - * The elapsed time in seconds. - * - * @type {Number} - */ - getElapsed(): number; - - } - - /** - * An object selection. - * - * Object selections use render layers to facilitate quick and efficient visibility changes. - */ - export class Selection extends Set { - - /** - * Constructs a new selection. - * - * @param {Iterable} [iterable] - A collection of objects that should be added to this selection. - * @param {Number} [layer=10] - A dedicated render layer for selected objects. - */ - constructor(iterable?: Iterable, layer?: number); - /** - * Controls whether objects that are added to this selection should be removed from all other layers. - * - * @type {Boolean} - */ - exclusive: boolean; - set layer(arg: number); - /** - * The render layer for selected objects. - * - * @type {Number} - */ - get layer(): number; - /** - * Returns the current render layer for selected objects. - * - * The default layer is 10. If this collides with your own custom layers, please change it before rendering! - * - * @deprecated Use layer instead. - * @return {Number} The layer. - */ - getLayer(): number; - /** - * Sets the render layer for selected objects. - * - * The current selection will be updated accordingly. - * - * @deprecated Use layer instead. - * @param {Number} value - The layer. Range is [0, 31]. - */ - setLayer(value: number): void; - /** - * Indicates whether objects that are added to this selection will be removed from all other layers. - * - * @deprecated Use exclusive instead. - * @return {Number} Whether this selection is exclusive. Default is false. - */ - isExclusive(): number; - /** - * Controls whether objects that are added to this selection should be removed from all other layers. - * - * @deprecated Use exclusive instead. - * @param {Number} value - Whether this selection should be exclusive. - */ - setExclusive(value: number): void; - /** - * Clears this selection. - * - * @return {Selection} This selection. - */ - clear(): this; - /** - * Clears this selection and adds the given objects. - * - * @param {Iterable} objects - The objects that should be selected. - * @return {Selection} This selection. - */ - set(objects: Iterable): this; - /** - * An alias for {@link has}. - * - * @param {Object3D} object - An object. - * @return {Number} Returns 0 if the given object is currently selected, or -1 otherwise. - * @deprecated Added for backward-compatibility. - */ - indexOf(object: Object3D): number; - /** - * Adds an object to this selection. - * - * If {@link exclusive} is set to `true`, the object will also be removed from all other layers. - * - * @param {Object3D} object - The object that should be selected. - * @return {Selection} This selection. - */ - add(object: Object3D): this; - /** - * Removes an existing object from the selection. If the object doesn't exist it's added instead. - * - * @param {Object3D} object - The object. - * @return {Boolean} Returns true if the object is added, false otherwise. - */ - toggle(object: Object3D): boolean; - /** - * Sets the visibility of all selected objects. - * - * This method enables or disables render layer 0 of all selected objects. - * - * @param {Boolean} visible - Whether the selected objects should be visible. - * @return {Selection} This selection. - */ - setVisible(visible: boolean): this; - - } - - /** - * A timer. - * - * Original implementation by Michael Herzog (Mugen87). - * - * @deprecated Use `three/addons/misc/Timer.js` instead. - * @implements {ImmutableTimer} - * @implements {Disposable} - * @implements {EventListenerObject} - */ - export class Timer implements Disposable, ImmutableTimer, EventListenerObject { - handleEvent(object: Event): void; - /** - * The current delta time in seconds. - */ - get delta(): number; - /** - * The fixed delta time in seconds. - */ - get fixedDelta(): number; - set fixedDelta(value: number); - /** - * The elapsed time in seconds. - */ - get elapsed(): number; - /** - * Determines whether this timer should use a fixed time step. - */ - useFixedDelta: boolean; - /** - * The timescale. - */ - timescale: number; - /** - * Enables or disables auto reset based on page visibility. - * - * If enabled, the timer will be reset when the page becomes visible. This effectively pauses the timer when the page - * is hidden. Has no effect if the API is not supported. - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API - */ - get autoReset(): boolean; - set autoReset(value: boolean); - - getDelta(): number; - getElapsed(): number; - /** - * Updates this timer. - * - * @param {Number} [timestamp] - The current time in milliseconds. - */ - update(timestamp?: number): void; - /** - * Resets this timer. - * - * @return {Timer} This timer. - */ - reset(): Timer; - /** - * Disposes this timer. - */ - dispose(): void; - - } - - /** - * An ASCII effect. - * - * Warning: This effect cannot be merged with convolution effects. - */ - export class ASCIIEffect extends Effect { - - /** - * Constructs a new ASCII effect. - * - * @param {Object} [options] - The options. - * @param {ASCIITexture} [options.asciiTexture] - An ASCII character lookup texture. - * @param {Number} [options.cellSize=16] - The cell size. It's recommended to use even numbers. - * @param {Number} [options.color=null] - A color to use instead of the scene colors. - * @param {Boolean} [options.inverted=false] - Inverts the effect. - */ - constructor({ - asciiTexture, - cellSize, - color, - inverted - }?: { - asciiTexture?: ASCIITexture | null; - cellSize?: number; - color?: Color | string | number | null; - inverted?: boolean; - }); - - /** - * The current ASCII lookup texture. - * - * @type {ASCIITexture} - */ - get asciiTexture(): ASCIITexture | null; - set asciiTexture(value: ASCIITexture | null); - /** - * A color that overrides the scene colors. - * - * @type {Color | string | number | null} - */ - get color(): Color; - set color(value: Color | string | number | null); - /** - * Controls whether the effect should be inverted. - * - * @type {Boolean} - */ - get inverted(): boolean; - set inverted(value: boolean); - /** - * The cell size. - * - * @type {Number} - */ - get cellSize(): number; - set cellSize(value: number); - - } - - export type BloomEffectOptions = { - blendFunction?: BlendFunction; - luminanceThreshold?: number; - luminanceSmoothing?: number; - mipmapBlur?: boolean; - intensity?: number; - radius?: number; - levels?: number; - kernelSize?: KernelSize; - resolutionScale?: number; - width?: number; - height?: number; - resolutionX?: number; - resolutionY?: number; - }; + * Supported formats are `RGBAFormat`, `RedFormat` and `RGFormat`. + * + * @param {Number} width - The width. + * @param {Number} height - The height. + * @param {Number} [format=RedFormat] - The texture format. + * @param {Number} [type=UnsignedByteType] - The texture type. + */ + constructor(width: number, height: number, format?: number, type?: number); + +} + +/** + * An ASCII character lookup texture. + */ +export class ASCIITexture extends CanvasTexture { /** - * A bloom effect. - */ - export class BloomEffect extends Effect { - - /** - * Constructs a new bloom effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. - * @param {Number} [options.luminanceThreshold=1.0] - The luminance threshold. Raise this value to mask out darker elements in the scene. - * @param {Number} [options.luminanceSmoothing=0.03] - Controls the smoothness of the luminance threshold. - * @param {Boolean} [options.mipmapBlur=true] - Enables or disables mipmap blur. - * @param {Number} [options.intensity=1.0] - The bloom intensity. - * @param {Number} [options.radius=0.85] - The blur radius. Only applies to mipmap blur. - * @param {Number} [options.levels=8] - The amount of MIP levels. Only applies to mipmap blur. - * @param {KernelSize} [options.kernelSize=KernelSize.LARGE] - Deprecated. Use mipmapBlur instead. - * @param {Number} [options.resolutionScale=0.5] - Deprecated. Use mipmapBlur instead. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use mipmapBlur instead. - */ - constructor({ - blendFunction, - luminanceThreshold, - luminanceSmoothing, - mipmapBlur, - intensity, - radius, - levels, - kernelSize, - resolutionScale, - width, - height, - resolutionX, - resolutionY - }?: BloomEffectOptions); - - /** - * A luminance shader pass. - * - * This pass can be disabled to skip luminance filtering. - * - * @type {LuminancePass} - * @readonly - */ - readonly luminancePass: LuminancePass; - /** - * A blur pass. - * - * @type {KawaseBlurPass} - * @readonly - * @deprecated Use mipmapBlurPass instead. - */ - readonly blurPass: KawaseBlurPass; - /** - * A mipmap blur pass. - * - * @type {MipmapBlurPass} - * @readonly - */ - readonly mipmapBlurPass: MipmapBlurPass; - /** - * A texture that contains the intermediate result of this effect. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Returns the generated bloom texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * The resolution of this effect. - * - * @type {Resolution} - */ - get resolution(): Resolution; - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * Returns the blur pass. - * - * @deprecated Use blurPass instead. - * @return {KawaseBlurPass} The blur pass. - */ - getBlurPass(): KawaseBlurPass; - /** - * Returns the luminance pass. - * - * @deprecated Use luminancePass instead. - * @return {LuminancePass} The luminance pass. - */ - getLuminancePass(): LuminancePass; - /** - * The luminance material. - * - * @type {LuminanceMaterial} - */ - get luminanceMaterial(): LuminanceMaterial; - /** - * Returns the luminance material. - * - * @deprecated Use luminanceMaterial instead. - * @return {LuminanceMaterial} The material. - */ - getLuminanceMaterial(): LuminanceMaterial; - set width(arg: number); - /** - * The current width of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.width instead. - */ - get width(): number; - set height(arg: number); - /** - * The current height of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.height instead. - */ - get height(): number; - set dithering(arg: boolean); - /** - * Indicates whether dithering is enabled. - * - * @type {Boolean} - * @deprecated Use EffectPass.fullscreenMaterial.dithering instead. - */ - get dithering(): boolean; - set kernelSize(arg: KernelSize); - /** - * The blur kernel size. - * - * @type {KernelSize} - * @deprecated Use blurPass.kernelSize instead. - */ - get kernelSize(): KernelSize; - set distinction(arg: number); - /** - * @type {Number} - * @deprecated Use luminanceMaterial instead. - */ - get distinction(): number; - set intensity(arg: number); - /** - * The bloom intensity. - * - * @type {Number} - */ - get intensity(): number; - /** - * The bloom intensity. - * - * @deprecated Use intensity instead. - * @return {Number} The intensity. - */ - getIntensity(): number; - /** - * Sets the bloom intensity. - * - * @deprecated Use intensity instead. - * @param {Number} value - The intensity. - */ - setIntensity(value: number): void; - /** - * Returns the current resolution scale. - * - * @return {Number} The resolution scale. - * @deprecated Use resolution instead. - */ - getResolutionScale(): number; - /** - * Sets the resolution scale. - * - * @param {Number} scale - The new resolution scale. - * @deprecated Use resolution instead. - */ - setResolutionScale(scale: number): void; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Updates the size of internal render targets. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * A depth of field (bokeh) effect. - * - * Original shader code by Martins Upitis: - * http://artmartinsh.blogspot.com/2010/02/glsl-lens-blur-filter-with-bokeh.html - * - * @deprecated Use DepthOfFieldEffect instead. - */ - export class BokehEffect extends Effect { - - /** - * Constructs a new bokeh effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.focus=0.5] - The focus distance ratio, ranging from 0.0 to 1.0. - * @param {Number} [options.dof=0.02] - Depth of field. An area in front of and behind the focal point that still appears sharp. - * @param {Number} [options.aperture=0.015] - Camera aperture scale. Bigger values for stronger blur and shallower depth of field. - * @param {Number} [options.maxBlur=1.0] - The maximum blur strength. - */ - constructor({ - blendFunction, - focus, - dof, - aperture, - maxBlur - }?: { - blendFunction?: BlendFunction; - focus?: number; - dof?: number; - aperture?: number; - maxBlur?: number; - }); + * Constructs a new ASCII texture. + * + * @param {Object} [options] - The options. + * @param {String} [options.characters] - The character set to render. Defaults to a common ASCII art charset. + * @param {String} [options.font="Arial"] - The font. + * @param {Number} [options.fontSize=54] - The font size in pixels. + * @param {Number} [options.size=1024] - The texture size. + * @param {Number} [options.cellCount=16] - The cell count along each side of the texture. + */ + constructor({ + characters, + font, + fontSize, + size, + cellCount + }?: { + characters?: string; + font?: string; + fontSize?: number; + size?: number; + cellCount?: number; + }); + + /** + * The amount of characters in this texture. + * + * @type {Number} + * @readonly + */ + readonly characterCount: number; + /** + * The cell count along each side of the texture. + * + * @type {Number} + * @readonly + */ + readonly cellCount: number; + +} - } +/** + * A container for raw RGBA image data. + * + * @implements {ImageData} + */ +export class RawImageData implements ImageData { /** - * A brightness/contrast effect. + * Creates a new image data container. * - * Reference: https://github.com/evanw/glfx.js + * @param {ImageData|Image} image - An image or plain image data. + * @return {RawImageData} The image data. */ - export class BrightnessContrastEffect extends Effect { + static from( + image: + | ImageData + | (new (width?: number, height?: number) => HTMLImageElement) + ): RawImageData; - /** - * Constructs a new brightness/contrast effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.brightness=0.0] - The brightness factor, ranging from -1 to 1, where 0 means no change. - * @param {Number} [options.contrast=0.0] - The contrast factor, ranging from -1 to 1, where 0 means no change. - */ - constructor({ - blendFunction, - brightness, - contrast - }?: { - blendFunction?: BlendFunction; - brightness?: number; - contrast?: number; - }); - - set brightness(arg: number); - /** - * The brightness. - * - * @type {Number} - */ - get brightness(): number; - /** - * Returns the brightness. - * - * @deprecated Use brightness instead. - * @return {Number} The brightness. - */ - getBrightness(): number; - /** - * Sets the brightness. - * - * @deprecated Use brightness instead. - * @param {Number} value - The brightness. - */ - setBrightness(value: number): void; - set contrast(arg: number); - /** - * The contrast. - * - * @type {Number} - */ - get contrast(): number; - /** - * Returns the contrast. - * - * @deprecated Use contrast instead. - * @return {Number} The contrast. - */ - getContrast(): number; - /** - * Sets the contrast. - * - * @deprecated Use contrast instead. - * @param {Number} value - The contrast. - */ - setContrast(value: number): void; - - } - - /** - * A chromatic aberration effect. - */ - export class ChromaticAberrationEffect extends Effect { - - /** - * Constructs a new chromatic aberration effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Vector2} [options.offset] - The color offset. - * @param {Boolean} [options.radialModulation=false] - Whether the effect should be modulated with a radial gradient. - * @param {Number} [options.modulationOffset=0.15] - The modulation offset. Only applies if `radialModulation` is enabled. - */ - constructor({ - blendFunction, - offset, - radialModulation, - modulationOffset - }?: { - blendFunction?: BlendFunction; - offset?: Vector2; - radialModulation: boolean, - modulationOffset: number - }); - - set offset(arg: Vector2); - /** - * The color offset. - * - * @type {Vector2} - */ - get offset(): Vector2; - /** - * Indicates whether radial modulation is enabled. - * - * When enabled, the effect will be weaker in the middle and stronger towards the screen edges. - * - * @type {Boolean} - */ - get radialModulation(): boolean; - set radialModulation(arg: boolean); - /** - * The modulation offset. - * - * @type {Number} - */ - get modulationOffset(): number; - set modulationOffset(arg: number); - /** - * Returns the color offset vector. - * - * @deprecated Use offset instead. - * @return {Vector2} The offset. - */ - getOffset(): Vector2; - /** - * Sets the color offset vector. - * - * @deprecated Use offset instead. - * @param {Vector2} value - The offset. - */ - setOffset(value: Vector2): void; - - } - - /** - * A fast greyscale effect. - */ - export class ColorAverageEffect extends Effect { - - /** - * Constructs a new color average effect. - * - * @param {BlendFunction} [blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - */ - constructor(blendFunction?: BlendFunction); - - } - - /** - * A color depth effect. - * - * Simulates a hardware limitation to achieve a retro feel. The real color depth will not be altered by this effect. - */ - export class ColorDepthEffect extends Effect { - - /** - * Constructs a new color depth effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.bits=16] - The color bit depth. - */ - constructor({ - blendFunction, - bits - }?: { - blendFunction?: BlendFunction; - bits?: number; - }); - - set bitDepth(arg: number); - /** - * The virtual amount of color bits. - * - * Each color channel effectively uses a fourth of the total amount of bits. Alpha remains unaffected. - * - * @type {Number} - */ - get bitDepth(): number; - /** - * Returns the current color bit depth. - * - * @return {Number} The bit depth. - */ - getBitDepth(): number; - /** - * Sets the virtual amount of color bits. - * - * @param {Number} value - The bit depth. - */ - setBitDepth(value: number): void; - - } - - /** - * A depth visualization effect. - * - * Useful for debugging. - */ - export class DepthEffect extends Effect { - - /** - * Constructs a new depth effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Boolean} [options.inverted=false] - Whether the depth should be inverted. - */ - constructor({ - blendFunction, - inverted - }?: { - blendFunction?: BlendFunction; - inverted?: boolean; - }); - - set inverted(arg: boolean); - /** - * Indicates whether depth should be inverted. - * - * @type {Boolean} - */ - get inverted(): boolean; - /** - * Indicates whether the rendered depth is inverted. - * - * @deprecated Use inverted instead. - * @return {Boolean} Whether the rendered depth is inverted. - */ - isInverted(): boolean; - /** - * Enables or disables depth inversion. - * - * @deprecated Use inverted instead. - * @param {Boolean} value - Whether depth should be inverted. - */ - setInverted(value: boolean): void; - - } - - /** - * A depth of field effect. - * - * Based on a graphics study by Adrian Courrèges and an article by Steve Avery: - * https://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/ - * https://pixelmischiefblog.wordpress.com/2016/11/25/bokeh-depth-of-field/ - */ - export class DepthOfFieldEffect extends Effect { - - /** - * Constructs a new depth of field effect. - * - * @param {Camera} camera - The main camera. - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.worldFocusDistance] - The focus distance in world units. - * @param {Number} [options.worldFocusRange] - The focus distance in world units. - * @param {Number} [options.focusDistance=0.0] - The normalized focus distance. Range is [0.0, 1.0]. - * @param {Number} [options.focalLength=0.1] - The focal length. Range is [0.0, 1.0]. - * @param {Number} [options.focusRange=0.1] - The focus range. Range is [0.0, 1.0]. - * @param {Number} [options.focalLength=0.1] - Deprecated. - * @param {Number} [options.bokehScale=1.0] - The scale of the bokeh blur. - * @param {Number} [options.resolutionScale=1.0] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - */ - constructor( - camera?: Camera, - { - blendFunction, - worldFocusDistance, - worldFocusRange, - focusDistance, - focalLength, - focusRange, - bokehScale, - resolutionScale, - resolutionX, - resolutionY, - width, - height - }?: { - blendFunction?: BlendFunction; - worldFocusDistance?: number; - worldFocusRange?: number; - focusDistance?: number; - focalLength?: number; - focusRange?: number; - bokehScale?: number; - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - } - ); - - /** - * This pass blurs the foreground CoC buffer to soften edges. - * - * @type {KawaseBlurPass} - */ - readonly blurPass: KawaseBlurPass; - /** - * A target position that should be kept in focus. Set to `null` to disable auto focus. - * - * @type {Vector3} - */ - target: Vector3; - set bokehScale(arg: number); - /** - * The current bokeh scale. - * - * @type {Number} - */ - get bokehScale(): number; - /** - * The circle of confusion texture. - * - * @type {Texture} - */ - get cocTexture(): Texture; - /** - * The mask function. Default is `MULTIPLY_RGB`. - * - * @type {MaskFunction} - */ - get maskFunction(): MaskFunction; - set maskFunction(arg: MaskFunction); - /** - * The circle of confusion material. - * - * @type {CircleOfConfusionMaterial} - */ - get cocMaterial(): CircleOfConfusionMaterial; - /** - * The circle of confusion material. - * - * @deprecated Use cocMaterial instead. - * @type {CircleOfConfusionMaterial} - */ - get circleOfConfusionMaterial(): CircleOfConfusionMaterial; - /** - * Returns the circle of confusion material. - * - * @deprecated Use cocMaterial instead. - * @return {CircleOfConfusionMaterial} The material. - */ - getCircleOfConfusionMaterial(): CircleOfConfusionMaterial; - /** - * Returns the pass that blurs the foreground CoC buffer to soften edges. - * - * @deprecated Use blurPass instead. - * @return {KawaseBlurPass} The blur pass. - */ - getBlurPass(): KawaseBlurPass; - /** - * The resolution of this effect. - * - * @type {Resolution} - */ - get resolution(): Resolution; - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * Returns the current bokeh scale. - * - * @deprecated Use bokehScale instead. - * @return {Number} The scale. - */ - getBokehScale(): number; - /** - * Sets the bokeh scale. - * - * @deprecated Use bokehScale instead. - * @param {Number} value - The scale. - */ - setBokehScale(value: number): void; - /** - * Returns the current auto focus target. - * - * @deprecated Use target instead. - * @return {Vector3} The target. - */ - getTarget(): Vector3; - /** - * Sets the auto focus target. - * - * @deprecated Use target instead. - * @param {Vector3} value - The target. - */ - setTarget(value: Vector3): void; - /** - * Calculates the focus distance from the camera to the given position. - * - * @param {Vector3} target - The target. - * @return {Number} The normalized focus distance. - */ - calculateFocusDistance(target: Vector3): number; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Updates the size of internal render targets. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * A dot screen effect. - */ - export class DotScreenEffect extends Effect { - - /** - * Constructs a new dot screen effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.angle=1.57] - The angle of the dot pattern. - * @param {Number} [options.scale=1.0] - The scale of the dot pattern. - */ - constructor({ - blendFunction, - angle, - scale - }?: { - blendFunction?: BlendFunction; - angle?: number; - scale?: number; - }); - - set angle(arg: number); - /** - * The angle. - * - * @type {Number} - */ - get angle(): number; - /** - * Returns the pattern angle. - * - * @deprecated Use angle instead. - * @return {Number} The angle in radians. - */ - getAngle(): number; - /** - * Sets the pattern angle. - * - * @deprecated Use angle instead. - * @param {Number} value - The angle in radians. - */ - setAngle(value: number): void; - set scale(arg: number); - /** - * The scale. - * - * @type {Number} - */ - get scale(): number; - - } - - /** - * A gamma correction effect. - * - * @deprecated Set WebGLRenderer.outputEncoding to sRGBEncoding instead. - */ - export class GammaCorrectionEffect extends Effect { - - /** - * Constructs a new gamma correction effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.gamma=2.0] - The gamma factor. - */ - constructor({ - blendFunction, - gamma - }?: { - blendFunction?: BlendFunction; - gamma?: number; - }); - - } - - /** - * A tilt shift effect. - */ - export class TiltShiftEffect extends Effect { - - /** - * Constructs a new tilt shift Effect - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction] - The blend function of this effect. - * @param {Number} [options.offset=0.0] - The relative offset of the focus area. - * @param {Number} [options.rotation=0.0] - The rotation of the focus area in radians. - * @param {Number} [options.focusArea=0.4] - The relative size of the focus area. - * @param {Number} [options.feather=0.3] - The softness of the focus area edges. - * @param {Number} [options.bias=0.06] - Deprecated. - * @param {KernelSize} [options.kernelSize=KernelSize.MEDIUM] - The blur kernel size. - * @param {Number} [options.resolutionScale=0.5] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - */ - constructor({ - blendFunction, - offset, - rotation, - focusArea, - feather, - bias, - kernelSize, - resolutionScale, - resolutionX, - resolutionY - }?: { - blendFunction?: BlendFunction, - offset?: number, - rotation?: number, - focusArea?: number, - feather?: number, - bias?: number, - kernelSize?: KernelSize, - resolutionScale?: number, - resolutionX?: number, - resolutionY?: number - }); - - /** - * A blur pass. - * - * @type {KawaseBlurPass} - */ - readonly blurPass: KawaseBlurPass; - /** - * The resolution. - * - * @type {Resolution} - * @readonly - */ - get resolution(): Resolution; - /** - * The rotation of the focus area in radians. - * - * @type {Number} - */ - get rotation(): number; - set rotation(arg: number); - /** - * The relative offset of the focus area. - * - * @type {Number} - */ - get offset(): number; - set offset(arg: number); - /** - * The relative size of the focus area. - * - * @type {Number} - */ - - get focusArea(): number; - set focusArea(arg: number); - /** - * The softness of the focus area edges. - * - * @type {Number} - */ - get feather(): number; - set feather(arg: number); - /** - * A blend bias. - * - * @type {Number} - * @deprecated - */ - get bias(): number; - set bias(arg: number); - } - - /** - * A glitch effect. - * - * This effect can be used in conjunction with the {@link ChromaticAberrationEffect}. - * - * Reference: https://github.com/staffantan/unityglitch - */ - export class GlitchEffect extends Effect { - - /** - * Constructs a new glitch effect. - * - * TODO Change ratio to 0.15. - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Vector2} [options.chromaticAberrationOffset] - A chromatic aberration offset. If provided, the glitch effect will influence this offset. - * @param {Vector2} [options.delay] - The minimum and maximum delay between glitch activations in seconds. - * @param {Vector2} [options.duration] - The minimum and maximum duration of a glitch in seconds. - * @param {Vector2} [options.strength] - The strength of weak and strong glitches. - * @param {Texture} [options.perturbationMap] - A perturbation map. If none is provided, a noise texture will be created. - * @param {Number} [options.dtSize=64] - The size of the generated noise map. Will be ignored if a perturbation map is provided. - * @param {Number} [options.columns=0.05] - The scale of the blocky glitch columns. - * @param {Number} [options.ratio=0.85] - The threshold for strong glitches. - */ - constructor({ - blendFunction, - chromaticAberrationOffset, - delay, - duration, - strength, - columns, - ratio, - perturbationMap, - dtSize - }?: { - blendFunction?: BlendFunction; - chromaticAberrationOffset?: Vector2; - delay?: Vector2; - duration?: Vector2; - strength?: Vector2; - perturbationMap?: Texture; - dtSize?: number; - columns?: number; - ratio?: number; - }); - - set perturbationMap(arg: Texture); - /** - * The perturbation map. - * - * @type {Texture} - */ - get perturbationMap(): Texture; - /** - * The minimum and maximum delay between glitch activations in seconds. - * - * @type {Vector2} - * @deprecated Use minDelay and maxDelay instead. - */ - delay: Vector2; - /** - * The minimum and maximum duration of a glitch in seconds. - * - * @type {Vector2} - * @deprecated Use minDuration and maxDuration instead. - */ - duration: Vector2; - /** - * The strength of weak and strong glitches. - * - * @type {Vector2} - * @deprecated Use minStrength and maxStrength instead. - */ - strength: Vector2; - /** - * The effect mode. - * - * @type {GlitchMode} - */ - mode: GlitchMode; - /** - * The ratio between weak (0.0) and strong (1.0) glitches. Range is [0.0, 1.0]. - * - * This value is currently being treated as a threshold for strong glitches, i.e. it's inverted. - * - * TODO Resolve inversion. - * @type {Number} - */ - ratio: number; - /** - * The chromatic aberration offset. - * - * @type {Vector2} - */ - chromaticAberrationOffset: Vector2; - /** - * Indicates whether the glitch effect is currently active. - * - * @type {Boolean} - */ - get active(): boolean; - /** - * Indicates whether the glitch effect is currently active. - * - * @deprecated Use active instead. - * @return {Boolean} Whether the glitch effect is active. - */ - isActive(): boolean; - set minDelay(arg: number); - /** - * The minimum delay between glitch activations. - * - * @type {Number} - */ - get minDelay(): number; - /** - * Returns the minimum delay between glitch activations. - * - * @deprecated Use minDelay instead. - * @return {Number} The minimum delay in seconds. - */ - getMinDelay(): number; - /** - * Sets the minimum delay between glitch activations. - * - * @deprecated Use minDelay instead. - * @param {Number} value - The minimum delay in seconds. - */ - setMinDelay(value: number): void; - set maxDelay(arg: number); - /** - * The maximum delay between glitch activations. - * - * @type {Number} - */ - get maxDelay(): number; - /** - * Returns the maximum delay between glitch activations. - * - * @deprecated Use maxDelay instead. - * @return {Number} The maximum delay in seconds. - */ - getMaxDelay(): number; - /** - * Sets the maximum delay between glitch activations. - * - * @deprecated Use maxDelay instead. - * @param {Number} value - The maximum delay in seconds. - */ - setMaxDelay(value: number): void; - set minDuration(arg: number); - /** - * The minimum duration of sporadic glitches. - * - * @type {Number} - */ - get minDuration(): number; - /** - * Returns the minimum duration of sporadic glitches. - * - * @deprecated Use minDuration instead. - * @return {Number} The minimum duration in seconds. - */ - getMinDuration(): number; - /** - * Sets the minimum duration of sporadic glitches. - * - * @deprecated Use minDuration instead. - * @param {Number} value - The minimum duration in seconds. - */ - setMinDuration(value: number): void; - set maxDuration(arg: number); - /** - * The maximum duration of sporadic glitches. - * - * @type {Number} - */ - get maxDuration(): number; - /** - * Returns the maximum duration of sporadic glitches. - * - * @deprecated Use maxDuration instead. - * @return {Number} The maximum duration in seconds. - */ - getMaxDuration(): number; - /** - * Sets the maximum duration of sporadic glitches. - * - * @deprecated Use maxDuration instead. - * @param {Number} value - The maximum duration in seconds. - */ - setMaxDuration(value: number): void; - set minStrength(arg: number); - /** - * The strength of weak glitches. - * - * @type {Number} - */ - get minStrength(): number; - /** - * Returns the strength of weak glitches. - * - * @deprecated Use minStrength instead. - * @return {Number} The strength. - */ - getMinStrength(): number; - /** - * Sets the strength of weak glitches. - * - * @deprecated Use minStrength instead. - * @param {Number} value - The strength. - */ - setMinStrength(value: number): void; - set maxStrength(arg: number); - /** - * The strength of strong glitches. - * - * @type {Number} - */ - get maxStrength(): number; - /** - * Returns the strength of strong glitches. - * - * @deprecated Use maxStrength instead. - * @return {Number} The strength. - */ - getMaxStrength(): number; - /** - * Sets the strength of strong glitches. - * - * @deprecated Use maxStrength instead. - * @param {Number} value - The strength. - */ - setMaxStrength(value: number): void; - /** - * Returns the current glitch mode. - * - * @deprecated Use mode instead. - * @return {GlitchMode} The mode. - */ - getMode(): GlitchMode; - /** - * Sets the current glitch mode. - * - * @deprecated Use mode instead. - * @param {GlitchMode} value - The mode. - */ - setMode(value: GlitchMode): void; - /** - * Returns the glitch ratio. - * - * @deprecated Use ratio instead. - * @return {Number} The ratio. - */ - getGlitchRatio(): number; - /** - * Sets the ratio of weak (0.0) and strong (1.0) glitches. - * - * @deprecated Use ratio instead. - * @param {Number} value - The ratio. Range is [0.0, 1.0]. - */ - setGlitchRatio(value: number): void; - set columns(arg: number); - /** - * The glitch column size. - * - * @type {Number} - */ - get columns(): number; - /** - * Returns the glitch column size. - * - * @deprecated Use columns instead. - * @return {Number} The glitch column size. - */ - getGlitchColumns(): number; - /** - * Sets the glitch column size. - * - * @deprecated Use columns instead. - * @param {Number} value - The glitch column size. - */ - setGlitchColumns(value: number): void; - /** - * Returns the chromatic aberration offset. - * - * @deprecated Use chromaticAberrationOffset instead. - * @return {Vector2} The offset. - */ - getChromaticAberrationOffset(): Vector2; - /** - * Sets the chromatic aberration offset. - * - * @deprecated Use chromaticAberrationOffset instead. - * @param {Vector2} value - The offset. - */ - setChromaticAberrationOffset(value: Vector2): void; - /** - * Returns the current perturbation map. - * - * @deprecated Use perturbationMap instead. - * @return {Texture} The current perturbation map. - */ - getPerturbationMap(): Texture; - /** - * Replaces the current perturbation map with the given one. - * - * The current map will be disposed if it was generated by this effect. - * - * @deprecated Use perturbationMap instead. - * @param {Texture} value - The new perturbation map. - */ - setPerturbationMap(value: Texture): void; - /** - * Generates a perturbation map. - * - * @deprecated Use NoiseTexture instead. - * @param {Number} [value=64] - The texture size. - * @return {DataTexture} The perturbation map. - */ - generatePerturbationMap(value?: number): DataTexture; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Deletes generated resources. - */ - dispose(): void; - - } - - /** - * A glitch mode enumeration. + /** + * Constructs a new image data container. * - * @type {Object} - * @property {Number} DISABLED - No glitches. - * @property {Number} SPORADIC - Sporadic glitches. - * @property {Number} CONSTANT_MILD - Constant mild glitches. - * @property {Number} CONSTANT_WILD - Constant wild glitches. - */ - export enum GlitchMode { - DISABLED, - SPORADIC, - CONSTANT_MILD, - CONSTANT_WILD, - } - - /** - * A god rays effect. - */ - export class GodRaysEffect extends Effect { - - /** - * Constructs a new god rays effect. - * - * @param {Camera} [camera] - The main camera. - * @param {Mesh|Points} [lightSource] - The light source. Must not write depth and has to be flagged as transparent. - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. - * @param {Number} [options.samples=60.0] - The number of samples per pixel. - * @param {Number} [options.density=0.96] - The density of the light rays. - * @param {Number} [options.decay=0.9] - An illumination decay factor. - * @param {Number} [options.weight=0.4] - A light ray weight factor. - * @param {Number} [options.exposure=0.6] - A constant attenuation coefficient. - * @param {Number} [options.clampMax=1.0] - An upper bound for the saturation of the overall effect. - * @param {Number} [options.resolutionScale=0.5] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - * @param {KernelSize} [options.kernelSize=KernelSize.SMALL] - The blur kernel size. Has no effect if blur is disabled. - * @param {Boolean} [options.blur=true] - Whether the god rays should be blurred to reduce artifacts. - */ - constructor( - camera?: Camera, - lightSource?: Mesh | Points, - { - blendFunction, - samples, - density, - decay, - weight, - exposure, - clampMax, - resolutionScale, - resolutionX, - resolutionY, - width, - height, - kernelSize, - blur - }?: { - blendFunction?: BlendFunction; - samples?: number; - density?: number; - decay?: number; - weight?: number; - exposure?: number; - clampMax?: number; - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - kernelSize?: KernelSize; - blur?: boolean; - } - ); - - /** - * A blur pass that reduces aliasing artifacts and makes the light softer. - * - * This pass can be disabled to improve performance. - * - * @type {KawaseBlurPass} - */ - blurPass: KawaseBlurPass; - /** - * Returns the blur pass that reduces aliasing artifacts and makes the light softer. - * - * @deprecated Use blurPass instead. - * @return {KawaseBlurPass} The blur pass. - */ - getBlurPass(): KawaseBlurPass; - /** - * Sets the light source. - * - * @type {Mesh|Points} - */ - get lightSource(): Mesh | Points | null; - set lightSource(value: Mesh | Points | null); - /** - * A texture that contains the intermediate result of this effect. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * The depth mask material. - * - * @type {DepthMaskMaterial} - */ - get depthMaskMaterial(): DepthMaskMaterial; - /** - * Returns the god rays texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * The internal god rays material. - * - * @type {GodRaysMaterial} - */ - get godRaysMaterial(): GodRaysMaterial; - /** - * Returns the god rays material. - * - * @deprecated Use godRaysMaterial instead. - * @return {GodRaysMaterial} The material. - */ - getGodRaysMaterial(): GodRaysMaterial; - /** - * The resolution of this effect. - * - * @type {Resolution} - */ - get resolution(): Resolution; - /** - * Returns the resolution of this effect. - * - * @deprecated Use resolution instead. - * @return {GodRaysMaterial} The material. - */ - getResolution(): GodRaysMaterial; - set width(arg: number); - /** - * The current width of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.width instead. - */ - get width(): number; - set height(arg: number); - /** - * The current height of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.height instead. - */ - get height(): number; - set dithering(arg: boolean); - /** - * Indicates whether dithering is enabled. - * - * @type {Boolean} - * @deprecated - */ - get dithering(): boolean; - set blur(arg: boolean); - /** - * Indicates whether the god rays should be blurred to reduce artifacts. - * - * @type {Boolean} - * @deprecated Use blurPass.enabled instead. - */ - get blur(): boolean; - set kernelSize(arg: KernelSize); - /** - * The blur kernel size. - * - * @type {KernelSize} - * @deprecated Use blurPass.kernelSize instead. - */ - get kernelSize(): KernelSize; - /** - * Returns the current resolution scale. - * - * @return {Number} The resolution scale. - * @deprecated Use resolution instead. - */ - getResolutionScale(): number; - /** - * Sets the resolution scale. - * - * @param {Number} scale - The new resolution scale. - * @deprecated Use resolution instead. - */ - setResolutionScale(scale: number): void; - /** - * A higher sample count improves quality at the cost of performance. - * - * @type {Number} - * @deprecated Use godRaysMaterial.samples instead. - */ - set samples(arg: number); - /** - * The number of samples per pixel. - * - * @type {Number} - * @deprecated Use godRaysMaterial.samples instead. - */ - get samples(): number; - /** - * Sets the depth texture. - * - * @param {Texture} depthTexture - A depth texture. - * @param {Number} [depthPacking=BasicDepthPacking] - The depth packing. - */ - setDepthTexture(depthTexture: Texture, depthPacking?: number): void; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Updates the size of internal render targets. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * A grid effect. - */ - export class GridEffect extends Effect { - - /** - * Constructs a new grid effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.OVERLAY] - The blend function of this effect. - * @param {Number} [options.scale=1.0] - The scale of the grid pattern. - * @param {Number} [options.lineWidth=0.0] - The line width of the grid pattern. - */ - constructor({ - blendFunction, - scale, - lineWidth - }?: { - blendFunction?: BlendFunction; - scale?: number; - lineWidth?: number; - }); - - set scale(arg: number); - /** - * The scale. - * - * @type {Number} - */ - get scale(): number; - set lineWidth(arg: number); - /** - * The line width. - * - * @type {Number} - */ - get lineWidth(): number; - /** - * Returns the current grid scale. - * - * @deprecated Use scale instead. - * @return {Number} The grid scale. - */ - getScale(): number; - /** - * Sets the grid scale. - * - * @deprecated Use scale instead. - * @param {Number} value - The new grid scale. - */ - setScale(value: number): void; - /** - * Returns the current grid line width. - * - * @deprecated Use lineWidth instead. - * @return {Number} The grid line width. - */ - getLineWidth(): number; - /** - * Sets the grid line width. - * - * @deprecated Use lineWidth instead. - * @param {Number} value - The new grid line width. - */ - setLineWidth(value: number): void; - /** - * Updates the size of this pass. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * A hue/saturation effect. - * - * Reference: https://github.com/evanw/glfx.js - */ - export class HueSaturationEffect extends Effect { - - /** - * Constructs a new hue/saturation effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.hue=0.0] - The hue in radians. - * @param {Number} [options.saturation=0.0] - The saturation factor, ranging from -1 to 1, where 0 means no change. - */ - constructor({ - blendFunction, - hue, - saturation - }?: { - blendFunction?: BlendFunction; - hue?: number; - saturation?: number; - }); - - set hue(arg: number); - /** - * The hue. - * - * @type {Number} - */ - get hue(): number; - set saturation(arg: number); - /** - * The saturation. - * - * @type {Number} - */ - get saturation(): number; - /** - * Returns the saturation. - * - * @deprecated Use saturation instead. - * @return {Number} The saturation. - */ - getSaturation(): number; - /** - * Sets the saturation. - * - * @deprecated Use saturation instead. - * @param {Number} value - The saturation. - */ - setSaturation(value: number): void; - /** - * Returns the hue. - * - * @deprecated Use hue instead. - * @return {Number} The hue in radians. - */ - getHue(): number; - /** - * Sets the hue. - * - * @deprecated Use hue instead. - * @param {Number} value - The hue in radians. - */ - setHue(value: number): void; - - } - - /** - * A 1D LUT effect. - */ - - export class LUT1DEffect extends Effect { - - /** - * Constructs a new color grading effect. - * - * @param {Texture} lut - The lookup texture. - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SET] - The blend function of this effect. - */ - constructor( - lut: Texture, - { - blendFunction - }?: { - blendFunction?: BlendFunction; - } - ); - - } - /** - * A LUT effect. - * - * The tetrahedral interpolation algorithm was inspired by an implementation from OpenColorIO which is licensed under - * the BSD 3-Clause License. - * - * The manual trilinear interpolation algorithm is based on an implementation by Garret Johnson which is licensed under - * the MIT License. - * - * References: - * https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-quality-rendering/chapter-24-using-lookup-tables-accelerate-color - * https://www.nvidia.com/content/GTC/posters/2010/V01-Real-Time-Color-Space-Conversion-for-High-Resolution-Video.pdf - * https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/master/src/OpenColorIO/ops/lut3d/ - * https://github.com/gkjohnson/threejs-sandbox/tree/master/3d-lut - */ - export class LUT3DEffect extends Effect { - - /** - * Constructs a new color grading effect. - * - * @param {Texture} lut - The lookup texture. - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SET] - The blend function of this effect. - * @param {Boolean} [options.tetrahedralInterpolation=false] - Enables or disables tetrahedral interpolation. - * @param {ColorSpace} [options.inputColorSpace=SRGBColorSpace] - The input color space. - */ - constructor( - lut: Texture, - { - blendFunction, - tetrahedralInterpolation, - inputColorSpace - }?: { - blendFunction?: BlendFunction; - tetrahedralInterpolation?: boolean; - inputColorSpace?: ColorSpace; - } - ); - - /** - * Indicates whether tetrahedral interpolation is enabled. Requires a 3D LUT, disabled by default. - * - * Tetrahedral interpolation produces highly accurate results but is slower than hardware interpolation. - * - * @type {Boolean} - */ - get tetrahedralInterpolation(): boolean; - set tetrahedralInterpolation(arg: boolean); - /** - * The LUT. - * - * @type {Texture} - */ - get lut(): Texture; - set lut(arg: Texture); - /** - * Returns the current LUT. - * - * @deprecated Use lut instead. - * @return {Texture} The LUT. - */ - getLUT(): Texture; - /** - * Sets the LUT. - * - * @deprecated Use lut instead. - * @param {Texture} value - The LUT. - */ - setLUT(value: Texture): void; - /** - * Enables or disables tetrahedral interpolation. - * - * @deprecated Use tetrahedralInterpolation instead. - * @param {Boolean} value - Whether tetrahedral interpolation should be enabled. - */ - setTetrahedralInterpolationEnabled(value: boolean): void; - - } - - /** - * A noise effect. - */ - export class NoiseEffect extends Effect { - - /** - * Constructs a new noise effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect. - * @param {Boolean} [options.premultiply=false] - Whether the noise should be multiplied with the input colors prior to blending. - */ - constructor({ - blendFunction, - premultiply - }?: { - blendFunction?: BlendFunction; - premultiply?: boolean; - }); - - set premultiply(arg: boolean); - /** - * Indicates whether noise will be multiplied with the input colors prior to blending. - * - * @type {Boolean} - */ - get premultiply(): boolean; - /** - * Indicates whether noise will be multiplied with the input colors prior to blending. - * - * @deprecated Use premultiply instead. - * @return {Boolean} Whether noise is premultiplied. - */ - isPremultiplied(): boolean; - /** - * Controls whether noise should be multiplied with the input colors prior to blending. - * - * @deprecated Use premultiply instead. - * @param {Boolean} value - Whether noise should be premultiplied. - */ - setPremultiplied(value: boolean): void; - - } - - /** - * An outline effect. - */ - export class OutlineEffect extends Effect { - - /** - * Constructs a new outline effect. - * - * @param {Scene} scene - The main scene. - * @param {Camera} camera - The main camera. - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function. Use `BlendFunction.ALPHA` for dark outlines. - * @param {Texture} [options.patternTexture=null] - A pattern texture. - * @param {Number} [options.patternScale=1.0] - The pattern scale. - * @param {Number} [options.edgeStrength=1.0] - The edge strength. - * @param {Number} [options.pulseSpeed=0.0] - The pulse speed. A value of zero disables the pulse effect. - * @param {Number} [options.visibleEdgeColor=0xffffff] - The color of visible edges. - * @param {Number} [options.hiddenEdgeColor=0x22090a] - The color of hidden edges. - * @param {KernelSize} [options.kernelSize=KernelSize.VERY_SMALL] - The blur kernel size. - * @param {Boolean} [options.blur=false] - Whether the outline should be blurred. - * @param {Boolean} [options.xRay=true] - Whether occluded parts of selected objects should be visible. - * @param {Number} [options.multisampling=0] - The number of samples used for multisample antialiasing. Requires WebGL 2. - * @param {Number} [options.resolutionScale=0.5] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - */ - constructor( - scene?: Scene, - camera?: Camera, - { - blendFunction, - patternTexture, - patternScale, - edgeStrength, - pulseSpeed, - visibleEdgeColor, - hiddenEdgeColor, - multisampling, - resolutionScale, - resolutionX, - resolutionY, - width, - height, - kernelSize, - blur, - xRay - }?: { - blendFunction?: BlendFunction; - patternTexture?: Texture; - patternScale?: number; - edgeStrength?: number; - pulseSpeed?: number; - visibleEdgeColor?: number; - hiddenEdgeColor?: number; - multisampling?: number; - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - kernelSize?: KernelSize; - blur?: boolean; - xRay?: boolean; - } - ); - - set patternTexture(arg: Texture); - /** - * The pattern texture. Set to `null` to disable. - * - * @type {Texture} - */ - get patternTexture(): Texture; - set xRay(arg: boolean); - /** - * Indicates whether X-ray mode is enabled. - * - * @type {Boolean} - */ - get xRay(): boolean; - /** - * A blur pass. - * - * @type {KawaseBlurPass} - */ - blurPass: KawaseBlurPass; - /** - * A selection of objects that will be outlined. - * - * The default layer of this selection is 10. - * - * @type {Selection} - */ - selection: Selection; - /** - * The pulse speed. Set to 0 to disable. - * - * @type {Number} - */ - pulseSpeed: number; - /** - * The resolution of this effect. - * - * @type {Resolution} - */ - get resolution(): Resolution; - /** - * Returns the resolution. - * - * @return {Resizer} The resolution. - */ - getResolution(): Resizer; - set patternScale(arg: number); - /** - * The pattern scale. - * - * @type {Number} - */ - get patternScale(): number; - set edgeStrength(arg: number); - /** - * The edge strength. - * - * @type {Number} - */ - get edgeStrength(): number; - set visibleEdgeColor(arg: Color); - /** - * The visible edge color. - * - * @type {Color} - */ - get visibleEdgeColor(): Color; - set hiddenEdgeColor(arg: Color); - /** - * The hidden edge color. - * - * @type {Color} - */ - get hiddenEdgeColor(): Color; - /** - * The amount of MSAA samples. - * - * Requires WebGL 2. Set to zero to disable multisampling. - * - * @experimental Requires three >= r138. - * @type {Number} - */ - get multisampling(): number; - set multisampling(arg: number); - /** - * Returns the blur pass. - * - * @deprecated Use blurPass instead. - * @return {KawaseBlurPass} The blur pass. - */ - getBlurPass(): KawaseBlurPass; - /** - * Returns the selection. - * - * @deprecated Use selection instead. - * @return {Selection} The selection. - */ - getSelection(): Selection; - /** - * Returns the pulse speed. - * - * @deprecated Use pulseSpeed instead. - * @return {Number} The speed. - */ - getPulseSpeed(): number; - /** - * Sets the pulse speed. Set to zero to disable. - * - * @deprecated Use pulseSpeed instead. - * @param {Number} value - The speed. - */ - setPulseSpeed(value: number): void; - set width(arg: number); - /** - * The current width of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.width instead. - */ - get width(): number; - set height(arg: number); - /** - * The current height of the internal render targets. - * - * @type {Number} - * @deprecated Use resolution.height instead. - */ - get height(): number; - set selectionLayer(arg: number); - /** - * The selection layer. - * - * @type {Number} - * @deprecated Use selection.layer instead. - */ - get selectionLayer(): number; - set dithering(arg: boolean); - /** - * Indicates whether dithering is enabled. - * - * @type {Boolean} - * @deprecated - */ - get dithering(): boolean; - set kernelSize(arg: KernelSize); - /** - * The blur kernel size. - * - * @type {KernelSize} - * @deprecated Use blurPass.kernelSize instead. - */ - get kernelSize(): KernelSize; - set blur(arg: boolean); - /** - * Indicates whether the outlines should be blurred. - * - * @type {Boolean} - * @deprecated Use blurPass.enabled instead. - */ - get blur(): boolean; - /** - * Indicates whether X-ray mode is enabled. - * - * @deprecated Use xRay instead. - * @return {Boolean} Whether X-ray mode is enabled. - */ - isXRayEnabled(): boolean; - /** - * Enables or disables X-ray outlines. - * - * @deprecated Use xRay instead. - * @param {Boolean} value - Whether X-ray should be enabled. - */ - setXRayEnabled(value: boolean): void; - /** - * Sets the pattern texture. - * - * @deprecated Use patternTexture instead. - * @param {Texture} value - The new texture. - */ - setPatternTexture(value: Texture): void; - /** - * Returns the current resolution scale. - * - * @return {Number} The resolution scale. - * @deprecated Use resolution instead. - */ - getResolutionScale(): number; - /** - * Sets the resolution scale. - * - * @param {Number} scale - The new resolution scale. - * @deprecated Use resolution instead. - */ - setResolutionScale(scale: number): void; - /** - * Clears the current selection and selects a list of objects. - * - * @param {Object3D[]} objects - The objects that should be outlined. This array will be copied. - * @return {OutlineEffect} This pass. - * @deprecated Use selection.set() instead. - */ - setSelection(objects: Object3D[]): OutlineEffect; - /** - * Clears the list of selected objects. - * - * @return {OutlineEffect} This pass. - * @deprecated Use selection.clear() instead. - */ - clearSelection(): OutlineEffect; - /** - * Selects an object. - * - * @param {Object3D} object - The object that should be outlined. - * @return {OutlineEffect} This pass. - * @deprecated Use selection.add() instead. - */ - selectObject(object: Object3D): OutlineEffect; - /** - * Deselects an object. - * - * @param {Object3D} object - The object that should no longer be outlined. - * @return {OutlineEffect} This pass. - * @deprecated Use selection.delete() instead. - */ - deselectObject(object: Object3D): OutlineEffect; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Updates the size of internal render targets. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * A pixelation effect. - * - * Warning: This effect cannot be merged with convolution effects. - */ - export class PixelationEffect extends Effect { - - /** - * Constructs a new pixelation effect. - * - * @param {Number} [granularity=30.0] - The pixel granularity. - */ - constructor(granularity?: number); - set granularity(arg: number); - /** - * The pixel granularity. - * - * A higher value yields coarser visuals. - * - * @type {Number} - */ - get granularity(): number; - /** - * Returns the pixel granularity. - * - * @deprecated Use granularity instead. - * @return {Number} The granularity. - */ - getGranularity(): number; - /** - * Sets the pixel granularity. - * - * @deprecated Use granularity instead. - * @param {Number} value - The new granularity. - */ - setGranularity(value: number): void; - /** - * Updates the granularity. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - } - - /** - * Depth of Field shader v2.4. - * - * Yields more realistic results but is also more demanding. - * - * Original shader code by Martins Upitis: - * http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update) - * - * @deprecated Use DepthOfFieldEffect instead. - */ - export class RealisticBokehEffect extends Effect { - - /** - * Constructs a new bokeh effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.focus=1.0] - The focus distance in world units. - * @param {Number} [options.focalLength=24.0] - The focal length of the main camera. - * @param {Number} [options.fStop=0.9] - The ratio of the lens focal length to the diameter of the entrance pupil (aperture). - * @param {Number} [options.luminanceThreshold=0.5] - A luminance threshold. - * @param {Number} [options.luminanceGain=2.0] - A luminance gain factor. - * @param {Number} [options.bias=0.5] - A blur bias. - * @param {Number} [options.fringe=0.7] - A blur offset. - * @param {Number} [options.maxBlur=1.0] - The maximum blur strength. - * @param {Boolean} [options.rings=3] - The number of blur iterations. - * @param {Boolean} [options.samples=2] - The amount of samples taken per ring. - * @param {Boolean} [options.showFocus=false] - Whether the focal point should be highlighted. Useful for debugging. - * @param {Boolean} [options.manualDoF=false] - Enables manual control over the depth of field. - * @param {Boolean} [options.pentagon=false] - Enables pentagonal blur shapes. Requires a high number of rings and samples. - */ - constructor({ - blendFunction, - focus, - focalLength, - fStop, - luminanceThreshold, - luminanceGain, - bias, - fringe, - maxBlur, - rings, - samples, - showFocus, - manualDoF, - pentagon - }?: { - blendFunction?: BlendFunction; - focus?: number; - focalLength?: number; - fStop?: number; - luminanceThreshold?: number; - luminanceGain?: number; - bias?: number; - fringe?: number; - maxBlur?: number; - rings?: boolean; - samples?: boolean; - showFocus?: boolean; - manualDoF?: boolean; - pentagon?: boolean; - }); - - set rings(arg: number); - /** - * The amount of blur iterations. - * - * @type {Number} - */ - get rings(): number; - set samples(arg: number); - /** - * The amount of blur samples per ring. - * - * @type {Number} - */ - get samples(): number; - set showFocus(arg: boolean); - /** - * Indicates whether the focal point will be highlighted. - * - * @type {Boolean} - */ - get showFocus(): boolean; - set manualDoF(arg: boolean); - /** - * Indicates whether the Depth of Field should be calculated manually. - * - * If enabled, the Depth of Field can be adjusted via the `dof` uniform. - * - * @type {Boolean} - */ - get manualDoF(): boolean; - set pentagon(arg: boolean); - /** - * Indicates whether the blur shape should be pentagonal. - * - * @type {Boolean} - */ - get pentagon(): boolean; - - } - - /** - * A scanline effect. - * - * Based on an implementation by Georg 'Leviathan' Steinrohder (CC BY 3.0): - * http://www.truevision3d.com/forums/showcase/staticnoise_colorblackwhite_scanline_shaders-t18698.0.html - */ - export class ScanlineEffect extends Effect { - - /** - * Constructs a new scanline effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.OVERLAY] - The blend function of this effect. - * @param {Number} [options.density=1.25] - The scanline density. - */ - constructor({ - blendFunction, - density - }?: { - blendFunction?: BlendFunction; - density?: number; - }); - - set density(arg: number); - /** - * The scanline density. - * - * @type {Number} - */ - get density(): number; - /** - * Returns the current scanline density. - * - * @deprecated Use density instead. - * @return {Number} The scanline density. - */ - getDensity(): number; - /** - * Sets the scanline density. - * - * @deprecated Use density instead. - * @param {Number} value - The new scanline density. - */ - setDensity(value: number): void; - /** - * Updates the size of this pass. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * The scanline scroll speed. Default is 0 (disabled). - * - * @type {Number} - */ - get scrollSpeed(): number; - set scrollSpeed(value: number); - - } - - /** - * A selective bloom effect. - * - * This effect applies bloom to selected objects only. - */ - export class SelectiveBloomEffect extends BloomEffect { - - /** - * Constructs a new selective bloom effect. - * - * @param {Scene} scene - The main scene. - * @param {Camera} camera - The main camera. - * @param {BloomEffectOptions} [options] - The options. See {@link BloomEffect} for details. - */ - constructor(scene?: Scene, camera?: Camera, options?: BloomEffectOptions); - /** - * A selection of objects. - * - * The default layer of this selection is 11. - * - * @type {Selection} - */ - selection: Selection; - /** - * Returns the selection. - * - * @deprecated Use selection instead. - * @return {Selection} The selection. - */ - getSelection(): Selection; - set inverted(arg: boolean); - /** - * Indicates whether the selection should be considered inverted. - * - * @type {Boolean} - */ - get inverted(): boolean; - /** - * Indicates whether the mask is inverted. - * - * @deprecated Use inverted instead. - * @return {Boolean} Whether the mask is inverted. - */ - isInverted(): boolean; - /** - * Enables or disable mask inversion. - * - * @deprecated Use inverted instead. - * @param {Boolean} value - Whether the mask should be inverted. - */ - setInverted(value: boolean): void; - set ignoreBackground(arg: boolean); - /** - * Indicates whether the background colors will be ignored. - * - * @type {Boolean} - */ - get ignoreBackground(): boolean; - /** - * Indicates whether the background is disabled. - * - * @deprecated Use ignoreBackground instead. - * @return {Boolean} Whether the background is disabled. - */ - isBackgroundDisabled(): boolean; - /** - * Enables or disables the background. - * - * @deprecated Use ignoreBackground instead. - * @param {Boolean} value - Whether the background should be disabled. - */ - setBackgroundDisabled(value: boolean): void; - /** - * Sets the depth texture. - * - * @param {Texture} depthTexture - A depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. - */ - setDepthTexture( - depthTexture: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime: number - ): void; - - /** - * Updates the size of internal render targets. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * A sepia effect. - */ - export class SepiaEffect extends Effect { - - /** - * Constructs a new sepia effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Number} [options.intensity=1.0] - The intensity of the effect. - */ - constructor({ - blendFunction, - intensity - }?: { - blendFunction?: BlendFunction; - intensity?: number; - }); - - set intensity(arg: number); - /** - * The intensity. - * - * @deprecated Use blendMode.opacity instead. - * @type {Number} - */ - get intensity(): number; - /** - * Returns the current sepia intensity. - * - * @deprecated Use blendMode.opacity instead. - * @return {Number} The intensity. - */ - getIntensity(): number; - /** - * Sets the sepia intensity. - * - * @deprecated Use blendMode.opacity instead. - * @param {Number} value - The intensity. - */ - setIntensity(value: number): void; - - } - - /** - * A shock wave effect. - * - * Based on a Gist by Jean-Philippe Sarda: - * https://gist.github.com/jpsarda/33cea67a9f2ecb0a0eda - */ - export class ShockWaveEffect extends Effect { - - /** - * Constructs a new shock wave effect. - * - * @param {Camera} camera - The main camera. - * @param {Vector3} [position] - The world position of the shock wave. - * @param {Object} [options] - The options. - * @param {Number} [options.speed=2.0] - The animation speed. - * @param {Number} [options.maxRadius=1.0] - The extent of the shock wave. - * @param {Number} [options.waveSize=0.2] - The wave size. - * @param {Number} [options.amplitude=0.05] - The distortion amplitude. - */ - constructor( - camera?: Camera, - position?: Vector3, - { - speed, - maxRadius, - waveSize, - amplitude - }?: { - speed?: number; - maxRadius?: number; - waveSize?: number; - amplitude?: number; - } - ); - - /** - * The position of the shock wave. - * - * @type {Vector3} - */ - position: Vector3; - /** - * The speed of the shock wave animation. - * - * @type {Number} - */ - speed: number; - set amplitude(arg: number); - /** - * The amplitude. - * - * @type {Number} - */ - get amplitude(): number; - set waveSize(arg: number); - /** - * The wave size. - * - * @type {Number} - */ - get waveSize(): number; - set maxRadius(arg: number); - /** - * The maximum radius. - * - * @type {Number} - */ - get maxRadius(): number; - set epicenter(arg: Vector3); - /** - * The position of the shock wave. - * - * @type {Vector3} - * @deprecated Use position instead. - */ - get epicenter(): Vector3; - /** - * Returns the position of the shock wave. - * - * @deprecated Use position instead. - * @return {Vector3} The position. - */ - getPosition(): Vector3; - /** - * Sets the position of the shock wave. - * - * @deprecated Use position instead. - * @param {Vector3} value - The position. - */ - setPosition(value: Vector3): void; - /** - * Returns the speed of the shock wave. - * - * @deprecated Use speed instead. - * @return {Number} The speed. - */ - getSpeed(): number; - /** - * Sets the speed of the shock wave. - * - * @deprecated Use speed instead. - * @param {Number} value - The speed. - */ - setSpeed(value: number): void; - /** - * Emits the shock wave. - */ - explode(): void; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [delta] - The time between the last frame and the current one in seconds. - */ - - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - delta: number - ): void; - - } - - /** - * NVIDIA FXAA 3.11 by Timothy Lottes: - * https://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf - * - * Based on an implementation by Simon Rodriguez: - * https://github.com/kosua20/Rendu/blob/master/resources/common/shaders/screens/fxaa.frag - */ - export class FXAAEffect extends Effect { - - /** - * Constructs a new FXAA effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.SRC] - The blend function of this effect. - */ - constructor({ - blendFunction - }?: { - blendFunction?: BlendFunction - }); - - /** - * The minimum edge detection threshold. Range is [0.0, 1.0]. - * - * @type {Number} - */ - get minEdgeThreshold(): number; - set minEdgeThreshold(arg: number); - - /** - * The maximum edge detection threshold. Range is [0.0, 1.0]. - * - * @type {Number} - */ - get maxEdgeThreshold(): number; - set maxEdgeThreshold(arg: number); - - /** - * The subpixel blend quality. Range is [0.0, 1.0]. - * - * @type {Number} - */ - get subpixelQuality(): number; - set subpixelQuality(arg: number); - - /** - * The maximum amount of edge detection samples. - * - * @type {Number} - */ - get samples(): number; - set samples(arg: number); - - } - - /** - * Subpixel Morphological Antialiasing (SMAA). - * - * https://github.com/iryoku/smaa/releases/tag/v2.8 - */ - export class SMAAEffect extends Effect { - - /** - * The SMAA search image, encoded as a base64 data URL. - * - * @type {String} - * @deprecated - */ - static get searchImageDataURL(): string; - /** - * The SMAA area image, encoded as a base64 data URL. - * - * @type {String} - * @deprecated - */ - static get areaImageDataURL(): string; - /** - * Constructs a new SMAA effect. - * - * @param {Object} [options] - The options. - * @param {SMAAPreset} [options.preset=SMAAPreset.MEDIUM] - The quality preset. - * @param {EdgeDetectionMode} [options.edgeDetectionMode=EdgeDetectionMode.COLOR] - The edge detection mode. - * @param {PredicationMode} [options.predicationMode=PredicationMode.DISABLED] - The predication mode. - */ - constructor({ - preset, - edgeDetectionMode, - predicationMode - }?: { - preset?: SMAAPreset; - edgeDetectionMode?: EdgeDetectionMode; - predicationMode?: PredicationMode; - }); - - /** - * The edges texture. - * - * @type {Texture} - */ - get edgesTexture(): Texture; - /** - * Returns the edges texture. - * - * @deprecated Use edgesTexture instead. - * @return {Texture} The texture. - */ - getEdgesTexture(): Texture; - /** - * The edge weights texture. - * - * @type {Texture} - */ - get weightsTexture(): Texture; - /** - * Returns the edge weights texture. - * - * @deprecated Use weightsTexture instead. - * @return {Texture} The texture. - */ - getWeightsTexture(): Texture; - /** - * The edge detection material. - * - * @type {EdgeDetectionMaterial} - */ - get edgeDetectionMaterial(): EdgeDetectionMaterial; - /** - * The edge detection material. - * - * @type {EdgeDetectionMaterial} - * @deprecated Use edgeDetectionMaterial instead. - */ - get colorEdgesMaterial(): EdgeDetectionMaterial; - /** - * Returns the edge detection material. - * - * @deprecated Use edgeDetectionMaterial instead. - * @return {EdgeDetectionMaterial} The material. - */ - getEdgeDetectionMaterial(): EdgeDetectionMaterial; - /** - * The edge weights material. - * - * @type {SMAAWeightsMaterial} - */ - get weightsMaterial(): SMAAWeightsMaterial; - /** - * Returns the edge weights material. - * - * @deprecated Use weightsMaterial instead. - * @return {SMAAWeightsMaterial} The material. - */ - getWeightsMaterial(): SMAAWeightsMaterial; - /** - * Sets the edge detection sensitivity. - * - * See {@link EdgeDetectionMaterial#setEdgeDetectionThreshold} for more details. - * - * @deprecated Use edgeDetectionMaterial instead. - * @param {Number} threshold - The edge detection sensitivity. Range: [0.05, 0.5]. - */ - setEdgeDetectionThreshold(threshold: number): void; - /** - * Sets the maximum amount of horizontal/vertical search steps. - * - * See {@link SMAAWeightsMaterial#setOrthogonalSearchSteps} for more details. - * - * @deprecated Use weightsMaterial instead. - * @param {Number} steps - The search steps. Range: [0, 112]. - */ - setOrthogonalSearchSteps(steps: number): void; - /** - * Applies the given quality preset. - * - * @param {SMAAPreset} preset - The preset. - */ - applyPreset(preset: SMAAPreset): void; - /** - * Sets the depth texture. - * - * @param {Texture} depthTexture - A depth texture. - * @param {DepthPackingStrategies} [depthPacking=BasicDepthPacking] - The depth packing. - */ - setDepthTexture( - depthTexture: Texture, - depthPacking?: DepthPackingStrategies - ): void; - - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Updates the size of internal render targets. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * Deletes internal render targets and textures. - */ - dispose(): void; - - } - - /** - * An enumeration of SMAA presets. + * @param {Number} [width=0] - The width of the image. + * @param {Number} [height=0] - The height of the image. + * @param {Uint8ClampedArray} [data=null] - The image data. + */ + constructor(width?: number, height?: number, data?: Uint8ClampedArray); + + colorSpace: PredefinedColorSpace; + /** + * The width of the image. * - * @type {Object} - * @property {Number} LOW - Results in around 60% of the maximum quality. - * @property {Number} MEDIUM - Results in around 80% of the maximum quality. - * @property {Number} HIGH - Results in around 95% of the maximum quality. - * @property {Number} ULTRA - Results in around 99% of the maximum quality. - */ - export enum SMAAPreset { - LOW, - MEDIUM, - HIGH, - ULTRA, - } - - /** - * A Screen Space Ambient Occlusion (SSAO) effect. - * - * For high quality visuals use two SSAO effect instances in a row with different radii, one for rough AO and one for - * fine details. - * - * This effect supports depth-aware upsampling and should be rendered at a lower resolution. The resolution should match - * that of the downsampled normals and depth. If you intend to render SSAO at full resolution, do not provide a - * downsampled `normalDepthBuffer`. - * - * It's recommended to specify a relative render resolution using the `resolutionScale` constructor parameter to avoid - * undesired sampling patterns. - * - * Based on "Scalable Ambient Obscurance" by Morgan McGuire et al. and "Depth-aware upsampling experiments" by Eleni - * Maria Stea: - * https://research.nvidia.com/publication/scalable-ambient-obscurance - * https://eleni.mutantstargoat.com/hikiko/on-depth-aware-upsampling - * - * The view position calculation is based on a shader by Norbert Nopper: - * https://github.com/McNopper/OpenGL/blob/master/Example28/shader/ssao.frag.glsl - */ - export class SSAOEffect extends Effect { - - /** - * Constructs a new SSAO effect. - * - * @todo Move normalBuffer to options. - * @param {Camera} [camera] - The main camera. - * @param {Texture} [normalBuffer] - A texture that contains the scene normals. - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.MULTIPLY] - The blend function of this effect. - * @param {Boolean} [options.distanceScaling=true] - Deprecated. - * @param {Boolean} [options.depthAwareUpsampling=true] - Enables or disables depth-aware upsampling. Has no effect if WebGL 2 is not supported. - * @param {Texture} [options.normalDepthBuffer=null] - Deprecated. - * @param {Number} [options.samples=9] - The amount of samples per pixel. Should not be a multiple of the ring count. - * @param {Number} [options.rings=7] - The amount of spiral turns in the occlusion sampling pattern. Should be a prime number. - * @param {Number} [options.worldDistanceThreshold] - The world distance threshold at which the occlusion effect starts to fade out. - * @param {Number} [options.worldDistanceFalloff] - The world distance falloff. Influences the smoothness of the occlusion cutoff. - * @param {Number} [options.worldProximityThreshold] - The world proximity threshold at which the occlusion starts to fade out. - * @param {Number} [options.worldProximityFalloff] - The world proximity falloff. Influences the smoothness of the proximity cutoff. - * @param {Number} [options.distanceThreshold=0.97] - Deprecated. - * @param {Number} [options.distanceFalloff=0.03] - Deprecated. - * @param {Number} [options.rangeThreshold=0.0005] - Deprecated. - * @param {Number} [options.rangeFalloff=0.001] - Deprecated. - * @param {Number} [options.minRadiusScale=0.1] - The minimum radius scale. - * @param {Number} [options.luminanceInfluence=0.7] - Determines how much the luminance of the scene influences the ambient occlusion. - * @param {Number} [options.radius=0.1825] - The occlusion sampling radius, expressed as a scale relative to the resolution. Range [1e-6, 1.0]. - * @param {Number} [options.intensity=1.0] - The intensity of the ambient occlusion. - * @param {Number} [options.bias=0.025] - An occlusion bias. Eliminates artifacts caused by depth discontinuities. - * @param {Number} [options.fade=0.01] - Influences the smoothness of the shadows. A lower value results in higher contrast. - * @param {Color} [options.color=null] - The color of the ambient occlusion. - * @param {Number} [options.resolutionScale=1.0] - The resolution scale. - * @param {Number} [options.resolutionX=Resolution.AUTO_SIZE] - The horizontal resolution. - * @param {Number} [options.resolutionY=Resolution.AUTO_SIZE] - The vertical resolution. - * @param {Number} [options.width=Resolution.AUTO_SIZE] - Deprecated. Use resolutionX instead. - * @param {Number} [options.height=Resolution.AUTO_SIZE] - Deprecated. Use resolutionY instead. - */ - constructor( - camera?: Camera, - normalBuffer?: Texture, - { - blendFunction, - distanceScaling, - depthAwareUpsampling, - normalDepthBuffer, - samples, - rings, - worldDistanceThreshold, - worldDistanceFalloff, - worldProximityThreshold, - worldProximityFalloff, - distanceThreshold, - distanceFalloff, - rangeThreshold, - rangeFalloff, - minRadiusScale, - luminanceInfluence, - radius, - intensity, - bias, - fade, - color, - resolutionScale, - resolutionX, - resolutionY, - width, - height - }?: { - blendFunction?: BlendFunction; - distanceScaling?: boolean; - depthAwareUpsampling?: boolean; - normalDepthBuffer?: Texture; - samples?: number; - rings?: number; - worldDistanceThreshold?: number; - worldDistanceFalloff?: number; - worldProximityThreshold?: number; - worldProximityFalloff?: number; - distanceThreshold?: number; - distanceFalloff?: number; - rangeThreshold?: number; - rangeFalloff?: number; - minRadiusScale?: number; - luminanceInfluence?: number; - radius?: number; - intensity?: number; - bias?: number; - fade?: number; - color?: Color; - resolutionScale?: number; - resolutionX?: number; - resolutionY?: number; - width?: number; - height?: number; - } - ); - - resolution: Resolution; - /** - * Sets the normal buffer. - * - * @type {Texture} - */ - get normalBuffer(): Texture | null; - set normalBuffer(value: Texture | null); - /** - * Indicates whether depth-aware upsampling is enabled. - * - * @type {Boolean} - */ - get depthAwareUpsampling(): boolean; - set depthAwareUpsampling(arg: boolean); - /** - * The color of the ambient occlusion. Set to `null` to disable. - * - * @type {Color} - */ - get color(): Color; - set color(arg: Color); - /** - * Returns the resolution settings. - * - * @deprecated Use resolution instead. - * @return {Resolution} The resolution. - */ - getResolution(): Resolution; - /** - * The SSAO material. - * - * @type {SSAOMaterial} - */ - get ssaoMaterial(): SSAOMaterial; - /** - * Returns the SSAO material. - * - * @deprecated Use ssaoMaterial instead. - * @return {SSAOMaterial} The material. - */ - getSSAOMaterial(): SSAOMaterial; - /** - * The amount of occlusion samples per pixel. - * - * @type {Number} - * @deprecated Use ssaoMaterial.samples instead. - */ - get samples(): number; - set samples(arg: number); - /** - * The amount of spiral turns in the occlusion sampling pattern. - * - * @type {Number} - * @deprecated Use ssaoMaterial.rings instead. - */ - get rings(): number; - set rings(arg: number); - /** - * The occlusion sampling radius. - * - * @type {Number} - * @deprecated Use ssaoMaterial.radius instead. - */ - get radius(): number; - set radius(arg: number); - /** - * The intensity. - * - * @type {Number} - */ - get intensity(): number; - set intensity(arg: number); - /** - * Indicates whether depth-aware upsampling is enabled. - * - * @deprecated Use depthAwareUpsampling instead. - * @return {Boolean} Whether depth-aware upsampling is enabled. - */ - isDepthAwareUpsamplingEnabled(): boolean; - /** - * Enables or disables depth-aware upsampling. - * - * @deprecated Use depthAwareUpsampling instead. - * @param {Boolean} value - Whether depth-aware upsampling should be enabled. - */ - setDepthAwareUpsamplingEnabled(value: boolean): void; - /** - * Indicates whether distance-based radius scaling is enabled. - * - * @type {Boolean} - * @deprecated Use ssaoMaterial.distanceScaling instead. - */ - get distanceScaling(): boolean; - set distanceScaling(arg: boolean); - /** - * Returns the color of the ambient occlusion. - * - * @deprecated Use color instead. - * @return {Color} The color. - */ - getColor(): Color; - /** - * Sets the color of the ambient occlusion. Set to `null` to disable colorization. - * - * @deprecated Use color instead. - * @param {Color} value - The color. - */ - setColor(value: Color): void; - /** - * Sets the occlusion distance cutoff. - * - * @deprecated Use ssaoMaterial instead. - * @param {Number} threshold - The distance threshold. Range [0.0, 1.0]. - * @param {Number} falloff - The falloff. Range [0.0, 1.0]. - */ - setDistanceCutoff(threshold: number, falloff: number): void; - /** - * Sets the occlusion proximity cutoff. - * - * @deprecated Use ssaoMaterial instead. - * @param {Number} threshold - The proximity threshold. Range [0.0, 1.0]. - * @param {Number} falloff - The falloff. Range [0.0, 1.0]. - */ - setProximityCutoff(threshold: number, falloff: number): void; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - /** - * Sets the size. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - */ - setSize(width: number, height: number): void; - /** - * The luminance influence factor. Range: [0.0, 1.0]. - * - * @type {Boolean} - */ - get luminanceInfluence(): boolean; - set luminanceInfluence(value: boolean); - - } - - /** - * A texture effect. - */ - export class TextureEffect extends Effect { - - /** - * Constructs a new texture effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Texture} [options.texture] - A texture. - * @param {Boolean} [options.aspectCorrection=false] - Deprecated. Adjust the texture's offset, repeat and center instead. - */ - constructor({ - blendFunction, - texture, - aspectCorrection - }?: { - blendFunction?: BlendFunction; - texture?: Texture; - aspectCorrection?: boolean; - }); - - set texture(arg: Texture); - /** - * The texture. - * - * @type {Texture} - */ - get texture(): Texture; - set aspectCorrection(arg: number); - /** - * Indicates whether aspect correction is enabled. - * - * @type {Number} - * @deprecated Adjust the texture's offset, repeat, rotation and center instead. - */ - get aspectCorrection(): number; - /** - * Returns the texture. - * - * @deprecated Use texture instead. - * @return {Texture} The texture. - */ - getTexture(): Texture; - /** - * Sets the texture. - * - * @deprecated Use texture instead. - * @param {Texture} value - The texture. - */ - setTexture(value: Texture): void; - set uvTransform(arg: boolean); - /** - * Indicates whether the texture UV coordinates will be transformed using the transformation matrix of the texture. - * - * @type {Boolean} - * @deprecated Use texture.matrixAutoUpdate instead. - */ - get uvTransform(): boolean; - /** - * Sets the swizzles that will be applied to the components of a texel before it is written to the output color. - * - * @param {ColorChannel} r - The swizzle for the `r` component. - * @param {ColorChannel} [g=r] - The swizzle for the `g` component. - * @param {ColorChannel} [b=r] - The swizzle for the `b` component. - * @param {ColorChannel} [a=r] - The swizzle for the `a` component. - */ - setTextureSwizzleRGBA( - r: ColorChannel, - g?: ColorChannel, - b?: ColorChannel, - a?: ColorChannel - ): void; - - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime: number - ): void; - - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * A tone mapping mode enumeration. + * @type {Number} + */ + width: number; + /** + * The height of the image. * - * @type {Object} - * @property {Number} LINEAR - No tone mapping, only exposure. - * @property {Number} REINHARD - Simple Reinhard tone mapping. - * @property {Number} REINHARD2 - Modified Reinhard tone mapping. - * @property {Number} REINHARD2_ADAPTIVE - Simulates the optic nerve responding to the amount of light it is receiving. - * @property {Number} UNCHARTED2 - Uncharted 2 tone mapping. http://filmicworlds.com/blog/filmic-tonemapping-operators. - * @property {Number} OPTIMIZED_CINEON - Deprecated. Use CINEON instead. - * @property {Number} CINEON - Optimized filmic operator by Jim Hejl and Richard Burgess-Dawson. - * @property {Number} ACES_FILMIC - ACES tone mapping with a scale of 1.0/0.6. - * @property {Number} AGX - Filmic tone mapping. Requires three r160 or higher. https://github.com/EaryChow/AgX. - * @property {Number} NEUTRAL - Neutral tone mapping by Khronos. Requires three r162 or higher. https://modelviewer.dev/examples/tone-mapping. - */ - export enum ToneMappingMode { - LINEAR, - REINHARD, - REINHARD2, - REINHARD2_ADAPTIVE, - UNCHARTED2, - OPTIMIZED_CINEON, - CINEON, - ACES_FILMIC, - AGX, - NEUTRAL - } - - /** - * A tone mapping effect. - * - * Note: `ToneMappingMode.REINHARD2_ADAPTIVE` requires support for `EXT_shader_texture_lod`. - * - * Reference: - * GDC2007 - Wolfgang Engel, Post-Processing Pipeline - * http://perso.univ-lyon1.fr/jean-claude.iehl/Public/educ/GAMA/2007/gdc07/Post-Processing_Pipeline.pdf - */ - export class ToneMappingEffect extends Effect { - - /** - * Constructs a new tone mapping effect. - * - * The additional parameters only affect the Reinhard2 operator. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {Boolean} [options.adaptive=false] - Deprecated. Use mode instead. - * @param {ToneMappingMode} [options.mode=ToneMappingMode.ACES_FILMIC] - The tone mapping mode. - * @param {Number} [options.resolution=256] - The resolution of the luminance texture. Must be a power of two. - * @param {Number} [options.maxLuminance=4.0] - Deprecated. Same as whitePoint. - * @param {Number} [options.whitePoint=4.0] - The white point. - * @param {Number} [options.middleGrey=0.6] - The middle grey factor. - * @param {Number} [options.minLuminance=0.01] - The minimum luminance. Prevents very high exposure in dark scenes. - * @param {Number} [options.averageLuminance=1.0] - The average luminance. Used for the non-adaptive Reinhard operator. - * @param {Number} [options.adaptationRate=1.0] - The luminance adaptation rate. - */ - constructor({ - blendFunction, - adaptive, - mode, - resolution, - maxLuminance, - whitePoint, - middleGrey, - minLuminance, - averageLuminance, - adaptationRate - }?: { - blendFunction?: BlendFunction; - adaptive?: boolean; - mode?: ToneMappingMode; - resolution?: number; - maxLuminance?: number; - whitePoint?: number; - middleGrey?: number; - minLuminance?: number; - averageLuminance?: number; - adaptationRate?: number; - }); - - set resolution(arg: number); - /** - * The resolution of the luminance texture. Must be a power of two. - * - * @type {Number} - */ - get resolution(): number; - set mode(arg: ToneMappingMode); - /** - * The tone mapping mode. - * - * @type {ToneMappingMode} - */ - get mode(): ToneMappingMode; - /** - * The white point. Default is `16.0`. - * - * Only applies to Reinhard2 (Modified & Adaptive). - * - * @type {Number} - */ - get whitePoint(): number; - /** - * The middle grey factor. Default is `0.6`. - * - * Only applies to Reinhard2 (Modified & Adaptive). - * - * @type {Number} - */ - get middleGrey(): number; - /** - * The average luminance. - * - * Only applies to Reinhard2 (Modified). - * - * @type {Number} - */ - get averageLuminance(): number; - /** - * Returns the current tone mapping mode. - * - * @deprecated Use mode instead. - * @return {ToneMappingMode} The tone mapping mode. - */ - getMode(): ToneMappingMode; - /** - * Sets the tone mapping mode. - * - * @deprecated Use mode instead. - * @param {ToneMappingMode} value - The tone mapping mode. - */ - setMode(value: ToneMappingMode): void; - /** - * The adaptive luminance material. - * - * @type {AdaptiveLuminanceMaterial} - */ - get adaptiveLuminanceMaterial(): AdaptiveLuminanceMaterial; - /** - * Returns the adaptive luminance material. - * - * @deprecated Use adaptiveLuminanceMaterial instead. - * @return {AdaptiveLuminanceMaterial} The material. - */ - getAdaptiveLuminanceMaterial(): AdaptiveLuminanceMaterial; - /** - * Returns the resolution of the luminance texture. - * - * @deprecated Use resolution instead. - * @return {Number} The resolution. - */ - getResolution(): number; - /** - * Sets the resolution of the luminance texture. Must be a power of two. - * - * @deprecated Use resolution instead. - * @param {Number} value - The resolution. - */ - setResolution(value: number): void; - set adaptive(arg: boolean); - /** - * Indicates whether this pass uses adaptive luminance. - * - * @type {Boolean} - * @deprecated Use mode instead. - */ - get adaptive(): boolean; - set adaptationRate(arg: number); - /** - * The luminance adaptation rate. - * - * @type {Number} - * @deprecated Use adaptiveLuminanceMaterial.adaptationRate instead. - */ - get adaptationRate(): number; - set distinction(arg: number); - /** - * @type {Number} - * @deprecated - */ - get distinction(): number; - /** - * Updates this effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass. - * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds. - */ - update( - renderer: WebGLRenderer, - inputBuffer: WebGLRenderTarget, - deltaTime?: number - ): void; - - /** - * Performs initialization tasks. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Boolean} alpha - Whether the renderer uses the alpha channel or not. - * @param {Number} frameBufferType - The type of the main frame buffers. - */ - initialize( - renderer: WebGLRenderer, - alpha: boolean, - frameBufferType: number - ): void; - - } - - /** - * An enumeration of Vignette techniques. + * @type {Number} + */ + height: number; + /** + * The RGBA image data. * - * @type {Object} - * @property {Number} DEFAULT - Produces a dusty look. - * @property {Number} ESKIL - Produces a burned look. - */ - export enum VignetteTechnique { - DEFAULT, - ESKIL, - } - /** - * A Vignette effect. - */ - export class VignetteEffect extends Effect { - - /** - * Constructs a new Vignette effect. - * - * @param {Object} [options] - The options. - * @param {BlendFunction} [options.blendFunction=BlendFunction.NORMAL] - The blend function of this effect. - * @param {VignetteTechnique} [options.technique=VignetteTechnique.DEFAULT] - The Vignette technique. - * @param {Boolean} [options.eskil=false] - Deprecated. Use technique instead. - * @param {Number} [options.offset=0.5] - The Vignette offset. - * @param {Number} [options.darkness=0.5] - The Vignette darkness. - */ - constructor({ - blendFunction, - technique, - eskil, - offset, - darkness - }?: { - blendFunction?: BlendFunction; - technique?: VignetteTechnique; - eskil?: boolean; - offset?: number; - darkness?: number; - }); - - set technique(arg: VignetteTechnique); - /** - * The Vignette technique. - * - * @type {VignetteTechnique} - */ - get technique(): VignetteTechnique; - /** - * Indicates whether Eskil's Vignette technique is enabled. - * - * @type {Boolean} - * @deprecated Use technique instead. - */ - set eskil(arg: boolean); - /** - * Indicates whether Eskil's Vignette technique is enabled. - * - * @type {Boolean} - * @deprecated Use technique instead. - */ - get eskil(): boolean; - /** - * Returns the Vignette technique. - * - * @deprecated Use technique instead. - * @return {VignetteTechnique} The technique. - */ - getTechnique(): VignetteTechnique; - /** - * Sets the Vignette technique. - * - * @deprecated Use technique instead. - * @param {VignetteTechnique} value - The technique. - */ - setTechnique(value: VignetteTechnique): void; - set offset(arg: number); - /** - * The Vignette offset. - * - * @type {Number} - */ - get offset(): number; - /** - * Returns the Vignette offset. - * - * @deprecated Use offset instead. - * @return {Number} The offset. - */ - getOffset(): number; - /** - * Sets the Vignette offset. - * - * @deprecated Use offset instead. - * @param {Number} value - The offset. - */ - setOffset(value: number): void; - set darkness(arg: number); - /** - * The Vignette darkness. - * - * @type {Number} - */ - get darkness(): number; - /** - * Returns the Vignette darkness. - * - * @deprecated Use darkness instead. - * @return {Number} The darkness. - */ - getDarkness(): number; - /** - * Sets the Vignette darkness. - * - * @deprecated Use darkness instead. - * @param {Number} value - The darkness. - */ - setDarkness(value: number): void; - - } - - /** - * An enumeration of LUT worker operations. + * @type {Uint8ClampedArray} + */ + data: Uint8ClampedArray; + /** + * Creates a canvas from this image data. * - * @type {Object} - * @property {String} SCALE_UP - Tetrahedral upscale operation. + * @return {HTMLCanvasElement} The canvas, or null if it couldn't be created. */ - export enum LUTOperation { - SCALE_UP = "lut.scaleup", - } + toCanvas(): HTMLCanvasElement; + +} + +/** + * An SMAA image loader. + * + * @deprecated Preloading the SMAA lookup textures is no longer required. + */ +export class SMAAImageLoader extends Loader { /** - * A tetrahedral upscaler that can be used to augment 3D LUTs. + * Loads the SMAA data images. * - * Based on an implementation by Garrett Johnson: - * https://github.com/gkjohnson/threejs-sandbox/blob/master/3d-lut/src/TetrahedralUpscaler.js + * @param {Function} [onLoad] - A callback that receives the search image and area image as a pair. + * @param {Function} [onError] - An error callback that receives the URL of the image that failed to load. + * @return {Promise} A promise that returns the search image and area image as a pair. */ - export class TetrahedralUpscaler { + load( + url?: string | null, + onLoad?: (data: HTMLImageElement[]) => void, + onProgress?: (event: ProgressEvent) => void, + onError?: (err: unknown) => void, + ): void; - /** - * Expands the given data to the target size. - * - * @param {ArrayBufferView} data - The input RGBA data. Assumed to be cubic. - * @param {Number} size - The target size. - * @return {ArrayBufferView} The new data. - */ - static expand(data: ArrayBufferView, size: number): ArrayBufferView; +} - } +/** + * A 3D LUT loader that supports the .cube file format. + * + * Based on an implementation by Garrett Johnson: + * https://github.com/gkjohnson/threejs-sandbox/tree/master/3d-lut + * + * For more details see: + * https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf + * + * @deprecated Use `three/addons/loaders/LUTCubeLoader.js` instead. + */ +export class LUTCubeLoader extends Loader { /** - * SMAA area image data. + * Loads a LUT. * - * This texture allows to obtain the area for a certain pattern and distances to the left and right of identified lines. + * @param {String} url - The URL of the CUBE-file. + * @param {Function} [onLoad] - A callback that receives the loaded lookup texture. + * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. + * @param {Function} [onError] - An error callback that receives the URL of the file that failed to load. + */ + override load( + url: string, + onLoad: (data: LookupTexture) => void, + onProgress?: (event: ProgressEvent) => void, + onError?: (err: unknown) => void, + ): void; + + /** + * Loads a LUT asynchronously. * - * Based on the official python scripts: - * https://github.com/iryoku/smaa/tree/master/Scripts - */ - export class SMAAAreaImageData { - - /** - * Creates a new area image. - * - * @return {RawImageData} The generated image data. - */ - static generate(): RawImageData; - - } - - /** - * An SMAA image generator. - * - * This class uses a worker thread to generate the search and area images. The generated data URLs will be cached using - * localStorage, if available. To disable caching use {@link SMAAImageGenerator.setCacheEnabled}. - */ - export class SMAAImageGenerator { - - /** - * Indicates whether data image caching is disabled. - * - * @type {Boolean} - * @deprecated Use setCacheEnabled() instead. - */ - disableCache: boolean; - /** - * Enables or disables caching via localStorage. - * - * @param {Boolean} value - Whether the cache should be enabled. - */ - setCacheEnabled(value: boolean): void; - /** - * Generates the SMAA data images. - * - * @example - * SMAAImageGenerator.generate().then(([search, area]) => { - * const smaaEffect = new SMAAEffect(search, area); - * }); - * @return {Promise} A promise that returns the search image and area image as a pair. - */ - generate(): Promise< - (new (width?: number, height?: number) => HTMLImageElement)[] - >; - - } - - /** - * SMAA search image data. - * - * This image stores information about how many pixels the line search algorithm must advance in the last step. - * - * Based on the official python scripts: - * https://github.com/iryoku/smaa/tree/master/Scripts - */ - export class SMAASearchImageData { - - /** - * Creates a new search image. - * - * @return {RawImageData} The generated image data. - */ - static generate(): RawImageData; - - } - - /** - * A 3D lookup texture (LUT). - * - * This texture can be used as-is in a WebGL 2 context. It can also be converted into a 2D texture. - */ - export class LookupTexture extends Data3DTexture { - - /** - * Creates a new 3D LUT by copying a given LUT. - * - * Common image-based textures will be converted into 3D data textures. - * - * @param {Texture} texture - The LUT. Assumed to be cubic. - * @return {LookupTexture} A new 3D LUT. - */ - static from(texture: Texture): LookupTexture; - /** - * Creates a neutral 3D LUT. - * - * @param {Number} size - The sidelength. - * @return {LookupTexture} A neutral 3D LUT. - */ - static createNeutral(size: number): LookupTexture; - /** - * Constructs a cubic 3D lookup texture. - * - * @param {TypedArray} data - The pixel data. The default format is RGBA. - * @param {Number} size - The sidelength. - */ - constructor(data: ArrayBufferView, size: number); - /** - * The lower bounds of the input domain. - * - * @type {Vector3} - */ - domainMin: Vector3; - /** - * The upper bounds of the input domain. - * - * @type {Vector3} - */ - domainMax: Vector3; - /** - * Indicates that this is an instance of LookupTexture3D. - * - * @type {Boolean} - * @deprecated - */ - get isLookupTexture3D(): boolean; - /** - * Scales this LUT up to a given target size using tetrahedral interpolation. - * - * @param {Number} size - The target sidelength. - * @param {Boolean} [transferData=true] - Extra fast mode. Set to false to keep the original data intact. - * @return {Promise} A promise that resolves with a new LUT upon completion. - */ - scaleUp(size: number, transferData?: boolean): Promise; - /** - * Applies the given LUT to this one. - * - * @param {LookupTexture} lut - A LUT. Must have the same dimensions, type and format as this LUT. - * @return {LookupTexture} This texture. - */ - applyLUT(lut: LookupTexture): LookupTexture; - /** - * Converts the LUT data into unsigned byte data. - * - * This is a lossy operation which should only be performed after all other transformations have been applied. - * - * @return {LookupTexture} This texture. - */ - convertToUint8(): LookupTexture; - /** - * Converts the LUT data into float data. - * - * @return {LookupTexture} This texture. - */ - convertToFloat(): LookupTexture; - /** - * Converts this LUT into RGBA data. - * - * @deprecated LUTs are RGBA by default since three r137. - * @return {LookupTexture} This texture. - */ - convertToRGBA(): LookupTexture; - /** - * Converts the output of this LUT into sRGB color space. - * - * @return {LookupTexture} This texture. - */ - convertLinearToSRGB(): LookupTexture; - /** - * Converts the output of this LUT into linear color space. - * - * @return {LookupTexture} This texture. - */ - convertSRGBToLinear(): LookupTexture; - /** - * Converts this LUT into a 2D data texture. - * - * Please note that custom input domains are not carried over to 2D textures. - * - * @return {DataTexture} The texture. - */ - toDataTexture(): DataTexture; - - } - - export type LookupTexture3D = LookupTexture; - - /** - * A simple noise texture. - */ - export class NoiseTexture extends DataTexture { - - /** - * Constructs a new noise texture. - * - * Supported formats are `RGBAFormat`, `RedFormat` and `RGFormat`. - * - * @param {Number} width - The width. - * @param {Number} height - The height. - * @param {Number} [format=RedFormat] - The texture format. - * @param {Number} [type=UnsignedByteType] - The texture type. - */ - constructor(width: number, height: number, format?: number, type?: number); - - } - - /** - * An ASCII character lookup texture. - */ - export class ASCIITexture extends CanvasTexture { - - /** - * Constructs a new ASCII texture. - * - * @param {Object} [options] - The options. - * @param {String} [options.characters] - The character set to render. Defaults to a common ASCII art charset. - * @param {String} [options.font="Arial"] - The font. - * @param {Number} [options.fontSize=54] - The font size in pixels. - * @param {Number} [options.size=1024] - The texture size. - * @param {Number} [options.cellCount=16] - The cell count along each side of the texture. - */ - constructor({ - characters, - font, - fontSize, - size, - cellCount - }?: { - characters?: string; - font?: string; - fontSize?: number; - size?: number; - cellCount?: number; - }); - - /** - * The amount of characters in this texture. - * - * @type {Number} - * @readonly - */ - readonly characterCount: number; - /** - * The cell count along each side of the texture. - * - * @type {Number} - * @readonly - */ - readonly cellCount: number; - - } - - /** - * A container for raw RGBA image data. - * - * @implements {ImageData} - */ - export class RawImageData implements ImageData { - - /** - * Creates a new image data container. - * - * @param {ImageData|Image} image - An image or plain image data. - * @return {RawImageData} The image data. - */ - static from( - image: - | ImageData - | (new (width?: number, height?: number) => HTMLImageElement) - ): RawImageData; - - /** - * Constructs a new image data container. - * - * @param {Number} [width=0] - The width of the image. - * @param {Number} [height=0] - The height of the image. - * @param {Uint8ClampedArray} [data=null] - The image data. - */ - constructor(width?: number, height?: number, data?: Uint8ClampedArray); - colorSpace: PredefinedColorSpace; - /** - * The width of the image. - * - * @type {Number} - */ - width: number; - /** - * The height of the image. - * - * @type {Number} - */ - height: number; - /** - * The RGBA image data. - * - * @type {Uint8ClampedArray} - */ - data: Uint8ClampedArray; - /** - * Creates a canvas from this image data. - * - * @return {HTMLCanvasElement} The canvas, or null if it couldn't be created. - */ - toCanvas(): HTMLCanvasElement; - - } - - /** - * An SMAA image loader. - * - * @deprecated Preloading the SMAA lookup textures is no longer required. - * @experimental Added for testing, API might change in patch or minor releases. Requires three >= r108. - */ - export class SMAAImageLoader extends Loader { - - /** - * Loads the SMAA data images. - * - * @param {Function} [onLoad] - A callback that receives the search image and area image as a pair. - * @param {Function} [onError] - An error callback that receives the URL of the image that failed to load. - * @return {Promise} A promise that returns the search image and area image as a pair. - */ - load( - url?: string | null, - onLoad?: Function, - onError?: Function - ): Promise<(new (width?: number, height?: number) => HTMLImageElement)[]>; - - } - - /** - * A 3D LUT loader that supports the .cube file format. - * - * Based on an implementation by Garrett Johnson: - * https://github.com/gkjohnson/threejs-sandbox/tree/master/3d-lut - * - * For more details see: - * https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf - */ - export class LUTCubeLoader extends Loader { - - /** - * Loads a LUT. - * - * @param {String} url - The URL of the CUBE-file. - * @param {Function} [onLoad] - A callback that receives the loaded lookup texture. - * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. - * @param {Function} [onError] - An error callback that receives the URL of the file that failed to load. - * @return {Promise} A promise that returns the lookup texture. - */ - load( - url: string, - onLoad?: Function, - onProgress?: Function, - onError?: Function - ): Promise; - - /** - * Parses the given data. - * - * @param {String} input - The LUT data. - * @return {LookupTexture} The lookup texture. - * @throws {Error} Fails if the data is invalid. - */ - parse(input: string): LookupTexture; - - } - - /** - * A 3D LUT loader that supports the .3dl file format. - * - * Based on an implementation by Garrett Johnson: - * https://github.com/gkjohnson/threejs-sandbox/tree/master/3d-lut - * - * For more details see: - * http://download.autodesk.com/us/systemdocs/help/2011/lustre/index.html?url=./files/WSc4e151a45a3b785a24c3d9a411df9298473-7ffd.htm,topicNumber=d0e9492 - */ - export class LUT3dlLoader extends Loader { - - /** - * Loads a LUT. - * - * @param {String} url - The URL of the 3dl-file. - * @param {Function} [onLoad] - A callback that receives the loaded lookup texture. - * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. - * @param {Function} [onError] - An error callback that receives the URL of the file that failed to load. - * @return {Promise} A promise that returns the lookup texture. - */ - load( - url: string, - onLoad?: Function, - onProgress?: Function, - onError?: Function - ): Promise; - - /** - * Parses the given data. - * - * @param {String} input - The LUT data. - * @return {LookupTexture} The lookup texture. - * @throws {Error} Fails if the data is invalid. - */ - parse(input: string): LookupTexture; + * @param {String} url - The URL of the CUBE-file. + * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. + * @return {Promise} A promise that returns the lookup texture. + */ + loadAsync( + url: string, + onProgress?: (event: ProgressEvent) => void, + ): Promise; + + /** + * Parses the given data. + * + * @param {String} input - The LUT data. + * @return {LookupTexture} The lookup texture. + * @throws {Error} Fails if the data is invalid. + */ + parse(input: string): LookupTexture; + +} + +/** + * A 3D LUT loader that supports the .3dl file format. + * + * Based on an implementation by Garrett Johnson: + * https://github.com/gkjohnson/threejs-sandbox/tree/master/3d-lut + * + * For more details see: + * http://download.autodesk.com/us/systemdocs/help/2011/lustre/index.html?url=./files/WSc4e151a45a3b785a24c3d9a411df9298473-7ffd.htm,topicNumber=d0e9492 + * + * @deprecated Use `three/addons/loaders/LUT3dlLoader.js` instead. + */ +export class LUT3dlLoader extends Loader { + + /** + * Loads a LUT. + * + * @param {String} url - The URL of the 3dl-file. + * @param {Function} [onLoad] - A callback that receives the loaded lookup texture. + * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. + * @param {Function} [onError] - An error callback that receives the URL of the file that failed to load. + */ + load( + url: string, + onLoad: (data: LookupTexture) => void, + onProgress?: (event: ProgressEvent) => void, + onError?: (err: unknown) => void, + ): void; - } + /** + * Loads a LUT asynchronously. + * + * @param {String} url - The URL of the 3dl-file. + * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. + * @return {Promise} A promise that returns the lookup texture. + */ + loadAsync( + url: string, + onProgress?: (event: ProgressEvent) => void, + ): Promise; /** - * Determines the texture inline decoding. - * - * @param {Texture} texture - A texture. - * @param {Boolean} isWebGL2 - Whether the context is WebGL 2. - * @return {String} The decoding. - * @ignore - */ - export function getTextureDecoding( - texture: Texture, - isWebGL2: boolean - ): string; - - /** - * Converts orthographic depth to view Z. - * - * @see https://github.com/mrdoob/three.js/blob/0de4e75ee65c3238957318b88ef91b6597e23c1e/src/renderers/shaders/ShaderChunk/packing.glsl.js#L42 - * @param {Number} depth - The linear clip Z. - * @param {Number} near - The camera near plane. - * @param {Number} far - The camera far plane. - * @return {Number} The view Z. - * @ignore - */ - export function orthographicDepthToViewZ( - depth: number, - near: number, - far: number - ): number; - - /** - * Converts view Z to orthographic depth. - * - * @see https://github.com/mrdoob/three.js/blob/0de4e75ee65c3238957318b88ef91b6597e23c1e/src/renderers/shaders/ShaderChunk/packing.glsl.js#L39 - * @param {Number} viewZ - The view Z. Expected to be negative. - * @param {Number} near - The camera near plane. - * @param {Number} far - The camera far plane. - * @return {Number} The depth. - * @ignore - */ - export function viewZToOrthographicDepth( - viewZ: number, - near: number, - far: number - ): number; - - /** - * A lens distortion effect. + * Parses the given data. * - * Original shader ported from https://github.com/ycw/three-lens-distortion + * @param {String} input - The LUT data. + * @return {LookupTexture} The lookup texture. + * @throws {Error} Fails if the data is invalid. */ + parse(input: string): LookupTexture; - export class LensDistortionEffect extends Effect { +} - /** - * Constructs a new lens distortion effect. - * - * @param {Object} [options] - The options. - * @param {Vector2} [options.distortion] - The distortion value. - * @param {Vector2} [options.principalPoint] - The center point. - * @param {Vector2} [options.focalLength] - The focal length. - * @param {Number} [options.skew=0] - The skew value. - */ +/** + * Determines the texture inline decoding. + * + * @param {Texture} texture - A texture. + * @param {Boolean} isWebGL2 - Whether the context is WebGL 2. + * @return {String} The decoding. + * @ignore + */ +export function getTextureDecoding( + texture: Texture, + isWebGL2: boolean +): string; + +/** + * Converts orthographic depth to view Z. + * + * @see https://github.com/mrdoob/three.js/blob/0de4e75ee65c3238957318b88ef91b6597e23c1e/src/renderers/shaders/ShaderChunk/packing.glsl.js#L42 + * @param {Number} depth - The linear clip Z. + * @param {Number} near - The camera near plane. + * @param {Number} far - The camera far plane. + * @return {Number} The view Z. + * @ignore + */ +export function orthographicDepthToViewZ( + depth: number, + near: number, + far: number +): number; + +/** + * Converts view Z to orthographic depth. + * + * @see https://github.com/mrdoob/three.js/blob/0de4e75ee65c3238957318b88ef91b6597e23c1e/src/renderers/shaders/ShaderChunk/packing.glsl.js#L39 + * @param {Number} viewZ - The view Z. Expected to be negative. + * @param {Number} near - The camera near plane. + * @param {Number} far - The camera far plane. + * @return {Number} The depth. + * @ignore + */ +export function viewZToOrthographicDepth( + viewZ: number, + near: number, + far: number +): number; + +/** + * A lens distortion effect. + * + * Original shader ported from https://github.com/ycw/three-lens-distortion + */ +export class LensDistortionEffect extends Effect { - constructor({ - distortion, - principalPoint, - focalLength, - skew - }?: { - distortion: Vector2; - principalPoint: Vector2; - focalLength: Vector2; - skew?: number; - }); - - /** - * The radial distortion coefficients. Default is (0, 0). - * - * @type {Vector2} - */ - - get distortion(): Vector2; - set distortion(value: Vector2); - - /** - * The principal point. Default is (0, 0). - * - * @type {Vector2} - */ - - get principalPoint(): Vector2; - set principalPoint(value: Vector2); - - /** - * The focal length. Default is (1, 1). - * - * @type {Vector2} - */ - - get focalLength(): Vector2; - set focalLength(value: Vector2); - - /** - * The skew factor in radians. - * - * @type {Number} - */ - - get skew(): number; - set skew(value: number); - - } + /** + * Constructs a new lens distortion effect. + * + * @param {Object} [options] - The options. + * @param {Vector2} [options.distortion] - The distortion value. + * @param {Vector2} [options.principalPoint] - The center point. + * @param {Vector2} [options.focalLength] - The focal length. + * @param {Number} [options.skew=0] - The skew value. + */ + constructor({ + distortion, + principalPoint, + focalLength, + skew + }?: { + distortion: Vector2; + principalPoint: Vector2; + focalLength: Vector2; + skew?: number; + }); + + /** + * The radial distortion coefficients. Default is (0, 0). + * + * @type {Vector2} + */ + get distortion(): Vector2; + set distortion(value: Vector2); + /** + * The principal point. Default is (0, 0). + * + * @type {Vector2} + */ + get principalPoint(): Vector2; + set principalPoint(value: Vector2); + /** + * The focal length. Default is (1, 1). + * + * @type {Vector2} + */ + get focalLength(): Vector2; + set focalLength(value: Vector2); + /** + * The skew factor in radians. + * + * @type {Number} + */ + get skew(): number; + set skew(value: number); }