manim-web 0.20.0 → 0.22.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.
Files changed (47) hide show
  1. package/dist/BokehPass-BtX0qHyZ.js +52 -0
  2. package/dist/BokehPass-D-qNlcw3.js +52 -0
  3. package/dist/CopyShader-C2Oc7n1P.js +12 -0
  4. package/dist/EffectComposer-BrOvLZtb.js +88 -0
  5. package/dist/EffectComposer-D427QFuS.js +88 -0
  6. package/dist/OutputPass-BeBCm_Ta.js +29 -0
  7. package/dist/OutputPass-oQu4Xmeb.js +29 -0
  8. package/dist/Pass--g-Yi-4V.js +51 -0
  9. package/dist/Pass-CSHIrJrV.js +51 -0
  10. package/dist/RenderPass-DS8SYAhJ.js +16 -0
  11. package/dist/RenderPass-DqrV7dhy.js +16 -0
  12. package/dist/ShaderPass-MHAIxsHm.js +22 -0
  13. package/dist/ShaderPass-h4P0lBmc.js +22 -0
  14. package/dist/UnrealBloomPass-DXgh_M0E.js +123 -0
  15. package/dist/UnrealBloomPass-DxDOnUAw.js +123 -0
  16. package/dist/core/PostProcessing.d.ts +203 -0
  17. package/dist/core/PostProcessing.d.ts.map +1 -0
  18. package/dist/core/Scene.d.ts +23 -0
  19. package/dist/core/Scene.d.ts.map +1 -1
  20. package/dist/export/FrameExporter.d.ts +25 -12
  21. package/dist/export/FrameExporter.d.ts.map +1 -1
  22. package/dist/export/WebCodecsExporter.d.ts +39 -0
  23. package/dist/export/WebCodecsExporter.d.ts.map +1 -1
  24. package/dist/export/alphaBackground.d.ts +78 -0
  25. package/dist/export/alphaBackground.d.ts.map +1 -0
  26. package/dist/index.d.ts +4 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +3 -3
  29. package/dist/integrations/react.js +17 -17
  30. package/dist/integrations/vue.js +16 -16
  31. package/dist/interaction/PanZoomControls.d.ts +133 -0
  32. package/dist/interaction/PanZoomControls.d.ts.map +1 -0
  33. package/dist/interaction/index.d.ts +1 -0
  34. package/dist/interaction/index.d.ts.map +1 -1
  35. package/dist/manim-web.browser.js +2426 -1708
  36. package/dist/mobjects/particles/ParticleSystem.d.ts +162 -0
  37. package/dist/mobjects/particles/ParticleSystem.d.ts.map +1 -0
  38. package/dist/mobjects/particles/index.d.ts +6 -0
  39. package/dist/mobjects/particles/index.d.ts.map +1 -0
  40. package/dist/mobjects/text/TextOnPath.d.ts +70 -0
  41. package/dist/mobjects/text/TextOnPath.d.ts.map +1 -0
  42. package/dist/mobjects/text/index.d.ts +2 -0
  43. package/dist/mobjects/text/index.d.ts.map +1 -1
  44. package/dist/mobjects/text/textOnPathLayout.d.ts +110 -0
  45. package/dist/mobjects/text/textOnPathLayout.d.ts.map +1 -0
  46. package/dist/{src-jWauXqbN.js → src-C18aslV3.js} +2408 -1690
  47. package/package.json +1 -1
