main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

19
node_modules/postprocessing/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright © 2015 Raoul van Rüschen
This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use of
this software.
Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to
the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

122
node_modules/postprocessing/README.md generated vendored Normal file
View File

@@ -0,0 +1,122 @@
# Post Processing
[![CI](https://github.com/pmndrs/postprocessing/actions/workflows/ci.yml/badge.svg)](https://github.com/pmndrs/postprocessing/actions/workflows/ci.yml)
[![Version](https://badgen.net/npm/v/postprocessing?color=green)](https://www.npmjs.com/package/postprocessing)
A post processing library for [three.js](https://threejs.org/).
*[Demo](https://pmndrs.github.io/postprocessing/public/demo) · [Sandbox](https://stackblitz.com/edit/postprocessing-v6) · [Documentation](https://pmndrs.github.io/postprocessing/public/docs) · [Wiki](https://github.com/pmndrs/postprocessing/wiki)*
## Installation
This library requires the peer dependency [three](https://github.com/mrdoob/three.js/).
```sh
npm install three postprocessing
```
## Usage
Post processing introduces the concept of passes and effects to extend the common rendering workflow with fullscreen image manipulation tools. The following WebGL attributes should be used for an optimal post processing workflow:
```js
import { WebGLRenderer } from "three";
const renderer = new WebGLRenderer({
powerPreference: "high-performance",
antialias: false,
stencil: false,
depth: false
});
```
The [EffectComposer](https://pmndrs.github.io/postprocessing/public/docs/class/src/core/EffectComposer.js~EffectComposer.html) manages and runs passes. It is common practice to use a [RenderPass](https://pmndrs.github.io/postprocessing/public/docs/class/src/passes/RenderPass.js~RenderPass.html) as the first pass to automatically clear the buffers and render a scene for further processing. Fullscreen image effects are rendered via the [EffectPass](https://pmndrs.github.io/postprocessing/public/docs/class/src/passes/EffectPass.js~EffectPass.html). Please refer to the [usage example](https://github.com/mrdoob/three.js/blob/master/README.md) of three.js for more information on how to setup the renderer, scene and camera.
```js
import { BloomEffect, EffectComposer, EffectPass, RenderPass } from "postprocessing";
const composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
composer.addPass(new EffectPass(camera, new BloomEffect()));
requestAnimationFrame(function render() {
requestAnimationFrame(render);
composer.render();
});
```
## Output Color Space
New applications should follow a [linear workflow](https://docs.unity3d.com/Manual/LinearRendering-LinearOrGammaWorkflow.html) for color management and postprocessing supports this automatically. Simply set `WebGLRenderer.outputColorSpace` to `SRGBColorSpace` and postprocessing will follow suit.
Postprocessing uses `UnsignedByteType` sRGB frame buffers to store intermediate results. This is a trade-off between hardware support, efficiency and quality since linear results normally require at least 12 bits per color channel to prevent [color degradation and banding](https://blog.demofox.org/2018/03/10/dont-convert-srgb-u8-to-linear-u8/). With low precision sRGB buffers, colors will be clamped to `[0.0, 1.0]` and information loss will shift to the darker spectrum which leads to noticable banding in dark scenes. Linear, high precision `HalfFloatType` buffers don't have these issues and are the preferred option for HDR-like workflows on desktop devices. You can enable high precision frame buffers as follows:
```ts
import { HalfFloatType } from "three";
const composer = new EffectComposer(renderer, {
frameBufferType: HalfFloatType
});
```
## Tone Mapping
Tone mapping is the process of converting HDR colors to LDR output colors. When using postprocessing, the `toneMapping` setting on the renderer should be set to `NoToneMapping` (default) and high precision frame buffers should be enabled. Otherwise, colors will be mapped to `[0.0, 1.0]` at the start of the pipeline. To enable tone mapping, use a `ToneMappingEffect` at the end of the pipeline.
Note that tone mapping is not applied to the clear color when using only the renderer because clearing doesn't involve shaders. Postprocessing applies to the full input image which means that tone mapping will also be applied uniformly. Consequently, the results of tone mapping a clear color background with and without postprocessing will be different, with the postprocessing approach being correct.
## Performance
This library provides an [EffectPass](https://pmndrs.github.io/postprocessing/public/docs/class/src/passes/EffectPass.js~EffectPass.html) which automatically organizes and merges any given combination of effects. This minimizes the amount of render operations and makes it possible to combine many effects without the performance penalties of traditional pass chaining. Additionally, every effect can choose its own [blend function](https://pmndrs.github.io/postprocessing/public/docs/variable/index.html#static-variable-BlendFunction).
All fullscreen render operations also use a [single triangle](https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/) that fills the screen. Compared to using a quad, this approach harmonizes with modern GPU rasterization patterns and eliminates unnecessary fragment calculations along the screen diagonal. This is especially beneficial for GPGPU passes and effects that use complex fragment shaders.
[Performance Test](https://pmndrs.github.io/postprocessing/public/demo/#performance)
## Included Effects
_The total demo download size is about `60 MB`._
- [Antialiasing](https://pmndrs.github.io/postprocessing/public/demo/#antialiasing)
- [Bloom](https://pmndrs.github.io/postprocessing/public/demo/#bloom)
- [Blur](https://pmndrs.github.io/postprocessing/public/demo/#blur)
- [Color Depth](https://pmndrs.github.io/postprocessing/public/demo/#color-depth)
- [Color Grading](https://pmndrs.github.io/postprocessing/public/demo/#color-grading)
- Color Average
- Sepia
- Brightness & Contrast
- Hue & Saturation
- LUT
- [Depth of Field](https://pmndrs.github.io/postprocessing/public/demo/#depth-of-field)
- Vignette
- [Glitch](https://pmndrs.github.io/postprocessing/public/demo/#glitch)
- Chromatic Aberration
- Noise
- [God Rays](https://pmndrs.github.io/postprocessing/public/demo/#god-rays)
- [Pattern](https://pmndrs.github.io/postprocessing/public/demo/#pattern)
- Dot-Screen
- Grid
- Scanline
- [Pixelation](https://pmndrs.github.io/postprocessing/public/demo/#pixelation)
- [Outline](https://pmndrs.github.io/postprocessing/public/demo/#outline)
- [Shock Wave](https://pmndrs.github.io/postprocessing/public/demo/#shock-wave)
- Depth Picking
- [SSAO](https://pmndrs.github.io/postprocessing/public/demo/#ssao)
- [Texture](https://pmndrs.github.io/postprocessing/public/demo/#texture)
- [Tone Mapping](https://pmndrs.github.io/postprocessing/public/demo/#tone-mapping)
## Custom Effects
If you want to learn how to create custom effects or passes, please check the [Wiki](https://github.com/pmndrs/postprocessing/wiki).
## Contributing
Please refer to the [contribution guidelines](https://github.com/pmndrs/postprocessing/blob/main/.github/CONTRIBUTING.md) for details.
## License
This library is licensed under the [Zlib license](https://github.com/pmndrs/postprocessing/blob/main/LICENSE.md).
The original code that this library is based on, was written by [mrdoob](https://mrdoob.com) and the [three.js contributors](https://github.com/mrdoob/three.js/graphs/contributors) and is licensed under the [MIT license](https://github.com/mrdoob/three.js/blob/master/LICENSE).

16641
node_modules/postprocessing/build/index.cjs generated vendored Normal file

File diff suppressed because one or more lines are too long

16724
node_modules/postprocessing/build/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

16651
node_modules/postprocessing/build/postprocessing.js generated vendored Normal file

File diff suppressed because one or more lines are too long

879
node_modules/postprocessing/build/postprocessing.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

9350
node_modules/postprocessing/build/types/index.d.cts generated vendored Normal file

File diff suppressed because it is too large Load Diff

9350
node_modules/postprocessing/build/types/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

132
node_modules/postprocessing/package.json generated vendored Normal file
View File

@@ -0,0 +1,132 @@
{
"name": "postprocessing",
"version": "6.37.8",
"description": "A post processing library for three.js.",
"homepage": "https://github.com/pmndrs/postprocessing",
"license": "Zlib",
"type": "module",
"sideEffects": false,
"main": "./build/index.cjs",
"module": "./build/index.js",
"types": "./build/types/index.d.cts",
"exports": {
".": {
"import": {
"types": "./build/types/index.d.ts",
"default": "./build/index.js"
},
"require": {
"types": "./build/types/index.d.cts",
"default": "./build/index.cjs"
}
}
},
"keywords": [
"rendering",
"image",
"filter",
"effect",
"composer",
"pass",
"post",
"processing",
"gpgpu",
"rtt",
"rendertexture",
"rendertarget",
"three"
],
"author": {
"name": "Raoul van Rüschen",
"email": "vanruesc@outlook.de"
},
"repository": {
"url": "git+https://github.com/pmndrs/postprocessing.git"
},
"bugs": {
"url": "https://github.com/pmndrs/postprocessing/issues"
},
"files": [
"./build"
],
"ava": {
"failFast": true,
"files": [
"./test/**/*"
]
},
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"core-js",
"esbuild",
"hugo-bin"
]
},
"scripts": {
"ava": "ava",
"build": "npm run clean && run-p build:css build:js:min build:dts",
"build:css": "sass --no-source-map -I manual/assets/css/src/values manual/assets/css/src:manual/assets/css/dist",
"build:js": "node esbuild",
"build:js:min": "node esbuild -m",
"build:dts": "cpy \"types/*\" build/types && cpy \"types/*\" build/types --rename=index.d.cts",
"clean": "del-cli build temp manual/resources \"manual/assets/**/dist\" public",
"copy": "cpy \"demo/static/**/*\" public/demo",
"deploy": "run-s copy postcss hugo gzip",
"doc": "esdoc",
"gzip": "gzipper c \"public\"",
"hugo": "hugo -s manual --minify",
"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 --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",
"test": "run-s lint build ava doc",
"start": "hugo server -s manual -e development",
"watch": "run-p watch:* start",
"watch:css": "sass --no-source-map -I manual/assets/css/src/values manual/assets/css/src:manual/assets/css/dist -w",
"watch:js": "node esbuild -w"
},
"peerDependencies": {
"three": ">= 0.157.0 < 0.181.0"
},
"devDependencies": {
"@tweakpane/core": "2.x.x",
"@types/node": "24.x.x",
"@types/three": "0.x.x",
"@typescript-eslint/eslint-plugin": "8.x.x",
"@typescript-eslint/parser": "8.x.x",
"autoprefixer": "10.x.x",
"ava": "6.x.x",
"cpy-cli": "6.x.x",
"cssnano": "7.x.x",
"dat.gui": "0.x.x",
"del-cli": "6.x.x",
"esbuild": "0.25.x",
"esbuild-plugin-glsl": "1.x.x",
"esdoc": "1.x.x",
"esdoc-importpath-plugin": "1.x.x",
"esdoc-standard-plugin": "1.x.x",
"eslint": "9.x.x",
"eslint-config-aether": "2.x.x",
"gzipper": "8.x.x",
"hugo-bin": "0.x.x",
"npm-run-all": "4.x.x",
"postcss": "8.x.x",
"postcss-cli": "11.x.x",
"postcss-preset-env": "10.x.x",
"sass": "1.x.x",
"spatial-controls": "6.x.x",
"stylelint": "16.x.x",
"stylelint-config-standard-scss": "15.x.x",
"stylelint-order": "7.x.x",
"three": "0.x.x",
"three-demo": "5.x.x",
"tiny-glob": "0.x.x",
"tslib": "2.x.x",
"tweakpane": "4.x.x",
"typescript": "5.9.x"
}
}