@sapui5/sap.ui.vk 1.136.1 → 1.139.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/package.json +1 -1
- package/src/sap/ui/vk/.library +9 -1
- package/src/sap/ui/vk/AnimationPlayback.js +1 -1
- package/src/sap/ui/vk/AnimationPlayer.js +2 -2
- package/src/sap/ui/vk/AnimationSequence.js +1 -1
- package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
- package/src/sap/ui/vk/AnimationTrack.js +1 -1
- package/src/sap/ui/vk/Annotation.js +2 -2
- package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/Camera.js +1 -1
- package/src/sap/ui/vk/ContentConnector.js +19 -15
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +3 -2
- package/src/sap/ui/vk/ContentType.js +1 -1
- package/src/sap/ui/vk/Core.js +1 -3
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +152 -19
- package/src/sap/ui/vk/DrawerToolbarButton.js +12 -1
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -2
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -2
- package/src/sap/ui/vk/Highlight.js +1 -1
- package/src/sap/ui/vk/ImageContentManager.js +1 -1
- package/src/sap/ui/vk/JointUtils.js +1 -1
- package/src/sap/ui/vk/LayerProxy.js +1 -1
- package/src/sap/ui/vk/LegendItem.js +1 -1
- package/src/sap/ui/vk/ListPanel.js +1 -1
- package/src/sap/ui/vk/ListPanelStack.js +1 -1
- package/src/sap/ui/vk/Loco.js +1 -1
- package/src/sap/ui/vk/Material.js +1 -1
- package/src/sap/ui/vk/NativeViewport.js +1 -1
- package/src/sap/ui/vk/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/NodeProxy.js +1 -1
- package/src/sap/ui/vk/NodeUtils.js +1 -1
- package/src/sap/ui/vk/Notifications.js +1 -1
- package/src/sap/ui/vk/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/OutputSettings.js +0 -1
- package/src/sap/ui/vk/Overlay.js +1 -1
- package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/ProgressIndicator.js +1 -1
- package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
- package/src/sap/ui/vk/RedlineConversation.js +1 -1
- package/src/sap/ui/vk/RedlineDesign.js +1 -1
- package/src/sap/ui/vk/RedlineElement.js +1 -1
- package/src/sap/ui/vk/RedlineElementComment.js +1 -1
- package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
- package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
- package/src/sap/ui/vk/RedlineElementLine.js +1 -1
- package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
- package/src/sap/ui/vk/RedlineElementText.js +1 -1
- package/src/sap/ui/vk/RedlineSurface.js +2 -2
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +16 -1
- package/src/sap/ui/vk/SceneTree.js +23 -9
- package/src/sap/ui/vk/StepNavigation.js +1 -2
- package/src/sap/ui/vk/Texture.js +2 -2
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +7 -4
- package/src/sap/ui/vk/ToggleMenuItemRenderer.js +224 -0
- package/src/sap/ui/vk/Toolbar.js +62 -100
- package/src/sap/ui/vk/View.js +7 -13
- package/src/sap/ui/vk/ViewGallery.js +2 -2
- package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
- package/src/sap/ui/vk/ViewGroup.js +1 -1
- package/src/sap/ui/vk/ViewManager.js +1 -1
- package/src/sap/ui/vk/ViewStateManager.js +4 -11
- package/src/sap/ui/vk/ViewStateManagerBase.js +4 -4
- package/src/sap/ui/vk/Viewer.js +408 -234
- package/src/sap/ui/vk/Viewport.js +2 -2
- package/src/sap/ui/vk/ViewportBase.js +24 -70
- package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
- package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
- package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/Scene.js +1 -1
- package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/dvl/Viewport.js +1 -1
- package/src/sap/ui/vk/ecad/ElementsPanel.js +627 -132
- package/src/sap/ui/vk/ecad/LayersPanel.js +247 -131
- package/src/sap/ui/vk/i18n/messagebundle.properties +70 -38
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +31 -12
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +27 -9
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +30 -12
- package/src/sap/ui/vk/library.js +7 -4
- package/src/sap/ui/vk/measurements/Angle.js +1 -1
- package/src/sap/ui/vk/measurements/Area.js +1 -1
- package/src/sap/ui/vk/measurements/Distance.js +1 -1
- package/src/sap/ui/vk/measurements/Edge.js +1 -1
- package/src/sap/ui/vk/measurements/Face.js +1 -1
- package/src/sap/ui/vk/measurements/Feature.js +1 -1
- package/src/sap/ui/vk/measurements/Vertex.js +1 -1
- package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
- package/src/sap/ui/vk/pdf/Page.js +9 -10
- package/src/sap/ui/vk/pdf/Utils.js +4 -2
- package/src/sap/ui/vk/pdf/Viewport.js +5 -8
- package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/svg/ContentManager.js +2 -1
- package/src/sap/ui/vk/svg/HotspotHelper.js +2 -2
- package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/svg/Scene.js +1 -1
- package/src/sap/ui/vk/svg/SceneBuilder.js +12 -4
- package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
- package/src/sap/ui/vk/svg/Viewport.js +192 -2
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
- package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/Billboard.js +23 -11
- package/src/sap/ui/vk/threejs/Callout.js +11 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +3 -2
- package/src/sap/ui/vk/threejs/DetailView.js +1 -1
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +14 -22
- package/src/sap/ui/vk/threejs/Material.js +2 -2
- package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/threejs/NodeProxy.js +9 -11
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/threejs/OutlineRenderer.js +4 -10
- package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
- package/src/sap/ui/vk/threejs/Scene.js +1 -15
- package/src/sap/ui/vk/threejs/SceneBuilder.js +17 -4
- package/src/sap/ui/vk/threejs/Texture.js +2 -2
- package/src/sap/ui/vk/threejs/ThreeExtensions.js +10 -174
- package/src/sap/ui/vk/threejs/ThreeUtils.js +7 -18
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +752 -447
- package/src/sap/ui/vk/threejs/Viewport.js +43 -33
- package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
- package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeItemGroup.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Gizmo.js +1 -1
- package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +2 -2
- package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Tool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolHandler.js +5 -0
- package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/totara/TotaraLoader.js +5 -1
- package/src/sap/ui/vk/ve/matai.js +1 -1
- package/src/sap/ui/vk/ve/matai.wasm +0 -0
- package/ui5.yaml +5 -3
- package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
- package/src/sap/ui/vk/ViewerRenderer.js +0 -48
- package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +0 -41
- package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +0 -41
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
// Provides the HighlightPlayer class.
|
|
9
9
|
sap.ui.define([
|
|
10
10
|
"sap/ui/base/Object",
|
|
11
|
-
"../thirdparty/three",
|
|
12
11
|
"../HighlightDisplayState"
|
|
13
12
|
], function(
|
|
14
13
|
BaseObject,
|
|
15
|
-
THREE,
|
|
16
14
|
HighlightDisplayState
|
|
17
15
|
) {
|
|
18
16
|
"use strict";
|
|
@@ -24,7 +22,7 @@ sap.ui.define([
|
|
|
24
22
|
*
|
|
25
23
|
* @private
|
|
26
24
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
25
|
+
* @version 1.139.0
|
|
28
26
|
* @extends sap.ui.base.Object
|
|
29
27
|
* @alias sap.ui.vk.threejs.HighlightPlayer
|
|
30
28
|
*/
|
|
@@ -85,7 +83,7 @@ sap.ui.define([
|
|
|
85
83
|
var hiddenNodes = [];
|
|
86
84
|
nodesInfo.nodes.forEach(function(node) {
|
|
87
85
|
while (node) {
|
|
88
|
-
if (!node
|
|
86
|
+
if (!vsm.getVisibilityState(node)) {
|
|
89
87
|
vsm.setVisibilityState(node, true, false);
|
|
90
88
|
hiddenNodes.push(node);
|
|
91
89
|
}
|
|
@@ -109,14 +107,12 @@ sap.ui.define([
|
|
|
109
107
|
this._highlightsNodesMap.forEach(function(nodesInfo, highlight) {
|
|
110
108
|
const res = highlight.evaluate(this._timeElapsed / 1000.0);
|
|
111
109
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
});
|
|
110
|
+
if (res.color != null) {
|
|
111
|
+
this._viewStateManager.setNodesHighlightColor(nodesInfo.nodes, res.isCompleted ? null : res.color);
|
|
112
|
+
}
|
|
113
|
+
if (res.opacity != null) {
|
|
114
|
+
this._viewStateManager.setOpacity(nodesInfo.nodes, res.isCompleted ? null : res.opacity);
|
|
115
|
+
}
|
|
120
116
|
|
|
121
117
|
if (res.isCompleted) {
|
|
122
118
|
if (highlight.isFadeOut() && nodesInfo.hiddenNodes !== undefined) {
|
|
@@ -141,22 +137,18 @@ sap.ui.define([
|
|
|
141
137
|
};
|
|
142
138
|
|
|
143
139
|
/*
|
|
144
|
-
|
|
140
|
+
Stop highlight
|
|
145
141
|
*/
|
|
146
142
|
HighlightPlayer.prototype.stop = function(time) {
|
|
147
143
|
this._timeElapsed = 0;
|
|
148
144
|
this._startTime = 0;
|
|
149
145
|
var that = this;
|
|
150
146
|
this._highlightsNodesMap.forEach(function(nodesInfo, highlight) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
var node = nodes[ni];
|
|
154
|
-
node._vkSetHighlightColor(undefined);
|
|
155
|
-
node._vkSetOpacity(undefined);
|
|
156
|
-
}
|
|
147
|
+
that._viewStateManager.setNodesHighlightColor(nodesInfo.nodes, null);
|
|
148
|
+
that._viewStateManager.setOpacity(nodesInfo.nodes, null);
|
|
157
149
|
|
|
158
|
-
if (highlight.isFadeOut() &&
|
|
159
|
-
that._viewStateManager.setVisibilityState(
|
|
150
|
+
if (highlight.isFadeOut() && nodesInfo.hiddenNodes != undefined) {
|
|
151
|
+
that._viewStateManager.setVisibilityState(nodesInfo.hiddenNodes, false, false);
|
|
160
152
|
}
|
|
161
153
|
});
|
|
162
154
|
|
|
@@ -166,7 +158,7 @@ sap.ui.define([
|
|
|
166
158
|
};
|
|
167
159
|
|
|
168
160
|
/*
|
|
169
|
-
|
|
161
|
+
Pause highlight
|
|
170
162
|
*/
|
|
171
163
|
HighlightPlayer.prototype.pause = function(time) {
|
|
172
164
|
if (this._state === HighlightDisplayState.stopped) {
|
|
@@ -31,10 +31,10 @@ sap.ui.define([
|
|
|
31
31
|
* @class Provides the interface for the material.
|
|
32
32
|
* @public
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.139.0
|
|
35
35
|
* @extends sap.ui.vk.Material
|
|
36
36
|
* @alias sap.ui.vk.threejs.Material
|
|
37
|
-
* @
|
|
37
|
+
* @since 1.60.0
|
|
38
38
|
*/
|
|
39
39
|
var Material = MaterialBase.extend("sap.ui.vk.threejs.Material", /** @lends sap.ui.vk.three.Material.prototype */ {
|
|
40
40
|
metadata: {
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
*
|
|
43
43
|
* @public
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.139.0
|
|
46
46
|
* @extends sap.ui.vk.NodeProxy
|
|
47
47
|
* @alias sap.ui.vk.threejs.NodeProxy
|
|
48
48
|
*/
|
|
@@ -170,7 +170,8 @@ sap.ui.define([
|
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
NodeProxy.prototype.getOpacity = function() {
|
|
173
|
-
|
|
173
|
+
const vsm = this._nodeHierarchy.getScene().getViewStateManager();
|
|
174
|
+
return vsm?.getOpacity(this._object3D) ?? this._object3D.userData.opacity;
|
|
174
175
|
};
|
|
175
176
|
|
|
176
177
|
NodeProxy.prototype.setOpacity = function(value) {
|
|
@@ -178,14 +179,15 @@ sap.ui.define([
|
|
|
178
179
|
if (vsManager) {
|
|
179
180
|
vsManager.setOpacity(this._object3D, value);
|
|
180
181
|
} else {
|
|
181
|
-
this._object3D.
|
|
182
|
+
this._object3D.userData.opacity = value;
|
|
182
183
|
}
|
|
183
184
|
this.setProperty("opacity", value, true);
|
|
184
185
|
return this;
|
|
185
186
|
};
|
|
186
187
|
|
|
187
188
|
NodeProxy.prototype.getTintColorABGR = function() {
|
|
188
|
-
|
|
189
|
+
const vsm = this._nodeHierarchy.getScene().getViewStateManager();
|
|
190
|
+
return vsm?._getTintColorABGR(this._object3D) ?? this._object3D.userData.tintColor;
|
|
189
191
|
};
|
|
190
192
|
|
|
191
193
|
NodeProxy.prototype.setTintColorABGR = function(value) {
|
|
@@ -193,7 +195,7 @@ sap.ui.define([
|
|
|
193
195
|
if (vsManager) {
|
|
194
196
|
vsManager.setTintColor(this._object3D, value);
|
|
195
197
|
} else {
|
|
196
|
-
this._object3D.
|
|
198
|
+
this._object3D.userData.tintColor = value;
|
|
197
199
|
}
|
|
198
200
|
this.setProperty("tintColorABGR", value, true);
|
|
199
201
|
this.setProperty("tintColor", colorToCSSColor(abgrToColor(value)), true);
|
|
@@ -201,7 +203,7 @@ sap.ui.define([
|
|
|
201
203
|
};
|
|
202
204
|
|
|
203
205
|
NodeProxy.prototype.getTintColor = function() {
|
|
204
|
-
return colorToCSSColor(abgrToColor(this.
|
|
206
|
+
return colorToCSSColor(abgrToColor(this.getTintColorABGR()));
|
|
205
207
|
};
|
|
206
208
|
|
|
207
209
|
NodeProxy.prototype.setTintColor = function(value) {
|
|
@@ -211,7 +213,7 @@ sap.ui.define([
|
|
|
211
213
|
if (vsManager) {
|
|
212
214
|
vsManager.setTintColor(this._object3D, abgr);
|
|
213
215
|
} else {
|
|
214
|
-
this._object3D.
|
|
216
|
+
this._object3D.userData.tintColor = abgr;
|
|
215
217
|
}
|
|
216
218
|
this.setProperty("tintColorABGR", abgr, true);
|
|
217
219
|
this.setProperty("tintColor", value, true);
|
|
@@ -258,8 +260,6 @@ sap.ui.define([
|
|
|
258
260
|
nodeRef.material = materialRef;
|
|
259
261
|
materialRef.userData.materialUsed++;
|
|
260
262
|
delete nodeRef.userData.originalMaterial;
|
|
261
|
-
|
|
262
|
-
nodeRef._vkUpdateMaterialColorAndOpacity();
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
265
|
|
|
@@ -343,7 +343,6 @@ sap.ui.define([
|
|
|
343
343
|
var materialRef = (typeof material.getMaterialRef === "function") ? material.getMaterialRef() : material;
|
|
344
344
|
if (this._object3D.userData.originalMaterial && this._object3D.userData.originalMaterial === materialToReplaceRef) {
|
|
345
345
|
this._object3D.userData.originalMaterial = materialRef;
|
|
346
|
-
this._object3D._vkUpdateMaterialColorAndOpacity();
|
|
347
346
|
} else if (this._object3D.material && this._object3D.material === materialToReplaceRef) {
|
|
348
347
|
this._object3D.material = materialRef;
|
|
349
348
|
}
|
|
@@ -359,7 +358,6 @@ sap.ui.define([
|
|
|
359
358
|
this._object3D.children.forEach(function(child) {
|
|
360
359
|
if (child && child.userData.originalMaterial && child.userData.originalMaterial === materialToReplaceRef) {
|
|
361
360
|
child.userData.originalMaterial = materialRef;
|
|
362
|
-
child._vkUpdateMaterialColorAndOpacity();
|
|
363
361
|
} else if (child && child.material && child.material === materialToReplaceRef) {
|
|
364
362
|
child.material = materialRef;
|
|
365
363
|
}
|
|
@@ -17,9 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
|
-
var OutlineRenderer = function(
|
|
21
|
-
this._outlineWidth = outlineWidth;
|
|
22
|
-
|
|
20
|
+
var OutlineRenderer = function() {
|
|
23
21
|
this._copyMaterial = new THREE.MeshBasicMaterial({ transparent: true, fog: false });
|
|
24
22
|
this._maskMaterial = new THREE.MeshBasicMaterial({ side: THREE.DoubleSide, fog: false });
|
|
25
23
|
|
|
@@ -96,11 +94,7 @@ sap.ui.define([
|
|
|
96
94
|
this._screenMesh = new THREE.Mesh(new THREE.PlaneGeometry(2, 2));
|
|
97
95
|
};
|
|
98
96
|
|
|
99
|
-
OutlineRenderer.prototype.
|
|
100
|
-
this._outlineWidth = width;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
OutlineRenderer.prototype.render = function(renderer, scene, camera, selectedObjects, outlineColor, joints) {
|
|
97
|
+
OutlineRenderer.prototype.render = function(renderer, scene, camera, selectedObjects, outlineColor, outlineWidth, joints) {
|
|
104
98
|
if (!selectedObjects || !selectedObjects.length) {
|
|
105
99
|
return;
|
|
106
100
|
}
|
|
@@ -210,11 +204,11 @@ sap.ui.define([
|
|
|
210
204
|
renderer.setRenderTarget(rt2);
|
|
211
205
|
renderer.render(this._screenMesh, this._screenCamera);
|
|
212
206
|
// expand outline
|
|
213
|
-
if (
|
|
207
|
+
if (outlineWidth > 1) {
|
|
214
208
|
material = this._expandMaterial;
|
|
215
209
|
material.uniforms.offset.value = offset;
|
|
216
210
|
this._screenMesh.material = material;
|
|
217
|
-
for (i = 1; i <
|
|
211
|
+
for (i = 1; i < outlineWidth; i++) {
|
|
218
212
|
var rt = rt1;
|
|
219
213
|
rt1 = rt2;
|
|
220
214
|
rt2 = rt;
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @param {THREE.Scene} scene The three.js scene object.
|
|
44
44
|
* @public
|
|
45
45
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.139.0
|
|
47
47
|
* @extends sap.ui.vk.Scene
|
|
48
48
|
* @alias sap.ui.vk.threejs.Scene
|
|
49
49
|
*/
|
|
@@ -795,7 +795,6 @@ sap.ui.define([
|
|
|
795
795
|
|
|
796
796
|
// apply highlighting on the updated material
|
|
797
797
|
userData.originalMaterial = null;
|
|
798
|
-
node._vkUpdateMaterialColorAndOpacity();
|
|
799
798
|
}
|
|
800
799
|
|
|
801
800
|
function restoreMeshMaterial(node) {
|
|
@@ -806,28 +805,15 @@ sap.ui.define([
|
|
|
806
805
|
|
|
807
806
|
// apply highlighting on the updated material
|
|
808
807
|
userData.originalMaterial = null;
|
|
809
|
-
node._vkUpdateMaterialColorAndOpacity();
|
|
810
808
|
}
|
|
811
809
|
}
|
|
812
810
|
|
|
813
811
|
Scene.prototype._createOutlineGeometry = function(renderMode) {
|
|
814
812
|
if (this._scene) {
|
|
815
|
-
// var totalCount = 0, count = 0, time1 = Date.now();
|
|
816
|
-
// this._scene._vkTraverseMeshNodes(function(node) {
|
|
817
|
-
// if (!node.isOutline) {
|
|
818
|
-
// totalCount += 1;
|
|
819
|
-
// }
|
|
820
|
-
// });
|
|
821
|
-
// console.log("!!!", totalCount);
|
|
822
813
|
this._scene._vkTraverseMeshNodes(function(node) {
|
|
823
814
|
if (node.isOutline) {
|
|
824
815
|
node.visible = true;
|
|
825
816
|
} else {
|
|
826
|
-
// count += 1;
|
|
827
|
-
// if (count % 100 === 0) {
|
|
828
|
-
// console.log(count * 100 / totalCount, (Date.now() - time1) * 1e-3);
|
|
829
|
-
// }
|
|
830
|
-
|
|
831
817
|
if (!node.hasOutline) {// create outline
|
|
832
818
|
const isThickLines = this._illustrationLineWidth > 0.0;
|
|
833
819
|
_addOutlineGeometry(node, isThickLines, isThickLines ? this._outlineThickMaterial : this._outlineMaterial, this._outlineGeometryToNodes);
|
|
@@ -104,7 +104,7 @@ sap.ui.define([
|
|
|
104
104
|
*
|
|
105
105
|
* @private
|
|
106
106
|
* @author SAP SE
|
|
107
|
-
* @version 1.
|
|
107
|
+
* @version 1.139.0
|
|
108
108
|
*/
|
|
109
109
|
var SceneBuilder = function(rootNode, contentResource, resolve, reject) {
|
|
110
110
|
this._rootNode = rootNode;
|
|
@@ -236,6 +236,8 @@ sap.ui.define([
|
|
|
236
236
|
backgroundTopColor: info.backgroundTopColor,
|
|
237
237
|
backgroundBottomColor: info.backgroundBottomColor,
|
|
238
238
|
upAxis: info.upAxis, // (0 = +X, 1 = -X, 2 = +Y, 3 = -Y, 4 = +Z, 5 = -Z)
|
|
239
|
+
dimension: info.dimension,
|
|
240
|
+
outputSettings: info.showPaperFrame ? info.outputSettings : null,
|
|
239
241
|
// renderMode: renderModes[info.renderMethod],
|
|
240
242
|
contentResource: this._contentResource,
|
|
241
243
|
builder: this
|
|
@@ -270,6 +272,9 @@ sap.ui.define([
|
|
|
270
272
|
|
|
271
273
|
if (vkScene) {
|
|
272
274
|
this._vkScene = vkScene;
|
|
275
|
+
if (this._sceneMetadata) {
|
|
276
|
+
this._vkScene.setSceneMetadata(this._sceneMetadata);
|
|
277
|
+
}
|
|
273
278
|
}
|
|
274
279
|
return this;
|
|
275
280
|
};
|
|
@@ -1486,7 +1491,6 @@ sap.ui.define([
|
|
|
1486
1491
|
child.material = material;
|
|
1487
1492
|
child.userData.materialId = materialId;
|
|
1488
1493
|
delete child.userData.originalMaterial;
|
|
1489
|
-
child._vkUpdateMaterialColorAndOpacity();
|
|
1490
1494
|
if (child.material !== material) {
|
|
1491
1495
|
TotaraUtils.pushElementIntoMapArray(this._materialClones, materialId, child.material);
|
|
1492
1496
|
}
|
|
@@ -1514,7 +1518,6 @@ sap.ui.define([
|
|
|
1514
1518
|
function applyNodeOpacityToSubmeshMaterial(submesh, materialClones) {
|
|
1515
1519
|
if (submesh.material) {
|
|
1516
1520
|
var prevMaterial = submesh.material;
|
|
1517
|
-
submesh._vkUpdateMaterialOpacity();
|
|
1518
1521
|
if (submesh.material !== prevMaterial) {
|
|
1519
1522
|
TotaraUtils.pushElementIntoMapArray(materialClones, submesh.material.userData.materialId, submesh.material);
|
|
1520
1523
|
}
|
|
@@ -3678,6 +3681,9 @@ sap.ui.define([
|
|
|
3678
3681
|
|
|
3679
3682
|
view.renderMode = renderModes[viewInfo.renderMethod] ?? RenderMode.Default;
|
|
3680
3683
|
view.dimension = viewInfo.dimension;
|
|
3684
|
+
if (viewInfo.showPaperFrame) {
|
|
3685
|
+
view.outputSettings = viewInfo.outputSettings;
|
|
3686
|
+
}
|
|
3681
3687
|
view.query = viewInfo.query;
|
|
3682
3688
|
view.metadata = viewInfo.metadata;
|
|
3683
3689
|
view.veids = viewInfo.veids;
|
|
@@ -4303,7 +4309,6 @@ sap.ui.define([
|
|
|
4303
4309
|
const nodeUserData = node.userData;
|
|
4304
4310
|
if (groupInfo.items?.length > 0) {
|
|
4305
4311
|
node.material ??= new THREE.MeshPhongMaterial(); // assign material to be able to select/highlight this node
|
|
4306
|
-
node._vkSetOpacity(nodeUserData.opacity);
|
|
4307
4312
|
|
|
4308
4313
|
nodeUserData.pointCloudGroupId = groupInfo.id;
|
|
4309
4314
|
nodeUserData.pcgBoundingBox ??= new THREE.Box3();
|
|
@@ -4496,5 +4501,13 @@ sap.ui.define([
|
|
|
4496
4501
|
markerNodes.set(newMarkerNodeId, { coordinateSpace: this._vkScene.PoiCoordinateSpaces.ReferenceNodeSpace });
|
|
4497
4502
|
};
|
|
4498
4503
|
|
|
4504
|
+
SceneBuilder.prototype.setSceneMetadata = function(metadata) {
|
|
4505
|
+
if (this._vkScene) {
|
|
4506
|
+
this._vkScene.setSceneMetadata(metadata);
|
|
4507
|
+
} else {
|
|
4508
|
+
this._sceneMetadata = metadata;
|
|
4509
|
+
}
|
|
4510
|
+
};
|
|
4511
|
+
|
|
4499
4512
|
return SceneBuilder;
|
|
4500
4513
|
});
|
|
@@ -21,10 +21,10 @@ sap.ui.define([
|
|
|
21
21
|
* @class Provides the interface for the material.
|
|
22
22
|
* @public
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.139.0
|
|
25
25
|
* @extends sap.ui.vk.Texture
|
|
26
26
|
* @alias sap.ui.vk.threejs.Texture
|
|
27
|
-
* @
|
|
27
|
+
* @since 1.60.0
|
|
28
28
|
*/
|
|
29
29
|
var Texture = TextureBase.extend("sap.ui.vk.threejs.Texture", /** @lends sap.ui.vk.three.Texture.prototype */ {
|
|
30
30
|
metadata: {
|
|
@@ -41,182 +41,16 @@ sap.ui.define([
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
THREE.Object3D.prototype.
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
THREE.Object3D.prototype._vkSetTintColor = function(tintColorABGR) {
|
|
52
|
-
this._vkTraverseNodeGeometry(function(node) {
|
|
53
|
-
node.userData.tintColor = tintColorABGR;
|
|
54
|
-
node._vkUpdateMaterialColorAndOpacity();
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
THREE.Object3D.prototype._vkSetOpacity = function(opacity, joints) {
|
|
59
|
-
this.userData.opacity = opacity;
|
|
60
|
-
var nodeJointMap;
|
|
61
|
-
var parentJointsMap;
|
|
62
|
-
if (joints) {
|
|
63
|
-
nodeJointMap = new Map();
|
|
64
|
-
parentJointsMap = new Map();
|
|
65
|
-
joints.forEach(function(joint) {
|
|
66
|
-
if (!joint.node || !joint.parent) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
nodeJointMap.set(joint.node, joint);
|
|
70
|
-
if (joint.parent) {
|
|
71
|
-
var jointsArray = parentJointsMap.get(joint.parent);
|
|
72
|
-
if (!jointsArray) {
|
|
73
|
-
jointsArray = [];
|
|
74
|
-
}
|
|
75
|
-
jointsArray.push(joint);
|
|
76
|
-
parentJointsMap.set(joint.parent, jointsArray);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
this._vkTraverseNodes(function(node) {
|
|
81
|
-
node._vkUpdateMaterialOpacity(nodeJointMap);
|
|
82
|
-
}, nodeJointMap, parentJointsMap);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
THREE.Object3D.prototype._vkUpdateMaterialColorAndOpacity = function() {
|
|
86
|
-
if (!this.material || !this.material.color) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
var userData = this.userData;
|
|
91
|
-
userData.blendColor = null;
|
|
92
|
-
|
|
93
|
-
if (userData.originalMaterial) {
|
|
94
|
-
this.material.color.copy(userData.originalMaterial.color); // diffuse color, may be multiplied by material.map
|
|
95
|
-
this.material.emissive?.copy(userData.originalMaterial.emissive);
|
|
96
|
-
this.material.specular?.copy(userData.originalMaterial.specular);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (userData.highlightColor !== undefined || userData.tintColor !== undefined || userData.highlightingColor !== undefined) {
|
|
100
|
-
if (!userData.originalMaterial) {
|
|
101
|
-
// The original material might be shared with other objects, so assign it to
|
|
102
|
-
// userData.originalMaterial and replace the own material with cloned one.
|
|
103
|
-
userData.originalMaterial = this.material;
|
|
104
|
-
this.material = this.material.clone();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const color = new THREE.Vector4(0, 0, 0, 0);
|
|
108
|
-
|
|
109
|
-
if (userData.highlightingColor !== undefined) { // highlighting animation of the view (HighlightPlayer)
|
|
110
|
-
color.fromArray(userData.highlightingColor);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (userData.tintColor !== undefined) { // tinting (ViewStateManangert)
|
|
114
|
-
const c = abgrToColor(userData.tintColor);
|
|
115
|
-
color.lerp(new THREE.Vector4(c.red / 255.0, c.green / 255.0, c.blue / 255.0, 1), c.alpha);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (userData.highlightColor !== undefined) { // selection (ViewStateManangert)
|
|
119
|
-
const c = abgrToColor(userData.highlightColor);
|
|
120
|
-
color.lerp(new THREE.Vector4(c.red / 255.0, c.green / 255.0, c.blue / 255.0, 1), c.alpha);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (color.w > 0) {
|
|
124
|
-
userData.blendColor = color.toArray();
|
|
125
|
-
|
|
126
|
-
const blendColor = new THREE.Color(color.x, color.y, color.z);
|
|
127
|
-
this.material.color.lerp(blendColor, color.w);
|
|
128
|
-
this.material.emissive?.lerp(blendColor, color.w * 0.5);
|
|
129
|
-
this.material.specular?.multiplyScalar(1 - 0.75 * color.w); // reduce specular as it may overexpose the highlighting
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
this._vkUpdateMaterialOpacity();
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
THREE.Object3D.prototype._vkUpdateMaterialOpacity = function(nodeJointMap) {
|
|
137
|
-
if (!this.material) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
var userData = this.userData;
|
|
142
|
-
|
|
143
|
-
if (userData.originalMaterial) {
|
|
144
|
-
this.material.opacity = userData.originalMaterial.opacity;
|
|
145
|
-
this.material.transparent = userData.originalMaterial.transparent;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
var opacity = 1.0;
|
|
149
|
-
|
|
150
|
-
var hasOpacity = false;
|
|
151
|
-
let renderMethod;
|
|
152
|
-
|
|
153
|
-
var obj3D = this; // eslint-disable-line consistent-this
|
|
154
|
-
do {
|
|
155
|
-
renderMethod ??= obj3D.userData.renderMethod;
|
|
156
|
-
|
|
157
|
-
var currentOpacity = null, joint = null;
|
|
158
|
-
if (nodeJointMap) {
|
|
159
|
-
joint = nodeJointMap.get(obj3D);
|
|
44
|
+
THREE.Object3D.prototype._vkSetOpacityRecursive = function(opacity) { // used only to change the opacity of Symbols depending on the camera direction
|
|
45
|
+
this.traverseVisible(function(child) {
|
|
46
|
+
if (child.material) {
|
|
47
|
+
child.material.opacity = opacity;
|
|
48
|
+
child.material.transparent = opacity < 1.0;
|
|
160
49
|
}
|
|
161
|
-
|
|
162
|
-
if (joint && joint.opacity != null) {
|
|
163
|
-
currentOpacity = joint.opacity;
|
|
164
|
-
} else if (obj3D.userData.opacity !== undefined && obj3D.userData.opacity !== 1) {
|
|
165
|
-
currentOpacity = obj3D.userData.opacity;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
var offsetOpacity = 1;
|
|
169
|
-
if (joint && joint.opacity != null && obj3D.userData && obj3D.userData.offsetOpacity != null) {
|
|
170
|
-
offsetOpacity = obj3D.userData.offsetOpacity;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
if (currentOpacity != null) {
|
|
174
|
-
opacity *= currentOpacity;
|
|
175
|
-
opacity *= offsetOpacity;
|
|
176
|
-
hasOpacity = true;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (joint && joint.parent) {
|
|
180
|
-
obj3D = joint.parent;
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
obj3D = obj3D.parent;
|
|
185
|
-
} while (obj3D);
|
|
186
|
-
|
|
187
|
-
if (renderMethod === 2) { // TRANSPARENT
|
|
188
|
-
opacity *= 0.5;
|
|
189
|
-
hasOpacity = true;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (hasOpacity || this.renderOrder > 0) {
|
|
193
|
-
if (!userData.originalMaterial) {
|
|
194
|
-
userData.originalMaterial = this.material;
|
|
195
|
-
this.material = this.material.clone();
|
|
196
|
-
if (this.isMesh && !this.geometry.getAttribute("normal")) {
|
|
197
|
-
// Make three.js material double-sided if geometry does not have normals defined
|
|
198
|
-
this.material.side = THREE.DoubleSide;
|
|
199
|
-
this.material.userData.originalMaterialSide = THREE.DoubleSide;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (this.renderOrder > 0 && !this.isOutline) {
|
|
204
|
-
this.material.depthTest = false;
|
|
205
|
-
this.material.transparent = true; // enable z-sorting
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
if (this.material.opacity) {
|
|
209
|
-
this.material.opacity *= opacity;
|
|
210
|
-
var materialIsTransparent = userData.originalMaterial.transparent || this.material.opacity < 1;
|
|
211
|
-
if (materialIsTransparent !== this.material.transparent) {
|
|
212
|
-
this.material.transparent = materialIsTransparent;
|
|
213
|
-
this.material.needsUpdate = true; // three.js needs to update shaders for this material
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
50
|
+
});
|
|
217
51
|
};
|
|
218
52
|
|
|
219
|
-
THREE.Object3D.prototype._vkGetTotalOpacity = function(joints) {
|
|
53
|
+
THREE.Object3D.prototype._vkGetTotalOpacity = function(joints, vsm) {
|
|
220
54
|
var nodeJointMap;
|
|
221
55
|
if (joints) {
|
|
222
56
|
nodeJointMap = new Map();
|
|
@@ -241,6 +75,8 @@ sap.ui.define([
|
|
|
241
75
|
|
|
242
76
|
if (joint && joint.opacity != null) {
|
|
243
77
|
currentOpacity = joint.opacity;
|
|
78
|
+
} else if (vsm) {
|
|
79
|
+
currentOpacity = vsm._getOpacity(obj3D);
|
|
244
80
|
} else if (obj3D.userData && obj3D.userData.opacity !== undefined) {
|
|
245
81
|
currentOpacity = obj3D.userData.opacity;
|
|
246
82
|
}
|
|
@@ -268,7 +104,7 @@ sap.ui.define([
|
|
|
268
104
|
};
|
|
269
105
|
|
|
270
106
|
THREE.Object3D.prototype._vkTraverseMeshNodes = function(callback) {
|
|
271
|
-
if (this._vkUpdate !== undefined || this.isDetailView) {
|
|
107
|
+
if (this._vkUpdate !== undefined || this.isDetailView || this.userData.nodeContentType === NodeContentType.PMI) {
|
|
272
108
|
return;
|
|
273
109
|
}
|
|
274
110
|
|
|
@@ -455,29 +455,18 @@ sap.ui.define([
|
|
|
455
455
|
// '0' - hidden, '1' - draw as cluster, '2' - render by three js, '3' - cluster with custom color
|
|
456
456
|
if (!cluster.isPoints && (ud.initialMaterialId !== ud.materialId
|
|
457
457
|
|| node.renderOrder != 0
|
|
458
|
-
|| ud.
|
|
458
|
+
|| ud.customMaterial
|
|
459
459
|
|| ud.defaultMaterial // defaultMaterial is used for Outline objects
|
|
460
460
|
|| node.material.transparent === true)) {
|
|
461
461
|
|
|
462
462
|
scratch8[3] = 2; // render using threejs standard rendering
|
|
463
463
|
cluster.additionalRenderables.push(node);
|
|
464
|
-
} else if (ud.
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
if (ce.r === 0.0235 && ce.g === 0.0235 && ce.b === 0.0235
|
|
471
|
-
&& cs.r === 0.0602 && cs.g === 0.0602 && cs.b === 0.0602) {
|
|
472
|
-
ce = node.material.color;
|
|
473
|
-
scratch8[0] = 255 * ce.r;
|
|
474
|
-
scratch8[1] = 255 * ce.g;
|
|
475
|
-
scratch8[2] = 255 * ce.b;
|
|
476
|
-
scratch8[3] = 3; // cluster render + patch color
|
|
477
|
-
} else {
|
|
478
|
-
scratch8[3] = 2; // render using threejs standard rendering
|
|
479
|
-
cluster.additionalRenderables.push(node);
|
|
480
|
-
}
|
|
464
|
+
} else if (ud.customMaterial && node.material.userData.customColor) { // point cloud with highlighting/tinting
|
|
465
|
+
const ce = node.material.color;
|
|
466
|
+
scratch8[0] = 255 * ce.r;
|
|
467
|
+
scratch8[1] = 255 * ce.g;
|
|
468
|
+
scratch8[2] = 255 * ce.b;
|
|
469
|
+
scratch8[3] = 3; // cluster render + patch color
|
|
481
470
|
} else {
|
|
482
471
|
scratch8[3] = 1; // cluster render
|
|
483
472
|
}
|