softbox 4.16.1 → 4.18.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 (49) hide show
  1. package/README.md +7 -6
  2. package/dist/{BrightnessContrastShader-BN6FBcLV.cjs → BrightnessContrastShader-C1jbh-NA.cjs} +2 -2
  3. package/dist/BrightnessContrastShader-CoM5EjqG.js +13 -0
  4. package/dist/ContactShadowBaker-MzqtJ-0h.js +2052 -0
  5. package/dist/ContactShadowBaker-lWQW97Cr.cjs +2 -0
  6. package/dist/CopyShader-C2Oc7n1P.js +12 -0
  7. package/dist/{CopyShader-DPSZNOxL.cjs → CopyShader-CM1OGKAp.cjs} +2 -2
  8. package/dist/EffectComposer-CMs4vldH.js +88 -0
  9. package/dist/EffectComposer-CdAQB6p0.cjs +1 -0
  10. package/dist/HueSaturationShader-BeHSjNY8.js +13 -0
  11. package/dist/{HueSaturationShader-BEp7jjxf.cjs → HueSaturationShader-bN5IWhh8.cjs} +2 -2
  12. package/dist/OutputPass-DicIJHut.cjs +72 -0
  13. package/dist/OutputPass-oQu4Xmeb.js +29 -0
  14. package/dist/Pass-CSHIrJrV.js +51 -0
  15. package/dist/Pass-D0vYi-gB.cjs +1 -0
  16. package/dist/RenderPass-DS8SYAhJ.js +16 -0
  17. package/dist/RenderPass-DlRq51Kq.cjs +1 -0
  18. package/dist/ShaderPass-DghZ7TAj.cjs +1 -0
  19. package/dist/ShaderPass-h4P0lBmc.js +22 -0
  20. package/dist/{ThreePathTracingService-VOgJGtMH.cjs → ThreePathTracingService-B1WEEKgQ.cjs} +96 -96
  21. package/dist/ThreePathTracingService-qV8I_V9u.js +2546 -0
  22. package/dist/UnrealBloomPass-BTHiW_Y8.js +123 -0
  23. package/dist/UnrealBloomPass-CQHHa-s_.cjs +115 -0
  24. package/dist/VignetteShader-CPF_iEkO.js +13 -0
  25. package/dist/{VignetteShader-Drpo9YxI.cjs → VignetteShader-CQmGrpns.cjs} +2 -2
  26. package/dist/index.d.cts +7 -0
  27. package/dist/index.d.ts +7 -0
  28. package/dist/simple-viewer.cjs +23 -1
  29. package/dist/simple-viewer.es.js +8473 -11
  30. package/package.json +26 -18
  31. package/dist/BrightnessContrastShader-B9tNAd_c.js +0 -49
  32. package/dist/CopyShader-DVL8Bcar.js +0 -41
  33. package/dist/EffectComposer-BdHnHszK.js +0 -188
  34. package/dist/EffectComposer-D2IQ0sek.cjs +0 -1
  35. package/dist/HueSaturationShader-B6tnz2ga.js +0 -60
  36. package/dist/OutputPass-Dy4KNHYF.cjs +0 -72
  37. package/dist/OutputPass-Tt8WbC_B.js +0 -125
  38. package/dist/Pass-C1mreNp8.cjs +0 -1
  39. package/dist/Pass-DOcH4lwV.js +0 -88
  40. package/dist/RenderPass-B57TYmjs.js +0 -37
  41. package/dist/RenderPass-BVzyKWsC.cjs +0 -1
  42. package/dist/ShaderPass-BQRqK8zp.cjs +0 -1
  43. package/dist/ShaderPass-C2HX8lsT.js +0 -45
  44. package/dist/ThreePathTracingService-CK3zD4Qj.js +0 -6383
  45. package/dist/UnrealBloomPass-Kx7djcld.cjs +0 -115
  46. package/dist/UnrealBloomPass-rjyQu37v.js +0 -281
  47. package/dist/VignetteShader-BG_QwoTp.js +0 -45
  48. package/dist/index-BWjJNKzq.js +0 -13030
  49. package/dist/index-BqbKpEQh.cjs +0 -29
