@sapui5/sap.ui.vk 1.138.0 → 1.140.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 +1 -1
- 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 +3 -3
- 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 +149 -95
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +26 -7
- package/src/sap/ui/vk/ContentType.js +41 -0
- package/src/sap/ui/vk/Core.js +1 -1
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +46 -19
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -1
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
- 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/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/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 +1 -1
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +5 -1
- package/src/sap/ui/vk/SceneTree.js +20 -3
- package/src/sap/ui/vk/StepNavigation.js +1 -1
- package/src/sap/ui/vk/Texture.js +1 -1
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
- package/src/sap/ui/vk/Toolbar.js +1 -1
- package/src/sap/ui/vk/View.js +1 -1
- package/src/sap/ui/vk/ViewGallery.js +1 -1
- 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 +3 -10
- package/src/sap/ui/vk/ViewStateManagerBase.js +2 -2
- package/src/sap/ui/vk/Viewer.js +13 -3
- package/src/sap/ui/vk/Viewport.js +1 -1
- 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 +408 -385
- package/src/sap/ui/vk/ecad/LayersPanel.js +95 -99
- package/src/sap/ui/vk/i18n/messagebundle.properties +44 -46
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +28 -14
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +27 -327
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +24 -12
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +29 -15
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +29 -15
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +29 -15
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +39 -25
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +24 -10
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +28 -14
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +28 -14
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +27 -13
- package/src/sap/ui/vk/library.js +5 -5
- 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 +1 -1
- 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 +4 -5
- 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 +1 -1
- package/src/sap/ui/vk/svg/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/svg/Viewport.js +11 -18
- package/src/sap/ui/vk/thirdparty/BufferGeometryUtils.js +86 -27
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- package/src/sap/ui/vk/thirdparty/three.js +54501 -32246
- 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 +1 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +2 -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 +1 -1
- 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 +1 -4
- package/src/sap/ui/vk/threejs/Texture.js +1 -1
- 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 +755 -451
- package/src/sap/ui/vk/threejs/Viewport.js +47 -35
- 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/ExplodeTool.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Gizmo.js +4 -3
- 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 +1 -1
- 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/SceneContext.js +3 -1
- package/src/sap/ui/vk/totara/TotaraLoader.js +2 -2
- package/src/sap/ui/vk/totara/TotaraLoaderWorker.js +18 -21
- package/src/sap/ui/vk/ve/dvl.wasm +0 -0
- package/ui5.yaml +5 -3
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
*
|
|
40
40
|
* @private
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.140.0
|
|
43
43
|
* @extends sap.ui.base.ManagedObject
|
|
44
44
|
* @alias sap.ui.vk.threejs.Billboard
|
|
45
45
|
*/
|
|
@@ -305,9 +305,19 @@ sap.ui.define([
|
|
|
305
305
|
return this;
|
|
306
306
|
};
|
|
307
307
|
|
|
308
|
-
Billboard.prototype.setTexture = function(
|
|
309
|
-
this.setProperty("texture",
|
|
310
|
-
|
|
308
|
+
Billboard.prototype.setTexture = function(texture) {
|
|
309
|
+
this.setProperty("texture", texture, true);
|
|
310
|
+
|
|
311
|
+
const material = this._billboard.material;
|
|
312
|
+
material.map = texture;
|
|
313
|
+
material.needsUpdate = true;
|
|
314
|
+
material.visible = true;
|
|
315
|
+
const prototypeMaterial = material.userData.prototypeMaterial;
|
|
316
|
+
if (prototypeMaterial) {
|
|
317
|
+
prototypeMaterial.map = texture;
|
|
318
|
+
prototypeMaterial.needsUpdate = true;
|
|
319
|
+
prototypeMaterial.visible = true;
|
|
320
|
+
}
|
|
311
321
|
return this;
|
|
312
322
|
};
|
|
313
323
|
|
|
@@ -1047,9 +1057,7 @@ sap.ui.define([
|
|
|
1047
1057
|
|
|
1048
1058
|
var texture = new THREE.CanvasTexture(canvas);
|
|
1049
1059
|
texture.magFilter = THREE.NearestFilter;
|
|
1050
|
-
this.
|
|
1051
|
-
this._billboard.material.needsUpdate = true;
|
|
1052
|
-
this._billboard.material.visible = true;
|
|
1060
|
+
this.setTexture(texture);
|
|
1053
1061
|
};
|
|
1054
1062
|
|
|
1055
1063
|
var pos4 = new THREE.Vector4(),
|
|
@@ -1166,7 +1174,7 @@ sap.ui.define([
|
|
|
1166
1174
|
this.updateMatrixWorld(true); // update children matrices
|
|
1167
1175
|
};
|
|
1168
1176
|
|
|
1169
|
-
Billboard.prototype._billboardViewUpdate = function(renderer, camera, viewportSize, backgroundProjection) {
|
|
1177
|
+
Billboard.prototype._billboardViewUpdate = function(renderer, camera, viewportSize, backgroundProjection, viewStateManager) {
|
|
1170
1178
|
if (!this.visible) {
|
|
1171
1179
|
return;
|
|
1172
1180
|
}
|
|
@@ -1176,9 +1184,13 @@ sap.ui.define([
|
|
|
1176
1184
|
this.quaternion.copy(quat); // no onChangeCallback overhead with variable quat
|
|
1177
1185
|
|
|
1178
1186
|
if (this._vkGetNodeContentType() === NodeContentType.Symbol) {
|
|
1179
|
-
if (backgroundProjection
|
|
1180
|
-
|
|
1181
|
-
|
|
1187
|
+
if (viewStateManager != null && backgroundProjection !== undefined) {
|
|
1188
|
+
let opacity = viewStateManager._computeWorldOpacity(this);
|
|
1189
|
+
if (backgroundProjection) { // spherical or planar (if backgroundProjection is null then this is a special case for Viewport.getObjectImageEx)
|
|
1190
|
+
const cameraDirection = new THREE.Vector3().setFromMatrixColumn(camera.matrixWorld, 2);
|
|
1191
|
+
opacity *= Math.max(cameraDirection.dot(this.userData.direction), 0) * 0.8 + 0.2;
|
|
1192
|
+
}
|
|
1193
|
+
this._vkSetOpacityRecursive(opacity);
|
|
1182
1194
|
}
|
|
1183
1195
|
|
|
1184
1196
|
// calculate symbol scale in navigation scene
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @class Provides a class to communicate with content delivery service.
|
|
34
34
|
* @private
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.140.0
|
|
37
37
|
* @extends sap.ui.base.ManagedObject
|
|
38
38
|
* @alias sap.ui.vk.threejs.ContentDeliveryService
|
|
39
39
|
*/
|
|
@@ -112,7 +112,7 @@ sap.ui.define([
|
|
|
112
112
|
* @param {object} [mSettings] Initial settings for the new ContentManager object.
|
|
113
113
|
* @protected
|
|
114
114
|
* @author SAP SE
|
|
115
|
-
* @version 1.
|
|
115
|
+
* @version 1.140.0
|
|
116
116
|
* @extends sap.ui.vk.ContentManager
|
|
117
117
|
* @alias sap.ui.vk.threejs.ContentManager
|
|
118
118
|
* @since 1.50.0
|
|
@@ -361,7 +361,7 @@ sap.ui.define([
|
|
|
361
361
|
|
|
362
362
|
if (contentResource.getSource()) {
|
|
363
363
|
// Try one of default loaders.
|
|
364
|
-
var sourceType = contentResource.
|
|
364
|
+
var sourceType = contentResource.getEffectiveSourceType().toLowerCase();
|
|
365
365
|
|
|
366
366
|
var that = this;
|
|
367
367
|
switch (sourceType) {
|
|
@@ -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.140.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) {
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
*
|
|
43
43
|
* @public
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.140.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.140.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.140.0
|
|
108
108
|
*/
|
|
109
109
|
var SceneBuilder = function(rootNode, contentResource, resolve, reject) {
|
|
110
110
|
this._rootNode = rootNode;
|
|
@@ -1491,7 +1491,6 @@ sap.ui.define([
|
|
|
1491
1491
|
child.material = material;
|
|
1492
1492
|
child.userData.materialId = materialId;
|
|
1493
1493
|
delete child.userData.originalMaterial;
|
|
1494
|
-
child._vkUpdateMaterialColorAndOpacity();
|
|
1495
1494
|
if (child.material !== material) {
|
|
1496
1495
|
TotaraUtils.pushElementIntoMapArray(this._materialClones, materialId, child.material);
|
|
1497
1496
|
}
|
|
@@ -1519,7 +1518,6 @@ sap.ui.define([
|
|
|
1519
1518
|
function applyNodeOpacityToSubmeshMaterial(submesh, materialClones) {
|
|
1520
1519
|
if (submesh.material) {
|
|
1521
1520
|
var prevMaterial = submesh.material;
|
|
1522
|
-
submesh._vkUpdateMaterialOpacity();
|
|
1523
1521
|
if (submesh.material !== prevMaterial) {
|
|
1524
1522
|
TotaraUtils.pushElementIntoMapArray(materialClones, submesh.material.userData.materialId, submesh.material);
|
|
1525
1523
|
}
|
|
@@ -4311,7 +4309,6 @@ sap.ui.define([
|
|
|
4311
4309
|
const nodeUserData = node.userData;
|
|
4312
4310
|
if (groupInfo.items?.length > 0) {
|
|
4313
4311
|
node.material ??= new THREE.MeshPhongMaterial(); // assign material to be able to select/highlight this node
|
|
4314
|
-
node._vkSetOpacity(nodeUserData.opacity);
|
|
4315
4312
|
|
|
4316
4313
|
nodeUserData.pointCloudGroupId = groupInfo.id;
|
|
4317
4314
|
nodeUserData.pcgBoundingBox ??= new THREE.Box3();
|