@threepipe/webgi-plugins 0.7.0 → 0.9.0-r172.1

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 (82) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/LICENSE +182 -16
  3. package/README.md +5 -7
  4. package/THIRD_PARTY_NOTICES.md +1 -1
  5. package/dist/index.js +3946 -4433
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +3825 -4404
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/passes/BilateralFilterPass.d.ts +1 -1
  10. package/dist/passes/BilateralFilterPass.d.ts.map +1 -1
  11. package/dist/plugins/buffer/VelocityBufferPlugin.d.ts +23 -0
  12. package/dist/plugins/buffer/VelocityBufferPlugin.d.ts.map +1 -1
  13. package/dist/plugins/extras/AdvancedGroundPlugin.d.ts +1 -1
  14. package/dist/plugins/extras/AdvancedGroundPlugin.d.ts.map +1 -1
  15. package/dist/plugins/extras/AnisotropyPlugin.d.ts +5 -4
  16. package/dist/plugins/extras/AnisotropyPlugin.d.ts.map +1 -1
  17. package/dist/plugins/extras/WatchHandsPlugin.d.ts +1 -1
  18. package/dist/plugins/extras/WatchHandsPlugin.d.ts.map +1 -1
  19. package/dist/plugins/index.d.ts +9 -9
  20. package/dist/plugins/postprocessing/BloomPlugin.d.ts.map +1 -1
  21. package/dist/plugins/postprocessing/DepthOfFieldPlugin.d.ts.map +1 -1
  22. package/dist/plugins/postprocessing/OutlinePlugin.d.ts +4 -1
  23. package/dist/plugins/postprocessing/OutlinePlugin.d.ts.map +1 -1
  24. package/dist/plugins/postprocessing/SSContactShadowsPlugin.d.ts.map +1 -1
  25. package/dist/plugins/postprocessing/SSGIPlugin.d.ts +1 -1
  26. package/dist/plugins/postprocessing/SSGIPlugin.d.ts.map +1 -1
  27. package/dist/plugins/postprocessing/SSReflectionPlugin.d.ts.map +1 -1
  28. package/dist/plugins/postprocessing/TemporalAAPlugin.d.ts +14 -0
  29. package/dist/plugins/postprocessing/TemporalAAPlugin.d.ts.map +1 -1
  30. package/dist/utils/FSShadowMaterial.d.ts.map +1 -1
  31. package/dist/utils/RandomizedDirectionalLight.d.ts.map +1 -1
  32. package/dist/utils/Reflector2.d.ts +4 -4
  33. package/dist/utils/Reflector2.d.ts.map +1 -1
  34. package/dist/utils/ShadowMapBaker.d.ts +1 -1
  35. package/dist/utils/ShadowMapBaker.d.ts.map +1 -1
  36. package/docs/.nojekyll +1 -0
  37. package/docs/assets/highlight.css +1 -1
  38. package/docs/assets/icons.js +1 -1
  39. package/docs/assets/icons.svg +1 -1
  40. package/docs/assets/main.js +4 -4
  41. package/docs/assets/search.js +1 -1
  42. package/docs/assets/style.css +18 -3
  43. package/docs/classes/AdvancedGroundPlugin.html +678 -11
  44. package/docs/classes/AnisotropyPlugin.html +400 -8
  45. package/docs/classes/BloomPlugin.html +436 -7
  46. package/docs/classes/BloomPluginPass.html +301 -12
  47. package/docs/classes/DepthOfFieldPlugin.html +459 -7
  48. package/docs/classes/DepthOfFieldPluginPass.html +315 -12
  49. package/docs/classes/OutlinePlugin.html +632 -11
  50. package/docs/classes/OutlineRenderPass.html +239 -12
  51. package/docs/classes/SSContactShadowsPlugin.html +390 -6
  52. package/docs/classes/SSGIPlugin.html +454 -8
  53. package/docs/classes/SSGIPluginPass.html +372 -12
  54. package/docs/classes/SSReflectionPlugin.html +460 -8
  55. package/docs/classes/SSReflectionPluginPass.html +377 -12
  56. package/docs/classes/SSVelocityMaterial.html +123 -5
  57. package/docs/classes/TemporalAAPlugin.html +418 -8
  58. package/docs/classes/TemporalAAPluginPass.html +357 -13
  59. package/docs/classes/VelocityBufferPlugin.html +466 -7
  60. package/docs/classes/WatchHandsPlugin.html +410 -6
  61. package/docs/hierarchy.html +28 -1
  62. package/docs/index.html +38 -1
  63. package/docs/types/OutlinePluginPass.html +32 -1
  64. package/docs/types/OutlinePluginTarget.html +32 -1
  65. package/docs/types/SSGIPluginTarget.html +32 -1
  66. package/docs/types/SSReflectionPluginTarget.html +32 -1
  67. package/docs/types/VelocityBufferPluginPass.html +32 -1
  68. package/docs/types/VelocityBufferPluginTarget.html +32 -1
  69. package/docs/variables/anisotropyGLTFExtension.html +43 -1
  70. package/docs/variables/webgiPlugins.html +32 -1
  71. package/package.json +6 -3
  72. package/src/plugins/buffer/VelocityBufferPlugin.ts +119 -8
  73. package/src/plugins/buffer/shaders/VelocityBufferPlugin.mat.frag.glsl +9 -1
  74. package/src/plugins/buffer/shaders/VelocityBufferPlugin.mat.vert.glsl +14 -1
  75. package/src/plugins/extras/AnisotropyPlugin.ts +2 -2
  76. package/src/plugins/postprocessing/BloomPlugin.ts +5 -2
  77. package/src/plugins/postprocessing/DepthOfFieldPlugin.ts +3 -3
  78. package/src/plugins/postprocessing/OutlinePlugin.ts +53 -38
  79. package/src/plugins/postprocessing/SSContactShadowsPlugin.ts +1 -1
  80. package/src/plugins/postprocessing/TemporalAAPlugin.ts +42 -0
  81. package/src/utils/shaders/temporalaa.glsl +9 -0
  82. package/tsconfig.json +2 -1