@@ -1,88 +0,0 @@
1
- import { Mesh as r, OrthographicCamera as i, BufferGeometry as a, Float32BufferAttribute as t } from "three";
2
- class l {
3
- /**
4
- * Constructs a new pass.
5
- */
6
- constructor() {
7
- this.isPass = !0, this.enabled = !0, this.needsSwap = !0, this.clear = !1, this.renderToScreen = !1;
8
- }
9
- /**
10
- * Sets the size of the pass.
11
- *
12
- * @abstract
13
- * @param {number} width - The width to set.
14
- * @param {number} height - The height to set.
15
- */
16
- setSize() {
17
- }
18
- /**
19
- * This method holds the render logic of a pass. It must be implemented in all derived classes.
20
- *
21
- * @abstract
22
- * @param {WebGLRenderer} renderer - The renderer.
23
- * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering
24
- * destination for the pass.
25
- * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the
26
- * previous pass from this buffer.
27
- * @param {number} deltaTime - The delta time in seconds.
28
- * @param {boolean} maskActive - Whether masking is active or not.
29
- */
30
- render() {
31
- console.error("THREE.Pass: .render() must be implemented in derived pass.");
32
- }
33
- /**
34
- * Frees the GPU-related resources allocated by this instance. Call this
35
- * method whenever the pass is no longer used in your app.
36
- *
37
- * @abstract
38
- */
39
- dispose() {
40
- }
41
- }
42
- const n = new i(-1, 1, 1, -1, 0, 1);
43
- class o extends a {
44
- constructor() {
45
- super(), this.setAttribute("position", new t([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), this.setAttribute("uv", new t([0, 2, 0, 0, 2, 0], 2));
46
- }
47
- }
48
- const h = new o();
49
- class c {
50
- /**
51
- * Constructs a new full screen quad.
52
- *
53
- * @param {?Material} material - The material to render te full screen quad with.
54
- */
55
- constructor(e) {
56
- this._mesh = new r(h, e);
57
- }
58
- /**
59
- * Frees the GPU-related resources allocated by this instance. Call this
60
- * method whenever the instance is no longer used in your app.
61
- */
62
- dispose() {
63
- this._mesh.geometry.dispose();
64
- }
65
- /**
66
- * Renders the full screen quad.
67
- *
68
- * @param {WebGLRenderer} renderer - The renderer.
69
- */
70
- render(e) {
71
- e.render(this._mesh, n);
72
- }
73
- /**
74
- * The quad's material.
75
- *
76
- * @type {?Material}
77
- */
78
- get material() {
79
- return this._mesh.material;
80
- }
81
- set material(e) {
82
- this._mesh.material = e;
83
- }
84
- }
85
- export {
86
- c as F,
87
- l as P
88
- };
@@ -1,37 +0,0 @@
1
- import { Color as o } from "three";
2
- import { P as r } from "./Pass-DOcH4lwV.js";
3
- class u extends r {
4
- /**
5
- * Constructs a new render pass.
6
- *
7
- * @param {Scene} scene - The scene to render.
8
- * @param {Camera} camera - The camera.
9
- * @param {?Material} [overrideMaterial=null] - The override material. If set, this material is used
10
- * for all objects in the scene.
11
- * @param {?(number|Color|string)} [clearColor=null] - The clear color of the render pass.
12
- * @param {?number} [clearAlpha=null] - The clear alpha of the render pass.
13
- */
14
- constructor(l, i, t = null, e = null, a = null) {
15
- super(), this.scene = l, this.camera = i, this.overrideMaterial = t, this.clearColor = e, this.clearAlpha = a, this.clear = !0, this.clearDepth = !1, this.needsSwap = !1, this.isRenderPass = !0, this._oldClearColor = new o();
16
- }
17
- /**
18
- * Performs a beauty pass with the configured scene and camera.
19
- *
20
- * @param {WebGLRenderer} renderer - The renderer.
21
- * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering
22
- * destination for the pass.
23
- * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the
24
- * previous pass from this buffer.
25
- * @param {number} deltaTime - The delta time in seconds.
26
- * @param {boolean} maskActive - Whether masking is active or not.
27
- */
28
- render(l, i, t) {
29
- const e = l.autoClear;
30
- l.autoClear = !1;
31
- let a, s;
32
- this.overrideMaterial !== null && (s = this.scene.overrideMaterial, this.scene.overrideMaterial = this.overrideMaterial), this.clearColor !== null && (l.getClearColor(this._oldClearColor), l.setClearColor(this.clearColor, l.getClearAlpha())), this.clearAlpha !== null && (a = l.getClearAlpha(), l.setClearAlpha(this.clearAlpha)), this.clearDepth == !0 && l.clearDepth(), l.setRenderTarget(this.renderToScreen ? null : t), this.clear === !0 && l.clear(l.autoClearColor, l.autoClearDepth, l.autoClearStencil), l.render(this.scene, this.camera), this.clearColor !== null && l.setClearColor(this._oldClearColor), this.clearAlpha !== null && l.setClearAlpha(a), this.overrideMaterial !== null && (this.scene.overrideMaterial = s), l.autoClear = e;
33
- }
34
- }
35
- export {
36
- u as RenderPass
37
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("three"),r=require("./Pass-C1mreNp8.cjs");class h extends r.Pass{constructor(l,s,e=null,t=null,a=null){super(),this.scene=l,this.camera=s,this.overrideMaterial=e,this.clearColor=t,this.clearAlpha=a,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this.isRenderPass=!0,this._oldClearColor=new o.Color}render(l,s,e){const t=l.autoClear;l.autoClear=!1;let a,i;this.overrideMaterial!==null&&(i=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(l.getClearColor(this._oldClearColor),l.setClearColor(this.clearColor,l.getClearAlpha())),this.clearAlpha!==null&&(a=l.getClearAlpha(),l.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&l.clearDepth(),l.setRenderTarget(this.renderToScreen?null:e),this.clear===!0&&l.clear(l.autoClearColor,l.autoClearDepth,l.autoClearStencil),l.render(this.scene,this.camera),this.clearColor!==null&&l.setClearColor(this._oldClearColor),this.clearAlpha!==null&&l.setClearAlpha(a),this.overrideMaterial!==null&&(this.scene.overrideMaterial=i),l.autoClear=t}}exports.RenderPass=h;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("three"),s=require("./Pass-C1mreNp8.cjs");class n extends s.Pass{constructor(e,t="tDiffuse"){super(),this.textureID=t,this.uniforms=null,this.material=null,e instanceof i.ShaderMaterial?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=i.UniformsUtils.clone(e.uniforms),this.material=new i.ShaderMaterial({name:e.name!==void 0?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this._fsQuad=new s.FullScreenQuad(this.material)}render(e,t,a){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=a.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))}dispose(){this.material.dispose(),this._fsQuad.dispose()}}exports.ShaderPass=n;
@@ -1,45 +0,0 @@
1
- import { ShaderMaterial as s, UniformsUtils as a } from "three";
2
- import { P as n, F as u } from "./Pass-DOcH4lwV.js";
3
- class o extends n {
4
- /**
5
- * Constructs a new shader pass.
6
- *
7
- * @param {Object|ShaderMaterial} [shader] - A shader object holding vertex and fragment shader as well as
8
- * defines and uniforms. It's also valid to pass a custom shader material.
9
- * @param {string} [textureID='tDiffuse'] - The name of the texture uniform that should sample
10
- * the read buffer.
11
- */
12
- constructor(t, i = "tDiffuse") {
13
- super(), this.textureID = i, this.uniforms = null, this.material = null, t instanceof s ? (this.uniforms = t.uniforms, this.material = t) : t && (this.uniforms = a.clone(t.uniforms), this.material = new s({
14
- name: t.name !== void 0 ? t.name : "unspecified",
15
- defines: Object.assign({}, t.defines),
16
- uniforms: this.uniforms,
17
- vertexShader: t.vertexShader,
18
- fragmentShader: t.fragmentShader
19
- })), this._fsQuad = new u(this.material);
20
- }
21
- /**
22
- * Performs the shader pass.
23
- *
24
- * @param {WebGLRenderer} renderer - The renderer.
25
- * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering
26
- * destination for the pass.
27
- * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the
28
- * previous pass from this buffer.
29
- * @param {number} deltaTime - The delta time in seconds.
30
- * @param {boolean} maskActive - Whether masking is active or not.
31
- */
32
- render(t, i, e) {
33
- this.uniforms[this.textureID] && (this.uniforms[this.textureID].value = e.texture), this._fsQuad.material = this.material, this.renderToScreen ? (t.setRenderTarget(null), this._fsQuad.render(t)) : (t.setRenderTarget(i), this.clear && t.clear(t.autoClearColor, t.autoClearDepth, t.autoClearStencil), this._fsQuad.render(t));
34
- }
35
- /**
36
- * Frees the GPU-related resources allocated by this instance. Call this
37
- * method whenever the pass is no longer used in your app.
38
- */
39
- dispose() {
40
- this.material.dispose(), this._fsQuad.dispose();
41
- }
42
- }
43
- export {
44
- o as ShaderPass
45
- };