@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.
Files changed (242) 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 +2 -2
  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 +2 -2
  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 +19 -15
  12. package/src/sap/ui/vk/ContentManager.js +1 -1
  13. package/src/sap/ui/vk/ContentResource.js +3 -2
  14. package/src/sap/ui/vk/ContentType.js +1 -1
  15. package/src/sap/ui/vk/Core.js +1 -3
  16. package/src/sap/ui/vk/DownloadManager.js +1 -1
  17. package/src/sap/ui/vk/DrawerToolbar.js +152 -19
  18. package/src/sap/ui/vk/DrawerToolbarButton.js +12 -1
  19. package/src/sap/ui/vk/DvlException.js +1 -1
  20. package/src/sap/ui/vk/FlexibleControl.js +1 -2
  21. package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -2
  22. package/src/sap/ui/vk/Highlight.js +1 -1
  23. package/src/sap/ui/vk/ImageContentManager.js +1 -1
  24. package/src/sap/ui/vk/JointUtils.js +1 -1
  25. package/src/sap/ui/vk/LayerProxy.js +1 -1
  26. package/src/sap/ui/vk/LegendItem.js +1 -1
  27. package/src/sap/ui/vk/ListPanel.js +1 -1
  28. package/src/sap/ui/vk/ListPanelStack.js +1 -1
  29. package/src/sap/ui/vk/Loco.js +1 -1
  30. package/src/sap/ui/vk/Material.js +1 -1
  31. package/src/sap/ui/vk/NativeViewport.js +1 -1
  32. package/src/sap/ui/vk/NodeHierarchy.js +1 -1
  33. package/src/sap/ui/vk/NodeProxy.js +1 -1
  34. package/src/sap/ui/vk/NodeUtils.js +1 -1
  35. package/src/sap/ui/vk/Notifications.js +1 -1
  36. package/src/sap/ui/vk/OrthographicCamera.js +1 -1
  37. package/src/sap/ui/vk/OutputSettings.js +0 -1
  38. package/src/sap/ui/vk/Overlay.js +1 -1
  39. package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
  40. package/src/sap/ui/vk/ProgressIndicator.js +1 -1
  41. package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
  42. package/src/sap/ui/vk/RedlineConversation.js +1 -1
  43. package/src/sap/ui/vk/RedlineDesign.js +1 -1
  44. package/src/sap/ui/vk/RedlineElement.js +1 -1
  45. package/src/sap/ui/vk/RedlineElementComment.js +1 -1
  46. package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
  47. package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
  48. package/src/sap/ui/vk/RedlineElementLine.js +1 -1
  49. package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
  50. package/src/sap/ui/vk/RedlineElementText.js +1 -1
  51. package/src/sap/ui/vk/RedlineSurface.js +2 -2
  52. package/src/sap/ui/vk/SafeArea.js +1 -1
  53. package/src/sap/ui/vk/Scene.js +16 -1
  54. package/src/sap/ui/vk/SceneTree.js +23 -9
  55. package/src/sap/ui/vk/StepNavigation.js +1 -2
  56. package/src/sap/ui/vk/Texture.js +2 -2
  57. package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
  58. package/src/sap/ui/vk/ToggleMenuItem.js +7 -4
  59. package/src/sap/ui/vk/ToggleMenuItemRenderer.js +224 -0
  60. package/src/sap/ui/vk/Toolbar.js +62 -100
  61. package/src/sap/ui/vk/View.js +7 -13
  62. package/src/sap/ui/vk/ViewGallery.js +2 -2
  63. package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
  64. package/src/sap/ui/vk/ViewGroup.js +1 -1
  65. package/src/sap/ui/vk/ViewManager.js +1 -1
  66. package/src/sap/ui/vk/ViewStateManager.js +4 -11
  67. package/src/sap/ui/vk/ViewStateManagerBase.js +4 -4
  68. package/src/sap/ui/vk/Viewer.js +408 -234
  69. package/src/sap/ui/vk/Viewport.js +2 -2
  70. package/src/sap/ui/vk/ViewportBase.js +24 -70
  71. package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
  72. package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
  73. package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
  74. package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
  75. package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
  76. package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
  77. package/src/sap/ui/vk/dvl/Scene.js +1 -1
  78. package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
  79. package/src/sap/ui/vk/dvl/Viewport.js +1 -1
  80. package/src/sap/ui/vk/ecad/ElementsPanel.js +627 -132
  81. package/src/sap/ui/vk/ecad/LayersPanel.js +247 -131
  82. package/src/sap/ui/vk/i18n/messagebundle.properties +70 -38
  83. package/src/sap/ui/vk/i18n/messagebundle_ar.properties +30 -12
  84. package/src/sap/ui/vk/i18n/messagebundle_bg.properties +30 -12
  85. package/src/sap/ui/vk/i18n/messagebundle_ca.properties +30 -12
  86. package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +30 -12
  87. package/src/sap/ui/vk/i18n/messagebundle_cs.properties +30 -12
  88. package/src/sap/ui/vk/i18n/messagebundle_cy.properties +30 -12
  89. package/src/sap/ui/vk/i18n/messagebundle_da.properties +30 -12
  90. package/src/sap/ui/vk/i18n/messagebundle_de.properties +30 -12
  91. package/src/sap/ui/vk/i18n/messagebundle_el.properties +30 -12
  92. package/src/sap/ui/vk/i18n/messagebundle_en.properties +30 -12
  93. package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +30 -12
  94. package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +31 -12
  95. package/src/sap/ui/vk/i18n/messagebundle_es.properties +30 -12
  96. package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +30 -12
  97. package/src/sap/ui/vk/i18n/messagebundle_et.properties +30 -12
  98. package/src/sap/ui/vk/i18n/messagebundle_fi.properties +30 -12
  99. package/src/sap/ui/vk/i18n/messagebundle_fr.properties +30 -12
  100. package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +30 -12
  101. package/src/sap/ui/vk/i18n/messagebundle_hi.properties +30 -12
  102. package/src/sap/ui/vk/i18n/messagebundle_hr.properties +30 -12
  103. package/src/sap/ui/vk/i18n/messagebundle_hu.properties +30 -12
  104. package/src/sap/ui/vk/i18n/messagebundle_id.properties +30 -12
  105. package/src/sap/ui/vk/i18n/messagebundle_it.properties +30 -12
  106. package/src/sap/ui/vk/i18n/messagebundle_iw.properties +30 -12
  107. package/src/sap/ui/vk/i18n/messagebundle_ja.properties +30 -12
  108. package/src/sap/ui/vk/i18n/messagebundle_kk.properties +30 -12
  109. package/src/sap/ui/vk/i18n/messagebundle_ko.properties +27 -9
  110. package/src/sap/ui/vk/i18n/messagebundle_lt.properties +30 -12
  111. package/src/sap/ui/vk/i18n/messagebundle_lv.properties +30 -12
  112. package/src/sap/ui/vk/i18n/messagebundle_mk.properties +30 -12
  113. package/src/sap/ui/vk/i18n/messagebundle_ms.properties +30 -12
  114. package/src/sap/ui/vk/i18n/messagebundle_nl.properties +30 -12
  115. package/src/sap/ui/vk/i18n/messagebundle_no.properties +30 -12
  116. package/src/sap/ui/vk/i18n/messagebundle_pl.properties +30 -12
  117. package/src/sap/ui/vk/i18n/messagebundle_pt.properties +30 -12
  118. package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +30 -12
  119. package/src/sap/ui/vk/i18n/messagebundle_ro.properties +30 -12
  120. package/src/sap/ui/vk/i18n/messagebundle_ru.properties +30 -12
  121. package/src/sap/ui/vk/i18n/messagebundle_sh.properties +30 -12
  122. package/src/sap/ui/vk/i18n/messagebundle_sk.properties +30 -12
  123. package/src/sap/ui/vk/i18n/messagebundle_sl.properties +30 -12
  124. package/src/sap/ui/vk/i18n/messagebundle_sr.properties +30 -12
  125. package/src/sap/ui/vk/i18n/messagebundle_sv.properties +30 -12
  126. package/src/sap/ui/vk/i18n/messagebundle_th.properties +30 -12
  127. package/src/sap/ui/vk/i18n/messagebundle_tr.properties +30 -12
  128. package/src/sap/ui/vk/i18n/messagebundle_uk.properties +30 -12
  129. package/src/sap/ui/vk/i18n/messagebundle_vi.properties +30 -12
  130. package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +30 -12
  131. package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +30 -12
  132. package/src/sap/ui/vk/library.js +7 -4
  133. package/src/sap/ui/vk/measurements/Angle.js +1 -1
  134. package/src/sap/ui/vk/measurements/Area.js +1 -1
  135. package/src/sap/ui/vk/measurements/Distance.js +1 -1
  136. package/src/sap/ui/vk/measurements/Edge.js +1 -1
  137. package/src/sap/ui/vk/measurements/Face.js +1 -1
  138. package/src/sap/ui/vk/measurements/Feature.js +1 -1
  139. package/src/sap/ui/vk/measurements/Vertex.js +1 -1
  140. package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
  141. package/src/sap/ui/vk/pdf/Page.js +9 -10
  142. package/src/sap/ui/vk/pdf/Utils.js +4 -2
  143. package/src/sap/ui/vk/pdf/Viewport.js +5 -8
  144. package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
  145. package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
  146. package/src/sap/ui/vk/svg/ContentManager.js +2 -1
  147. package/src/sap/ui/vk/svg/HotspotHelper.js +2 -2
  148. package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
  149. package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
  150. package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
  151. package/src/sap/ui/vk/svg/Scene.js +1 -1
  152. package/src/sap/ui/vk/svg/SceneBuilder.js +12 -4
  153. package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
  154. package/src/sap/ui/vk/svg/Viewport.js +192 -2
  155. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
  156. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
  157. package/src/sap/ui/vk/themes/base/library.source.less +1 -1
  158. package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
  159. package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
  160. package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
  161. package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
  162. package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
  163. package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
  164. package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
  165. package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
  166. package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
  167. package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
  168. package/src/sap/ui/vk/threejs/Billboard.js +23 -11
  169. package/src/sap/ui/vk/threejs/Callout.js +11 -1
  170. package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
  171. package/src/sap/ui/vk/threejs/ContentManager.js +3 -2
  172. package/src/sap/ui/vk/threejs/DetailView.js +1 -1
  173. package/src/sap/ui/vk/threejs/HighlightPlayer.js +14 -22
  174. package/src/sap/ui/vk/threejs/Material.js +2 -2
  175. package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
  176. package/src/sap/ui/vk/threejs/NodeProxy.js +9 -11
  177. package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
  178. package/src/sap/ui/vk/threejs/OutlineRenderer.js +4 -10
  179. package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
  180. package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
  181. package/src/sap/ui/vk/threejs/Scene.js +1 -15
  182. package/src/sap/ui/vk/threejs/SceneBuilder.js +17 -4
  183. package/src/sap/ui/vk/threejs/Texture.js +2 -2
  184. package/src/sap/ui/vk/threejs/ThreeExtensions.js +10 -174
  185. package/src/sap/ui/vk/threejs/ThreeUtils.js +7 -18
  186. package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
  187. package/src/sap/ui/vk/threejs/ViewStateManager.js +752 -447
  188. package/src/sap/ui/vk/threejs/Viewport.js +43 -33
  189. package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
  190. package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
  191. package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
  192. package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
  193. package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
  194. package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
  195. package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
  196. package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
  197. package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
  198. package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
  199. package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
  200. package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
  201. package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
  202. package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
  203. package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
  204. package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
  205. package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
  206. package/src/sap/ui/vk/tools/ExplodeItemGroup.js +1 -1
  207. package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
  208. package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
  209. package/src/sap/ui/vk/tools/Gizmo.js +1 -1
  210. package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
  211. package/src/sap/ui/vk/tools/MoveTool.js +1 -1
  212. package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
  213. package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +2 -2
  214. package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
  215. package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
  216. package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
  217. package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
  218. package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
  219. package/src/sap/ui/vk/tools/RotateTool.js +1 -1
  220. package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
  221. package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
  222. package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
  223. package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
  224. package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
  225. package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
  226. package/src/sap/ui/vk/tools/Tool.js +1 -1
  227. package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
  228. package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
  229. package/src/sap/ui/vk/tools/TooltipToolHandler.js +5 -0
  230. package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
  231. package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
  232. package/src/sap/ui/vk/totara/TotaraLoader.js +5 -1
  233. package/src/sap/ui/vk/ve/matai.js +1 -1
  234. package/src/sap/ui/vk/ve/matai.wasm +0 -0
  235. package/ui5.yaml +5 -3
  236. package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
  237. package/src/sap/ui/vk/ViewerRenderer.js +0 -48
  238. package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +0 -41
  239. package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +0 -41
  240. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
  241. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
  242. package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
