added god rays

This commit is contained in:
2025-07-29 00:15:57 +01:00
parent 51427294da
commit 1508b3cb29
20 changed files with 2436 additions and 3 deletions

13
app/node_modules/.package-lock.json generated vendored
View File

@@ -897,7 +897,6 @@
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"ideallyInert": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@@ -1037,6 +1036,18 @@
"integrity": "sha512-ybFIB0+x8mz0wnZgSGy2MO/WCO6xZhQSZnmfytSPyNpM0sBafGRVhdaj+erYh5U+RhQOAg/eXqw5uVDiM2BjhQ==", "integrity": "sha512-ybFIB0+x8mz0wnZgSGy2MO/WCO6xZhQSZnmfytSPyNpM0sBafGRVhdaj+erYh5U+RhQOAg/eXqw5uVDiM2BjhQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/three-good-godrays": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/three-good-godrays/-/three-good-godrays-0.7.1.tgz",
"integrity": "sha512-VeaJlcWozjKPm2FgiHXPDTVmGxYr89arRYJlyLmJvLr+C+2OVm1RPsHcdXyRU4IPT33EQUfSuFBtL/z2lNqXAw==",
"engines": {
"node": ">= 0.13.2"
},
"peerDependencies": {
"postprocessing": "^6.33.4",
"three": ">= 0.125.0 <= 0.167.0"
}
},
"node_modules/tinyglobby": { "node_modules/tinyglobby": {
"version": "0.2.14", "version": "0.2.14",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",

22
app/node_modules/fsevents/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
MIT License
-----------
Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

89
app/node_modules/fsevents/README.md generated vendored Normal file
View File

@@ -0,0 +1,89 @@
# fsevents
Native access to MacOS FSEvents in [Node.js](https://nodejs.org/)
The FSEvents API in MacOS allows applications to register for notifications of
changes to a given directory tree. It is a very fast and lightweight alternative
to kqueue.
This is a low-level library. For a cross-platform file watching module that
uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar).
## Usage
```sh
npm install fsevents
```
Supports only **Node.js v8.16 and higher**.
```js
const fsevents = require('fsevents');
// To start observation
const stop = fsevents.watch(__dirname, (path, flags, id) => {
const info = fsevents.getInfo(path, flags);
});
// To end observation
stop();
```
> **Important note:** The API behaviour is slightly different from typical JS APIs. The `stop` function **must** be
> retrieved and stored somewhere, even if you don't plan to stop the watcher. If you forget it, the garbage collector
> will eventually kick in, the watcher will be unregistered, and your callbacks won't be called anymore.
The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a
a change in the file system. It takes three arguments:
###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise<undefined>`
* `path: string` - the item in the filesystem that have been changed
* `flags: number` - a numeric value describing what the change was
* `id: string` - an unique-id identifying this specific event
Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down.
###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo`
The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure
that is easier to digest to determine what the change was.
The `FsEventsInfo` has the following shape:
```js
/**
* @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent
* @typedef {'file'|'directory'|'symlink'} FsEventsType
*/
{
"event": "created", // {FsEventsEvent}
"path": "file.txt",
"type": "file", // {FsEventsType}
"changes": {
"inode": true, // Had iNode Meta-Information changed
"finder": false, // Had Finder Meta-Data changed
"access": false, // Had access permissions changed
"xattrs": false // Had xAttributes changed
},
"flags": 0x100000000
}
```
## Changelog
- v2.3 supports Apple Silicon ARM CPUs
- v2 supports node 8.16+ and reduces package size massively
- v1.2.8 supports node 6+
- v1.2.7 supports node 4+
## Troubleshooting
- I'm getting `EBADPLATFORM` `Unsupported platform for fsevents` error.
- It's fine, nothing is broken. fsevents is macos-only. Other platforms are skipped. If you want to hide this warning, report a bug to NPM bugtracker asking them to hide ebadplatform warnings by default.
## License
The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file.
Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents)

46
app/node_modules/fsevents/fsevents.d.ts generated vendored Normal file
View File

@@ -0,0 +1,46 @@
declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown";
declare type Type = "file" | "directory" | "symlink";
declare type FileChanges = {
inode: boolean;
finder: boolean;
access: boolean;
xattrs: boolean;
};
declare type Info = {
event: Event;
path: string;
type: Type;
changes: FileChanges;
flags: number;
};
declare type WatchHandler = (path: string, flags: number, id: string) => void;
export declare function watch(path: string, handler: WatchHandler): () => Promise<void>;
export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise<void>;
export declare function getInfo(path: string, flags: number): Info;
export declare const constants: {
None: 0x00000000;
MustScanSubDirs: 0x00000001;
UserDropped: 0x00000002;
KernelDropped: 0x00000004;
EventIdsWrapped: 0x00000008;
HistoryDone: 0x00000010;
RootChanged: 0x00000020;
Mount: 0x00000040;
Unmount: 0x00000080;
ItemCreated: 0x00000100;
ItemRemoved: 0x00000200;
ItemInodeMetaMod: 0x00000400;
ItemRenamed: 0x00000800;
ItemModified: 0x00001000;
ItemFinderInfoMod: 0x00002000;
ItemChangeOwner: 0x00004000;
ItemXattrMod: 0x00008000;
ItemIsFile: 0x00010000;
ItemIsDir: 0x00020000;
ItemIsSymlink: 0x00040000;
ItemIsHardlink: 0x00100000;
ItemIsLastHardlink: 0x00200000;
OwnEvent: 0x00080000;
ItemCloned: 0x00400000;
};
export {};

83
app/node_modules/fsevents/fsevents.js generated vendored Normal file
View File

@@ -0,0 +1,83 @@
/*
** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
** Licensed under MIT License.
*/
/* jshint node:true */
"use strict";
if (process.platform !== "darwin") {
throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`);
}
const Native = require("./fsevents.node");
const events = Native.constants;
function watch(path, since, handler) {
if (typeof path !== "string") {
throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`);
}
if ("function" === typeof since && "undefined" === typeof handler) {
handler = since;
since = Native.flags.SinceNow;
}
if (typeof since !== "number") {
throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`);
}
if (typeof handler !== "function") {
throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`);
}
let instance = Native.start(Native.global, path, since, handler);
if (!instance) throw new Error(`could not watch: ${path}`);
return () => {
const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined);
instance = undefined;
return result;
};
}
function getInfo(path, flags) {
return {
path,
flags,
event: getEventType(flags),
type: getFileType(flags),
changes: getFileChanges(flags),
};
}
function getFileType(flags) {
if (events.ItemIsFile & flags) return "file";
if (events.ItemIsDir & flags) return "directory";
if (events.MustScanSubDirs & flags) return "directory";
if (events.ItemIsSymlink & flags) return "symlink";
}
function anyIsTrue(obj) {
for (let key in obj) {
if (obj[key]) return true;
}
return false;
}
function getEventType(flags) {
if (events.ItemRemoved & flags) return "deleted";
if (events.ItemRenamed & flags) return "moved";
if (events.ItemCreated & flags) return "created";
if (events.ItemModified & flags) return "modified";
if (events.RootChanged & flags) return "root-changed";
if (events.ItemCloned & flags) return "cloned";
if (anyIsTrue(flags)) return "modified";
return "unknown";
}
function getFileChanges(flags) {
return {
inode: !!(events.ItemInodeMetaMod & flags),
finder: !!(events.ItemFinderInfoMod & flags),
access: !!(events.ItemChangeOwner & flags),
xattrs: !!(events.ItemXattrMod & flags),
};
}
exports.watch = watch;
exports.getInfo = getInfo;
exports.constants = events;

