@sapui5/sap.ui.vk 1.138.0 → 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.
Files changed (217) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/vk/.library +9 -1
  3. package/src/sap/ui/vk/AnimationPlayback.js +1 -1
  4. package/src/sap/ui/vk/AnimationPlayer.js +1 -1
  5. package/src/sap/ui/vk/AnimationSequence.js +1 -1
  6. package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
  7. package/src/sap/ui/vk/AnimationTrack.js +1 -1
  8. package/src/sap/ui/vk/Annotation.js +1 -1
  9. package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
  10. package/src/sap/ui/vk/Camera.js +1 -1
  11. package/src/sap/ui/vk/ContentConnector.js +149 -95
  12. package/src/sap/ui/vk/ContentManager.js +1 -1
  13. package/src/sap/ui/vk/ContentResource.js +26 -7
  14. package/src/sap/ui/vk/ContentType.js +41 -0
  15. package/src/sap/ui/vk/Core.js +1 -1
  16. package/src/sap/ui/vk/DownloadManager.js +1 -1
  17. package/src/sap/ui/vk/DrawerToolbar.js +46 -19
  18. package/src/sap/ui/vk/DvlException.js +1 -1
  19. package/src/sap/ui/vk/FlexibleControl.js +1 -1
  20. package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
  21. package/src/sap/ui/vk/Highlight.js +1 -1
  22. package/src/sap/ui/vk/ImageContentManager.js +1 -1
  23. package/src/sap/ui/vk/JointUtils.js +1 -1
  24. package/src/sap/ui/vk/LayerProxy.js +1 -1
  25. package/src/sap/ui/vk/Loco.js +1 -1
  26. package/src/sap/ui/vk/Material.js +1 -1
  27. package/src/sap/ui/vk/NativeViewport.js +1 -1
  28. package/src/sap/ui/vk/NodeHierarchy.js +1 -1
  29. package/src/sap/ui/vk/NodeProxy.js +1 -1
  30. package/src/sap/ui/vk/NodeUtils.js +1 -1
  31. package/src/sap/ui/vk/Notifications.js +1 -1
  32. package/src/sap/ui/vk/OrthographicCamera.js +1 -1
  33. package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
  34. package/src/sap/ui/vk/ProgressIndicator.js +1 -1
  35. package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
  36. package/src/sap/ui/vk/RedlineConversation.js +1 -1
  37. package/src/sap/ui/vk/RedlineDesign.js +1 -1
  38. package/src/sap/ui/vk/RedlineElement.js +1 -1
  39. package/src/sap/ui/vk/RedlineElementComment.js +1 -1
  40. package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
  41. package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
  42. package/src/sap/ui/vk/RedlineElementLine.js +1 -1
  43. package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
  44. package/src/sap/ui/vk/RedlineElementText.js +1 -1
  45. package/src/sap/ui/vk/RedlineSurface.js +1 -1
  46. package/src/sap/ui/vk/SafeArea.js +1 -1
  47. package/src/sap/ui/vk/Scene.js +5 -1
  48. package/src/sap/ui/vk/SceneTree.js +20 -3
  49. package/src/sap/ui/vk/StepNavigation.js +1 -1
  50. package/src/sap/ui/vk/Texture.js +1 -1
  51. package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
  52. package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
  53. package/src/sap/ui/vk/Toolbar.js +1 -1
  54. package/src/sap/ui/vk/View.js +1 -1
  55. package/src/sap/ui/vk/ViewGallery.js +1 -1
  56. package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
  57. package/src/sap/ui/vk/ViewGroup.js +1 -1
  58. package/src/sap/ui/vk/ViewManager.js +1 -1
  59. package/src/sap/ui/vk/ViewStateManager.js +3 -10
  60. package/src/sap/ui/vk/ViewStateManagerBase.js +2 -2
  61. package/src/sap/ui/vk/Viewer.js +2 -2
  62. package/src/sap/ui/vk/Viewport.js +1 -1
  63. package/src/sap/ui/vk/ViewportBase.js +24 -70
  64. package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
  65. package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
  66. package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
  67. package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
  68. package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
  69. package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
  70. package/src/sap/ui/vk/dvl/Scene.js +1 -1
  71. package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
  72. package/src/sap/ui/vk/dvl/Viewport.js +1 -1
  73. package/src/sap/ui/vk/ecad/ElementsPanel.js +14 -41
  74. package/src/sap/ui/vk/ecad/LayersPanel.js +8 -25
  75. package/src/sap/ui/vk/i18n/messagebundle.properties +46 -44
  76. package/src/sap/ui/vk/i18n/messagebundle_ar.properties +25 -12
  77. package/src/sap/ui/vk/i18n/messagebundle_bg.properties +25 -12
  78. package/src/sap/ui/vk/i18n/messagebundle_ca.properties +25 -12
  79. package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +25 -12
  80. package/src/sap/ui/vk/i18n/messagebundle_cs.properties +25 -12
  81. package/src/sap/ui/vk/i18n/messagebundle_cy.properties +25 -12
  82. package/src/sap/ui/vk/i18n/messagebundle_da.properties +25 -12
  83. package/src/sap/ui/vk/i18n/messagebundle_de.properties +26 -13
  84. package/src/sap/ui/vk/i18n/messagebundle_el.properties +25 -12
  85. package/src/sap/ui/vk/i18n/messagebundle_en.properties +25 -326
  86. package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +25 -12
  87. package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +26 -12
  88. package/src/sap/ui/vk/i18n/messagebundle_es.properties +27 -14
  89. package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +25 -12
  90. package/src/sap/ui/vk/i18n/messagebundle_et.properties +25 -12
  91. package/src/sap/ui/vk/i18n/messagebundle_fi.properties +25 -12
  92. package/src/sap/ui/vk/i18n/messagebundle_fr.properties +25 -12
  93. package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +25 -12
  94. package/src/sap/ui/vk/i18n/messagebundle_hi.properties +25 -12
  95. package/src/sap/ui/vk/i18n/messagebundle_hr.properties +25 -12
  96. package/src/sap/ui/vk/i18n/messagebundle_hu.properties +25 -12
  97. package/src/sap/ui/vk/i18n/messagebundle_id.properties +26 -13
  98. package/src/sap/ui/vk/i18n/messagebundle_it.properties +25 -12
  99. package/src/sap/ui/vk/i18n/messagebundle_iw.properties +25 -12
  100. package/src/sap/ui/vk/i18n/messagebundle_ja.properties +25 -12
  101. package/src/sap/ui/vk/i18n/messagebundle_kk.properties +37 -24
  102. package/src/sap/ui/vk/i18n/messagebundle_ko.properties +22 -9
  103. package/src/sap/ui/vk/i18n/messagebundle_lt.properties +25 -12
  104. package/src/sap/ui/vk/i18n/messagebundle_lv.properties +25 -12
  105. package/src/sap/ui/vk/i18n/messagebundle_mk.properties +25 -12
  106. package/src/sap/ui/vk/i18n/messagebundle_ms.properties +25 -12
  107. package/src/sap/ui/vk/i18n/messagebundle_nl.properties +25 -12
  108. package/src/sap/ui/vk/i18n/messagebundle_no.properties +25 -12
  109. package/src/sap/ui/vk/i18n/messagebundle_pl.properties +25 -12
  110. package/src/sap/ui/vk/i18n/messagebundle_pt.properties +25 -12
  111. package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +25 -12
  112. package/src/sap/ui/vk/i18n/messagebundle_ro.properties +25 -12
  113. package/src/sap/ui/vk/i18n/messagebundle_ru.properties +25 -12
  114. package/src/sap/ui/vk/i18n/messagebundle_sh.properties +25 -12
  115. package/src/sap/ui/vk/i18n/messagebundle_sk.properties +25 -12
  116. package/src/sap/ui/vk/i18n/messagebundle_sl.properties +25 -12
  117. package/src/sap/ui/vk/i18n/messagebundle_sr.properties +25 -12
  118. package/src/sap/ui/vk/i18n/messagebundle_sv.properties +25 -12
  119. package/src/sap/ui/vk/i18n/messagebundle_th.properties +25 -12
  120. package/src/sap/ui/vk/i18n/messagebundle_tr.properties +25 -12
  121. package/src/sap/ui/vk/i18n/messagebundle_uk.properties +25 -12
  122. package/src/sap/ui/vk/i18n/messagebundle_vi.properties +25 -12
  123. package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +25 -12
  124. package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +25 -12
  125. package/src/sap/ui/vk/library.js +5 -5
  126. package/src/sap/ui/vk/measurements/Angle.js +1 -1
  127. package/src/sap/ui/vk/measurements/Area.js +1 -1
  128. package/src/sap/ui/vk/measurements/Distance.js +1 -1
  129. package/src/sap/ui/vk/measurements/Edge.js +1 -1
  130. package/src/sap/ui/vk/measurements/Face.js +1 -1
  131. package/src/sap/ui/vk/measurements/Feature.js +1 -1
  132. package/src/sap/ui/vk/measurements/Vertex.js +1 -1
  133. package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
  134. package/src/sap/ui/vk/pdf/Page.js +9 -10
  135. package/src/sap/ui/vk/pdf/Utils.js +4 -2
  136. package/src/sap/ui/vk/pdf/Viewport.js +1 -1
  137. package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
  138. package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
  139. package/src/sap/ui/vk/svg/ContentManager.js +4 -5
  140. package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
  141. package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
  142. package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
  143. package/src/sap/ui/vk/svg/Scene.js +1 -1
  144. package/src/sap/ui/vk/svg/SceneBuilder.js +1 -1
  145. package/src/sap/ui/vk/svg/ViewStateManager.js +1 -1
  146. package/src/sap/ui/vk/svg/Viewport.js +11 -18
  147. package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
  148. package/src/sap/ui/vk/thirdparty/three.js +31455 -31473
  149. package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
  150. package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
  151. package/src/sap/ui/vk/threejs/Billboard.js +23 -11
  152. package/src/sap/ui/vk/threejs/Callout.js +1 -1
  153. package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
  154. package/src/sap/ui/vk/threejs/ContentManager.js +2 -2
  155. package/src/sap/ui/vk/threejs/DetailView.js +1 -1
  156. package/src/sap/ui/vk/threejs/HighlightPlayer.js +14 -22
  157. package/src/sap/ui/vk/threejs/Material.js +1 -1
  158. package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
  159. package/src/sap/ui/vk/threejs/NodeProxy.js +9 -11
  160. package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
  161. package/src/sap/ui/vk/threejs/OutlineRenderer.js +4 -10
  162. package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
  163. package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
  164. package/src/sap/ui/vk/threejs/Scene.js +1 -15
  165. package/src/sap/ui/vk/threejs/SceneBuilder.js +1 -4
  166. package/src/sap/ui/vk/threejs/Texture.js +1 -1
  167. package/src/sap/ui/vk/threejs/ThreeExtensions.js +10 -174
  168. package/src/sap/ui/vk/threejs/ThreeUtils.js +7 -18
  169. package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
  170. package/src/sap/ui/vk/threejs/ViewStateManager.js +751 -446
  171. package/src/sap/ui/vk/threejs/Viewport.js +41 -31
  172. package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
  173. package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
  174. package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
  175. package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
  176. package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
  177. package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
  178. package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
  179. package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
  180. package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
  181. package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
  182. package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
  183. package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
  184. package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
  185. package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
  186. package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
  187. package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
  188. package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
  189. package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
  190. package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
  191. package/src/sap/ui/vk/tools/Gizmo.js +1 -1
  192. package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
  193. package/src/sap/ui/vk/tools/MoveTool.js +1 -1
  194. package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
  195. package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +1 -1
  196. package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
  197. package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
  198. package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
  199. package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
  200. package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
  201. package/src/sap/ui/vk/tools/RotateTool.js +1 -1
  202. package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
  203. package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
  204. package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
  205. package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
  206. package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
  207. package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
  208. package/src/sap/ui/vk/tools/Tool.js +1 -1
  209. package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
  210. package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
  211. package/src/sap/ui/vk/tools/TooltipToolHandler.js +5 -0
  212. package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
  213. package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
  214. package/src/sap/ui/vk/totara/TotaraLoader.js +2 -2
  215. package/src/sap/ui/vk/totara/TotaraLoaderWorker.js +18 -21
  216. package/ui5.yaml +5 -3
  217. package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  *
