@babylonjs/gui 9.15.0 → 9.16.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/2D/controls/checkbox.pure.js +164 -153
- package/2D/controls/checkbox.pure.js.map +1 -1
- package/2D/controls/colorpicker.pure.js +1300 -1289
- package/2D/controls/colorpicker.pure.js.map +1 -1
- package/2D/controls/container.pure.js +597 -582
- package/2D/controls/container.pure.js.map +1 -1
- package/2D/controls/control.pure.js +2474 -2434
- package/2D/controls/control.pure.js.map +1 -1
- package/2D/controls/displayGrid.pure.js +201 -190
- package/2D/controls/displayGrid.pure.js.map +1 -1
- package/2D/controls/ellipse.pure.js +96 -85
- package/2D/controls/ellipse.pure.js.map +1 -1
- package/2D/controls/grid.pure.js +511 -500
- package/2D/controls/grid.pure.js.map +1 -1
- package/2D/controls/image.pure.js +888 -877
- package/2D/controls/image.pure.js.map +1 -1
- package/2D/controls/inputText.pure.js +988 -973
- package/2D/controls/inputText.pure.js.map +1 -1
- package/2D/controls/inputTextArea.pure.js +955 -944
- package/2D/controls/inputTextArea.pure.js.map +1 -1
- package/2D/controls/line.pure.js +237 -226
- package/2D/controls/line.pure.js.map +1 -1
- package/2D/controls/multiLine.pure.js +233 -222
- package/2D/controls/multiLine.pure.js.map +1 -1
- package/2D/controls/radioButton.pure.js +182 -169
- package/2D/controls/radioButton.pure.js.map +1 -1
- package/2D/controls/rectangle.pure.js +211 -200
- package/2D/controls/rectangle.pure.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.pure.js +579 -567
- package/2D/controls/scrollViewers/scrollViewer.pure.js.map +1 -1
- package/2D/controls/sliders/baseSlider.js +291 -280
- package/2D/controls/sliders/baseSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.pure.js +158 -147
- package/2D/controls/sliders/imageBasedSlider.pure.js.map +1 -1
- package/2D/controls/sliders/imageScrollBar.js +237 -223
- package/2D/controls/sliders/imageScrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.pure.js +169 -158
- package/2D/controls/sliders/scrollBar.pure.js.map +1 -1
- package/2D/controls/sliders/slider.pure.js +251 -240
- package/2D/controls/sliders/slider.pure.js.map +1 -1
- package/2D/controls/stackPanel.pure.js +236 -221
- package/2D/controls/stackPanel.pure.js.map +1 -1
- package/2D/controls/textBlock.pure.js +637 -626
- package/2D/controls/textBlock.pure.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.pure.d.ts +4 -4
- package/3D/materials/fluent/fluentMaterial.pure.js +322 -273
- package/3D/materials/fluent/fluentMaterial.pure.js.map +1 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js +510 -454
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js.map +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.pure.js +612 -529
- package/3D/materials/fluentButton/fluentButtonMaterial.pure.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js +313 -274
- package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js +462 -405
- package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js.map +1 -1
- package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js +583 -501
- package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js.map +1 -1
- package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js +226 -203
- package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js +961 -825
- package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js +961 -825
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __esDecorate, __runInitializers } from "@babylonjs/core/tslib.es6.js";
|
|
2
2
|
import { Color4 } from "@babylonjs/core/Maths/math.color.pure.js";
|
|
3
3
|
import { Constants } from "@babylonjs/core/Engines/constants.js";
|
|
4
4
|
import { EffectFallbacks } from "@babylonjs/core/Materials/effectFallbacks.js";
|
|
@@ -18,287 +18,326 @@ class MRDLBackglowMaterialDefines extends MaterialDefines {
|
|
|
18
18
|
this.rebuild();
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
21
|
+
let MRDLBackglowMaterial = (() => {
|
|
22
|
+
var _a;
|
|
23
|
+
let _classSuper = PushMaterial;
|
|
24
|
+
let _bevelRadius_decorators;
|
|
25
|
+
let _bevelRadius_initializers = [];
|
|
26
|
+
let _bevelRadius_extraInitializers = [];
|
|
27
|
+
let _lineWidth_decorators;
|
|
28
|
+
let _lineWidth_initializers = [];
|
|
29
|
+
let _lineWidth_extraInitializers = [];
|
|
30
|
+
let _absoluteSizes_decorators;
|
|
31
|
+
let _absoluteSizes_initializers = [];
|
|
32
|
+
let _absoluteSizes_extraInitializers = [];
|
|
33
|
+
let _tuningMotion_decorators;
|
|
34
|
+
let _tuningMotion_initializers = [];
|
|
35
|
+
let _tuningMotion_extraInitializers = [];
|
|
36
|
+
let _motion_decorators;
|
|
37
|
+
let _motion_initializers = [];
|
|
38
|
+
let _motion_extraInitializers = [];
|
|
39
|
+
let _maxIntensity_decorators;
|
|
40
|
+
let _maxIntensity_initializers = [];
|
|
41
|
+
let _maxIntensity_extraInitializers = [];
|
|
42
|
+
let _intensityFadeInExponent_decorators;
|
|
43
|
+
let _intensityFadeInExponent_initializers = [];
|
|
44
|
+
let _intensityFadeInExponent_extraInitializers = [];
|
|
45
|
+
let _outerFuzzStart_decorators;
|
|
46
|
+
let _outerFuzzStart_initializers = [];
|
|
47
|
+
let _outerFuzzStart_extraInitializers = [];
|
|
48
|
+
let _outerFuzzEnd_decorators;
|
|
49
|
+
let _outerFuzzEnd_initializers = [];
|
|
50
|
+
let _outerFuzzEnd_extraInitializers = [];
|
|
51
|
+
let _color_decorators;
|
|
52
|
+
let _color_initializers = [];
|
|
53
|
+
let _color_extraInitializers = [];
|
|
54
|
+
let _innerColor_decorators;
|
|
55
|
+
let _innerColor_initializers = [];
|
|
56
|
+
let _innerColor_extraInitializers = [];
|
|
57
|
+
let _blendExponent_decorators;
|
|
58
|
+
let _blendExponent_initializers = [];
|
|
59
|
+
let _blendExponent_extraInitializers = [];
|
|
60
|
+
let _falloff_decorators;
|
|
61
|
+
let _falloff_initializers = [];
|
|
62
|
+
let _falloff_extraInitializers = [];
|
|
63
|
+
let _bias_decorators;
|
|
64
|
+
let _bias_initializers = [];
|
|
65
|
+
let _bias_extraInitializers = [];
|
|
66
|
+
return _a = class MRDLBackglowMaterial extends _classSuper {
|
|
67
|
+
constructor(name, scene) {
|
|
68
|
+
super(name, scene);
|
|
69
|
+
/**
|
|
70
|
+
* Gets or sets the bevel radius on the backglow. If this value is changed, update the lineWidth to match.
|
|
71
|
+
*/
|
|
72
|
+
this.bevelRadius = __runInitializers(this, _bevelRadius_initializers, 0.16);
|
|
73
|
+
/**
|
|
74
|
+
* Gets or sets the line width of the backglow.
|
|
75
|
+
*/
|
|
76
|
+
this.lineWidth = (__runInitializers(this, _bevelRadius_extraInitializers), __runInitializers(this, _lineWidth_initializers, 0.16));
|
|
77
|
+
/**
|
|
78
|
+
* Gets or sets whether to use absolute sizes when calculating effects on the backglow.
|
|
79
|
+
* Since desktop and VR/AR have different relative sizes, it's usually best to keep this false.
|
|
80
|
+
*/
|
|
81
|
+
this.absoluteSizes = (__runInitializers(this, _lineWidth_extraInitializers), __runInitializers(this, _absoluteSizes_initializers, false));
|
|
82
|
+
/**
|
|
83
|
+
* Gets or sets the tuning motion of the backglow.
|
|
84
|
+
*/
|
|
85
|
+
this.tuningMotion = (__runInitializers(this, _absoluteSizes_extraInitializers), __runInitializers(this, _tuningMotion_initializers, 0.0));
|
|
86
|
+
/**
|
|
87
|
+
* Gets or sets the motion of the backglow.
|
|
88
|
+
*/
|
|
89
|
+
this.motion = (__runInitializers(this, _tuningMotion_extraInitializers), __runInitializers(this, _motion_initializers, 1.0));
|
|
90
|
+
/**
|
|
91
|
+
* Gets or sets the maximum intensity of the backglow.
|
|
92
|
+
*/
|
|
93
|
+
this.maxIntensity = (__runInitializers(this, _motion_extraInitializers), __runInitializers(this, _maxIntensity_initializers, 0.7));
|
|
94
|
+
/**
|
|
95
|
+
* Gets or sets the fade-in exponent of the intensity of the backglow.
|
|
96
|
+
*/
|
|
97
|
+
this.intensityFadeInExponent = (__runInitializers(this, _maxIntensity_extraInitializers), __runInitializers(this, _intensityFadeInExponent_initializers, 2.0));
|
|
98
|
+
/**
|
|
99
|
+
* Gets or sets the start of the outer fuzz effect on the backglow.
|
|
100
|
+
*/
|
|
101
|
+
this.outerFuzzStart = (__runInitializers(this, _intensityFadeInExponent_extraInitializers), __runInitializers(this, _outerFuzzStart_initializers, 0.04));
|
|
102
|
+
/**
|
|
103
|
+
* Gets or sets the end of the outer fuzz effect on the backglow.
|
|
104
|
+
*/
|
|
105
|
+
this.outerFuzzEnd = (__runInitializers(this, _outerFuzzStart_extraInitializers), __runInitializers(this, _outerFuzzEnd_initializers, 0.04));
|
|
106
|
+
/**
|
|
107
|
+
* Gets or sets the color of the backglow.
|
|
108
|
+
*/
|
|
109
|
+
this.color = (__runInitializers(this, _outerFuzzEnd_extraInitializers), __runInitializers(this, _color_initializers, new Color4(0.682353, 0.698039, 1, 1)));
|
|
110
|
+
/**
|
|
111
|
+
* Gets or sets the inner color of the backglow.
|
|
112
|
+
*/
|
|
113
|
+
this.innerColor = (__runInitializers(this, _color_extraInitializers), __runInitializers(this, _innerColor_initializers, new Color4(0.356863, 0.392157, 0.796078, 1)));
|
|
114
|
+
/**
|
|
115
|
+
* Gets or sets the blend exponent of the backglow.
|
|
116
|
+
*/
|
|
117
|
+
this.blendExponent = (__runInitializers(this, _innerColor_extraInitializers), __runInitializers(this, _blendExponent_initializers, 1.5));
|
|
118
|
+
/**
|
|
119
|
+
* Gets or sets the falloff of the backglow.
|
|
120
|
+
*/
|
|
121
|
+
this.falloff = (__runInitializers(this, _blendExponent_extraInitializers), __runInitializers(this, _falloff_initializers, 2.0));
|
|
122
|
+
/**
|
|
123
|
+
* Gets or sets the bias of the backglow.
|
|
124
|
+
*/
|
|
125
|
+
this.bias = (__runInitializers(this, _falloff_extraInitializers), __runInitializers(this, _bias_initializers, 0.5));
|
|
126
|
+
__runInitializers(this, _bias_extraInitializers);
|
|
127
|
+
this.alphaMode = Constants.ALPHA_ADD;
|
|
128
|
+
this.disableDepthWrite = true;
|
|
129
|
+
this.backFaceCulling = false;
|
|
130
|
+
}
|
|
131
|
+
needAlphaBlending() {
|
|
99
132
|
return true;
|
|
100
133
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
subMesh.materialDefines = new MRDLBackglowMaterialDefines();
|
|
104
|
-
}
|
|
105
|
-
const defines = subMesh.materialDefines;
|
|
106
|
-
const scene = this.getScene();
|
|
107
|
-
if (this._isReadyForSubMesh(subMesh)) {
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
const engine = scene.getEngine();
|
|
111
|
-
// Attribs
|
|
112
|
-
PrepareDefinesForAttributes(mesh, defines, false, false);
|
|
113
|
-
// Get correct effect
|
|
114
|
-
if (defines.isDirty) {
|
|
115
|
-
defines.markAsProcessed();
|
|
116
|
-
scene.resetCachedMaterial();
|
|
117
|
-
// Fallbacks
|
|
118
|
-
const fallbacks = new EffectFallbacks();
|
|
119
|
-
if (defines.FOG) {
|
|
120
|
-
fallbacks.addFallback(1, "FOG");
|
|
134
|
+
needAlphaTesting() {
|
|
135
|
+
return false;
|
|
121
136
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
//Attributes
|
|
125
|
-
const attribs = [VertexBuffer.PositionKind];
|
|
126
|
-
if (defines.NORMAL) {
|
|
127
|
-
attribs.push(VertexBuffer.NormalKind);
|
|
137
|
+
getAlphaTestTexture() {
|
|
138
|
+
return null;
|
|
128
139
|
}
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
// Methods
|
|
141
|
+
isReadyForSubMesh(mesh, subMesh) {
|
|
142
|
+
const drawWrapper = subMesh._drawWrapper;
|
|
143
|
+
if (this.isFrozen) {
|
|
144
|
+
if (drawWrapper.effect && drawWrapper._wasPreviouslyReady) {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (!subMesh.materialDefines) {
|
|
149
|
+
subMesh.materialDefines = new MRDLBackglowMaterialDefines();
|
|
150
|
+
}
|
|
151
|
+
const defines = subMesh.materialDefines;
|
|
152
|
+
const scene = this.getScene();
|
|
153
|
+
if (this._isReadyForSubMesh(subMesh)) {
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
const engine = scene.getEngine();
|
|
157
|
+
// Attribs
|
|
158
|
+
PrepareDefinesForAttributes(mesh, defines, false, false);
|
|
159
|
+
// Get correct effect
|
|
160
|
+
if (defines.isDirty) {
|
|
161
|
+
defines.markAsProcessed();
|
|
162
|
+
scene.resetCachedMaterial();
|
|
163
|
+
// Fallbacks
|
|
164
|
+
const fallbacks = new EffectFallbacks();
|
|
165
|
+
if (defines.FOG) {
|
|
166
|
+
fallbacks.addFallback(1, "FOG");
|
|
167
|
+
}
|
|
168
|
+
HandleFallbacksForShadows(defines, fallbacks);
|
|
169
|
+
defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
|
|
170
|
+
//Attributes
|
|
171
|
+
const attribs = [VertexBuffer.PositionKind];
|
|
172
|
+
if (defines.NORMAL) {
|
|
173
|
+
attribs.push(VertexBuffer.NormalKind);
|
|
174
|
+
}
|
|
175
|
+
if (defines.UV1) {
|
|
176
|
+
attribs.push(VertexBuffer.UVKind);
|
|
177
|
+
}
|
|
178
|
+
if (defines.UV2) {
|
|
179
|
+
attribs.push(VertexBuffer.UV2Kind);
|
|
180
|
+
}
|
|
181
|
+
if (defines.VERTEXCOLOR) {
|
|
182
|
+
attribs.push(VertexBuffer.ColorKind);
|
|
183
|
+
}
|
|
184
|
+
if (defines.TANGENT) {
|
|
185
|
+
attribs.push(VertexBuffer.TangentKind);
|
|
186
|
+
}
|
|
187
|
+
PrepareAttributesForInstances(attribs, defines);
|
|
188
|
+
// Legacy browser patch
|
|
189
|
+
const shaderName = "mrdlBackglow";
|
|
190
|
+
const join = defines.toString();
|
|
191
|
+
const uniforms = [
|
|
192
|
+
"world",
|
|
193
|
+
"worldView",
|
|
194
|
+
"worldViewProjection",
|
|
195
|
+
"view",
|
|
196
|
+
"projection",
|
|
197
|
+
"viewProjection",
|
|
198
|
+
"cameraPosition",
|
|
199
|
+
"_Bevel_Radius_",
|
|
200
|
+
"_Line_Width_",
|
|
201
|
+
"_Absolute_Sizes_",
|
|
202
|
+
"_Tuning_Motion_",
|
|
203
|
+
"_Motion_",
|
|
204
|
+
"_Max_Intensity_",
|
|
205
|
+
"_Intensity_Fade_In_Exponent_",
|
|
206
|
+
"_Outer_Fuzz_Start_",
|
|
207
|
+
"_Outer_Fuzz_End_",
|
|
208
|
+
"_Color_",
|
|
209
|
+
"_Inner_Color_",
|
|
210
|
+
"_Blend_Exponent_",
|
|
211
|
+
"_Falloff_",
|
|
212
|
+
"_Bias_",
|
|
213
|
+
];
|
|
214
|
+
const samplers = [];
|
|
215
|
+
const uniformBuffers = [];
|
|
216
|
+
PrepareUniformsAndSamplersList({
|
|
217
|
+
uniformsNames: uniforms,
|
|
218
|
+
uniformBuffersNames: uniformBuffers,
|
|
219
|
+
samplers: samplers,
|
|
220
|
+
defines: defines,
|
|
221
|
+
maxSimultaneousLights: 4,
|
|
222
|
+
});
|
|
223
|
+
subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
|
|
224
|
+
attributes: attribs,
|
|
225
|
+
uniformsNames: uniforms,
|
|
226
|
+
uniformBuffersNames: uniformBuffers,
|
|
227
|
+
samplers: samplers,
|
|
228
|
+
defines: join,
|
|
229
|
+
fallbacks: fallbacks,
|
|
230
|
+
onCompiled: this.onCompiled,
|
|
231
|
+
onError: this.onError,
|
|
232
|
+
indexParameters: { maxSimultaneousLights: 4 },
|
|
233
|
+
extraInitializationsAsync: async () => {
|
|
234
|
+
await Promise.all([import("./shaders/mrdlBackglow.vertex.js"), import("./shaders/mrdlBackglow.fragment.js")]);
|
|
235
|
+
},
|
|
236
|
+
}, engine), defines);
|
|
237
|
+
}
|
|
238
|
+
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
defines._renderId = scene.getRenderId();
|
|
242
|
+
drawWrapper._wasPreviouslyReady = true;
|
|
243
|
+
return true;
|
|
131
244
|
}
|
|
132
|
-
|
|
133
|
-
|
|
245
|
+
bindForSubMesh(world, mesh, subMesh) {
|
|
246
|
+
const scene = this.getScene();
|
|
247
|
+
const defines = subMesh.materialDefines;
|
|
248
|
+
if (!defines) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const effect = subMesh.effect;
|
|
252
|
+
if (!effect) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
this._activeEffect = effect;
|
|
256
|
+
// Matrices
|
|
257
|
+
this.bindOnlyWorldMatrix(world);
|
|
258
|
+
this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
259
|
+
this._activeEffect.setVector3("cameraPosition", scene.activeCamera.position);
|
|
260
|
+
// "Rounded Rectangle"
|
|
261
|
+
this._activeEffect.setFloat("_Bevel_Radius_", this.bevelRadius);
|
|
262
|
+
this._activeEffect.setFloat("_Line_Width_", this.lineWidth);
|
|
263
|
+
this._activeEffect.setFloat("_Absolute_Sizes_", this.absoluteSizes ? 1.0 : 0.0);
|
|
264
|
+
// "Animation"
|
|
265
|
+
this._activeEffect.setFloat("_Tuning_Motion_", this.tuningMotion);
|
|
266
|
+
this._activeEffect.setFloat("_Motion_", this.motion);
|
|
267
|
+
this._activeEffect.setFloat("_Max_Intensity_", this.maxIntensity);
|
|
268
|
+
this._activeEffect.setFloat("_Intensity_Fade_In_Exponent_", this.intensityFadeInExponent);
|
|
269
|
+
this._activeEffect.setFloat("_Outer_Fuzz_Start_", this.outerFuzzStart);
|
|
270
|
+
this._activeEffect.setFloat("_Outer_Fuzz_End_", this.outerFuzzEnd);
|
|
271
|
+
// "Color"
|
|
272
|
+
this._activeEffect.setDirectColor4("_Color_", this.color);
|
|
273
|
+
this._activeEffect.setDirectColor4("_Inner_Color_", this.innerColor);
|
|
274
|
+
this._activeEffect.setFloat("_Blend_Exponent_", this.blendExponent);
|
|
275
|
+
// "Inner Transition"
|
|
276
|
+
this._activeEffect.setFloat("_Falloff_", this.falloff);
|
|
277
|
+
this._activeEffect.setFloat("_Bias_", this.bias);
|
|
278
|
+
this._afterBind(mesh, this._activeEffect, subMesh);
|
|
134
279
|
}
|
|
135
|
-
|
|
136
|
-
|
|
280
|
+
/**
|
|
281
|
+
* Get the list of animatables in the material.
|
|
282
|
+
* @returns the list of animatables object used in the material
|
|
283
|
+
*/
|
|
284
|
+
getAnimatables() {
|
|
285
|
+
return [];
|
|
137
286
|
}
|
|
138
|
-
|
|
139
|
-
|
|
287
|
+
dispose(forceDisposeEffect) {
|
|
288
|
+
super.dispose(forceDisposeEffect);
|
|
140
289
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
];
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
193
|
-
return false;
|
|
194
|
-
}
|
|
195
|
-
defines._renderId = scene.getRenderId();
|
|
196
|
-
drawWrapper._wasPreviouslyReady = true;
|
|
197
|
-
return true;
|
|
198
|
-
}
|
|
199
|
-
bindForSubMesh(world, mesh, subMesh) {
|
|
200
|
-
const scene = this.getScene();
|
|
201
|
-
const defines = subMesh.materialDefines;
|
|
202
|
-
if (!defines) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const effect = subMesh.effect;
|
|
206
|
-
if (!effect) {
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
this._activeEffect = effect;
|
|
210
|
-
// Matrices
|
|
211
|
-
this.bindOnlyWorldMatrix(world);
|
|
212
|
-
this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
213
|
-
this._activeEffect.setVector3("cameraPosition", scene.activeCamera.position);
|
|
214
|
-
// "Rounded Rectangle"
|
|
215
|
-
this._activeEffect.setFloat("_Bevel_Radius_", this.bevelRadius);
|
|
216
|
-
this._activeEffect.setFloat("_Line_Width_", this.lineWidth);
|
|
217
|
-
this._activeEffect.setFloat("_Absolute_Sizes_", this.absoluteSizes ? 1.0 : 0.0);
|
|
218
|
-
// "Animation"
|
|
219
|
-
this._activeEffect.setFloat("_Tuning_Motion_", this.tuningMotion);
|
|
220
|
-
this._activeEffect.setFloat("_Motion_", this.motion);
|
|
221
|
-
this._activeEffect.setFloat("_Max_Intensity_", this.maxIntensity);
|
|
222
|
-
this._activeEffect.setFloat("_Intensity_Fade_In_Exponent_", this.intensityFadeInExponent);
|
|
223
|
-
this._activeEffect.setFloat("_Outer_Fuzz_Start_", this.outerFuzzStart);
|
|
224
|
-
this._activeEffect.setFloat("_Outer_Fuzz_End_", this.outerFuzzEnd);
|
|
225
|
-
// "Color"
|
|
226
|
-
this._activeEffect.setDirectColor4("_Color_", this.color);
|
|
227
|
-
this._activeEffect.setDirectColor4("_Inner_Color_", this.innerColor);
|
|
228
|
-
this._activeEffect.setFloat("_Blend_Exponent_", this.blendExponent);
|
|
229
|
-
// "Inner Transition"
|
|
230
|
-
this._activeEffect.setFloat("_Falloff_", this.falloff);
|
|
231
|
-
this._activeEffect.setFloat("_Bias_", this.bias);
|
|
232
|
-
this._afterBind(mesh, this._activeEffect, subMesh);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Get the list of animatables in the material.
|
|
236
|
-
* @returns the list of animatables object used in the material
|
|
237
|
-
*/
|
|
238
|
-
getAnimatables() {
|
|
239
|
-
return [];
|
|
240
|
-
}
|
|
241
|
-
dispose(forceDisposeEffect) {
|
|
242
|
-
super.dispose(forceDisposeEffect);
|
|
243
|
-
}
|
|
244
|
-
clone(name) {
|
|
245
|
-
return SerializationHelper.Clone(() => new MRDLBackglowMaterial(name, this.getScene()), this);
|
|
246
|
-
}
|
|
247
|
-
serialize() {
|
|
248
|
-
const serializationObject = SerializationHelper.Serialize(this);
|
|
249
|
-
serializationObject.customType = "BABYLON.MRDLBackglowMaterial";
|
|
250
|
-
return serializationObject;
|
|
251
|
-
}
|
|
252
|
-
getClassName() {
|
|
253
|
-
return "MRDLBackglowMaterial";
|
|
254
|
-
}
|
|
255
|
-
// Statics
|
|
256
|
-
static Parse(source, scene, rootUrl) {
|
|
257
|
-
return SerializationHelper.Parse(() => new MRDLBackglowMaterial(source.name, scene), source, scene, rootUrl);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
__decorate([
|
|
261
|
-
serialize()
|
|
262
|
-
], MRDLBackglowMaterial.prototype, "bevelRadius", void 0);
|
|
263
|
-
__decorate([
|
|
264
|
-
serialize()
|
|
265
|
-
], MRDLBackglowMaterial.prototype, "lineWidth", void 0);
|
|
266
|
-
__decorate([
|
|
267
|
-
serialize()
|
|
268
|
-
], MRDLBackglowMaterial.prototype, "absoluteSizes", void 0);
|
|
269
|
-
__decorate([
|
|
270
|
-
serialize()
|
|
271
|
-
], MRDLBackglowMaterial.prototype, "tuningMotion", void 0);
|
|
272
|
-
__decorate([
|
|
273
|
-
serialize()
|
|
274
|
-
], MRDLBackglowMaterial.prototype, "motion", void 0);
|
|
275
|
-
__decorate([
|
|
276
|
-
serialize()
|
|
277
|
-
], MRDLBackglowMaterial.prototype, "maxIntensity", void 0);
|
|
278
|
-
__decorate([
|
|
279
|
-
serialize()
|
|
280
|
-
], MRDLBackglowMaterial.prototype, "intensityFadeInExponent", void 0);
|
|
281
|
-
__decorate([
|
|
282
|
-
serialize()
|
|
283
|
-
], MRDLBackglowMaterial.prototype, "outerFuzzStart", void 0);
|
|
284
|
-
__decorate([
|
|
285
|
-
serialize()
|
|
286
|
-
], MRDLBackglowMaterial.prototype, "outerFuzzEnd", void 0);
|
|
287
|
-
__decorate([
|
|
288
|
-
serialize()
|
|
289
|
-
], MRDLBackglowMaterial.prototype, "color", void 0);
|
|
290
|
-
__decorate([
|
|
291
|
-
serialize()
|
|
292
|
-
], MRDLBackglowMaterial.prototype, "innerColor", void 0);
|
|
293
|
-
__decorate([
|
|
294
|
-
serialize()
|
|
295
|
-
], MRDLBackglowMaterial.prototype, "blendExponent", void 0);
|
|
296
|
-
__decorate([
|
|
297
|
-
serialize()
|
|
298
|
-
], MRDLBackglowMaterial.prototype, "falloff", void 0);
|
|
299
|
-
__decorate([
|
|
300
|
-
serialize()
|
|
301
|
-
], MRDLBackglowMaterial.prototype, "bias", void 0);
|
|
290
|
+
clone(name) {
|
|
291
|
+
return SerializationHelper.Clone(() => new _a(name, this.getScene()), this);
|
|
292
|
+
}
|
|
293
|
+
serialize() {
|
|
294
|
+
const serializationObject = SerializationHelper.Serialize(this);
|
|
295
|
+
serializationObject.customType = "BABYLON.MRDLBackglowMaterial";
|
|
296
|
+
return serializationObject;
|
|
297
|
+
}
|
|
298
|
+
getClassName() {
|
|
299
|
+
return "MRDLBackglowMaterial";
|
|
300
|
+
}
|
|
301
|
+
// Statics
|
|
302
|
+
static Parse(source, scene, rootUrl) {
|
|
303
|
+
return SerializationHelper.Parse(() => new _a(source.name, scene), source, scene, rootUrl);
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
(() => {
|
|
307
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
308
|
+
_bevelRadius_decorators = [serialize()];
|
|
309
|
+
_lineWidth_decorators = [serialize()];
|
|
310
|
+
_absoluteSizes_decorators = [serialize()];
|
|
311
|
+
_tuningMotion_decorators = [serialize()];
|
|
312
|
+
_motion_decorators = [serialize()];
|
|
313
|
+
_maxIntensity_decorators = [serialize()];
|
|
314
|
+
_intensityFadeInExponent_decorators = [serialize()];
|
|
315
|
+
_outerFuzzStart_decorators = [serialize()];
|
|
316
|
+
_outerFuzzEnd_decorators = [serialize()];
|
|
317
|
+
_color_decorators = [serialize()];
|
|
318
|
+
_innerColor_decorators = [serialize()];
|
|
319
|
+
_blendExponent_decorators = [serialize()];
|
|
320
|
+
_falloff_decorators = [serialize()];
|
|
321
|
+
_bias_decorators = [serialize()];
|
|
322
|
+
__esDecorate(null, null, _bevelRadius_decorators, { kind: "field", name: "bevelRadius", static: false, private: false, access: { has: obj => "bevelRadius" in obj, get: obj => obj.bevelRadius, set: (obj, value) => { obj.bevelRadius = value; } }, metadata: _metadata }, _bevelRadius_initializers, _bevelRadius_extraInitializers);
|
|
323
|
+
__esDecorate(null, null, _lineWidth_decorators, { kind: "field", name: "lineWidth", static: false, private: false, access: { has: obj => "lineWidth" in obj, get: obj => obj.lineWidth, set: (obj, value) => { obj.lineWidth = value; } }, metadata: _metadata }, _lineWidth_initializers, _lineWidth_extraInitializers);
|
|
324
|
+
__esDecorate(null, null, _absoluteSizes_decorators, { kind: "field", name: "absoluteSizes", static: false, private: false, access: { has: obj => "absoluteSizes" in obj, get: obj => obj.absoluteSizes, set: (obj, value) => { obj.absoluteSizes = value; } }, metadata: _metadata }, _absoluteSizes_initializers, _absoluteSizes_extraInitializers);
|
|
325
|
+
__esDecorate(null, null, _tuningMotion_decorators, { kind: "field", name: "tuningMotion", static: false, private: false, access: { has: obj => "tuningMotion" in obj, get: obj => obj.tuningMotion, set: (obj, value) => { obj.tuningMotion = value; } }, metadata: _metadata }, _tuningMotion_initializers, _tuningMotion_extraInitializers);
|
|
326
|
+
__esDecorate(null, null, _motion_decorators, { kind: "field", name: "motion", static: false, private: false, access: { has: obj => "motion" in obj, get: obj => obj.motion, set: (obj, value) => { obj.motion = value; } }, metadata: _metadata }, _motion_initializers, _motion_extraInitializers);
|
|
327
|
+
__esDecorate(null, null, _maxIntensity_decorators, { kind: "field", name: "maxIntensity", static: false, private: false, access: { has: obj => "maxIntensity" in obj, get: obj => obj.maxIntensity, set: (obj, value) => { obj.maxIntensity = value; } }, metadata: _metadata }, _maxIntensity_initializers, _maxIntensity_extraInitializers);
|
|
328
|
+
__esDecorate(null, null, _intensityFadeInExponent_decorators, { kind: "field", name: "intensityFadeInExponent", static: false, private: false, access: { has: obj => "intensityFadeInExponent" in obj, get: obj => obj.intensityFadeInExponent, set: (obj, value) => { obj.intensityFadeInExponent = value; } }, metadata: _metadata }, _intensityFadeInExponent_initializers, _intensityFadeInExponent_extraInitializers);
|
|
329
|
+
__esDecorate(null, null, _outerFuzzStart_decorators, { kind: "field", name: "outerFuzzStart", static: false, private: false, access: { has: obj => "outerFuzzStart" in obj, get: obj => obj.outerFuzzStart, set: (obj, value) => { obj.outerFuzzStart = value; } }, metadata: _metadata }, _outerFuzzStart_initializers, _outerFuzzStart_extraInitializers);
|
|
330
|
+
__esDecorate(null, null, _outerFuzzEnd_decorators, { kind: "field", name: "outerFuzzEnd", static: false, private: false, access: { has: obj => "outerFuzzEnd" in obj, get: obj => obj.outerFuzzEnd, set: (obj, value) => { obj.outerFuzzEnd = value; } }, metadata: _metadata }, _outerFuzzEnd_initializers, _outerFuzzEnd_extraInitializers);
|
|
331
|
+
__esDecorate(null, null, _color_decorators, { kind: "field", name: "color", static: false, private: false, access: { has: obj => "color" in obj, get: obj => obj.color, set: (obj, value) => { obj.color = value; } }, metadata: _metadata }, _color_initializers, _color_extraInitializers);
|
|
332
|
+
__esDecorate(null, null, _innerColor_decorators, { kind: "field", name: "innerColor", static: false, private: false, access: { has: obj => "innerColor" in obj, get: obj => obj.innerColor, set: (obj, value) => { obj.innerColor = value; } }, metadata: _metadata }, _innerColor_initializers, _innerColor_extraInitializers);
|
|
333
|
+
__esDecorate(null, null, _blendExponent_decorators, { kind: "field", name: "blendExponent", static: false, private: false, access: { has: obj => "blendExponent" in obj, get: obj => obj.blendExponent, set: (obj, value) => { obj.blendExponent = value; } }, metadata: _metadata }, _blendExponent_initializers, _blendExponent_extraInitializers);
|
|
334
|
+
__esDecorate(null, null, _falloff_decorators, { kind: "field", name: "falloff", static: false, private: false, access: { has: obj => "falloff" in obj, get: obj => obj.falloff, set: (obj, value) => { obj.falloff = value; } }, metadata: _metadata }, _falloff_initializers, _falloff_extraInitializers);
|
|
335
|
+
__esDecorate(null, null, _bias_decorators, { kind: "field", name: "bias", static: false, private: false, access: { has: obj => "bias" in obj, get: obj => obj.bias, set: (obj, value) => { obj.bias = value; } }, metadata: _metadata }, _bias_initializers, _bias_extraInitializers);
|
|
336
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
337
|
+
})(),
|
|
338
|
+
_a;
|
|
339
|
+
})();
|
|
340
|
+
export { MRDLBackglowMaterial };
|
|
302
341
|
let _Registered = false;
|
|
303
342
|
/**
|
|
304
343
|
* Registers the MRDLBackglowMaterial class with the type store for serialization support.
|