BIN
app/node_modules/fsevents/fsevents.node generated vendored Executable file

Binary file not shown.

62
app/node_modules/fsevents/package.json generated vendored Normal file
View File

@@ -0,0 +1,62 @@
{
"name": "fsevents",
"version": "2.3.3",
"description": "Native Access to MacOS FSEvents",
"main": "fsevents.js",
"types": "fsevents.d.ts",
"os": [
"darwin"
],
"files": [
"fsevents.d.ts",
"fsevents.js",
"fsevents.node"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
},
"scripts": {
"clean": "node-gyp clean && rm -f fsevents.node",
"build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean",
"test": "/bin/bash ./test.sh 2>/dev/null",
"prepublishOnly": "npm run build"
},
"repository": {
"type": "git",
"url": "https://github.com/fsevents/fsevents.git"
},
"keywords": [
"fsevents",
"mac"
],
"contributors": [
{
"name": "Philipp Dunkel",
"email": "pip@pipobscure.com"
},
{
"name": "Ben Noordhuis",
"email": "info@bnoordhuis.nl"
},
{
"name": "Elan Shankar",
"email": "elan.shanker@gmail.com"
},
{
"name": "Miroslav Bajtoš",
"email": "mbajtoss@gmail.com"
},
{
"name": "Paul Miller",
"url": "https://paulmillr.com"
}
],
"license": "MIT",
"bugs": {
"url": "https://github.com/fsevents/fsevents/issues"
},
"homepage": "https://github.com/fsevents/fsevents",
"devDependencies": {
"node-gyp": "^9.4.0"
}
}