package/CHANGELOG.md CHANGED
@@ -4,11 +4,46 @@ All notable changes to this plugin will be documented in this file.
4
4
 
5
5
  [//]: # (The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).)
6
6
 
7
+ ## [0.9.0-r172.1] - 2026-12-05
8
+
9
+ Was 0.8.0-r172.1 (not published), which sorts below the released 0.8.0.
10
+
11
+ Release candidate of the three.js r172 upgrade lane, under the npm dist-tag `three-r172`, for threepipe 0.8.0-r172.1: the changes listed under [Unreleased] below.
12
+
7
13
  ## [Unreleased]
8
14
 
9
15
  ### Added
10
16
 
11
- - NA
17
+ - `TemporalAAPlugin`: a debug `Split` slider on its pass, like the ones of `SSReflectionPlugin` and `SSGIPlugin`: left of it the current frame without TAA, right of it with TAA. Off (0) it is not compiled in
18
+ - `TemporalAAPlugin`: a debug `Clamp history` toggle on its pass (`clamp`, on by default). Off, the history is kept as reprojected, not clamped to the colours around each pixel, so history taken from the wrong place (a moving object without its motion) shows as ghosting. Off, the clamp is compiled out
19
+ - `VelocityBufferPlugin`: a debug `split` (0 to 1): left of it the buffer holds the camera's motion only, as without the plugin, so TAA and the screen-space reflections and GI smear moving objects there and the difference shows in one image. Off (0) it is not compiled in
20
+
21
+ ### Changed
22
+
23
+ - `AnisotropyPlugin` glTF export uses the async `writeMaterialAsync` hook and `processTextureAsync` (three.js r170 made `GLTFExporter` async and no longer calls `writeMaterial`; without this, exported files silently lost the anisotropy extension)
24
+ - License: Apache 2.0, like threepipe, replacing the webgi Free Forever License of 0.8.0. Releases up to 0.8.0 keep the license they shipped with
25
+
26
+ ### Fixed
27
+
28
+ - `OutlinePlugin`: its pass still rendered the selection into the outline buffer every frame while the plugin was disabled (only the screen shader was off); the pass now follows the plugin's `enabled`
29
+ - `OutlinePlugin`: listeners stayed after the plugin was removed. The PickingPlugin `selectedObjectChanged` listener is managed with `viewer.forPlugin`, and the `document` `mousemove` listener is a named handler removed in `onRemove`
30
+ - `VelocityBufferPlugin`: instanced meshes get per-instance motion. The previous model matrix was kept per object, so
31
+ every instance moved with the mesh only (the camera's motion for a static mesh) and TAA and the SSGI/SSR history
32
+ smeared moving instances. The previous instance matrices are kept in a float texture per instanced mesh and read
33
+ in the vertex shader with `texelFetch(gl_InstanceID)`. Removing the plugin releases them (and its listeners on the
34
+ meshes), not only disposing each mesh.
35
+ - `VelocityBufferPlugin`: an object with several material groups had no motion in every group after the first (the
36
+ previous matrix was copied at each group's draw); previous matrices now advance once per velocity render.
37
+
38
+ ## [0.8.0] - 2026-12-01
39
+
40
+ ### Changed
41
+
42
+ - License: the webgi Free Forever License replaces the modified GNU GPL-3.0-only notice, from 0.8.0 (including its prereleases, such as 0.8.0-r172.1); see LICENSE and THIRD_PARTY_NOTICES.md. Releases up to 0.7.0 keep the license they carried
43
+
44
+ ### Fixed
45
+
46
+ - `BloomPlugin` and `DepthOfFieldPlugin`: setting a setting of their pass in code renders again: the bloom Threshold, Soft Threshold, Intensity, Background Bloom and Debug, and the depth of field Depth Range, Near and Far Blur Scale. They changed only the shader values, so a viewer at rest showed the change only at its next render; the Tweakpane panel hid it because its own change marks the viewer dirty. They now call `setDirty` like the settings of `SSAOPluginPass`
12
47
 
13
48
  ## [0.7.0] - 2026-10-24
14
49
 
package/LICENSE CHANGED
@@ -1,24 +1,190 @@
1
- GNU GENERAL PUBLIC LICENSE Version 3 AND ADDITIONAL TERMS
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
2
4
 
3
- Copyright (C) 2023 repalash <palash@shaders.app>
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4
6
 
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version, along with the additional terms for webgi-plugins.
7
+ 1. Definitions.
9
8
 
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
14
11
 
15
- You should have received a copy of the GNU General Public License
16
- along with this program. If not, see <https://www.gnu.org/licenses/>.
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
17
14
 
18
- ---
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
19
22
 
20
- ADDITIONAL TERMS FOR WEBGI-PLUGINS
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
21
25
 
22
- The free set of plugins included in this package can be used by everyone, both for personal and commercial purposes, without any restrictions. The source code shall be used in accordance with the terms of the GNU General Public License (GPL) v3.0.
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
23
29
 
24
- For more details or to checkout other paid packages, visit the website at <https://webgi.dev/pricing.html>.
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2023 Palash Bansal <palash@shaders.app>
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md CHANGED
@@ -12,13 +12,11 @@
12
12
 
13
13
  ## Licensing
14
14
 
15
- This project is licensed under a modified [GNU GPL-3.0-only](https://www.gnu.org/licenses/gpl-3.0.html) license, see LICENSE.
15
+ All plugins in this package are free and open source under the [Apache License 2.0](https://github.com/repalash/threepipe/blob/dev/plugins/webgi-plugins/LICENSE), like threepipe: use, modify and ship them in any project, commercial and closed source included. Keep the license and notices (LICENSE, THIRD_PARTY_NOTICES.md) with copies of the package.
16
16
 
17
- The free set of plugins in this package can be used by everyone, both for personal and commercial purposes, without restrictions. The source code shall be used in accordance with the terms of the GNU General Public License (GPL) v3.0.
18
-
19
- Paid jewellery plugins (Diamond, gemstones, inclusions, bevel, rainbow diamond) are not in this
20
- package. They will be a separate package, `@ijewel3d/threepipe-plugins`, under the iJewel3D SDK
21
- License. See [ijewel3d.com/license](https://ijewel3d.com/license) and the
17
+ Paid jewellery plugins (Diamond, gemstones, inclusions, bevel, rainbow diamond) will be a
18
+ separate package, `@ijewel3d/threepipe-plugins`, under the iJewel3D SDK License. See
19
+ [ijewel3d.com/license](https://ijewel3d.com/license) and the
22
20
  [licensing FAQ](https://developer.ijewel3d.com/introduction/licensing-faq.html).
23
21
 
24
- A new license for the free plugins is planned for version 1.0.0. Every release keeps the license it shipped with.
22
+ Earlier releases keep the license they shipped with: up to 0.7.0 a GNU GPL v3 notice, 0.8.0 the webgi Free Forever License. Apache 2.0 applies from the release after 0.8.0.
@@ -1,6 +1,6 @@
1
1
  # Third-party notices for @threepipe/webgi-plugins
2
2
 
3
- This package is licensed under a modified GNU GPL-3.0-only license (see LICENSE). It contains or
3
+ This package is licensed under the Apache License 2.0 (see LICENSE). It contains or
4
4
  adapts code from the following projects, which keep their own licenses and notices. The full
5
5
  license texts are at the end of this file.
6
6