@babylonjs/gui 5.0.0-alpha.7 → 5.0.0-beta.2
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/adtInstrumentation.js +1 -1
- package/2D/advancedDynamicTexture.d.ts +165 -125
- package/2D/advancedDynamicTexture.js +342 -181
- package/2D/advancedDynamicTexture.js.map +1 -1
- package/2D/controls/button.d.ts +8 -0
- package/2D/controls/button.js +33 -10
- package/2D/controls/button.js.map +1 -1
- package/2D/controls/checkbox.d.ts +2 -1
- package/2D/controls/checkbox.js +10 -8
- package/2D/controls/checkbox.js.map +1 -1
- package/2D/controls/colorpicker.d.ts +4 -3
- package/2D/controls/colorpicker.js +40 -23
- package/2D/controls/colorpicker.js.map +1 -1
- package/2D/controls/container.d.ts +16 -5
- package/2D/controls/container.js +91 -13
- package/2D/controls/container.js.map +1 -1
- package/2D/controls/control.d.ts +103 -44
- package/2D/controls/control.js +278 -129
- package/2D/controls/control.js.map +1 -1
- package/2D/controls/displayGrid.d.ts +2 -1
- package/2D/controls/displayGrid.js +6 -6
- package/2D/controls/displayGrid.js.map +1 -1
- package/2D/controls/ellipse.d.ts +5 -3
- package/2D/controls/ellipse.js +9 -5
- package/2D/controls/ellipse.js.map +1 -1
- package/2D/controls/focusableButton.d.ts +1 -0
- package/2D/controls/focusableButton.js +9 -6
- package/2D/controls/focusableButton.js.map +1 -1
- package/2D/controls/grid.d.ts +13 -2
- package/2D/controls/grid.js +108 -24
- package/2D/controls/grid.js.map +1 -1
- package/2D/controls/image.d.ts +5 -4
- package/2D/controls/image.js +52 -31
- package/2D/controls/image.js.map +1 -1
- package/2D/controls/index.js +29 -29
- package/2D/controls/inputPassword.js +4 -4
- package/2D/controls/inputPassword.js.map +1 -1
- package/2D/controls/inputText.d.ts +2 -1
- package/2D/controls/inputText.js +40 -14
- package/2D/controls/inputText.js.map +1 -1
- package/2D/controls/line.d.ts +3 -2
- package/2D/controls/line.js +8 -8
- package/2D/controls/line.js.map +1 -1
- package/2D/controls/multiLine.d.ts +4 -3
- package/2D/controls/multiLine.js +6 -6
- package/2D/controls/multiLine.js.map +1 -1
- package/2D/controls/radioButton.d.ts +2 -1
- package/2D/controls/radioButton.js +10 -7
- package/2D/controls/radioButton.js.map +1 -1
- package/2D/controls/rectangle.d.ts +8 -3
- package/2D/controls/rectangle.js +21 -5
- package/2D/controls/rectangle.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.d.ts +3 -2
- package/2D/controls/scrollViewers/scrollViewer.js +9 -9
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +4 -3
- package/2D/controls/scrollViewers/scrollViewerWindow.js +4 -4
- package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
- package/2D/controls/selector.js +8 -8
- package/2D/controls/selector.js.map +1 -1
- package/2D/controls/sliders/baseSlider.d.ts +1 -1
- package/2D/controls/sliders/baseSlider.js +12 -10
- package/2D/controls/sliders/baseSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.d.ts +10 -1
- package/2D/controls/sliders/imageBasedSlider.js +29 -5
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
- package/2D/controls/sliders/imageScrollBar.d.ts +2 -1
- package/2D/controls/sliders/imageScrollBar.js +3 -3
- package/2D/controls/sliders/imageScrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.d.ts +2 -1
- package/2D/controls/sliders/scrollBar.js +3 -3
- package/2D/controls/sliders/scrollBar.js.map +1 -1
- package/2D/controls/sliders/slider.d.ts +2 -1
- package/2D/controls/sliders/slider.js +4 -4
- package/2D/controls/sliders/slider.js.map +1 -1
- package/2D/controls/stackPanel.d.ts +10 -3
- package/2D/controls/stackPanel.js +35 -13
- package/2D/controls/stackPanel.js.map +1 -1
- package/2D/controls/statics.js +3 -3
- package/2D/controls/statics.js.map +1 -1
- package/2D/controls/textBlock.d.ts +16 -9
- package/2D/controls/textBlock.js +75 -34
- package/2D/controls/textBlock.js.map +1 -1
- package/2D/controls/textWrapper.js +2 -2
- package/2D/controls/textWrapper.js.map +1 -1
- package/2D/controls/toggleButton.d.ts +1 -13
- package/2D/controls/toggleButton.js +29 -38
- package/2D/controls/toggleButton.js.map +1 -1
- package/2D/controls/virtualKeyboard.js +5 -5
- package/2D/controls/virtualKeyboard.js.map +1 -1
- package/2D/index.d.ts +1 -1
- package/2D/index.js +9 -9
- package/2D/index.js.map +1 -1
- package/2D/math2D.d.ts +5 -0
- package/2D/math2D.js +14 -2
- package/2D/math2D.js.map +1 -1
- package/2D/measure.js +1 -1
- package/2D/measure.js.map +1 -1
- package/2D/multiLinePoint.js +3 -3
- package/2D/style.js +2 -2
- package/2D/valueAndUnit.d.ts +21 -6
- package/2D/valueAndUnit.js +57 -13
- package/2D/valueAndUnit.js.map +1 -1
- package/2D/xmlLoader.d.ts +17 -3
- package/2D/xmlLoader.js +54 -15
- package/2D/xmlLoader.js.map +1 -1
- package/3D/behaviors/defaultBehavior.d.ts +73 -0
- package/3D/behaviors/defaultBehavior.js +122 -0
- package/3D/behaviors/defaultBehavior.js.map +1 -0
- package/3D/controls/abstractButton3D.d.ts +2 -2
- package/3D/controls/abstractButton3D.js +3 -3
- package/3D/controls/abstractButton3D.js.map +1 -1
- package/3D/controls/button3D.d.ts +0 -24
- package/3D/controls/button3D.js +15 -84
- package/3D/controls/button3D.js.map +1 -1
- package/3D/controls/container3D.js +2 -2
- package/3D/controls/contentDisplay3D.d.ts +30 -0
- package/3D/controls/contentDisplay3D.js +79 -0
- package/3D/controls/contentDisplay3D.js.map +1 -0
- package/3D/controls/control3D.d.ts +10 -7
- package/3D/controls/control3D.js +27 -19
- package/3D/controls/control3D.js.map +1 -1
- package/3D/controls/cylinderPanel.js +5 -5
- package/3D/controls/handMenu.d.ts +28 -0
- package/3D/controls/handMenu.js +48 -0
- package/3D/controls/handMenu.js.map +1 -0
- package/3D/controls/holographicBackplate.d.ts +48 -0
- package/3D/controls/holographicBackplate.js +121 -0
- package/3D/controls/holographicBackplate.js.map +1 -0
- package/3D/controls/holographicButton.d.ts +1 -1
- package/3D/controls/holographicButton.js +35 -31
- package/3D/controls/holographicButton.js.map +1 -1
- package/3D/controls/holographicSlate.d.ts +118 -0
- package/3D/controls/holographicSlate.js +365 -0
- package/3D/controls/holographicSlate.js.map +1 -0
- package/3D/controls/index.d.ts +7 -0
- package/3D/controls/index.js +22 -15
- package/3D/controls/index.js.map +1 -1
- package/3D/controls/meshButton3D.js +2 -2
- package/3D/controls/meshButton3D.js.map +1 -1
- package/3D/controls/nearMenu.d.ts +45 -0
- package/3D/controls/nearMenu.js +111 -0
- package/3D/controls/nearMenu.js.map +1 -0
- package/3D/controls/planePanel.js +3 -3
- package/3D/controls/scatterPanel.js +4 -4
- package/3D/controls/slider3D.d.ts +80 -0
- package/3D/controls/slider3D.js +268 -0
- package/3D/controls/slider3D.js.map +1 -0
- package/3D/controls/spherePanel.js +5 -5
- package/3D/controls/stackPanel3D.js +3 -3
- package/3D/controls/touchButton3D.d.ts +9 -21
- package/3D/controls/touchButton3D.js +52 -224
- package/3D/controls/touchButton3D.js.map +1 -1
- package/3D/controls/touchHolographicButton.d.ts +20 -3
- package/3D/controls/touchHolographicButton.js +137 -67
- package/3D/controls/touchHolographicButton.js.map +1 -1
- package/3D/controls/touchHolographicMenu.d.ts +61 -0
- package/3D/controls/touchHolographicMenu.js +149 -0
- package/3D/controls/touchHolographicMenu.js.map +1 -0
- package/3D/controls/touchMeshButton3D.d.ts +3 -6
- package/3D/controls/touchMeshButton3D.js +6 -14
- package/3D/controls/touchMeshButton3D.js.map +1 -1
- package/3D/controls/touchToggleButton3D.d.ts +35 -0
- package/3D/controls/touchToggleButton3D.js +60 -0
- package/3D/controls/touchToggleButton3D.js.map +1 -0
- package/3D/controls/volumeBasedPanel.d.ts +1 -1
- package/3D/controls/volumeBasedPanel.js +5 -5
- package/3D/controls/volumeBasedPanel.js.map +1 -1
- package/3D/gizmos/gizmoHandle.d.ts +108 -0
- package/3D/gizmos/gizmoHandle.js +210 -0
- package/3D/gizmos/gizmoHandle.js.map +1 -0
- package/3D/gizmos/index.d.ts +2 -0
- package/3D/gizmos/index.js +3 -0
- package/3D/gizmos/index.js.map +1 -0
- package/3D/gizmos/slateGizmo.d.ts +59 -0
- package/3D/gizmos/slateGizmo.js +364 -0
- package/3D/gizmos/slateGizmo.js.map +1 -0
- package/3D/gui3DManager.d.ts +15 -2
- package/3D/gui3DManager.js +62 -41
- package/3D/gui3DManager.js.map +1 -1
- package/3D/index.d.ts +3 -2
- package/3D/index.js +5 -4
- package/3D/index.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.d.ts +90 -0
- package/3D/materials/fluent/fluentMaterial.js +282 -0
- package/3D/materials/fluent/fluentMaterial.js.map +1 -0
- package/3D/materials/fluent/index.d.ts +1 -0
- package/3D/materials/fluent/index.js +2 -0
- package/3D/materials/fluent/index.js.map +1 -0
- package/3D/materials/{shaders → fluent/shaders}/fluent.fragment.d.ts +0 -0
- package/3D/materials/fluent/shaders/fluent.fragment.js +7 -0
- package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -0
- package/3D/materials/{shaders → fluent/shaders}/fluent.vertex.d.ts +0 -0
- package/3D/materials/{shaders → fluent/shaders}/fluent.vertex.js +2 -2
- package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +154 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +435 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -0
- package/3D/materials/fluentBackplate/index.d.ts +1 -0
- package/3D/materials/fluentBackplate/index.js +2 -0
- package/3D/materials/fluentBackplate/index.js.map +1 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +5 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +7 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js.map +1 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.d.ts +5 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +7 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +189 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.js +538 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -0
- package/3D/materials/fluentButton/index.d.ts +1 -0
- package/3D/materials/fluentButton/index.js +2 -0
- package/3D/materials/fluentButton/index.js.map +1 -0
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +5 -0
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +7 -0
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js.map +1 -0
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.d.ts +5 -0
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +7 -0
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -0
- package/3D/materials/fluentMaterial.d.ts +2 -88
- package/3D/materials/fluentMaterial.js +2 -277
- package/3D/materials/fluentMaterial.js.map +1 -1
- package/3D/materials/handle/handleMaterial.d.ts +68 -0
- package/3D/materials/handle/handleMaterial.js +127 -0
- package/3D/materials/handle/handleMaterial.js.map +1 -0
- package/3D/materials/handle/index.d.ts +1 -0
- package/3D/materials/handle/index.js +2 -0
- package/3D/materials/handle/index.js.map +1 -0
- package/3D/materials/handle/shaders/handle.fragment.d.ts +5 -0
- package/3D/materials/handle/shaders/handle.fragment.js +7 -0
- package/3D/materials/handle/shaders/handle.fragment.js.map +1 -0
- package/3D/materials/handle/shaders/handle.vertex.d.ts +5 -0
- package/3D/materials/handle/shaders/handle.vertex.js +7 -0
- package/3D/materials/handle/shaders/handle.vertex.js.map +1 -0
- package/3D/materials/index.d.ts +5 -1
- package/3D/materials/index.js +5 -1
- package/3D/materials/index.js.map +1 -1
- package/3D/materials/mrdl/index.d.ts +3 -0
- package/3D/materials/mrdl/index.js +4 -0
- package/3D/materials/mrdl/index.js.map +1 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +147 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +410 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +333 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +787 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +333 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +787 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -0
- package/3D/vector3WithInfo.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/legacy/legacy.js +2 -2
- package/package.json +117 -9
- package/3D/materials/shaders/fluent.fragment.js +0 -7
- package/3D/materials/shaders/fluent.fragment.js.map +0 -1
- package/3D/materials/shaders/fluent.vertex.js.map +0 -1
|
@@ -0,0 +1,787 @@
|
|
|
1
|
+
import { __decorate, __extends } from "tslib";
|
|
2
|
+
import { SerializationHelper, serialize } from "@babylonjs/core/Misc/decorators.js";
|
|
3
|
+
import { Vector2, Vector3, Vector4 } from "@babylonjs/core/Maths/math.vector.js";
|
|
4
|
+
import { Texture } from "@babylonjs/core/Materials/Textures/texture.js";
|
|
5
|
+
import { MaterialDefines } from "@babylonjs/core/Materials/materialDefines.js";
|
|
6
|
+
import { MaterialHelper } from "@babylonjs/core/Materials/materialHelper.js";
|
|
7
|
+
import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
|
|
8
|
+
import { VertexBuffer } from "@babylonjs/core/Buffers/buffer.js";
|
|
9
|
+
import { RegisterClass } from "@babylonjs/core/Misc/typeStore.js";
|
|
10
|
+
import { Color4 } from "@babylonjs/core/Maths/math.color.js";
|
|
11
|
+
import { EffectFallbacks } from "@babylonjs/core/Materials/effectFallbacks.js";
|
|
12
|
+
import { Constants } from "@babylonjs/core/Engines/constants.js";
|
|
13
|
+
import "./shaders/mrdlSliderThumb.fragment.js";
|
|
14
|
+
import "./shaders/mrdlSliderThumb.vertex.js";
|
|
15
|
+
/** @hidden */
|
|
16
|
+
var MRDLSliderThumbMaterialDefines = /** @class */ (function (_super) {
|
|
17
|
+
__extends(MRDLSliderThumbMaterialDefines, _super);
|
|
18
|
+
function MRDLSliderThumbMaterialDefines() {
|
|
19
|
+
var _this = _super.call(this) || this;
|
|
20
|
+
/*
|
|
21
|
+
"SKY_ENABLED", "BLOB_ENABLE_2", "IRIDESCENCE_ENABLED"
|
|
22
|
+
*/
|
|
23
|
+
_this.SKY_ENABLED = true;
|
|
24
|
+
_this.BLOB_ENABLE_2 = true;
|
|
25
|
+
_this.IRIDESCENCE_ENABLED = true;
|
|
26
|
+
_this._needNormals = true;
|
|
27
|
+
_this._needUVs = true;
|
|
28
|
+
_this.rebuild();
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
return MRDLSliderThumbMaterialDefines;
|
|
32
|
+
}(MaterialDefines));
|
|
33
|
+
/**
|
|
34
|
+
* Class used to render Slider Thumb material with MRDL
|
|
35
|
+
*/
|
|
36
|
+
var MRDLSliderThumbMaterial = /** @class */ (function (_super) {
|
|
37
|
+
__extends(MRDLSliderThumbMaterial, _super);
|
|
38
|
+
function MRDLSliderThumbMaterial(name, scene) {
|
|
39
|
+
var _this = _super.call(this, name, scene) || this;
|
|
40
|
+
/**
|
|
41
|
+
* Gets or sets the corner Radius on the slider thumb.
|
|
42
|
+
*/
|
|
43
|
+
_this.radius = 0.157;
|
|
44
|
+
/**
|
|
45
|
+
* Gets or sets the Bevel Front on the slider thumb.
|
|
46
|
+
*/
|
|
47
|
+
_this.bevelFront = 0.065;
|
|
48
|
+
/**
|
|
49
|
+
* Gets or sets the Bevel Front Stretch on the slider thumb.
|
|
50
|
+
*/
|
|
51
|
+
_this.bevelFrontStretch = 0.077;
|
|
52
|
+
/**
|
|
53
|
+
* Gets or sets the Bevel Back on the slider thumb.
|
|
54
|
+
*/
|
|
55
|
+
_this.bevelBack = 0.031;
|
|
56
|
+
/**
|
|
57
|
+
* Gets or sets the Bevel Back Stretch on the slider thumb.
|
|
58
|
+
*/
|
|
59
|
+
_this.bevelBackStretch = 0;
|
|
60
|
+
/**
|
|
61
|
+
* Gets or sets the top left Radii Multiplier.
|
|
62
|
+
*/
|
|
63
|
+
_this.radiusTopLeft = 1.0;
|
|
64
|
+
/**
|
|
65
|
+
* Gets or sets the top left Radii Multiplier.
|
|
66
|
+
*/
|
|
67
|
+
_this.radiusTopRight = 1.0;
|
|
68
|
+
/**
|
|
69
|
+
* Gets or sets the top left Radii Multiplier.
|
|
70
|
+
*/
|
|
71
|
+
_this.radiusBottomLeft = 1.0;
|
|
72
|
+
/**
|
|
73
|
+
* Gets or sets the top left Radii Multiplier.
|
|
74
|
+
*/
|
|
75
|
+
_this.radiusBottomRight = 1.0;
|
|
76
|
+
/**
|
|
77
|
+
* Gets or sets whether Bulge is enabled.
|
|
78
|
+
* Default is false.
|
|
79
|
+
*/
|
|
80
|
+
_this.bulgeEnabled = false;
|
|
81
|
+
/**
|
|
82
|
+
* Gets or sets the Bulge Height.
|
|
83
|
+
*/
|
|
84
|
+
_this.bulgeHeight = -0.323;
|
|
85
|
+
/**
|
|
86
|
+
* Gets or sets the Bulge Radius.
|
|
87
|
+
*/
|
|
88
|
+
_this.bulgeRadius = 0.73;
|
|
89
|
+
/**
|
|
90
|
+
* Gets or sets the Sun Intensity.
|
|
91
|
+
*/
|
|
92
|
+
_this.sunIntensity = 2;
|
|
93
|
+
/**
|
|
94
|
+
* Gets or sets the Sun Theta.
|
|
95
|
+
*/
|
|
96
|
+
_this.sunTheta = 0.937;
|
|
97
|
+
/**
|
|
98
|
+
* Gets or sets the Sun Phi.
|
|
99
|
+
*/
|
|
100
|
+
_this.sunPhi = 0.555;
|
|
101
|
+
/**
|
|
102
|
+
* Gets or sets the Indirect Diffuse.
|
|
103
|
+
*/
|
|
104
|
+
_this.indirectDiffuse = 1;
|
|
105
|
+
/**
|
|
106
|
+
* Gets or sets the base albedo.
|
|
107
|
+
*/
|
|
108
|
+
_this.albedo = new Color4(0.0117647, 0.505882, 0.996078, 1);
|
|
109
|
+
/**
|
|
110
|
+
* Gets or sets the Specular value.
|
|
111
|
+
*/
|
|
112
|
+
_this.specular = 0;
|
|
113
|
+
/**
|
|
114
|
+
* Gets or sets the Shininess value.
|
|
115
|
+
*/
|
|
116
|
+
_this.shininess = 10;
|
|
117
|
+
/**
|
|
118
|
+
* Gets or sets the Sharpness value.
|
|
119
|
+
*/
|
|
120
|
+
_this.sharpness = 0;
|
|
121
|
+
/**
|
|
122
|
+
* Gets or sets the Subsurface value.
|
|
123
|
+
*/
|
|
124
|
+
_this.subsurface = 0.31;
|
|
125
|
+
/**
|
|
126
|
+
* Gets or sets the left gradient color.
|
|
127
|
+
*/
|
|
128
|
+
_this.leftGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);
|
|
129
|
+
/**
|
|
130
|
+
* Gets or sets the right gradient color.
|
|
131
|
+
*/
|
|
132
|
+
_this.rightGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);
|
|
133
|
+
/**
|
|
134
|
+
* Gets or sets the reflection value.
|
|
135
|
+
*/
|
|
136
|
+
_this.reflection = 0.749;
|
|
137
|
+
/**
|
|
138
|
+
* Gets or sets the front reflect value.
|
|
139
|
+
*/
|
|
140
|
+
_this.frontReflect = 0;
|
|
141
|
+
/**
|
|
142
|
+
* Gets or sets the edge reflect value.
|
|
143
|
+
*/
|
|
144
|
+
_this.edgeReflect = 0.09;
|
|
145
|
+
/**
|
|
146
|
+
* Gets or sets the power value.
|
|
147
|
+
*/
|
|
148
|
+
_this.power = 8.1;
|
|
149
|
+
/**
|
|
150
|
+
* Gets or sets the sky color.
|
|
151
|
+
*/
|
|
152
|
+
_this.skyColor = new Color4(0.0117647, 0.960784, 0.996078, 1);
|
|
153
|
+
/**
|
|
154
|
+
* Gets or sets the horizon color.
|
|
155
|
+
*/
|
|
156
|
+
_this.horizonColor = new Color4(0.0117647, 0.333333, 0.996078, 1);
|
|
157
|
+
/**
|
|
158
|
+
* Gets or sets the ground color.
|
|
159
|
+
*/
|
|
160
|
+
_this.groundColor = new Color4(0, 0.254902, 0.996078, 1);
|
|
161
|
+
/**
|
|
162
|
+
* Gets or sets the horizon power value.
|
|
163
|
+
*/
|
|
164
|
+
_this.horizonPower = 1;
|
|
165
|
+
/**
|
|
166
|
+
* Gets or sets the finger occlusion width value.
|
|
167
|
+
*/
|
|
168
|
+
_this.width = 0.02;
|
|
169
|
+
/**
|
|
170
|
+
* Gets or sets the finger occlusion fuzz value.
|
|
171
|
+
*/
|
|
172
|
+
_this.fuzz = 0.5;
|
|
173
|
+
/**
|
|
174
|
+
* Gets or sets the minimum finger occlusion fuzz value.
|
|
175
|
+
*/
|
|
176
|
+
_this.minFuzz = 0.001;
|
|
177
|
+
/**
|
|
178
|
+
* Gets or sets the finger occlusion clip fade value.
|
|
179
|
+
*/
|
|
180
|
+
_this.clipFade = 0.01;
|
|
181
|
+
/**
|
|
182
|
+
* Gets or sets the hue shift value.
|
|
183
|
+
*/
|
|
184
|
+
_this.hueShift = 0;
|
|
185
|
+
/**
|
|
186
|
+
* Gets or sets the saturation shift value.
|
|
187
|
+
*/
|
|
188
|
+
_this.saturationShift = 0;
|
|
189
|
+
/**
|
|
190
|
+
* Gets or sets the value shift.
|
|
191
|
+
*/
|
|
192
|
+
_this.valueShift = 0;
|
|
193
|
+
/**
|
|
194
|
+
* Gets or sets the position of the hover glow effect.
|
|
195
|
+
*/
|
|
196
|
+
_this.blobPosition = new Vector3(0, 0, 0.1);
|
|
197
|
+
/**
|
|
198
|
+
* Gets or sets the intensity of the hover glow effect.
|
|
199
|
+
*/
|
|
200
|
+
_this.blobIntensity = 0.5;
|
|
201
|
+
/**
|
|
202
|
+
* Gets or sets the near size of the hover glow effect.
|
|
203
|
+
*/
|
|
204
|
+
_this.blobNearSize = 0.01;
|
|
205
|
+
/**
|
|
206
|
+
* Gets or sets the far size of the hover glow effect.
|
|
207
|
+
*/
|
|
208
|
+
_this.blobFarSize = 0.03;
|
|
209
|
+
/**
|
|
210
|
+
* Gets or sets the distance considered "near" to the mesh, which controls the size of the hover glow effect (see blobNearSize).
|
|
211
|
+
*/
|
|
212
|
+
_this.blobNearDistance = 0;
|
|
213
|
+
/**
|
|
214
|
+
* Gets or sets the distance considered "far" from the mesh, which controls the size of the hover glow effect (see blobFarSize).
|
|
215
|
+
*/
|
|
216
|
+
_this.blobFarDistance = 0.08;
|
|
217
|
+
/**
|
|
218
|
+
* Gets or sets the length of the hover glow effect fade.
|
|
219
|
+
*/
|
|
220
|
+
_this.blobFadeLength = 0.576;
|
|
221
|
+
/**
|
|
222
|
+
* Gets or sets the progress of the hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0).
|
|
223
|
+
*/
|
|
224
|
+
_this.blobPulse = 0;
|
|
225
|
+
/**
|
|
226
|
+
* Gets or sets the opacity of the hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0.
|
|
227
|
+
*/
|
|
228
|
+
_this.blobFade = 1;
|
|
229
|
+
/**
|
|
230
|
+
* Gets or sets the position of the hover glow effect.
|
|
231
|
+
*/
|
|
232
|
+
_this.blobPosition2 = new Vector3(0.2, 0, 0.1);
|
|
233
|
+
/**
|
|
234
|
+
* Gets or sets the size of the hover glow effect when the right pointer is considered "near" to the mesh (see blobNearDistance).
|
|
235
|
+
*/
|
|
236
|
+
_this.blobNearSize2 = 0.01;
|
|
237
|
+
/**
|
|
238
|
+
* Gets or sets the progress of the hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0).
|
|
239
|
+
*/
|
|
240
|
+
_this.blobPulse2 = 0;
|
|
241
|
+
/**
|
|
242
|
+
* Gets or sets the opacity of the hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 1.
|
|
243
|
+
*/
|
|
244
|
+
_this.blobFade2 = 1;
|
|
245
|
+
/**
|
|
246
|
+
* Gets or sets the texture of the hover glow effect.
|
|
247
|
+
*/
|
|
248
|
+
_this.blobTexture = new Texture("", _this.getScene());
|
|
249
|
+
/**
|
|
250
|
+
* Gets or sets the finger position for left index.
|
|
251
|
+
*/
|
|
252
|
+
_this.leftIndexPosition = new Vector3(0, 0, 1);
|
|
253
|
+
/**
|
|
254
|
+
* Gets or sets the finger position for right index.
|
|
255
|
+
*/
|
|
256
|
+
_this.rightIndexPosition = new Vector3(-1, -1, -1);
|
|
257
|
+
/**
|
|
258
|
+
* Gets or sets the finger position for left index middle position.
|
|
259
|
+
*/
|
|
260
|
+
_this.leftIndexMiddlePosition = new Vector3(0, 0, 0);
|
|
261
|
+
/**
|
|
262
|
+
* Gets or sets the finger position for right index middle position.
|
|
263
|
+
*/
|
|
264
|
+
_this.rightIndexMiddlePosition = new Vector3(0, 0, 0);
|
|
265
|
+
/**
|
|
266
|
+
* Gets or sets the Decal Scle for XY.
|
|
267
|
+
*/
|
|
268
|
+
_this.decalScaleXY = new Vector2(1.5, 1.5);
|
|
269
|
+
/**
|
|
270
|
+
* Gets or sets decalFrontOnly
|
|
271
|
+
* Default is true
|
|
272
|
+
*/
|
|
273
|
+
_this.decalFrontOnly = true;
|
|
274
|
+
/**
|
|
275
|
+
* Gets or sets the Rim Light intensity.
|
|
276
|
+
*/
|
|
277
|
+
_this.rimIntensity = 0.287;
|
|
278
|
+
/**
|
|
279
|
+
* Gets or sets the Rim Light hue shift value.
|
|
280
|
+
*/
|
|
281
|
+
_this.rimHueShift = 0;
|
|
282
|
+
/**
|
|
283
|
+
* Gets or sets the Rim Light saturation shift value.
|
|
284
|
+
*/
|
|
285
|
+
_this.rimSaturationShift = 0;
|
|
286
|
+
/**
|
|
287
|
+
* Gets or sets the Rim Light value shift.
|
|
288
|
+
*/
|
|
289
|
+
_this.rimValueShift = -1;
|
|
290
|
+
/**
|
|
291
|
+
* Gets or sets the intensity of the iridescence effect.
|
|
292
|
+
*/
|
|
293
|
+
_this.iridescenceIntensity = 0;
|
|
294
|
+
/**
|
|
295
|
+
* @hidden
|
|
296
|
+
*/
|
|
297
|
+
_this.useGlobalLeftIndex = 1.0;
|
|
298
|
+
/**
|
|
299
|
+
* @hidden
|
|
300
|
+
*/
|
|
301
|
+
_this.useGlobalRightIndex = 1.0;
|
|
302
|
+
/**
|
|
303
|
+
* @hidden
|
|
304
|
+
*/
|
|
305
|
+
_this.globalLeftIndexTipProximity = 0.0;
|
|
306
|
+
/**
|
|
307
|
+
* @hidden
|
|
308
|
+
*/
|
|
309
|
+
_this.globalRightIndexTipProximity = 0.0;
|
|
310
|
+
/**
|
|
311
|
+
* @hidden
|
|
312
|
+
*/
|
|
313
|
+
_this.globalLeftIndexTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);
|
|
314
|
+
/**
|
|
315
|
+
* @hidden
|
|
316
|
+
*/
|
|
317
|
+
_this.globaRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);
|
|
318
|
+
/**
|
|
319
|
+
* @hidden
|
|
320
|
+
*/
|
|
321
|
+
_this.globalLeftThumbTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);
|
|
322
|
+
/**
|
|
323
|
+
* @hidden
|
|
324
|
+
*/
|
|
325
|
+
_this.globalRightThumbTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);
|
|
326
|
+
/**
|
|
327
|
+
* @hidden
|
|
328
|
+
*/
|
|
329
|
+
_this.globalLeftIndexMiddlePosition = new Vector4(0.5, 0.0, -0.55, 1.0);
|
|
330
|
+
/**
|
|
331
|
+
* @hidden
|
|
332
|
+
*/
|
|
333
|
+
_this.globalRightIndexMiddlePosition = new Vector4(0.0, 0.0, 0.0, 1.0);
|
|
334
|
+
_this.alphaMode = Constants.ALPHA_DISABLE;
|
|
335
|
+
_this.backFaceCulling = false;
|
|
336
|
+
_this._blueGradientTexture = new Texture(MRDLSliderThumbMaterial.BLUE_GRADIENT_TEXTURE_URL, scene, true, false, Texture.NEAREST_SAMPLINGMODE);
|
|
337
|
+
return _this;
|
|
338
|
+
}
|
|
339
|
+
MRDLSliderThumbMaterial.prototype.needAlphaBlending = function () {
|
|
340
|
+
return false;
|
|
341
|
+
};
|
|
342
|
+
MRDLSliderThumbMaterial.prototype.needAlphaTesting = function () {
|
|
343
|
+
return false;
|
|
344
|
+
};
|
|
345
|
+
MRDLSliderThumbMaterial.prototype.getAlphaTestTexture = function () {
|
|
346
|
+
return null;
|
|
347
|
+
};
|
|
348
|
+
// Methods
|
|
349
|
+
MRDLSliderThumbMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) {
|
|
350
|
+
if (this.isFrozen) {
|
|
351
|
+
if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {
|
|
352
|
+
return true;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
if (!subMesh.materialDefines) {
|
|
356
|
+
subMesh.materialDefines = new MRDLSliderThumbMaterialDefines();
|
|
357
|
+
}
|
|
358
|
+
var defines = subMesh.materialDefines;
|
|
359
|
+
var scene = this.getScene();
|
|
360
|
+
if (this._isReadyForSubMesh(subMesh)) {
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
var engine = scene.getEngine();
|
|
364
|
+
// Attribs
|
|
365
|
+
MaterialHelper.PrepareDefinesForAttributes(mesh, defines, false, false);
|
|
366
|
+
// Get correct effect
|
|
367
|
+
if (defines.isDirty) {
|
|
368
|
+
defines.markAsProcessed();
|
|
369
|
+
scene.resetCachedMaterial();
|
|
370
|
+
// Fallbacks
|
|
371
|
+
var fallbacks = new EffectFallbacks();
|
|
372
|
+
if (defines.FOG) {
|
|
373
|
+
fallbacks.addFallback(1, "FOG");
|
|
374
|
+
}
|
|
375
|
+
MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);
|
|
376
|
+
defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
|
|
377
|
+
//Attributes
|
|
378
|
+
var attribs = [VertexBuffer.PositionKind];
|
|
379
|
+
if (defines.NORMAL) {
|
|
380
|
+
attribs.push(VertexBuffer.NormalKind);
|
|
381
|
+
}
|
|
382
|
+
if (defines.UV1) {
|
|
383
|
+
attribs.push(VertexBuffer.UVKind);
|
|
384
|
+
}
|
|
385
|
+
if (defines.UV2) {
|
|
386
|
+
attribs.push(VertexBuffer.UV2Kind);
|
|
387
|
+
}
|
|
388
|
+
if (defines.VERTEXCOLOR) {
|
|
389
|
+
attribs.push(VertexBuffer.ColorKind);
|
|
390
|
+
}
|
|
391
|
+
if (defines.TANGENT) {
|
|
392
|
+
attribs.push(VertexBuffer.TangentKind);
|
|
393
|
+
}
|
|
394
|
+
MaterialHelper.PrepareAttributesForInstances(attribs, defines);
|
|
395
|
+
// Legacy browser patch
|
|
396
|
+
var shaderName = "mrdlSliderThumb";
|
|
397
|
+
var join = defines.toString();
|
|
398
|
+
var uniforms = [
|
|
399
|
+
"world", "viewProjection", "cameraPosition",
|
|
400
|
+
"_Radius_", "_Bevel_Front_", "_Bevel_Front_Stretch_", "_Bevel_Back_", "_Bevel_Back_Stretch_",
|
|
401
|
+
"_Radius_Top_Left_", "_Radius_Top_Right_", "_Radius_Bottom_Left_", "_Radius_Bottom_Right_",
|
|
402
|
+
"_Bulge_Enabled_", "_Bulge_Height_", "_Bulge_Radius_", "_Sun_Intensity_", "_Sun_Theta_", "_Sun_Phi_",
|
|
403
|
+
"_Indirect_Diffuse_", "_Albedo_", "_Specular_", "_Shininess_", "_Sharpness_", "_Subsurface_",
|
|
404
|
+
"_Left_Color_", "_Right_Color_", "_Reflection_", "_Front_Reflect_", "_Edge_Reflect_", "_Power_",
|
|
405
|
+
"_Sky_Color_", "_Horizon_Color_", "_Ground_Color_", "_Horizon_Power_", "_Reflection_Map_",
|
|
406
|
+
"_Indirect_Environment_", "_Width_", "_Fuzz_", "_Min_Fuzz_", "_Clip_Fade_", "_Hue_Shift_", "_Saturation_Shift_",
|
|
407
|
+
"_Value_Shift_", "_Blob_Position_", "_Blob_Intensity_", "_Blob_Near_Size_", "_Blob_Far_Size_",
|
|
408
|
+
"_Blob_Near_Distance_", "_Blob_Far_Distance_", "_Blob_Fade_Length_", "_Blob_Pulse_", "_Blob_Fade_",
|
|
409
|
+
"_Blob_Texture_", "_Blob_Position_2_", "_Blob_Near_Size_2_", "_Blob_Pulse_2_", "_Blob_Fade_2_",
|
|
410
|
+
"_Left_Index_Pos_", "_Right_Index_Pos_", "_Left_Index_Middle_Pos_", "_Right_Index_Middle_Pos_",
|
|
411
|
+
"_Decal_", "_Decal_Scale_XY_", "_Decal_Front_Only_", "_Rim_Intensity_", "_Rim_Texture_", "_Rim_Hue_Shift_",
|
|
412
|
+
"_Rim_Saturation_Shift_", "_Rim_Value_Shift_", "_Iridescence_Intensity_", "_Iridescence_Texture_",
|
|
413
|
+
"Use_Global_Left_Index", "Use_Global_Right_Index", "Global_Left_Index_Tip_Position", "Global_Right_Index_Tip_Position",
|
|
414
|
+
"Global_Left_Thumb_Tip_Position", "Global_Right_Thumb_Tip_Position", "Global_Left_Index_Middle_Position;", "Global_Right_Index_Middle_Position", "Global_Left_Index_Tip_Proximity", "Global_Right_Index_Tip_Proximity"
|
|
415
|
+
];
|
|
416
|
+
var samplers = ["_Rim_Texture_", "_Iridescence_Texture_"];
|
|
417
|
+
var uniformBuffers = new Array();
|
|
418
|
+
MaterialHelper.PrepareUniformsAndSamplersList({
|
|
419
|
+
uniformsNames: uniforms,
|
|
420
|
+
uniformBuffersNames: uniformBuffers,
|
|
421
|
+
samplers: samplers,
|
|
422
|
+
defines: defines,
|
|
423
|
+
maxSimultaneousLights: 4
|
|
424
|
+
});
|
|
425
|
+
subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
|
|
426
|
+
attributes: attribs,
|
|
427
|
+
uniformsNames: uniforms,
|
|
428
|
+
uniformBuffersNames: uniformBuffers,
|
|
429
|
+
samplers: samplers,
|
|
430
|
+
defines: join,
|
|
431
|
+
fallbacks: fallbacks,
|
|
432
|
+
onCompiled: this.onCompiled,
|
|
433
|
+
onError: this.onError,
|
|
434
|
+
indexParameters: { maxSimultaneousLights: 4 }
|
|
435
|
+
}, engine), defines);
|
|
436
|
+
}
|
|
437
|
+
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
defines._renderId = scene.getRenderId();
|
|
441
|
+
subMesh.effect._wasPreviouslyReady = true;
|
|
442
|
+
return true;
|
|
443
|
+
};
|
|
444
|
+
MRDLSliderThumbMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) {
|
|
445
|
+
var defines = subMesh.materialDefines;
|
|
446
|
+
if (!defines) {
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
var effect = subMesh.effect;
|
|
450
|
+
if (!effect) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
this._activeEffect = effect;
|
|
454
|
+
// Matrices
|
|
455
|
+
this.bindOnlyWorldMatrix(world);
|
|
456
|
+
this._activeEffect.setMatrix("viewProjection", this.getScene().getTransformMatrix());
|
|
457
|
+
this._activeEffect.setVector3("cameraPosition", this.getScene().activeCamera.position);
|
|
458
|
+
// "Round Rect"
|
|
459
|
+
this._activeEffect.setFloat("_Radius_", this.radius);
|
|
460
|
+
this._activeEffect.setFloat("_Bevel_Front_", this.bevelFront);
|
|
461
|
+
this._activeEffect.setFloat("_Bevel_Front_Stretch_", this.bevelFrontStretch);
|
|
462
|
+
this._activeEffect.setFloat("_Bevel_Back_", this.bevelBack);
|
|
463
|
+
this._activeEffect.setFloat("_Bevel_Back_Stretch_", this.bevelBackStretch);
|
|
464
|
+
// "Radii Multipliers"
|
|
465
|
+
this._activeEffect.setFloat("_Radius_Top_Left_", this.radiusTopLeft);
|
|
466
|
+
this._activeEffect.setFloat("_Radius_Top_Right_", this.radiusTopRight);
|
|
467
|
+
this._activeEffect.setFloat("_Radius_Bottom_Left_", this.radiusBottomLeft);
|
|
468
|
+
this._activeEffect.setFloat("_Radius_Bottom_Right_", this.radiusBottomRight);
|
|
469
|
+
// "Bulge"
|
|
470
|
+
this._activeEffect.setFloat("_Bulge_Enabled_", this.bulgeEnabled ? 1.0 : 0.0);
|
|
471
|
+
this._activeEffect.setFloat("_Bulge_Height_", this.bulgeHeight);
|
|
472
|
+
this._activeEffect.setFloat("_Bulge_Radius_", this.bulgeRadius);
|
|
473
|
+
// "Sun"
|
|
474
|
+
this._activeEffect.setFloat("_Sun_Intensity_", this.sunIntensity);
|
|
475
|
+
this._activeEffect.setFloat("_Sun_Theta_", this.sunTheta);
|
|
476
|
+
this._activeEffect.setFloat("_Sun_Phi_", this.sunPhi);
|
|
477
|
+
this._activeEffect.setFloat("_Indirect_Diffuse_", this.indirectDiffuse);
|
|
478
|
+
// "Diffuse And Specular"
|
|
479
|
+
this._activeEffect.setDirectColor4("_Albedo_", this.albedo);
|
|
480
|
+
this._activeEffect.setFloat("_Specular_", this.specular);
|
|
481
|
+
this._activeEffect.setFloat("_Shininess_", this.shininess);
|
|
482
|
+
this._activeEffect.setFloat("_Sharpness_", this.sharpness);
|
|
483
|
+
this._activeEffect.setFloat("_Subsurface_", this.subsurface);
|
|
484
|
+
// "Gradient"
|
|
485
|
+
this._activeEffect.setDirectColor4("_Left_Color_", this.leftGradientColor);
|
|
486
|
+
this._activeEffect.setDirectColor4("_Right_Color_", this.rightGradientColor);
|
|
487
|
+
// "Reflection"
|
|
488
|
+
this._activeEffect.setFloat("_Reflection_", this.reflection);
|
|
489
|
+
this._activeEffect.setFloat("_Front_Reflect_", this.frontReflect);
|
|
490
|
+
this._activeEffect.setFloat("_Edge_Reflect_", this.edgeReflect);
|
|
491
|
+
this._activeEffect.setFloat("_Power_", this.power);
|
|
492
|
+
// "Sky Environment"
|
|
493
|
+
//define SKY_ENABLED true;
|
|
494
|
+
this._activeEffect.setDirectColor4("_Sky_Color_", this.skyColor);
|
|
495
|
+
this._activeEffect.setDirectColor4("_Horizon_Color_", this.horizonColor);
|
|
496
|
+
this._activeEffect.setDirectColor4("_Ground_Color_", this.groundColor);
|
|
497
|
+
this._activeEffect.setFloat("_Horizon_Power_", this.horizonPower);
|
|
498
|
+
// "Mapped Environment"
|
|
499
|
+
//define ENV_ENABLE false;
|
|
500
|
+
this._activeEffect.setTexture("_Reflection_Map_", new Texture("", this.getScene()));
|
|
501
|
+
this._activeEffect.setTexture("_Indirect_Environment_", new Texture("", this.getScene()));
|
|
502
|
+
// "FingerOcclusion"
|
|
503
|
+
//define OCCLUSION_ENABLED false;
|
|
504
|
+
this._activeEffect.setFloat("_Width_", this.width);
|
|
505
|
+
this._activeEffect.setFloat("_Fuzz_", this.fuzz);
|
|
506
|
+
this._activeEffect.setFloat("_Min_Fuzz_", this.minFuzz);
|
|
507
|
+
this._activeEffect.setFloat("_Clip_Fade_", this.clipFade);
|
|
508
|
+
// "View Based Color Shift"
|
|
509
|
+
this._activeEffect.setFloat("_Hue_Shift_", this.hueShift);
|
|
510
|
+
this._activeEffect.setFloat("_Saturation_Shift_", this.saturationShift);
|
|
511
|
+
this._activeEffect.setFloat("_Value_Shift_", this.valueShift);
|
|
512
|
+
// "Blob"
|
|
513
|
+
//define BLOB_ENABLE false;
|
|
514
|
+
this._activeEffect.setVector3("_Blob_Position_", this.blobPosition);
|
|
515
|
+
this._activeEffect.setFloat("_Blob_Intensity_", this.blobIntensity);
|
|
516
|
+
this._activeEffect.setFloat("_Blob_Near_Size_", this.blobNearSize);
|
|
517
|
+
this._activeEffect.setFloat("_Blob_Far_Size_", this.blobFarSize);
|
|
518
|
+
this._activeEffect.setFloat("_Blob_Near_Distance_", this.blobNearDistance);
|
|
519
|
+
this._activeEffect.setFloat("_Blob_Far_Distance_", this.blobFarDistance);
|
|
520
|
+
this._activeEffect.setFloat("_Blob_Fade_Length_", this.blobFadeLength);
|
|
521
|
+
this._activeEffect.setFloat("_Blob_Pulse_", this.blobPulse);
|
|
522
|
+
this._activeEffect.setFloat("_Blob_Fade_", this.blobFade);
|
|
523
|
+
// "Blob Texture"
|
|
524
|
+
this._activeEffect.setTexture("_Blob_Texture_", this.blobTexture);
|
|
525
|
+
// "Blob 2"
|
|
526
|
+
//define BLOB_ENABLE_2 true;
|
|
527
|
+
this._activeEffect.setVector3("_Blob_Position_2_", this.blobPosition2);
|
|
528
|
+
this._activeEffect.setFloat("_Blob_Near_Size_2_", this.blobNearSize2);
|
|
529
|
+
this._activeEffect.setFloat("_Blob_Pulse_2_", this.blobPulse2);
|
|
530
|
+
this._activeEffect.setFloat("_Blob_Fade_2_", this.blobFade2);
|
|
531
|
+
// "Finger Positions"
|
|
532
|
+
this._activeEffect.setVector3("_Left_Index_Pos_", this.leftIndexPosition);
|
|
533
|
+
this._activeEffect.setVector3("_Right_Index_Pos_", this.rightIndexPosition);
|
|
534
|
+
this._activeEffect.setVector3("_Left_Index_Middle_Pos_", this.leftIndexMiddlePosition);
|
|
535
|
+
this._activeEffect.setVector3("_Right_Index_Middle_Pos_", this.rightIndexMiddlePosition);
|
|
536
|
+
// "Decal Texture"
|
|
537
|
+
//define DECAL_ENABLE false;
|
|
538
|
+
this._activeEffect.setTexture("_Decal_", new Texture("", this.getScene()));
|
|
539
|
+
this._activeEffect.setVector2("_Decal_Scale_XY_", this.decalScaleXY);
|
|
540
|
+
this._activeEffect.setFloat("_Decal_Front_Only_", this.decalFrontOnly ? 1.0 : 0.0);
|
|
541
|
+
// "Rim Light"
|
|
542
|
+
this._activeEffect.setFloat("_Rim_Intensity_", this.rimIntensity);
|
|
543
|
+
this._activeEffect.setTexture("_Rim_Texture_", this._blueGradientTexture);
|
|
544
|
+
this._activeEffect.setFloat("_Rim_Hue_Shift_", this.rimHueShift);
|
|
545
|
+
this._activeEffect.setFloat("_Rim_Saturation_Shift_", this.rimSaturationShift);
|
|
546
|
+
this._activeEffect.setFloat("_Rim_Value_Shift_", this.rimValueShift);
|
|
547
|
+
// "Iridescence"
|
|
548
|
+
//define IRIDESCENCE_ENABLED true;
|
|
549
|
+
this._activeEffect.setFloat("_Iridescence_Intensity_", this.iridescenceIntensity);
|
|
550
|
+
this._activeEffect.setTexture("_Iridescence_Texture_", this._blueGradientTexture);
|
|
551
|
+
// Global inputs
|
|
552
|
+
this._activeEffect.setFloat("Use_Global_Left_Index", this.useGlobalLeftIndex);
|
|
553
|
+
this._activeEffect.setFloat("Use_Global_Right_Index", this.useGlobalRightIndex);
|
|
554
|
+
this._activeEffect.setVector4("Global_Left_Index_Tip_Position", this.globalLeftIndexTipPosition);
|
|
555
|
+
this._activeEffect.setVector4("Global_Right_Index_Tip_Position", this.globaRightIndexTipPosition);
|
|
556
|
+
this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position", this.globalLeftThumbTipPosition);
|
|
557
|
+
this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position", this.globalRightThumbTipPosition);
|
|
558
|
+
this._activeEffect.setVector4("Global_Left_Index_Middle_Position", this.globalLeftIndexMiddlePosition);
|
|
559
|
+
this._activeEffect.setVector4("Global_Right_Index_Middle_Position", this.globalRightIndexMiddlePosition);
|
|
560
|
+
this._activeEffect.setFloat("Global_Left_Index_Tip_Proximity", this.globalLeftIndexTipProximity);
|
|
561
|
+
this._activeEffect.setFloat("Global_Right_Index_Tip_Proximity", this.globalRightIndexTipProximity);
|
|
562
|
+
this._afterBind(mesh, this._activeEffect);
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* Get the list of animatables in the material.
|
|
566
|
+
* @returns the list of animatables object used in the material
|
|
567
|
+
*/
|
|
568
|
+
MRDLSliderThumbMaterial.prototype.getAnimatables = function () {
|
|
569
|
+
return [];
|
|
570
|
+
};
|
|
571
|
+
MRDLSliderThumbMaterial.prototype.dispose = function (forceDisposeEffect) {
|
|
572
|
+
_super.prototype.dispose.call(this, forceDisposeEffect);
|
|
573
|
+
};
|
|
574
|
+
MRDLSliderThumbMaterial.prototype.clone = function (name) {
|
|
575
|
+
var _this = this;
|
|
576
|
+
return SerializationHelper.Clone(function () { return new MRDLSliderThumbMaterial(name, _this.getScene()); }, this);
|
|
577
|
+
};
|
|
578
|
+
MRDLSliderThumbMaterial.prototype.serialize = function () {
|
|
579
|
+
var serializationObject = SerializationHelper.Serialize(this);
|
|
580
|
+
serializationObject.customType = "BABYLON.MRDLSliderThumbMaterial";
|
|
581
|
+
return serializationObject;
|
|
582
|
+
};
|
|
583
|
+
MRDLSliderThumbMaterial.prototype.getClassName = function () {
|
|
584
|
+
return "MRDLSliderThumbMaterial";
|
|
585
|
+
};
|
|
586
|
+
// Statics
|
|
587
|
+
MRDLSliderThumbMaterial.Parse = function (source, scene, rootUrl) {
|
|
588
|
+
return SerializationHelper.Parse(function () { return new MRDLSliderThumbMaterial(source.name, scene); }, source, scene, rootUrl);
|
|
589
|
+
};
|
|
590
|
+
/**
|
|
591
|
+
* URL pointing to the texture used to define the coloring for the Iridescent Map effect.
|
|
592
|
+
*/
|
|
593
|
+
MRDLSliderThumbMaterial.BLUE_GRADIENT_TEXTURE_URL = "https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-blue-gradient.png";
|
|
594
|
+
__decorate([
|
|
595
|
+
serialize()
|
|
596
|
+
], MRDLSliderThumbMaterial.prototype, "radius", void 0);
|
|
597
|
+
__decorate([
|
|
598
|
+
serialize()
|
|
599
|
+
], MRDLSliderThumbMaterial.prototype, "bevelFront", void 0);
|
|
600
|
+
__decorate([
|
|
601
|
+
serialize()
|
|
602
|
+
], MRDLSliderThumbMaterial.prototype, "bevelFrontStretch", void 0);
|
|
603
|
+
__decorate([
|
|
604
|
+
serialize()
|
|
605
|
+
], MRDLSliderThumbMaterial.prototype, "bevelBack", void 0);
|
|
606
|
+
__decorate([
|
|
607
|
+
serialize()
|
|
608
|
+
], MRDLSliderThumbMaterial.prototype, "bevelBackStretch", void 0);
|
|
609
|
+
__decorate([
|
|
610
|
+
serialize()
|
|
611
|
+
], MRDLSliderThumbMaterial.prototype, "radiusTopLeft", void 0);
|
|
612
|
+
__decorate([
|
|
613
|
+
serialize()
|
|
614
|
+
], MRDLSliderThumbMaterial.prototype, "radiusTopRight", void 0);
|
|
615
|
+
__decorate([
|
|
616
|
+
serialize()
|
|
617
|
+
], MRDLSliderThumbMaterial.prototype, "radiusBottomLeft", void 0);
|
|
618
|
+
__decorate([
|
|
619
|
+
serialize()
|
|
620
|
+
], MRDLSliderThumbMaterial.prototype, "radiusBottomRight", void 0);
|
|
621
|
+
__decorate([
|
|
622
|
+
serialize()
|
|
623
|
+
], MRDLSliderThumbMaterial.prototype, "bulgeEnabled", void 0);
|
|
624
|
+
__decorate([
|
|
625
|
+
serialize()
|
|
626
|
+
], MRDLSliderThumbMaterial.prototype, "bulgeHeight", void 0);
|
|
627
|
+
__decorate([
|
|
628
|
+
serialize()
|
|
629
|
+
], MRDLSliderThumbMaterial.prototype, "bulgeRadius", void 0);
|
|
630
|
+
__decorate([
|
|
631
|
+
serialize()
|
|
632
|
+
], MRDLSliderThumbMaterial.prototype, "sunIntensity", void 0);
|
|
633
|
+
__decorate([
|
|
634
|
+
serialize()
|
|
635
|
+
], MRDLSliderThumbMaterial.prototype, "sunTheta", void 0);
|
|
636
|
+
__decorate([
|
|
637
|
+
serialize()
|
|
638
|
+
], MRDLSliderThumbMaterial.prototype, "sunPhi", void 0);
|
|
639
|
+
__decorate([
|
|
640
|
+
serialize()
|
|
641
|
+
], MRDLSliderThumbMaterial.prototype, "indirectDiffuse", void 0);
|
|
642
|
+
__decorate([
|
|
643
|
+
serialize()
|
|
644
|
+
], MRDLSliderThumbMaterial.prototype, "albedo", void 0);
|
|
645
|
+
__decorate([
|
|
646
|
+
serialize()
|
|
647
|
+
], MRDLSliderThumbMaterial.prototype, "specular", void 0);
|
|
648
|
+
__decorate([
|
|
649
|
+
serialize()
|
|
650
|
+
], MRDLSliderThumbMaterial.prototype, "shininess", void 0);
|
|
651
|
+
__decorate([
|
|
652
|
+
serialize()
|
|
653
|
+
], MRDLSliderThumbMaterial.prototype, "sharpness", void 0);
|
|
654
|
+
__decorate([
|
|
655
|
+
serialize()
|
|
656
|
+
], MRDLSliderThumbMaterial.prototype, "subsurface", void 0);
|
|
657
|
+
__decorate([
|
|
658
|
+
serialize()
|
|
659
|
+
], MRDLSliderThumbMaterial.prototype, "leftGradientColor", void 0);
|
|
660
|
+
__decorate([
|
|
661
|
+
serialize()
|
|
662
|
+
], MRDLSliderThumbMaterial.prototype, "rightGradientColor", void 0);
|
|
663
|
+
__decorate([
|
|
664
|
+
serialize()
|
|
665
|
+
], MRDLSliderThumbMaterial.prototype, "reflection", void 0);
|
|
666
|
+
__decorate([
|
|
667
|
+
serialize()
|
|
668
|
+
], MRDLSliderThumbMaterial.prototype, "frontReflect", void 0);
|
|
669
|
+
__decorate([
|
|
670
|
+
serialize()
|
|
671
|
+
], MRDLSliderThumbMaterial.prototype, "edgeReflect", void 0);
|
|
672
|
+
__decorate([
|
|
673
|
+
serialize()
|
|
674
|
+
], MRDLSliderThumbMaterial.prototype, "power", void 0);
|
|
675
|
+
__decorate([
|
|
676
|
+
serialize()
|
|
677
|
+
], MRDLSliderThumbMaterial.prototype, "skyColor", void 0);
|
|
678
|
+
__decorate([
|
|
679
|
+
serialize()
|
|
680
|
+
], MRDLSliderThumbMaterial.prototype, "horizonColor", void 0);
|
|
681
|
+
__decorate([
|
|
682
|
+
serialize()
|
|
683
|
+
], MRDLSliderThumbMaterial.prototype, "groundColor", void 0);
|
|
684
|
+
__decorate([
|
|
685
|
+
serialize()
|
|
686
|
+
], MRDLSliderThumbMaterial.prototype, "horizonPower", void 0);
|
|
687
|
+
__decorate([
|
|
688
|
+
serialize()
|
|
689
|
+
], MRDLSliderThumbMaterial.prototype, "width", void 0);
|
|
690
|
+
__decorate([
|
|
691
|
+
serialize()
|
|
692
|
+
], MRDLSliderThumbMaterial.prototype, "fuzz", void 0);
|
|
693
|
+
__decorate([
|
|
694
|
+
serialize()
|
|
695
|
+
], MRDLSliderThumbMaterial.prototype, "minFuzz", void 0);
|
|
696
|
+
__decorate([
|
|
697
|
+
serialize()
|
|
698
|
+
], MRDLSliderThumbMaterial.prototype, "clipFade", void 0);
|
|
699
|
+
__decorate([
|
|
700
|
+
serialize()
|
|
701
|
+
], MRDLSliderThumbMaterial.prototype, "hueShift", void 0);
|
|
702
|
+
__decorate([
|
|
703
|
+
serialize()
|
|
704
|
+
], MRDLSliderThumbMaterial.prototype, "saturationShift", void 0);
|
|
705
|
+
__decorate([
|
|
706
|
+
serialize()
|
|
707
|
+
], MRDLSliderThumbMaterial.prototype, "valueShift", void 0);
|
|
708
|
+
__decorate([
|
|
709
|
+
serialize()
|
|
710
|
+
], MRDLSliderThumbMaterial.prototype, "blobPosition", void 0);
|
|
711
|
+
__decorate([
|
|
712
|
+
serialize()
|
|
713
|
+
], MRDLSliderThumbMaterial.prototype, "blobIntensity", void 0);
|
|
714
|
+
__decorate([
|
|
715
|
+
serialize()
|
|
716
|
+
], MRDLSliderThumbMaterial.prototype, "blobNearSize", void 0);
|
|
717
|
+
__decorate([
|
|
718
|
+
serialize()
|
|
719
|
+
], MRDLSliderThumbMaterial.prototype, "blobFarSize", void 0);
|
|
720
|
+
__decorate([
|
|
721
|
+
serialize()
|
|
722
|
+
], MRDLSliderThumbMaterial.prototype, "blobNearDistance", void 0);
|
|
723
|
+
__decorate([
|
|
724
|
+
serialize()
|
|
725
|
+
], MRDLSliderThumbMaterial.prototype, "blobFarDistance", void 0);
|
|
726
|
+
__decorate([
|
|
727
|
+
serialize()
|
|
728
|
+
], MRDLSliderThumbMaterial.prototype, "blobFadeLength", void 0);
|
|
729
|
+
__decorate([
|
|
730
|
+
serialize()
|
|
731
|
+
], MRDLSliderThumbMaterial.prototype, "blobPulse", void 0);
|
|
732
|
+
__decorate([
|
|
733
|
+
serialize()
|
|
734
|
+
], MRDLSliderThumbMaterial.prototype, "blobFade", void 0);
|
|
735
|
+
__decorate([
|
|
736
|
+
serialize()
|
|
737
|
+
], MRDLSliderThumbMaterial.prototype, "blobPosition2", void 0);
|
|
738
|
+
__decorate([
|
|
739
|
+
serialize()
|
|
740
|
+
], MRDLSliderThumbMaterial.prototype, "blobNearSize2", void 0);
|
|
741
|
+
__decorate([
|
|
742
|
+
serialize()
|
|
743
|
+
], MRDLSliderThumbMaterial.prototype, "blobPulse2", void 0);
|
|
744
|
+
__decorate([
|
|
745
|
+
serialize()
|
|
746
|
+
], MRDLSliderThumbMaterial.prototype, "blobFade2", void 0);
|
|
747
|
+
__decorate([
|
|
748
|
+
serialize()
|
|
749
|
+
], MRDLSliderThumbMaterial.prototype, "blobTexture", void 0);
|
|
750
|
+
__decorate([
|
|
751
|
+
serialize()
|
|
752
|
+
], MRDLSliderThumbMaterial.prototype, "leftIndexPosition", void 0);
|
|
753
|
+
__decorate([
|
|
754
|
+
serialize()
|
|
755
|
+
], MRDLSliderThumbMaterial.prototype, "rightIndexPosition", void 0);
|
|
756
|
+
__decorate([
|
|
757
|
+
serialize()
|
|
758
|
+
], MRDLSliderThumbMaterial.prototype, "leftIndexMiddlePosition", void 0);
|
|
759
|
+
__decorate([
|
|
760
|
+
serialize()
|
|
761
|
+
], MRDLSliderThumbMaterial.prototype, "rightIndexMiddlePosition", void 0);
|
|
762
|
+
__decorate([
|
|
763
|
+
serialize()
|
|
764
|
+
], MRDLSliderThumbMaterial.prototype, "decalScaleXY", void 0);
|
|
765
|
+
__decorate([
|
|
766
|
+
serialize()
|
|
767
|
+
], MRDLSliderThumbMaterial.prototype, "decalFrontOnly", void 0);
|
|
768
|
+
__decorate([
|
|
769
|
+
serialize()
|
|
770
|
+
], MRDLSliderThumbMaterial.prototype, "rimIntensity", void 0);
|
|
771
|
+
__decorate([
|
|
772
|
+
serialize()
|
|
773
|
+
], MRDLSliderThumbMaterial.prototype, "rimHueShift", void 0);
|
|
774
|
+
__decorate([
|
|
775
|
+
serialize()
|
|
776
|
+
], MRDLSliderThumbMaterial.prototype, "rimSaturationShift", void 0);
|
|
777
|
+
__decorate([
|
|
778
|
+
serialize()
|
|
779
|
+
], MRDLSliderThumbMaterial.prototype, "rimValueShift", void 0);
|
|
780
|
+
__decorate([
|
|
781
|
+
serialize()
|
|
782
|
+
], MRDLSliderThumbMaterial.prototype, "iridescenceIntensity", void 0);
|
|
783
|
+
return MRDLSliderThumbMaterial;
|
|
784
|
+
}(PushMaterial));
|
|
785
|
+
export { MRDLSliderThumbMaterial };
|
|
786
|
+
RegisterClass("BABYLON.GUI.MRDLSliderThumbMaterial", MRDLSliderThumbMaterial);
|
|
787
|
+
//# sourceMappingURL=mrdlSliderThumbMaterial.js.map
|