22
app/node_modules/three-good-godrays/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright © 2022 Casey Primozic
Adapted from original code (https://github.com/N8python/goodGodRays)
by https://github.com/n8python
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.

113
app/node_modules/three-good-godrays/README.md generated vendored Normal file
View File

@@ -0,0 +1,113 @@
# `three-good-godrays`
[![CI](https://github.com/ameobea/three-good-godrays/actions/workflows/cd.yml/badge.svg)](https://github.com/ameobea/three-good-godrays/actions/workflows/ci.yml)
[![Version](https://badgen.net/npm/v/three-good-godrays?color=green)](https://www.npmjs.com/package/three-good-godrays)
Good godrays effect for three.js using the [pmndrs `postprocessing` library](https://github.com/pmndrs/postprocessing)
Adapted from [original implementation](https://github.com/n8python/goodGodRays) by [@n8python](https://github.com/n8python)
**Demo**: <https://three-good-godrays.ameo.design>
![A screenshot showing the three-good-godrays effect in action within the sponza demo scene. A white sphere in the middle of a terrace with pillars has white godrays emanating from it along with prominent shadows.](https://ameo.link/u/al8.jpg)
## Install
`npm install three-good-godrays`
Or import from unpkg as a module:
```ts
import { GodraysPass } from 'https://unpkg.com/three-good-godrays@0.7.1/build/three-good-godrays.esm.js';
```
## Supported Three.JS Version
This library was tested to work with Three.JS versions `>= 0.125.0 <= 0.167.0`. Although it might work with versions outside that range, support is not guaranteed.
## Usage
```ts
import { EffectComposer, RenderPass } from 'postprocessing';
import * as THREE from 'three';
import { GodraysPass } from 'three-good-godrays';
const { scene, camera, renderer } = initYourScene();
// shadowmaps are needed for this effect
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
renderer.shadowMap.autoUpdate = true;
// Make sure to set applicable objects in your scene to cast + receive shadows
// so that this effect will work
scene.traverse(obj => {
if (obj instanceof THREE.Mesh) {
obj.castShadow = true;
obj.receiveShadow = true;
}
});
// godrays can be cast from either `PointLight`s or `DirectionalLight`s
const lightPos = new THREE.Vector3(0, 20, 0);
const pointLight = new THREE.PointLight(0xffffff, 1, 10000);
pointLight.castShadow = true;
pointLight.shadow.mapSize.width = 1024;
pointLight.shadow.mapSize.height = 1024;
pointLight.shadow.autoUpdate = true;
pointLight.shadow.camera.near = 0.1;
pointLight.shadow.camera.far = 1000;
pointLight.shadow.camera.updateProjectionMatrix();
pointLight.position.copy(lightPos);
scene.add(pointLight);
// set up rendering pipeline and add godrays pass at the end
const composer = new EffectComposer(renderer, { frameBufferType: THREE.HalfFloatType });
const renderPass = new RenderPass(scene, camera);
renderPass.renderToScreen = false;
composer.addPass(renderPass);
// Default values are shown. You can supply a sparse object or `undefined`.
const params = {
density: 1 / 128,
maxDensity: 0.5,
edgeStrength: 2,
edgeRadius: 2,
distanceAttenuation: 2,
color: new THREE.Color(0xffffff),
raymarchSteps: 60,
blur: true,
gammaCorrection: true,
};
const godraysPass = new GodraysPass(pointLight, camera, params);
// If this is the last pass in your pipeline, set `renderToScreen` to `true`
godraysPass.renderToScreen = true;
composer.addPass(godraysPass);
function animate() {
requestAnimationFrame(animate);
composer.render();
}
requestAnimationFrame(animate);
```
### Gamma Correction
Gamma correction is enabled by this effect by default, matching expectations of sRGB buffers from `postprocessing`. However, you can disable this by setting `gammaCorrection: false` in the configuration object for the pass.
This may be necessary if you use other effect passes after `GodraysPass` that perform their own output encoding. If you see artifacts similar to these:
![Screenshot of artifacts caused by double encoding in a Three.Js pmndrs postprocessing pipeline. There is a grainy pattern of colorful pixels appearing over an otherwise blank black background.](https://i.ameo.link/bto.png)
Try setting `gammaCorrection: false` on the `GodraysPass` or setting `encodeOutput = false` on any `EffectPass` that is added after the `GodraysPass`.
## Develop + Run Demos Locally
- Clone repo
- `npm install`
- `npm run prepublishOnly` to run initial builds
- `npm install -g serve`
- Run `node esbuild.mjs` whenever files are chnaged to re-build
- Run `serve public/demo -p 5001` and visit http://localhost:5001 in your browser

View File

@@ -0,0 +1,16 @@
import { type Disposable, Pass, type Resizable } from 'postprocessing';
import * as THREE from 'three';
import type { GodraysBlurParams } from './index';
export declare const GODRAYS_BLUR_RESOLUTION_SCALE = 1;
declare class BilateralFilterMaterial extends THREE.ShaderMaterial {
constructor(input: THREE.Texture);
}
export declare class BilateralFilterPass extends Pass implements Resizable, Disposable {
material: BilateralFilterMaterial;
constructor(input: THREE.Texture);
setSize(width: number, height: number): void;
render(renderer: THREE.WebGLRenderer, _inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget, _deltaTime?: number | undefined, _stencilTest?: boolean | undefined): void;
updateUniforms(params: GodraysBlurParams): void;
dispose(): void;
}
export {};

View File

@@ -0,0 +1,28 @@
import { Pass, type Resizable } from 'postprocessing';
import * as THREE from 'three';
import type { PerspectiveCamera } from 'three';
import type { GodraysPassParams } from './index';
interface GodraysCompositorMaterialProps {
godrays: THREE.Texture;
edgeStrength: number;
edgeRadius: number;
color: THREE.Color;
camera: THREE.PerspectiveCamera;
gammaCorrection: boolean;
}
export declare class GodraysCompositorMaterial extends THREE.ShaderMaterial implements Resizable {
constructor({ godrays, edgeStrength, edgeRadius, color, camera, gammaCorrection, }: GodraysCompositorMaterialProps);
updateUniforms(edgeStrength: number, edgeRadius: number, color: THREE.Color, gammaCorrection: boolean, near: number, far: number): void;
setSize(width: number, height: number): void;
}
export declare class GodraysCompositorPass extends Pass {
sceneCamera: PerspectiveCamera;
private depthCopyRenderTexture;
private depthTextureCopyPass;
constructor(props: GodraysCompositorMaterialProps);
updateUniforms(params: GodraysPassParams): void;
render(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget | null, _deltaTime?: number | undefined, _stencilTest?: boolean | undefined): void;
setDepthTexture(depthTexture: THREE.Texture, depthPacking?: THREE.DepthPackingStrategies | undefined): void;
setSize(width: number, height: number): void;
}
export {};

View File

@@ -0,0 +1,21 @@
import { Pass, type Resizable } from 'postprocessing';
import * as THREE from 'three';
import type { GodraysPassParams } from './index';
export declare const GODRAYS_RESOLUTION_SCALE: number;
export interface GodraysIllumPassProps {
light: THREE.PointLight | THREE.DirectionalLight;
camera: THREE.PerspectiveCamera;
}
export declare class GodraysIllumPass extends Pass implements Resizable {
private material;
private shadowMapSet;
private props;
private lastParams;
private lightWorldPos;
constructor(props: GodraysIllumPassProps, params: GodraysPassParams);
setSize(width: number, height: number): void;
render(renderer: THREE.WebGLRenderer, _inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget, _deltaTime?: number | undefined, _stencilTest?: boolean | undefined): void;
setDepthTexture(depthTexture: THREE.Texture, depthPacking?: THREE.DepthPackingStrategies | undefined): void;
private updateLightParams;
updateUniforms({ light, camera }: GodraysIllumPassProps, params: GodraysPassParams): void;
}

View File

@@ -0,0 +1,117 @@
import { type Disposable, KernelSize, Pass } from 'postprocessing';
import * as THREE from 'three';
export interface GodraysBlurParams {
/**
* The sigma factor used by the bilateral filter for the blur. Higher values result in more blur, but
* can cause artifacts.
*
* Default: 0.1
*/
variance: number;
/**
* The kernel size for the bilateral filter. Higher values blur more neighboring pixels and can smooth over higher amounts of noise,
* but require exponentially more texture samples and thus can be slower.
*
* Default: `KernelSize.SMALL`
*/
kernelSize: KernelSize;
}
export interface GodraysPassParams {
/**
* The rate of accumulation for the godrays. Higher values roughly equate to more humid air/denser fog.
*
* Default: 1 / 128
*/
density: number;
/**
* The maximum density of the godrays. Limits the maximum brightness of the godrays.
*
* Default: 0.5
*/
maxDensity: number;
/**
* Default: 2
*/
edgeStrength: number;
/**
* Edge radius used for depth-aware upsampling of the godrays. Higher values can yield better edge quality at the cost of performance, as
* each level higher of this requires two additional texture samples.
*
* Default: 2
*/
edgeRadius: number;
/**
* Higher values decrease the accumulation of godrays the further away they are from the light source.
*
* Default: 2
*/
distanceAttenuation: number;
/**
* The color of the godrays.
*
* Default: `new THREE.Color(0xffffff)`
*/
color: THREE.Color;
/**
* The number of raymarching steps to take per pixel. Higher values increase the quality of the godrays at the cost of performance.
*
* Default: 60
*/
raymarchSteps: number;
/**
* Whether or not to apply a bilateral blur to the godrays. This can be used to reduce artifacts that can occur when using a low number of raymarching steps.
*
* It costs a bit of extra performance, but can allow for a lower number of raymarching steps to be used with similar quality.
*
* Default: false
*/
blur: boolean | Partial<GodraysBlurParams>;
gammaCorrection: boolean;
}
export declare class GodraysPass extends Pass implements Disposable {
private props;
private depthTexture;
private depthPacking;
private lastParams;
private godraysRenderTarget;
private illumPass;
private enableBlurPass;
private blurPass;
private blurRenderTarget;
private compositorPass;
/**
* Constructs a new GodraysPass. Casts godrays from a point light source. Add to your scene's composer like this:
*
* ```ts
* import { EffectComposer, RenderPass } from 'postprocessing';
* import { GodraysPass } from 'three-good-godrays';
*
* const composer = new EffectComposer(renderer, { frameBufferType: THREE.HalfFloatType });
* const renderPass = new RenderPass(scene, camera);
* renderPass.renderToScreen = false;
* composer.addPass(renderPass);
*
* const godraysPass = new GodraysPass(pointLight, camera);
* godraysPass.renderToScreen = true;
* composer.addPass(godraysPass);
*
* function animate() {
* composer.render(scene, camera);
* }
* ```
*
* @param light The light source to use for the godrays.
* @param camera The camera used to render the scene.
* @param partialParams The parameters to use for the godrays effect. Will use default values for any parameters not specified.
*/
constructor(light: THREE.PointLight | THREE.DirectionalLight, camera: THREE.PerspectiveCamera, partialParams?: Partial<GodraysPassParams>);
/**
* Updates the parameters used for the godrays effect. Will use default values for any parameters not specified.
*/
setParams(partialParams: Partial<GodraysPassParams>): void;
private maybeInitBlur;
render(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget, _deltaTime?: number | undefined, _stencilTest?: boolean | undefined): void;
setDepthTexture(depthTexture: THREE.Texture, depthPacking?: THREE.DepthPackingStrategies | undefined): void;
setSize(width: number, height: number): void;
dispose(): void;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

76
app/node_modules/three-good-godrays/package.json generated vendored Normal file
View File

@@ -0,0 +1,76 @@
{
"name": "three-good-godrays",
"version": "0.7.1",
"description": "Screen-space raymarched godrays for three.js using the pmndrs postprocessing library",
"main": "build/three-good-godrays.js",
"module": "build/three-good-godrays.esm.js",
"exports": {
".": {
"import": "./build/three-good-godrays.esm.js",
"require": "./build/three-good-godrays.js"
},
"./module": "./build/three-good-godrays.mjs"
},
"types": "build/three-good-godrays.d.ts",
"sideEffects": false,
"keywords": [
"three",
"threejs",
"godrays",
"postprocessing",
"raymarching"
],
"contributors": [
{
"name": "n8programs",
"url": "https://github.com/n8python"
},
{
"name": "Casey Primozic",
"url": "https://github.com/ameobea"
}
],
"repository": {
"type": "git",
"url": "https://github.com/ameobea/three-good-godrays.git"
},
"bugs": {
"url": "https://github.com/ameobea/three-good-godrays/issues"
},
"files": [
"build",
"types"
],
"engines": {
"node": ">= 0.13.2"
},
"scripts": {
"clean": "mkdir -p build && rimraf build types",
"copy-files": "cp -r demo/static/* public/demo",
"build:js": "node esbuild.mjs",
"build:js:min": "node esbuild.mjs -m",
"build:types": "tsc --declaration --emitDeclarationOnly && rm build/bluenoise.d.ts && mv build/index.d.ts build/three-good-godrays.d.ts",
"prepublishOnly": "run-s clean build:types build:js:min copy-files",
"prettier": "prettier --write \"src/**/*.{ts,js,tsx}\" && prettier --write \"demo/**/*.{ts,js,tsx}\""
},
"peerDependencies": {
"postprocessing": "^6.33.4",
"three": ">= 0.125.0 <= 0.167.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
"@types/dat.gui": "^0.7.12",
"@types/three": "^0.167.0",
"dat.gui": "^0.7.9",
"esbuild": "^0.19.11",
"esbuild-plugin-glsl": "1.x.x",
"eslint": "8.x.x",
"npm-run-all": "^4.1.5",
"postprocessing": "^6.34.1",
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"three": "^0.167.0",
"three-demo": "^5.1.3",
"typescript": "^5.3.3"
}
}

15
app/package-lock.json generated
View File

@@ -10,7 +10,8 @@
"dependencies": { "dependencies": {
"@types/three": "^0.178.1", "@types/three": "^0.178.1",
"cannon-es": "^0.20.0", "cannon-es": "^0.20.0",
"three": "^0.178.0" "three": "^0.178.0",
"three-good-godrays": "^0.7.1"
}, },
"devDependencies": { "devDependencies": {
"typescript": "~5.8.3", "typescript": "~5.8.3",
@@ -1005,6 +1006,18 @@
"integrity": "sha512-ybFIB0+x8mz0wnZgSGy2MO/WCO6xZhQSZnmfytSPyNpM0sBafGRVhdaj+erYh5U+RhQOAg/eXqw5uVDiM2BjhQ==", "integrity": "sha512-ybFIB0+x8mz0wnZgSGy2MO/WCO6xZhQSZnmfytSPyNpM0sBafGRVhdaj+erYh5U+RhQOAg/eXqw5uVDiM2BjhQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/three-good-godrays": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/three-good-godrays/-/three-good-godrays-0.7.1.tgz",
"integrity": "sha512-VeaJlcWozjKPm2FgiHXPDTVmGxYr89arRYJlyLmJvLr+C+2OVm1RPsHcdXyRU4IPT33EQUfSuFBtL/z2lNqXAw==",
"engines": {
"node": ">= 0.13.2"
},
"peerDependencies": {
"postprocessing": "^6.33.4",
"three": ">= 0.125.0 <= 0.167.0"
}
},
"node_modules/tinyglobby": { "node_modules/tinyglobby": {
"version": "0.2.14", "version": "0.2.14",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",

View File

@@ -15,6 +15,7 @@
"dependencies": { "dependencies": {
"@types/three": "^0.178.1", "@types/three": "^0.178.1",
"cannon-es": "^0.20.0", "cannon-es": "^0.20.0",
"three": "^0.178.0" "three": "^0.178.0",
"three-good-godrays": "^0.7.1"
} }
} }