36
36
  * @private
37
37
  * @author SAP SE
38
- * @version 1.138.0
38
+ * @version 1.139.0
39
39
  */
40
40
  var AnimationHelper = function() {
41
41
  };
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  *
36
36
  * @public
37
37
  * @author SAP SE
38
- * @version 1.138.0
38
+ * @version 1.139.0
39
39
  * @extends sap.ui.vk.BaseNodeProxy
40
40
  * @implements sap.ui.base.Poolable
41
41
  * @alias sap.ui.vk.threejs.BaseNodeProxy
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  *
40
40
  * @private
41
41
  * @author SAP SE
42
- * @version 1.138.0
42
+ * @version 1.139.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(value) {
309
- this.setProperty("texture", value, true);
310
- this._billboard.material.map = value;
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._billboard.material.map = texture;
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 === undefined) {// not spherical or planar
1180
- var cameraDirection = new THREE.Vector3().setFromMatrixColumn(camera.matrixWorld, 2);
1181
- this._vkSetOpacity(Math.max(cameraDirection.dot(this.userData.direction), 0) * 0.8 + 0.2);
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
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  *
40
40
  * @private
41
41
  * @author SAP SE
42
- * @version 1.138.0
42
+ * @version 1.139.0
43
43
  * @extends sap.ui.vk.threejs.Billboard
44
44
  * @alias sap.ui.vk.threejs.Callout
45
45
  */
@@ -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.138.0
36
+ * @version 1.139.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.138.0
115
+ * @version 1.139.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.getSourceType().toLowerCase();
364
+ var sourceType = contentResource.getEffectiveSourceType().toLowerCase();
365
365
 
366
366
  var that = this;
367
367
  switch (sourceType) {
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  *
34
34
  * @private
35
35
  * @author SAP SE
36
- * @version 1.138.0
36
+ * @version 1.139.0
37
37
  * @extends sap.ui.base.ManagedObject
38
38
  * @alias sap.ui.vk.threejs.DetailView
39
39
  */
@@ -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.138.0
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.visible) {
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
- nodesInfo.nodes.forEach(function(node) {
113
- if (res.color != null) {
114
- node._vkSetHighlightColor(res.color);
115
- }
116
- if (res.opacity != null) {
117
- node._vkSetOpacity(res.opacity);
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
- Play highlight
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
- var nodes = nodesInfo.nodes;
152
- for (var ni = 0; ni < nodes.length; ni++) {
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() && nodes.hiddenNodes != undefined) {
159
- that._viewStateManager.setVisibilityState(nodes.hiddenNodes, false, false);
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
- Play highlight
161
+ Pause highlight
170
162
  */
171
163
  HighlightPlayer.prototype.pause = function(time) {
172
164
  if (this._state === HighlightDisplayState.stopped) {
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @class Provides the interface for the material.
32
32
  * @public
33
33
  * @author SAP SE
34
- * @version 1.138.0
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
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  *
56
56
  * @public
57
57
  * @author SAP SE
58
- * @version 1.138.0
58
+ * @version 1.139.0
59
59
  * @extends sap.ui.vk.NodeHierarchy
60
60
  * @alias sap.ui.vk.threejs.NodeHierarchy
61
61
  */
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  *
43
43
  * @public
44
44
  * @author SAP SE
45
- * @version 1.138.0
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
- return this._object3D.userData.opacity;
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._vkSetOpacity(value);
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
- return this._object3D.userData.tintColor;
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._vkSetTintColor(value);
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._object3D.userData.tintColor));
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._vkSetTintColor(abgr);
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
  }
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @public
26
26
  * @author SAP SE
27
- * @version 1.138.0
27
+ * @version 1.139.0
28
28
  * @extends sap.ui.vk.OrthographicCamera
29
29
  * @alias sap.ui.vk.threejs.OrthographicCamera
30
30
  * @since 1.52.0
@@ -17,9 +17,7 @@ sap.ui.define([
17
17
  ) {
18
18
  "use strict";
19
19
 
20
- var OutlineRenderer = function(outlineWidth) {
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.setOutlineWidth = function(width) {
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 (this._outlineWidth > 1) {
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 < this._outlineWidth; i++) {
211
+ for (i = 1; i < outlineWidth; i++) {
218
212
  var rt = rt1;
219
213
  rt1 = rt2;
220
214
  rt2 = rt;
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @public
26
26
  * @author SAP SE
27
- * @version 1.138.0
27
+ * @version 1.139.0
28
28
  * @extends sap.ui.vk.PerspectiveCamera
29
29
  * @alias sap.ui.vk.threejs.PerspectiveCamera
30
30
  * @since 1.52.0
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @abstract
27
27
  * @private
28
28
  * @author SAP SE
29
- * @version 1.138.0
29
+ * @version 1.139.0
30
30
  * @alias sap.ui.vk.threejs.PointCloudGroup
31
31
  */
32
32
  const PointCloudGroup = function(settings) {
@@ -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.138.0
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.138.0
107
+ * @version 1.139.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();
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @class Provides the interface for the material.
22
22
  * @public
23
23
  * @author SAP SE
24
- * @version 1.138.0
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