@takram/three-geospatial-effects 0.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/build/index.cjs +1 -0
- package/build/index.js +25 -0
- package/build/r3f.cjs +748 -0
- package/build/r3f.js +1645 -0
- package/build/shared.cjs +315 -0
- package/build/shared.js +741 -0
- package/package.json +52 -0
- package/src/DepthEffect.ts +81 -0
- package/src/DitheringEffect.ts +28 -0
- package/src/DownsampleThresholdMaterial.ts +83 -0
- package/src/GeometryEffect.ts +79 -0
- package/src/GeometryPass.ts +53 -0
- package/src/LensFlareEffect.ts +185 -0
- package/src/LensFlareFeaturesMaterial.ts +96 -0
- package/src/NormalEffect.ts +135 -0
- package/src/createHaldLookupTexture.ts +20 -0
- package/src/index.ts +7 -0
- package/src/r3f/Depth.tsx +8 -0
- package/src/r3f/Dithering.tsx +5 -0
- package/src/r3f/EffectComposer.tsx +189 -0
- package/src/r3f/Geometry.tsx +45 -0
- package/src/r3f/LensFlare.tsx +30 -0
- package/src/r3f/Normal.tsx +49 -0
- package/src/r3f/SSAO.tsx +123 -0
- package/src/r3f/index.ts +8 -0
- package/src/r3f/types.ts +12 -0
- package/src/setupMaterialsForGeometryPass.ts +131 -0
- package/src/shaders/depthEffect.frag +26 -0
- package/src/shaders/ditheringEffect.frag +7 -0
- package/src/shaders/downsampleThreshold.frag +73 -0
- package/src/shaders/downsampleThreshold.vert +34 -0
- package/src/shaders/geometryEffect.frag +17 -0
- package/src/shaders/lensFlareEffect.frag +12 -0
- package/src/shaders/lensFlareFeatures.frag +73 -0
- package/src/shaders/lensFlareFeatures.vert +10 -0
- package/src/shaders/normalEffect.frag +37 -0
- package/src/shaders/ssr.frag +381 -0
- package/src/shaders/ssr.vert +6 -0
- package/src/shaders/ssrEffect.frag +6 -0
- package/types/DepthEffect.d.ts +23 -0
- package/types/DitheringEffect.d.ts +11 -0
- package/types/DownsampleThresholdMaterial.d.ts +21 -0
- package/types/GeometryEffect.d.ts +20 -0
- package/types/GeometryPass.d.ts +9 -0
- package/types/LensFlareEffect.d.ts +43 -0
- package/types/LensFlareFeaturesMaterial.d.ts +26 -0
- package/types/NormalEffect.d.ts +27 -0
- package/types/createHaldLookupTexture.d.ts +4 -0
- package/types/index.d.ts +7 -0
- package/types/r3f/Depth.d.ts +8 -0
- package/types/r3f/Dithering.d.ts +6 -0
- package/types/r3f/EffectComposer.d.ts +25 -0
- package/types/r3f/Geometry.d.ts +6 -0
- package/types/r3f/LensFlare.d.ts +6 -0
- package/types/r3f/Normal.d.ts +6 -0
- package/types/r3f/SSAO.d.ts +26 -0
- package/types/r3f/index.d.ts +8 -0
- package/types/r3f/types.d.ts +8 -0
- package/types/setupMaterialsForGeometryPass.d.ts +8 -0
package/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# @takram/three-geospatial-effects
|
2
|
+
|
3
|
+
A collection of post-processing effects.
|
4
|
+
|
5
|
+
This library is currently under active development, and its API may change without maintaining backward compatibility.
|
6
|
+
|
7
|
+
It is part of a project to prototype the rendering aspect of a Web GIS engine. For more details on the background and current status of this project, please refer to the [main README](/README.md).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
```sh
|
12
|
+
npm install @takram/three-geospatial-effects
|
13
|
+
pnpm add @takram/three-geospatial-effects
|
14
|
+
yarn add @takram/three-geospatial-effects
|
15
|
+
```
|
package/build/index.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("postprocessing"),e=require("./shared.cjs");function i(t){const{image:o}=t,{width:s,height:r}=o;if(s!==r)throw new Error("Hald CLUT image must be square.");const f=Math.cbrt(s*r);if(f%1!==0)throw new Error("Hald CLUT image must be cubic.");const{data:c}=n.RawImageData.from(o),a=new n.LookupTexture(c,f);return a.name=t.name,a.type=t.type,t.colorSpace=a.colorSpace,a}exports.DepthEffect=e.DepthEffect;exports.DitheringEffect=e.DitheringEffect;exports.GeometryPass=e.GeometryPass;exports.LensFlareEffect=e.LensFlareEffect;exports.NormalEffect=e.NormalEffect;exports.depthEffectOptionsDefaults=e.depthEffectOptionsDefaults;exports.ditheringOptionsDefaults=e.ditheringOptionsDefaults;exports.lensFlareEffectOptionsDefaults=e.lensFlareEffectOptionsDefaults;exports.normalEffectOptionsDefaults=e.normalEffectOptionsDefaults;exports.setupMaterialsForGeometryPass=e.setupMaterialsForGeometryPass;exports.createHaldLookupTexture=i;
|
package/build/index.js
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
import { RawImageData as n, LookupTexture as c } from "postprocessing";
|
2
|
+
import { D as u, b as h, G as E, L as d, N as D, d as g, a as w, l as L, n as b, s as y } from "./shared.js";
|
3
|
+
function l(e) {
|
4
|
+
const { image: a } = e, { width: s, height: o } = a;
|
5
|
+
if (s !== o)
|
6
|
+
throw new Error("Hald CLUT image must be square.");
|
7
|
+
const r = Math.cbrt(s * o);
|
8
|
+
if (r % 1 !== 0)
|
9
|
+
throw new Error("Hald CLUT image must be cubic.");
|
10
|
+
const { data: f } = n.from(a), t = new c(f, r);
|
11
|
+
return t.name = e.name, t.type = e.type, e.colorSpace = t.colorSpace, t;
|
12
|
+
}
|
13
|
+
export {
|
14
|
+
u as DepthEffect,
|
15
|
+
h as DitheringEffect,
|
16
|
+
E as GeometryPass,
|
17
|
+
d as LensFlareEffect,
|
18
|
+
D as NormalEffect,
|
19
|
+
l as createHaldLookupTexture,
|
20
|
+
g as depthEffectOptionsDefaults,
|
21
|
+
w as ditheringOptionsDefaults,
|
22
|
+
L as lensFlareEffectOptionsDefaults,
|
23
|
+
b as normalEffectOptionsDefaults,
|
24
|
+
y as setupMaterialsForGeometryPass
|
25
|
+
};
|