@@ -0,0 +1,52 @@
1
+ import { $i as e, U as t, Wa as n, Yt as r, Zr as i, co as a, gr as o, or as s } from "./three.core-1aHSpGwp.js";
2
+ import { n as c, t as l } from "./Pass--g-Yi-4V.js";
3
+ //#region node_modules/three/examples/jsm/shaders/BokehShader.js
4
+ var u = {
5
+ name: "BokehShader",
6
+ defines: {
7
+ DEPTH_PACKING: 1,
8
+ PERSPECTIVE_CAMERA: 1
9
+ },
10
+ uniforms: {
11
+ tColor: { value: null },
12
+ tDepth: { value: null },
13
+ focus: { value: 1 },
14
+ aspect: { value: 1 },
15
+ aperture: { value: .025 },
16
+ maxblur: { value: .01 },
17
+ nearClip: { value: 1 },
18
+ farClip: { value: 1e3 }
19
+ },
20
+ vertexShader: "\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
21
+ fragmentShader: "\n\n #include <common>\n\n varying vec2 vUv;\n\n uniform sampler2D tColor;\n uniform sampler2D tDepth;\n\n uniform float maxblur; // max blur amount\n uniform float aperture; // aperture - bigger values for shallower depth of field\n\n uniform float nearClip;\n uniform float farClip;\n\n uniform float focus;\n uniform float aspect;\n\n #include <packing>\n\n float getDepth( const in vec2 screenPosition ) {\n #if DEPTH_PACKING == 1\n return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );\n #else\n return texture2D( tDepth, screenPosition ).x;\n #endif\n }\n\n float getViewZ( const in float depth ) {\n #if PERSPECTIVE_CAMERA == 1\n return perspectiveDepthToViewZ( depth, nearClip, farClip );\n #else\n return orthographicDepthToViewZ( depth, nearClip, farClip );\n #endif\n }\n\n\n void main() {\n\n vec2 aspectcorrect = vec2( 1.0, aspect );\n\n float viewZ = getViewZ( getDepth( vUv ) );\n\n float factor = ( focus + viewZ ); // viewZ is <= 0, so this is a difference equation\n\n vec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );\n\n vec2 dofblur9 = dofblur * 0.9;\n vec2 dofblur7 = dofblur * 0.7;\n vec2 dofblur4 = dofblur * 0.4;\n\n vec4 col = vec4( 0.0 );\n\n col += texture2D( tColor, vUv.xy );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur );\n\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur9 );\n\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur7 );\n\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.4, 0.0 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur4 );\n\n gl_FragColor = col / 41.0;\n gl_FragColor.a = 1.0;\n\n }"
22
+ }, d = class extends c {
23
+ constructor(c, d, f) {
24
+ super(), this.scene = c, this.camera = d;
25
+ let p = f.focus === void 0 ? 1 : f.focus, m = f.aperture === void 0 ? .025 : f.aperture, h = f.maxblur === void 0 ? 1 : f.maxblur;
26
+ this._renderTargetDepth = new a(1, 1, {
27
+ minFilter: o,
28
+ magFilter: o,
29
+ type: r
30
+ }), this._renderTargetDepth.texture.name = "BokehPass.depth", this._materialDepth = new s(), this._materialDepth.depthPacking = i, this._materialDepth.blending = 0;
31
+ let g = n.clone(u.uniforms);
32
+ g.tDepth.value = this._renderTargetDepth.texture, g.focus.value = p, g.aspect.value = d.aspect, g.aperture.value = m, g.maxblur.value = h, g.nearClip.value = d.near, g.farClip.value = d.far, this.materialBokeh = new e({
33
+ defines: Object.assign({}, u.defines),
34
+ uniforms: g,
35
+ vertexShader: u.vertexShader,
36
+ fragmentShader: u.fragmentShader
37
+ }), this.uniforms = g, this._fsQuad = new l(this.materialBokeh), this._oldClearColor = new t();
38
+ }
39
+ render(e, t, n) {
40
+ this.scene.overrideMaterial = this._materialDepth, e.getClearColor(this._oldClearColor);
41
+ let r = e.getClearAlpha(), i = e.autoClear;
42
+ e.autoClear = !1, e.setClearColor(16777215), e.setClearAlpha(1), e.setRenderTarget(this._renderTargetDepth), e.clear(), e.render(this.scene, this.camera), this.uniforms.tColor.value = n.texture, this.uniforms.nearClip.value = this.camera.near, this.uniforms.farClip.value = this.camera.far, this.renderToScreen ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), e.clear(), this._fsQuad.render(e)), this.scene.overrideMaterial = null, e.setClearColor(this._oldClearColor), e.setClearAlpha(r), e.autoClear = i;
43
+ }
44
+ setSize(e, t) {
45
+ this.materialBokeh.uniforms.aspect.value = e / t, this._renderTargetDepth.setSize(e, t);
46
+ }
47
+ dispose() {
48
+ this._renderTargetDepth.dispose(), this._materialDepth.dispose(), this.materialBokeh.dispose(), this._fsQuad.dispose();
49
+ }
50
+ };
51
+ //#endregion
52
+ export { d as BokehPass };
@@ -0,0 +1,52 @@
1
+ import { n as e, t } from "./Pass-CSHIrJrV.js";
2
+ import { Color as n, HalfFloatType as r, MeshDepthMaterial as i, NearestFilter as a, NoBlending as o, RGBADepthPacking as s, ShaderMaterial as c, UniformsUtils as l, WebGLRenderTarget as u } from "three";
3
+ //#region node_modules/three/examples/jsm/shaders/BokehShader.js
4
+ var d = {
5
+ name: "BokehShader",
6
+ defines: {
7
+ DEPTH_PACKING: 1,
8
+ PERSPECTIVE_CAMERA: 1
9
+ },
10
+ uniforms: {
11
+ tColor: { value: null },
12
+ tDepth: { value: null },
13
+ focus: { value: 1 },
14
+ aspect: { value: 1 },
15
+ aperture: { value: .025 },
16
+ maxblur: { value: .01 },
17
+ nearClip: { value: 1 },
18
+ farClip: { value: 1e3 }
19
+ },
20
+ vertexShader: "\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
21
+ fragmentShader: "\n\n #include <common>\n\n varying vec2 vUv;\n\n uniform sampler2D tColor;\n uniform sampler2D tDepth;\n\n uniform float maxblur; // max blur amount\n uniform float aperture; // aperture - bigger values for shallower depth of field\n\n uniform float nearClip;\n uniform float farClip;\n\n uniform float focus;\n uniform float aspect;\n\n #include <packing>\n\n float getDepth( const in vec2 screenPosition ) {\n #if DEPTH_PACKING == 1\n return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );\n #else\n return texture2D( tDepth, screenPosition ).x;\n #endif\n }\n\n float getViewZ( const in float depth ) {\n #if PERSPECTIVE_CAMERA == 1\n return perspectiveDepthToViewZ( depth, nearClip, farClip );\n #else\n return orthographicDepthToViewZ( depth, nearClip, farClip );\n #endif\n }\n\n\n void main() {\n\n vec2 aspectcorrect = vec2( 1.0, aspect );\n\n float viewZ = getViewZ( getDepth( vUv ) );\n\n float factor = ( focus + viewZ ); // viewZ is <= 0, so this is a difference equation\n\n vec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );\n\n vec2 dofblur9 = dofblur * 0.9;\n vec2 dofblur7 = dofblur * 0.7;\n vec2 dofblur4 = dofblur * 0.4;\n\n vec4 col = vec4( 0.0 );\n\n col += texture2D( tColor, vUv.xy );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur );\n\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur9 );\n\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur7 );\n\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.4, 0.0 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );\n col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur4 );\n\n gl_FragColor = col / 41.0;\n gl_FragColor.a = 1.0;\n\n }"
22
+ }, f = class extends e {
23
+ constructor(e, f, p) {
24
+ super(), this.scene = e, this.camera = f;
25
+ let m = p.focus === void 0 ? 1 : p.focus, h = p.aperture === void 0 ? .025 : p.aperture, g = p.maxblur === void 0 ? 1 : p.maxblur;
26
+ this._renderTargetDepth = new u(1, 1, {
27
+ minFilter: a,
28
+ magFilter: a,
29
+ type: r
30
+ }), this._renderTargetDepth.texture.name = "BokehPass.depth", this._materialDepth = new i(), this._materialDepth.depthPacking = s, this._materialDepth.blending = o;
31
+ let _ = l.clone(d.uniforms);
32
+ _.tDepth.value = this._renderTargetDepth.texture, _.focus.value = m, _.aspect.value = f.aspect, _.aperture.value = h, _.maxblur.value = g, _.nearClip.value = f.near, _.farClip.value = f.far, this.materialBokeh = new c({
33
+ defines: Object.assign({}, d.defines),
34
+ uniforms: _,
35
+ vertexShader: d.vertexShader,
36
+ fragmentShader: d.fragmentShader
37
+ }), this.uniforms = _, this._fsQuad = new t(this.materialBokeh), this._oldClearColor = new n();
38
+ }
39
+ render(e, t, n) {
40
+ this.scene.overrideMaterial = this._materialDepth, e.getClearColor(this._oldClearColor);
41
+ let r = e.getClearAlpha(), i = e.autoClear;
42
+ e.autoClear = !1, e.setClearColor(16777215), e.setClearAlpha(1), e.setRenderTarget(this._renderTargetDepth), e.clear(), e.render(this.scene, this.camera), this.uniforms.tColor.value = n.texture, this.uniforms.nearClip.value = this.camera.near, this.uniforms.farClip.value = this.camera.far, this.renderToScreen ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), e.clear(), this._fsQuad.render(e)), this.scene.overrideMaterial = null, e.setClearColor(this._oldClearColor), e.setClearAlpha(r), e.autoClear = i;
43
+ }
44
+ setSize(e, t) {
45
+ this.materialBokeh.uniforms.aspect.value = e / t, this._renderTargetDepth.setSize(e, t);
46
+ }
47
+ dispose() {
48
+ this._renderTargetDepth.dispose(), this._materialDepth.dispose(), this.materialBokeh.dispose(), this._fsQuad.dispose();
49
+ }
50
+ };
51
+ //#endregion
52
+ export { f as BokehPass };
@@ -0,0 +1,12 @@
1
+ //#region node_modules/three/examples/jsm/shaders/CopyShader.js
2
+ var e = {
3
+ name: "CopyShader",
4
+ uniforms: {
5
+ tDiffuse: { value: null },
6
+ opacity: { value: 1 }
7
+ },
8
+ vertexShader: "\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
9
+ fragmentShader: "\n\n uniform float opacity;\n\n uniform sampler2D tDiffuse;\n\n varying vec2 vUv;\n\n void main() {\n\n vec4 texel = texture2D( tDiffuse, vUv );\n gl_FragColor = opacity * texel;\n\n\n }"
10
+ };
11
+ //#endregion
12
+ export { e as t };
@@ -0,0 +1,88 @@
1
+ import { $a as e, Ma as t, Yt as n, co as r } from "./three.core-1aHSpGwp.js";
2
+ import { n as i } from "./Pass--g-Yi-4V.js";
3
+ import { t as a } from "./CopyShader-C2Oc7n1P.js";
4
+ import { ShaderPass as o } from "./ShaderPass-MHAIxsHm.js";
5
+ //#region node_modules/three/examples/jsm/postprocessing/MaskPass.js
6
+ var s = class extends i {
7
+ constructor(e, t) {
8
+ super(), this.scene = e, this.camera = t, this.clear = !0, this.needsSwap = !1, this.inverse = !1;
9
+ }
10
+ render(e, t, n) {
11
+ let r = e.getContext(), i = e.state;
12
+ i.buffers.color.setMask(!1), i.buffers.depth.setMask(!1), i.buffers.color.setLocked(!0), i.buffers.depth.setLocked(!0);
13
+ let a, o;
14
+ this.inverse ? (a = 0, o = 1) : (a = 1, o = 0), i.buffers.stencil.setTest(!0), i.buffers.stencil.setOp(r.REPLACE, r.REPLACE, r.REPLACE), i.buffers.stencil.setFunc(r.ALWAYS, a, 4294967295), i.buffers.stencil.setClear(o), i.buffers.stencil.setLocked(!0), e.setRenderTarget(n), this.clear && e.clear(), e.render(this.scene, this.camera), e.setRenderTarget(t), this.clear && e.clear(), e.render(this.scene, this.camera), i.buffers.color.setLocked(!1), i.buffers.depth.setLocked(!1), i.buffers.color.setMask(!0), i.buffers.depth.setMask(!0), i.buffers.stencil.setLocked(!1), i.buffers.stencil.setFunc(r.EQUAL, 1, 4294967295), i.buffers.stencil.setOp(r.KEEP, r.KEEP, r.KEEP), i.buffers.stencil.setLocked(!0);
15
+ }
16
+ }, c = class extends i {
17
+ constructor() {
18
+ super(), this.needsSwap = !1;
19
+ }
20
+ render(e) {
21
+ e.state.buffers.stencil.setLocked(!1), e.state.buffers.stencil.setTest(!1);
22
+ }
23
+ }, l = class {
24
+ constructor(i, s) {
25
+ if (this.renderer = i, this._pixelRatio = i.getPixelRatio(), s === void 0) {
26
+ let t = i.getSize(new e());
27
+ this._width = t.width, this._height = t.height, s = new r(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: n }), s.texture.name = "EffectComposer.rt1";
28
+ } else this._width = s.width, this._height = s.height;
29
+ this.renderTarget1 = s, this.renderTarget2 = s.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new o(a), this.copyPass.material.blending = 0, this.timer = new t();
30
+ }
31
+ swapBuffers() {
32
+ let e = this.readBuffer;
33
+ this.readBuffer = this.writeBuffer, this.writeBuffer = e;
34
+ }
35
+ addPass(e) {
36
+ this.passes.push(e), e.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
37
+ }
38
+ insertPass(e, t) {
39
+ this.passes.splice(t, 0, e), e.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
40
+ }
41
+ removePass(e) {
42
+ let t = this.passes.indexOf(e);
43
+ t !== -1 && this.passes.splice(t, 1);
44
+ }
45
+ isLastEnabledPass(e) {
46
+ for (let t = e + 1; t < this.passes.length; t++) if (this.passes[t].enabled) return !1;
47
+ return !0;
48
+ }
49
+ render(e) {
50
+ this.timer.update(), e === void 0 && (e = this.timer.getDelta());
51
+ let t = this.renderer.getRenderTarget(), n = !1;
52
+ for (let t = 0, r = this.passes.length; t < r; t++) {
53
+ let r = this.passes[t];
54
+ if (r.enabled !== !1) {
55
+ if (r.renderToScreen = this.renderToScreen && this.isLastEnabledPass(t), r.render(this.renderer, this.writeBuffer, this.readBuffer, e, n), r.needsSwap) {
56
+ if (n) {
57
+ let t = this.renderer.getContext(), n = this.renderer.state.buffers.stencil;
58
+ n.setFunc(t.NOTEQUAL, 1, 4294967295), this.copyPass.render(this.renderer, this.writeBuffer, this.readBuffer, e), n.setFunc(t.EQUAL, 1, 4294967295);
59
+ }
60
+ this.swapBuffers();
61
+ }
62
+ s !== void 0 && (r instanceof s ? n = !0 : r instanceof c && (n = !1));
63
+ }
64
+ }
65
+ this.renderer.setRenderTarget(t);
66
+ }
67
+ reset(t) {
68
+ if (t === void 0) {
69
+ let n = this.renderer.getSize(new e());
70
+ this._pixelRatio = this.renderer.getPixelRatio(), this._width = n.width, this._height = n.height, t = this.renderTarget1.clone(), t.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
71
+ }
72
+ this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.renderTarget1 = t, this.renderTarget2 = t.clone(), this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2;
73
+ }
74
+ setSize(e, t) {
75
+ this._width = e, this._height = t;
76
+ let n = this._width * this._pixelRatio, r = this._height * this._pixelRatio;
77
+ this.renderTarget1.setSize(n, r), this.renderTarget2.setSize(n, r);
78
+ for (let e = 0; e < this.passes.length; e++) this.passes[e].setSize(n, r);
79
+ }
80
+ setPixelRatio(e) {
81
+ this._pixelRatio = e, this.setSize(this._width, this._height);
82
+ }
83
+ dispose() {
84
+ this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.copyPass.dispose();
85
+ }
86
+ };
87
+ //#endregion
88
+ export { l as EffectComposer };
@@ -0,0 +1,88 @@
1
+ import { n as e } from "./Pass-CSHIrJrV.js";
2
+ import { t } from "./CopyShader-C2Oc7n1P.js";
3
+ import { ShaderPass as n } from "./ShaderPass-h4P0lBmc.js";
4
+ import { HalfFloatType as r, NoBlending as i, Timer as a, Vector2 as o, WebGLRenderTarget as s } from "three";
5
+ //#region node_modules/three/examples/jsm/postprocessing/MaskPass.js
6
+ var c = class extends e {
7
+ constructor(e, t) {
8
+ super(), this.scene = e, this.camera = t, this.clear = !0, this.needsSwap = !1, this.inverse = !1;
9
+ }
10
+ render(e, t, n) {
11
+ let r = e.getContext(), i = e.state;
12
+ i.buffers.color.setMask(!1), i.buffers.depth.setMask(!1), i.buffers.color.setLocked(!0), i.buffers.depth.setLocked(!0);
13
+ let a, o;
14
+ this.inverse ? (a = 0, o = 1) : (a = 1, o = 0), i.buffers.stencil.setTest(!0), i.buffers.stencil.setOp(r.REPLACE, r.REPLACE, r.REPLACE), i.buffers.stencil.setFunc(r.ALWAYS, a, 4294967295), i.buffers.stencil.setClear(o), i.buffers.stencil.setLocked(!0), e.setRenderTarget(n), this.clear && e.clear(), e.render(this.scene, this.camera), e.setRenderTarget(t), this.clear && e.clear(), e.render(this.scene, this.camera), i.buffers.color.setLocked(!1), i.buffers.depth.setLocked(!1), i.buffers.color.setMask(!0), i.buffers.depth.setMask(!0), i.buffers.stencil.setLocked(!1), i.buffers.stencil.setFunc(r.EQUAL, 1, 4294967295), i.buffers.stencil.setOp(r.KEEP, r.KEEP, r.KEEP), i.buffers.stencil.setLocked(!0);
15
+ }
16
+ }, l = class extends e {
17
+ constructor() {
18
+ super(), this.needsSwap = !1;
19
+ }
20
+ render(e) {
21
+ e.state.buffers.stencil.setLocked(!1), e.state.buffers.stencil.setTest(!1);
22
+ }
23
+ }, u = class {
24
+ constructor(e, c) {
25
+ if (this.renderer = e, this._pixelRatio = e.getPixelRatio(), c === void 0) {
26
+ let t = e.getSize(new o());
27
+ this._width = t.width, this._height = t.height, c = new s(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: r }), c.texture.name = "EffectComposer.rt1";
28
+ } else this._width = c.width, this._height = c.height;
29
+ this.renderTarget1 = c, this.renderTarget2 = c.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new n(t), this.copyPass.material.blending = i, this.timer = new a();
30
+ }
31
+ swapBuffers() {
32
+ let e = this.readBuffer;
33
+ this.readBuffer = this.writeBuffer, this.writeBuffer = e;
34
+ }
35
+ addPass(e) {
36
+ this.passes.push(e), e.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
37
+ }
38
+ insertPass(e, t) {
39
+ this.passes.splice(t, 0, e), e.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
40
+ }
41
+ removePass(e) {
42
+ let t = this.passes.indexOf(e);
43
+ t !== -1 && this.passes.splice(t, 1);
44
+ }
45
+ isLastEnabledPass(e) {
46
+ for (let t = e + 1; t < this.passes.length; t++) if (this.passes[t].enabled) return !1;
47
+ return !0;
48
+ }
49
+ render(e) {
50
+ this.timer.update(), e === void 0 && (e = this.timer.getDelta());
51
+ let t = this.renderer.getRenderTarget(), n = !1;
52
+ for (let t = 0, r = this.passes.length; t < r; t++) {
53
+ let r = this.passes[t];
54
+ if (r.enabled !== !1) {
55
+ if (r.renderToScreen = this.renderToScreen && this.isLastEnabledPass(t), r.render(this.renderer, this.writeBuffer, this.readBuffer, e, n), r.needsSwap) {
56
+ if (n) {
57
+ let t = this.renderer.getContext(), n = this.renderer.state.buffers.stencil;
58
+ n.setFunc(t.NOTEQUAL, 1, 4294967295), this.copyPass.render(this.renderer, this.writeBuffer, this.readBuffer, e), n.setFunc(t.EQUAL, 1, 4294967295);
59
+ }
60
+ this.swapBuffers();
61
+ }
62
+ c !== void 0 && (r instanceof c ? n = !0 : r instanceof l && (n = !1));
63
+ }
64
+ }
65
+ this.renderer.setRenderTarget(t);
66
+ }
67
+ reset(e) {
68
+ if (e === void 0) {
69
+ let t = this.renderer.getSize(new o());
70
+ this._pixelRatio = this.renderer.getPixelRatio(), this._width = t.width, this._height = t.height, e = this.renderTarget1.clone(), e.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
71
+ }
72
+ this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.renderTarget1 = e, this.renderTarget2 = e.clone(), this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2;
73
+ }
74
+ setSize(e, t) {
75
+ this._width = e, this._height = t;
76
+ let n = this._width * this._pixelRatio, r = this._height * this._pixelRatio;
77
+ this.renderTarget1.setSize(n, r), this.renderTarget2.setSize(n, r);
78
+ for (let e = 0; e < this.passes.length; e++) this.passes[e].setSize(n, r);
79
+ }
80
+ setPixelRatio(e) {
81
+ this._pixelRatio = e, this.setSize(this._width, this._height);
82
+ }
83
+ dispose() {
84
+ this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.copyPass.dispose();
85
+ }
86
+ };
87
+ //#endregion
88
+ export { u as EffectComposer };
@@ -0,0 +1,29 @@
1
+ import { G as e, Pi as t, Wa as n } from "./three.core-1aHSpGwp.js";
2
+ import { n as r, t as i } from "./Pass--g-Yi-4V.js";
3
+ //#region node_modules/three/examples/jsm/shaders/OutputShader.js
4
+ var a = {
5
+ name: "OutputShader",
6
+ uniforms: {
7
+ tDiffuse: { value: null },
8
+ toneMappingExposure: { value: 1 }
9
+ },
10
+ vertexShader: "\n precision highp float;\n\n uniform mat4 modelViewMatrix;\n uniform mat4 projectionMatrix;\n\n attribute vec3 position;\n attribute vec2 uv;\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
11
+ fragmentShader: "\n\n precision highp float;\n\n uniform sampler2D tDiffuse;\n\n #include <tonemapping_pars_fragment>\n #include <colorspace_pars_fragment>\n\n varying vec2 vUv;\n\n void main() {\n\n gl_FragColor = texture2D( tDiffuse, vUv );\n\n // tone mapping\n\n #ifdef LINEAR_TONE_MAPPING\n\n gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );\n\n #elif defined( REINHARD_TONE_MAPPING )\n\n gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );\n\n #elif defined( CINEON_TONE_MAPPING )\n\n gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );\n\n #elif defined( ACES_FILMIC_TONE_MAPPING )\n\n gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );\n\n #elif defined( AGX_TONE_MAPPING )\n\n gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );\n\n #elif defined( NEUTRAL_TONE_MAPPING )\n\n gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );\n\n #elif defined( CUSTOM_TONE_MAPPING )\n\n gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );\n\n #endif\n\n // color space\n\n #ifdef SRGB_TRANSFER\n\n gl_FragColor = sRGBTransferOETF( gl_FragColor );\n\n #endif\n\n }"
12
+ }, o = class extends r {
13
+ constructor() {
14
+ super(), this.isOutputPass = !0, this.uniforms = n.clone(a.uniforms), this.material = new t({
15
+ name: a.name,
16
+ uniforms: this.uniforms,
17
+ vertexShader: a.vertexShader,
18
+ fragmentShader: a.fragmentShader
19
+ }), this._fsQuad = new i(this.material), this._outputColorSpace = null, this._toneMapping = null;
20
+ }
21
+ render(t, n, r) {
22
+ this.uniforms.tDiffuse.value = r.texture, this.uniforms.toneMappingExposure.value = t.toneMappingExposure, (this._outputColorSpace !== t.outputColorSpace || this._toneMapping !== t.toneMapping) && (this._outputColorSpace = t.outputColorSpace, this._toneMapping = t.toneMapping, this.material.defines = {}, e.getTransfer(this._outputColorSpace) === "srgb" && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === 1 ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === 2 ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === 3 ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === 4 ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === 6 ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === 7 ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === 5 && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (t.setRenderTarget(null), this._fsQuad.render(t)) : (t.setRenderTarget(n), this.clear && t.clear(t.autoClearColor, t.autoClearDepth, t.autoClearStencil), this._fsQuad.render(t));
23
+ }
24
+ dispose() {
25
+ this.material.dispose(), this._fsQuad.dispose();
26
+ }
27
+ };
28
+ //#endregion
29
+ export { o as OutputPass };
@@ -0,0 +1,29 @@
1
+ import { n as e, t } from "./Pass-CSHIrJrV.js";
2
+ import { ACESFilmicToneMapping as n, AgXToneMapping as r, CineonToneMapping as i, ColorManagement as a, CustomToneMapping as o, LinearToneMapping as s, NeutralToneMapping as c, RawShaderMaterial as l, ReinhardToneMapping as u, SRGBTransfer as d, UniformsUtils as f } from "three";
3
+ //#region node_modules/three/examples/jsm/shaders/OutputShader.js
4
+ var p = {
5
+ name: "OutputShader",
6
+ uniforms: {
7
+ tDiffuse: { value: null },
8
+ toneMappingExposure: { value: 1 }
9
+ },
10
+ vertexShader: "\n precision highp float;\n\n uniform mat4 modelViewMatrix;\n uniform mat4 projectionMatrix;\n\n attribute vec3 position;\n attribute vec2 uv;\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
11
+ fragmentShader: "\n\n precision highp float;\n\n uniform sampler2D tDiffuse;\n\n #include <tonemapping_pars_fragment>\n #include <colorspace_pars_fragment>\n\n varying vec2 vUv;\n\n void main() {\n\n gl_FragColor = texture2D( tDiffuse, vUv );\n\n // tone mapping\n\n #ifdef LINEAR_TONE_MAPPING\n\n gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );\n\n #elif defined( REINHARD_TONE_MAPPING )\n\n gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );\n\n #elif defined( CINEON_TONE_MAPPING )\n\n gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );\n\n #elif defined( ACES_FILMIC_TONE_MAPPING )\n\n gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );\n\n #elif defined( AGX_TONE_MAPPING )\n\n gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );\n\n #elif defined( NEUTRAL_TONE_MAPPING )\n\n gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );\n\n #elif defined( CUSTOM_TONE_MAPPING )\n\n gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );\n\n #endif\n\n // color space\n\n #ifdef SRGB_TRANSFER\n\n gl_FragColor = sRGBTransferOETF( gl_FragColor );\n\n #endif\n\n }"
12
+ }, m = class extends e {
13
+ constructor() {
14
+ super(), this.isOutputPass = !0, this.uniforms = f.clone(p.uniforms), this.material = new l({
15
+ name: p.name,
16
+ uniforms: this.uniforms,
17
+ vertexShader: p.vertexShader,
18
+ fragmentShader: p.fragmentShader
19
+ }), this._fsQuad = new t(this.material), this._outputColorSpace = null, this._toneMapping = null;
20
+ }
21
+ render(e, t, l) {
22
+ this.uniforms.tDiffuse.value = l.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, a.getTransfer(this._outputColorSpace) === d && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === s ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === u ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === i ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === n ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === r ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === c ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === o && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
23
+ }
24
+ dispose() {
25
+ this.material.dispose(), this._fsQuad.dispose();
26
+ }
27
+ };
28
+ //#endregion
29
+ export { m as OutputPass };
@@ -0,0 +1,51 @@
1
+ import { Er as e, Lt as t, ir as n, j as r } from "./three.core-1aHSpGwp.js";
2
+ //#region node_modules/three/examples/jsm/postprocessing/Pass.js
3
+ var i = class {
4
+ constructor() {
5
+ this.isPass = !0, this.enabled = !0, this.needsSwap = !0, this.clear = !1, this.renderToScreen = !1;
6
+ }
7
+ setSize() {}
8
+ render() {
9
+ console.error("THREE.Pass: .render() must be implemented in derived pass.");
10
+ }
11
+ dispose() {}
12
+ }, a = new e(-1, 1, 1, -1, 0, 1), o = new class extends r {
13
+ constructor() {
14
+ super(), this.setAttribute("position", new t([
15
+ -1,
16
+ 3,
17
+ 0,
18
+ -1,
19
+ -1,
20
+ 0,
21
+ 3,
22
+ -1,
23
+ 0
24
+ ], 3)), this.setAttribute("uv", new t([
25
+ 0,
26
+ 2,
27
+ 0,
28
+ 0,
29
+ 2,
30
+ 0
31
+ ], 2));
32
+ }
33
+ }(), s = class {
34
+ constructor(e) {
35
+ this._mesh = new n(o, e);
36
+ }
37
+ dispose() {
38
+ this._mesh.geometry.dispose();
39
+ }
40
+ render(e) {
41
+ e.render(this._mesh, a);
42
+ }
43
+ get material() {
44
+ return this._mesh.material;
45
+ }
46
+ set material(e) {
47
+ this._mesh.material = e;
48
+ }
49
+ };
50
+ //#endregion
51
+ export { i as n, s as t };
@@ -0,0 +1,51 @@
1
+ import { BufferGeometry as e, Float32BufferAttribute as t, Mesh as n, OrthographicCamera as r } from "three";
2
+ //#region node_modules/three/examples/jsm/postprocessing/Pass.js
3
+ var i = class {
4
+ constructor() {
5
+ this.isPass = !0, this.enabled = !0, this.needsSwap = !0, this.clear = !1, this.renderToScreen = !1;
6
+ }
7
+ setSize() {}
8
+ render() {
9
+ console.error("THREE.Pass: .render() must be implemented in derived pass.");
10
+ }
11
+ dispose() {}
12
+ }, a = new r(-1, 1, 1, -1, 0, 1), o = new class extends e {
13
+ constructor() {
14
+ super(), this.setAttribute("position", new t([
15
+ -1,
16
+ 3,
17
+ 0,
18
+ -1,
19
+ -1,
20
+ 0,
21
+ 3,
22
+ -1,
23
+ 0
24
+ ], 3)), this.setAttribute("uv", new t([
25
+ 0,
26
+ 2,
27
+ 0,
28
+ 0,
29
+ 2,
30
+ 0
31
+ ], 2));
32
+ }
33
+ }(), s = class {
34
+ constructor(e) {
35
+ this._mesh = new n(o, e);
36
+ }
37
+ dispose() {
38
+ this._mesh.geometry.dispose();
39
+ }
40
+ render(e) {
41
+ e.render(this._mesh, a);
42
+ }
43
+ get material() {
44
+ return this._mesh.material;
45
+ }
46
+ set material(e) {
47
+ this._mesh.material = e;
48
+ }
49
+ };
50
+ //#endregion
51
+ export { i as n, s as t };
@@ -0,0 +1,16 @@
1
+ import { n as e } from "./Pass-CSHIrJrV.js";
2
+ import { Color as t } from "three";
3
+ //#region node_modules/three/examples/jsm/postprocessing/RenderPass.js
4
+ var n = class extends e {
5
+ constructor(e, n, r = null, i = null, a = null) {
6
+ super(), this.scene = e, this.camera = n, this.overrideMaterial = r, this.clearColor = i, this.clearAlpha = a, this.clear = !0, this.clearDepth = !1, this.needsSwap = !1, this.isRenderPass = !0, this._oldClearColor = new t();
7
+ }
8
+ render(e, t, n) {
9
+ let r = e.autoClear;
10
+ e.autoClear = !1;
11
+ let i, a;
12
+ this.overrideMaterial !== null && (a = this.scene.overrideMaterial, this.scene.overrideMaterial = this.overrideMaterial), this.clearColor !== null && (e.getClearColor(this._oldClearColor), e.setClearColor(this.clearColor, e.getClearAlpha())), this.clearAlpha !== null && (i = e.getClearAlpha(), e.setClearAlpha(this.clearAlpha)), this.clearDepth == 1 && e.clearDepth(), e.setRenderTarget(this.renderToScreen ? null : n), this.clear === !0 && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), e.render(this.scene, this.camera), this.clearColor !== null && e.setClearColor(this._oldClearColor), this.clearAlpha !== null && e.setClearAlpha(i), this.overrideMaterial !== null && (this.scene.overrideMaterial = a), e.autoClear = r;
13
+ }
14
+ };
15
+ //#endregion
16
+ export { n as RenderPass };
@@ -0,0 +1,16 @@
1
+ import { U as e } from "./three.core-1aHSpGwp.js";
2
+ import { n as t } from "./Pass--g-Yi-4V.js";
3
+ //#region node_modules/three/examples/jsm/postprocessing/RenderPass.js
4
+ var n = class extends t {
5
+ constructor(t, n, r = null, i = null, a = null) {
6
+ super(), this.scene = t, this.camera = n, this.overrideMaterial = r, this.clearColor = i, this.clearAlpha = a, this.clear = !0, this.clearDepth = !1, this.needsSwap = !1, this.isRenderPass = !0, this._oldClearColor = new e();
7
+ }
8
+ render(e, t, n) {
9
+ let r = e.autoClear;
10
+ e.autoClear = !1;
11
+ let i, a;
12
+ this.overrideMaterial !== null && (a = this.scene.overrideMaterial, this.scene.overrideMaterial = this.overrideMaterial), this.clearColor !== null && (e.getClearColor(this._oldClearColor), e.setClearColor(this.clearColor, e.getClearAlpha())), this.clearAlpha !== null && (i = e.getClearAlpha(), e.setClearAlpha(this.clearAlpha)), this.clearDepth == 1 && e.clearDepth(), e.setRenderTarget(this.renderToScreen ? null : n), this.clear === !0 && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), e.render(this.scene, this.camera), this.clearColor !== null && e.setClearColor(this._oldClearColor), this.clearAlpha !== null && e.setClearAlpha(i), this.overrideMaterial !== null && (this.scene.overrideMaterial = a), e.autoClear = r;
13
+ }
14
+ };
15
+ //#endregion
16
+ export { n as RenderPass };
@@ -0,0 +1,22 @@
1
+ import { $i as e, Wa as t } from "./three.core-1aHSpGwp.js";
2
+ import { n, t as r } from "./Pass--g-Yi-4V.js";
3
+ //#region node_modules/three/examples/jsm/postprocessing/ShaderPass.js
4
+ var i = class extends n {
5
+ constructor(n, i = "tDiffuse") {
6
+ super(), this.textureID = i, this.uniforms = null, this.material = null, n instanceof e ? (this.uniforms = n.uniforms, this.material = n) : n && (this.uniforms = t.clone(n.uniforms), this.material = new e({
7
+ name: n.name === void 0 ? "unspecified" : n.name,
8
+ defines: Object.assign({}, n.defines),
9
+ uniforms: this.uniforms,
10
+ vertexShader: n.vertexShader,
11
+ fragmentShader: n.fragmentShader
12
+ })), this._fsQuad = new r(this.material);
13
+ }
14
+ render(e, t, n) {
15
+ this.uniforms[this.textureID] && (this.uniforms[this.textureID].value = n.texture), this._fsQuad.material = this.material, this.renderToScreen ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
16
+ }
17
+ dispose() {
18
+ this.material.dispose(), this._fsQuad.dispose();
19
+ }
20
+ };
21
+ //#endregion
22
+ export { i as ShaderPass };
@@ -0,0 +1,22 @@
1
+ import { n as e, t } from "./Pass-CSHIrJrV.js";
2
+ import { ShaderMaterial as n, UniformsUtils as r } from "three";
3
+ //#region node_modules/three/examples/jsm/postprocessing/ShaderPass.js
4
+ var i = class extends e {
5
+ constructor(e, i = "tDiffuse") {
6
+ super(), this.textureID = i, this.uniforms = null, this.material = null, e instanceof n ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms = r.clone(e.uniforms), this.material = new n({
7
+ name: e.name === void 0 ? "unspecified" : e.name,
8
+ defines: Object.assign({}, e.defines),
9
+ uniforms: this.uniforms,
10
+ vertexShader: e.vertexShader,
11
+ fragmentShader: e.fragmentShader
12
+ })), this._fsQuad = new t(this.material);
13
+ }
14
+ render(e, t, n) {
15
+ this.uniforms[this.textureID] && (this.uniforms[this.textureID].value = n.texture), this._fsQuad.material = this.material, this.renderToScreen ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
16
+ }
17
+ dispose() {
18
+ this.material.dispose(), this._fsQuad.dispose();
19
+ }
20
+ };
21
+ //#endregion
22
+ export { i as ShaderPass };