@xviewer.js/postprocessing 1.0.0-alpha.11 → 1.0.0-alpha.13
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/dist/main.js +9 -76
- package/dist/main.js.map +1 -1
- package/dist/module.js +11 -78
- package/dist/module.js.map +1 -1
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -66,36 +66,8 @@ class EffectComposerPlugin extends core.Plugin {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
/******************************************************************************
|
|
70
|
-
Copyright (c) Microsoft Corporation.
|
|
71
|
-
|
|
72
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
73
|
-
purpose with or without fee is hereby granted.
|
|
74
|
-
|
|
75
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
76
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
77
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
78
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
79
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
80
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
81
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
82
|
-
***************************************************************************** */
|
|
83
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
function __decorate(decorators, target, key, desc) {
|
|
87
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
88
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
89
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
90
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
94
|
-
var e = new Error(message);
|
|
95
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
69
|
class PassPlugin extends core.Plugin {
|
|
70
|
+
// @property
|
|
99
71
|
get enable() {
|
|
100
72
|
return this.pass.enabled;
|
|
101
73
|
}
|
|
@@ -109,11 +81,9 @@ class PassPlugin extends core.Plugin {
|
|
|
109
81
|
this.composer.activePass(this.pass, v);
|
|
110
82
|
}
|
|
111
83
|
}
|
|
112
|
-
__decorate([
|
|
113
|
-
core.property
|
|
114
|
-
], PassPlugin.prototype, "enable", null);
|
|
115
84
|
|
|
116
85
|
class ToneMappingPlugin extends PassPlugin {
|
|
86
|
+
// @property({ value: ToneMappingMode })
|
|
117
87
|
get mode() {
|
|
118
88
|
return this.effect.mode;
|
|
119
89
|
}
|
|
@@ -131,25 +101,23 @@ class ToneMappingPlugin extends PassPlugin {
|
|
|
131
101
|
};
|
|
132
102
|
}
|
|
133
103
|
}
|
|
134
|
-
__decorate([
|
|
135
|
-
core.property({
|
|
136
|
-
value: postprocessing.ToneMappingMode
|
|
137
|
-
})
|
|
138
|
-
], ToneMappingPlugin.prototype, "mode", null);
|
|
139
104
|
|
|
140
105
|
class BloomPlugin extends PassPlugin {
|
|
106
|
+
// @property({ min: 0, max: 2, step: 0.01 })
|
|
141
107
|
get intensity() {
|
|
142
108
|
return this.effect.intensity;
|
|
143
109
|
}
|
|
144
110
|
set intensity(v) {
|
|
145
111
|
this.effect.intensity = v;
|
|
146
112
|
}
|
|
113
|
+
// @property({ min: 0, max: 10, step: 0.01 })
|
|
147
114
|
get luminanceThreshold() {
|
|
148
115
|
return this.effect.luminanceMaterial.threshold;
|
|
149
116
|
}
|
|
150
117
|
set luminanceThreshold(v) {
|
|
151
118
|
this.effect.luminanceMaterial.threshold = v;
|
|
152
119
|
}
|
|
120
|
+
// @property({ min: 0, max: 10, step: 0.01 })
|
|
153
121
|
get luminanceSmoothing() {
|
|
154
122
|
return this.effect.luminanceMaterial.smoothing;
|
|
155
123
|
}
|
|
@@ -170,27 +138,6 @@ class BloomPlugin extends PassPlugin {
|
|
|
170
138
|
};
|
|
171
139
|
}
|
|
172
140
|
}
|
|
173
|
-
__decorate([
|
|
174
|
-
core.property({
|
|
175
|
-
min: 0,
|
|
176
|
-
max: 2,
|
|
177
|
-
step: 0.01
|
|
178
|
-
})
|
|
179
|
-
], BloomPlugin.prototype, "intensity", null);
|
|
180
|
-
__decorate([
|
|
181
|
-
core.property({
|
|
182
|
-
min: 0,
|
|
183
|
-
max: 10,
|
|
184
|
-
step: 0.01
|
|
185
|
-
})
|
|
186
|
-
], BloomPlugin.prototype, "luminanceThreshold", null);
|
|
187
|
-
__decorate([
|
|
188
|
-
core.property({
|
|
189
|
-
min: 0,
|
|
190
|
-
max: 10,
|
|
191
|
-
step: 0.01
|
|
192
|
-
})
|
|
193
|
-
], BloomPlugin.prototype, "luminanceSmoothing", null);
|
|
194
141
|
|
|
195
142
|
class FXAAPlugin extends PassPlugin {
|
|
196
143
|
constructor(){
|
|
@@ -205,6 +152,7 @@ class FXAAPlugin extends PassPlugin {
|
|
|
205
152
|
}
|
|
206
153
|
|
|
207
154
|
class SMAAPlugin extends PassPlugin {
|
|
155
|
+
// @property({ value: SMAAPreset })
|
|
208
156
|
get preset() {
|
|
209
157
|
return this._preset;
|
|
210
158
|
}
|
|
@@ -214,12 +162,14 @@ class SMAAPlugin extends PassPlugin {
|
|
|
214
162
|
this.effect.applyPreset(v);
|
|
215
163
|
}
|
|
216
164
|
}
|
|
165
|
+
// @property({ value: EdgeDetectionMode })
|
|
217
166
|
get edgeDetectionMode() {
|
|
218
167
|
return this.effect.edgeDetectionMaterial.edgeDetectionMode;
|
|
219
168
|
}
|
|
220
169
|
set edgeDetectionMode(v) {
|
|
221
170
|
this.effect.edgeDetectionMaterial.edgeDetectionMode = v;
|
|
222
171
|
}
|
|
172
|
+
// @property({ value: PredicationMode })
|
|
223
173
|
get predicationMode() {
|
|
224
174
|
return this.effect.edgeDetectionMaterial.predicationMode;
|
|
225
175
|
}
|
|
@@ -238,23 +188,9 @@ class SMAAPlugin extends PassPlugin {
|
|
|
238
188
|
};
|
|
239
189
|
}
|
|
240
190
|
}
|
|
241
|
-
__decorate([
|
|
242
|
-
core.property({
|
|
243
|
-
value: postprocessing.SMAAPreset
|
|
244
|
-
})
|
|
245
|
-
], SMAAPlugin.prototype, "preset", null);
|
|
246
|
-
__decorate([
|
|
247
|
-
core.property({
|
|
248
|
-
value: postprocessing.EdgeDetectionMode
|
|
249
|
-
})
|
|
250
|
-
], SMAAPlugin.prototype, "edgeDetectionMode", null);
|
|
251
|
-
__decorate([
|
|
252
|
-
core.property({
|
|
253
|
-
value: postprocessing.PredicationMode
|
|
254
|
-
})
|
|
255
|
-
], SMAAPlugin.prototype, "predicationMode", null);
|
|
256
191
|
|
|
257
192
|
class MSAAPlugin extends core.Plugin {
|
|
193
|
+
// @property
|
|
258
194
|
get enable() {
|
|
259
195
|
return this.composer.multisampling > 0;
|
|
260
196
|
}
|
|
@@ -277,9 +213,6 @@ class MSAAPlugin extends core.Plugin {
|
|
|
277
213
|
};
|
|
278
214
|
}
|
|
279
215
|
}
|
|
280
|
-
__decorate([
|
|
281
|
-
core.property
|
|
282
|
-
], MSAAPlugin.prototype, "enable", null);
|
|
283
216
|
|
|
284
217
|
// from: https://news.ycombinator.com/item?id=17876741
|
|
285
218
|
// reference: http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/
|