@@ -66,7 +66,7 @@ sap.ui.define([
66
66
  *
67
67
  * @private
68
68
  * @author SAP SE
69
- * @version 1.136.1
69
+ * @version 1.139.0
70
70
  */
71
71
  var SceneBuilder = function(rootNode, contentResource, resolve, reject) {
72
72
  this._rootNode = rootNode;
@@ -160,6 +160,9 @@ sap.ui.define([
160
160
 
161
161
  if (vkScene) {
162
162
  this._vkScene = vkScene;
163
+ if (this._sceneMetadata) {
164
+ this._vkScene.setSceneMetadata(this._sceneMetadata);
165
+ }
163
166
  }
164
167
  return this;
165
168
  };
@@ -895,7 +898,6 @@ sap.ui.define([
895
898
  fillStyle: geometry.isPolyline ? null : { colour: material.color },
896
899
  subelement: true
897
900
  });
898
- path.uid += "-g";
899
901
  node.add(path);
900
902
 
901
903
  TotaraUtils.pushElementIntoMapArray(this._materialNodesMap, materialId, path);
@@ -981,7 +983,6 @@ sap.ui.define([
981
983
 
982
984
  this._resetCurrentScene(sceneId);
983
985
  var node = this._nodes.get(nodeId);
984
- node.uid += "-p";
985
986
 
986
987
  var shapes = parametricContent.shapes;
987
988
  if (shapes) {
@@ -1077,7 +1078,6 @@ sap.ui.define([
1077
1078
 
1078
1079
  if (shape) {
1079
1080
  shape.userData.po = parametricContent;
1080
- shape.uid += "-s";
1081
1081
  if (parametricContent.materialID) {
1082
1082
  TotaraUtils.pushElementIntoMapArray(this._materialNodesMap, parametricContent.materialID, shape);
1083
1083
  }
@@ -1395,5 +1395,13 @@ sap.ui.define([
1395
1395
  return undefined;
1396
1396
  };
1397
1397
 
1398
+ SceneBuilder.prototype.setSceneMetadata = function(metadata) {
1399
+ if (this._vkScene) {
1400
+ this._vkScene.setSceneMetadata(metadata);
1401
+ } else {
1402
+ this._sceneMetadata = metadata;
1403
+ }
1404
+ };
1405
+
1398
1406
  return SceneBuilder;
1399
1407
  });
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @param {object} [mSettings] Initial settings for the new ViewStateManager object.
50
50
  * @public
51
51
  * @author SAP SE
52
- * @version 1.136.1
52
+ * @version 1.139.0
53
53
  * @extends sap.ui.vk.ViewStateManagerBase
54
54
  * @alias sap.ui.vk.svg.ViewStateManager
55
55
  * @since 1.80.0
@@ -354,7 +354,7 @@ sap.ui.define([
354
354
  // Force visibility by traversing ancestor nodes and make them visible
355
355
  var node = nodeRef.parent;
356
356
  while (node) {
357
- node.visible = true;
357
+ node.setVisible(mask, true);
358
358
  node = node.parent;
359
359
  }
360
360
  }
@@ -32,6 +32,7 @@ sap.ui.define([
32
32
  "../colorToABGR",
33
33
  "../abgrToColor",
34
34
  "./MiniMap",
35
+ "./Element",
35
36
  "sap/m/Dialog",
36
37
  "sap/base/Log",
37
38
  "sap/base/i18n/Localization"
@@ -61,6 +62,7 @@ sap.ui.define([
61
62
  colorToABGR,
62
63
  abgrToColor,
63
64
  MiniMap,
65
+ ElementSVG,
64
66
  Dialog,
65
67
  Log,
66
68
  Localization
@@ -74,7 +76,7 @@ sap.ui.define([
74
76
  *
75
77
  * @public
76
78
  * @author SAP SE
77
- * @version 1.136.1
79
+ * @version 1.139.0
78
80
  * @extends sap.ui.vk.ViewportBase
79
81
  * @alias sap.ui.vk.svg.Viewport
80
82
  */
@@ -127,6 +129,13 @@ sap.ui.define([
127
129
  }
128
130
  });
129
131
 
132
+ const EcadLayerZone = {
133
+ Top: "Top",
134
+ Inner: "Inner",
135
+ Bottom: "Bottom",
136
+ Unknown: ""
137
+ };
138
+
130
139
  var basePrototype = Viewport.getMetadata().getParent().getClass().prototype;
131
140
 
132
141
  Viewport.prototype.init = function() {
@@ -216,6 +225,11 @@ sap.ui.define([
216
225
  this._currentViewIndex = 0;
217
226
  this._currentView = null;
218
227
 
228
+ this._pcbRotateAngle = 0.0; // ECAD, to rotate board
229
+ this._pcbVisibleSurface = EcadLayerZone.Unknown;
230
+ this._topElements = []; // ECAD, elements from all top layers
231
+ this._bottomElements = []; // ECAD, elements from all bottom layers
232
+
219
233
  vkCore.getEventBus().subscribe("sap.ui.vk", "viewStateApplied", this._onViewStateApplied, this);
220
234
 
221
235
  Localization.attachChange(this._onLocalizationChanged.bind(this));
@@ -379,6 +393,15 @@ sap.ui.define([
379
393
  if (scene) {
380
394
  this.setCamera(new OrthographicCamera());
381
395
 
396
+ if (this.isECAD()) {
397
+ // get layer zone info from scene metadata
398
+ const zones = this._extractLayersZone();
399
+ // find elements belong to top & bottom layers
400
+ this._topElements = [];
401
+ this._bottomElements = [];
402
+ this._scanTree(zones, this._scene.getRootElement());
403
+ }
404
+
382
405
  /**
383
406
  * Viewport gets invalidated only when a node is created that needs content to be downloaded (in ContentLoadingFinished event handler)
384
407
  * But when creating an image out of annotation, the annotation is downloaded only the first (reused every other time)
@@ -556,10 +579,18 @@ sap.ui.define([
556
579
  }
557
580
  var node = this.hitTest(x, y, true);
558
581
 
582
+ if (this.isECAD() && node) {
583
+ const element = this.findElement(node);
584
+ if (element == null) {
585
+ return this; // nothing found, must be ECAD orphan node
586
+ }
587
+ node = element;
588
+ }
589
+
559
590
  if (!isDoubleClick) {
560
591
  this.tapObject(node);
561
592
 
562
- if (node !== null) {
593
+ if (node != null) {
563
594
  this.fireNodeClicked({ nodeRef: node, x: x, y: y }, true, true);
564
595
  }
565
596
  } else if (!this.getFreezeCamera()) {
@@ -586,8 +617,21 @@ sap.ui.define([
586
617
  var parameters = {
587
618
  picked: nodeRef ? [nodeRef] : []
588
619
  };
620
+
589
621
  this.fireNodesPicked(parameters);
590
622
 
623
+ // if ECAD scene then include all children
624
+ if (this.isECAD() && nodeRef) {
625
+ const include = (ref) => {
626
+ if (ref != null) {
627
+ parameters.picked.push(ref);
628
+ ref.children.forEach(include);
629
+ }
630
+ };
631
+ parameters.picked = [];
632
+ include(nodeRef);
633
+ }
634
+
591
635
  if (this.getSelectionMode() === SelectionMode.Exclusive) {
592
636
  this.exclusiveSelectionHandler(parameters.picked);
593
637
  } else if (this.getSelectionMode() === SelectionMode.Sticky) {
@@ -693,8 +737,26 @@ sap.ui.define([
693
737
  rect = this._camera._transformRect(rect);
694
738
  var selection = new Set();
695
739
  this._scene.getRootElement()._findRectElementsRecursive(selection, rect, vsm._mask);
740
+
741
+ if (this.isECAD() && selection.size !== 0) {
742
+ const output = new Set();
743
+ const include = (ref, output) => {
744
+ if (ref != null) {
745
+ output.add(ref);
746
+ ref.children.forEach((child) => include(child, output));
747
+ }
748
+ };
749
+ selection.forEach(ref => {
750
+ const element = this.findElement(ref);
751
+ if (element != null) {
752
+ include(element, output);
753
+ }
754
+ });
755
+ return Array.from(output);
756
+ }
696
757
  return Array.from(selection);
697
758
  }
759
+
698
760
  return [];
699
761
  };
700
762
 
@@ -756,6 +818,12 @@ sap.ui.define([
756
818
  }
757
819
  }, this);
758
820
  }
821
+ // when scene is available & content has been loaded -> proceed with initial view
822
+ if (this.isECAD()) {
823
+ this._pcbVisibleSurface = EcadLayerZone.Bottom;
824
+ // do the flip to make top layers elements visible without mirroring
825
+ this.flipPcb(true);
826
+ }
759
827
 
760
828
  if (event && (!this._camera._initialZoom || this._camera._initialZoom === -1)) {
761
829
  // this block should be called only once after loading all the content, if there is no camera information in the initial view
@@ -1685,5 +1753,127 @@ sap.ui.define([
1685
1753
  return screenPos;
1686
1754
  };
1687
1755
 
1756
+ Viewport.prototype.isECAD = function() {
1757
+ return this._scene?.isECADScene() ?? false;
1758
+ };
1759
+
1760
+ Viewport.prototype._extractMetadata = function(metadata) {
1761
+ if (metadata.length != undefined) {
1762
+ const map = new Map();
1763
+ metadata.forEach(function(entry) {
1764
+ if (entry.category === "ecad") {
1765
+ map.set(entry.tag, entry.value);
1766
+ }
1767
+ });
1768
+ return map;
1769
+ }
1770
+ return null;
1771
+ };
1772
+
1773
+ Viewport.prototype._extractLayersZone = function() {
1774
+ const zones = new Map();
1775
+ const metadata = this._scene.getSceneMetadata();
1776
+ const layers = metadata.find((el) => el.category === "ecad" && el.tag === "Layers");
1777
+
1778
+ if (layers) {
1779
+ const list = layers.value.split("|");
1780
+ list.forEach(function(name) {
1781
+ const zone = metadata.find((el) => el.category === name && el.tag === "Zone");
1782
+ zones.set(name, zone ? zone.value : EcadLayerZone.Unknown);
1783
+ }, this);
1784
+ }
1785
+ return zones;
1786
+ };
1787
+
1788
+ Viewport.prototype._scanTree = function(zones, nodeRef) {
1789
+ const metadata = this._extractMetadata(nodeRef.userData.metadata || {});
1790
+ if (metadata) {
1791
+ const layer = metadata.get("layer");
1792
+ if (layer) {
1793
+ const zone = zones.get(layer);
1794
+ switch (zone) {
1795
+ case EcadLayerZone.Top:
1796
+ this._topElements.push(nodeRef);
1797
+ break;
1798
+ case EcadLayerZone.Bottom:
1799
+ this._bottomElements.push(nodeRef);
1800
+ break;
1801
+ default:
1802
+ break;
1803
+ }
1804
+ return; // don't go further down the hierarchy
1805
+ }
1806
+ }
1807
+ nodeRef.children.forEach(this._scanTree.bind(this, zones));
1808
+ };
1809
+
1810
+ function makeRotateMatrix(x) {
1811
+ const sin = Math.sin(x);
1812
+ const cos = Math.cos(x);
1813
+ return [cos, -sin, sin, cos, 0, 0];
1814
+ }
1815
+ Viewport.prototype._setRootTransform = function() {
1816
+ const rotate = makeRotateMatrix(this._pcbRotateAngle);
1817
+ const reflect = [this._pcbVisibleSurface === EcadLayerZone.Top ? 1 : -1, 0, 0, 1, 0, 0];
1818
+ const root = this._scene.getRootElement();
1819
+ root.setMatrix(ElementSVG._multiplyMatrices(reflect, rotate));
1820
+ };
1821
+
1822
+ Viewport.prototype.findElement = function(ref) {
1823
+ while (ref != null) {
1824
+ const metadata = this._extractMetadata(ref.userData.metadata ?? {});
1825
+
1826
+ if (metadata?.has("type")) {
1827
+ return ref;
1828
+ }
1829
+ ref = ref.parent;
1830
+ }
1831
+ return null;
1832
+ };
1833
+
1834
+ Viewport.prototype.rotatePcbCW = function() {
1835
+ if (this.isECAD()) {
1836
+ this._pcbRotateAngle += this._pcbVisibleSurface === EcadLayerZone.Top
1837
+ ? -Math.PI / 2
1838
+ : Math.PI / 2;
1839
+ this._setRootTransform();
1840
+ this.zoomTo(ZoomTo.Visible);
1841
+ }
1842
+ };
1843
+
1844
+ Viewport.prototype.rotatePcbCCW = function() {
1845
+ if (this.isECAD()) {
1846
+ this._pcbRotateAngle += this._pcbVisibleSurface === EcadLayerZone.Top
1847
+ ? Math.PI / 2
1848
+ : -Math.PI / 2;
1849
+ this._setRootTransform();
1850
+ this.zoomTo(ZoomTo.Visible);
1851
+ }
1852
+ };
1853
+
1854
+ Viewport.prototype.flipPcb = function(skipReflect) {
1855
+ if (this.isECAD() && this._viewStateManager) {
1856
+ this._pcbVisibleSurface = (this._pcbVisibleSurface === EcadLayerZone.Top ? EcadLayerZone.Bottom : EcadLayerZone.Top);
1857
+
1858
+ if (!skipReflect) {
1859
+ this._setRootTransform();
1860
+ this.zoomTo(ZoomTo.Visible);
1861
+ }
1862
+ // hide everything first
1863
+ this._viewStateManager.setVisibilityState(this._scene.getRootElement(), false, true, true);
1864
+ // show elements from top or bottom layers
1865
+ switch (this._pcbVisibleSurface) {
1866
+ case EcadLayerZone.Top:
1867
+ this._viewStateManager.setVisibilityState(this._topElements, true, true, true);
1868
+ break;
1869
+ case EcadLayerZone.Bottom:
1870
+ this._viewStateManager.setVisibilityState(this._bottomElements, true, true, true);
1871
+ break;
1872
+ default:
1873
+ break;
1874
+ }
1875
+ }
1876
+ };
1877
+
1688
1878
  return Viewport;
1689
1879
  });
@@ -10,7 +10,7 @@
10
10
 
11
11
  @font-face {
12
12
  font-family: 'vk-icons';
13
- src: url('fonts/SAP-VE-icons-regular-v1.4.woff2') format('woff2');
13
+ src: url('fonts/SAP-VE-icons-regular-v1.8.woff2') format('woff2');
14
14
  font-weight: normal;
15
15
  font-style: normal;
16
16
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  @font-face {
12
12
  font-family: 'vk-icons';
13
- src: url('../base/fonts/SAP-VE-icons-regular-v1.4.woff2') format('woff2');
13
+ src: url('../base/fonts/SAP-VE-icons-regular-v1.8.woff2') format('woff2');
14
14
  font-weight: normal;
15
15
  font-style: normal;
16
16
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  @font-face {
12
12
  font-family: 'vk-icons';
13
- src: url('../base/fonts/SAP-VE-icons-regular-v1.4.woff2') format('woff2');
13
+ src: url('../base/fonts/SAP-VE-icons-regular-v1.8.woff2') format('woff2');
14
14
  font-weight: normal;
15
15
  font-style: normal;
16
16
  }
@@ -18,7 +18,7 @@
18
18
 
19
19
  @font-face {
20
20
  font-family: 'vk-icons';
21
- src: url('../base/fonts/SAP-VE-icons-regular-v1.4.woff2') format('woff2');
21
+ src: url('../base/fonts/SAP-VE-icons-regular-v1.8.woff2') format('woff2');
22
22
  font-weight: normal;
23
23
  font-style: normal;
24
24
  }
@@ -8,8 +8,3 @@
8
8
  @import "../base/library.source.less";
9
9
  @import "../../../../../sap/ui/core/themes/sap_horizon/base.less";
10
10
  @import "../../../../../sap/ui/core/themes/sap_horizon/global.less";
11
-
12
- @font-face {
13
- font-family: 'vk-icons';
14
- src: url('../base/fonts/SAP-VE-icons-bold-v1.4.woff2') format('woff2');
15
- }
@@ -8,8 +8,3 @@
8
8
  @import "../base/library.source.less";
9
9
  @import "../../../../../sap/ui/core/themes/sap_horizon_dark/base.less";
10
10
  @import "../../../../../sap/ui/core/themes/sap_horizon_dark/global.less";
11
-
12
- @font-face {
13
- font-family: 'vk-icons';
14
- src: url('../base/fonts/SAP-VE-icons-bold-v1.4.woff2') format('woff2');
15
- }
@@ -8,8 +8,3 @@
8
8
  @import "../base/library.source.less";
9
9
  @import "../../../../../sap/ui/core/themes/sap_horizon_hcb/base.less";
10
10
  @import "../../../../../sap/ui/core/themes/sap_horizon_hcb/global.less";
11
-
12
- @font-face {
13
- font-family: 'vk-icons';
14
- src: url('../base/fonts/SAP-VE-icons-bold-v1.4.woff2') format('woff2');
15
- }
@@ -8,8 +8,3 @@
8
8
  @import "../base/library.source.less";
9
9
  @import "../../../../../sap/ui/core/themes/sap_horizon_hcw/base.less";
10
10
  @import "../../../../../sap/ui/core/themes/sap_horizon_hcw/global.less";
11
-
12
- @font-face {
13
- font-family: 'vk-icons';
14
- src: url('../base/fonts/SAP-VE-icons-bold-v1.4.woff2') format('woff2');
15
- }
@@ -54306,7 +54306,7 @@ class PDFDocument {
54306
54306
  if (PDF_VERSION_REGEXP.test(version)) {
54307
54307
  this._version = version;
54308
54308
  } else {
54309
- warn(`Invalid PDF header version: 1.136.1`);
54309
+ warn(`Invalid PDF header version: 1.139.0`);
54310
54310
  }
54311
54311
  }
54312
54312
  parseStartXRef() {
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  *
36
36
  * @private
37
37
  * @author SAP SE
38
- * @version 1.136.1
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.136.1
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.136.1
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.136.1
42
+ * @version 1.139.0
43
43
  * @extends sap.ui.vk.threejs.Billboard
44
44
  * @alias sap.ui.vk.threejs.Callout
45
45
  */
@@ -152,6 +152,16 @@ sap.ui.define([
152
152
 
153
153
  // set billboard scale
154
154
  var scale = pos4.w * 2 / (viewportSize.x * camera.projectionMatrix.elements[0]);
155
+ const outputSettings = renderer.userData?.outputSettings;
156
+ if (outputSettings) {
157
+ const outputDPI = 72; // ignore outputSettings.dpi as VEA ignores DPI setting and always uses 72 DPI
158
+ const mmToInch = 1 / 25.4; // 1 inch = 25.4 mm
159
+ const pointToPixel = 4 / 3; // 1 inch = 72 points(common for older screens) = 96 pixels(standard web displays), so 1 point = 96 / 72 pixels = 4 / 3 pixels
160
+ const mmToPixels = mmToInch * outputDPI * pointToPixel; // convert mm to pixels (mm -> inches -> points -> pixels)
161
+ const outputWidth = outputSettings.width * mmToPixels;
162
+ const outputHeight = outputSettings.height * mmToPixels;
163
+ scale *= Math.min(viewportSize.x / outputWidth, viewportSize.y / outputHeight);
164
+ }
155
165
  this._billboard.scale.set(scale * this._width, scale * this._height, 1);
156
166
 
157
167
  // add per pixel alignment to the billboard
@@ -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.136.1
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.136.1
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
@@ -305,6 +305,7 @@ sap.ui.define([
305
305
  scene.backgroundBottomColor = value.backgroundBottomColor; // hex color or undefined
306
306
  scene.renderMode = value.renderMode; // sap.ui.vk.RenderMode or undefined
307
307
  scene.upAxis = value.upAxis; // (0 = +X, 1 = -X, 2 = +Y, 3 = -Y, 4 = +Z, 5 = -Z)
308
+ scene.outputSettings = value.outputSettings;
308
309
  }
309
310
  }
310
311
 
@@ -360,7 +361,7 @@ sap.ui.define([
360
361
 
361
362
  if (contentResource.getSource()) {
362
363
  // Try one of default loaders.
363
- const sourceType = contentResource.getEffectiveSourceType().toLowerCase();
364
+ var sourceType = contentResource.getEffectiveSourceType().toLowerCase();
364
365
 
365
366
  var that = this;
366
367
  switch (sourceType) {
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  *
34
34
  * @private
35
35
  * @author SAP SE
36
- * @version 1.136.1
36
+ * @version 1.139.0
37
37
  * @extends sap.ui.base.ManagedObject
38
38
  * @alias sap.ui.vk.threejs.DetailView
39
39
  */