@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
|
@@ -76,7 +76,7 @@ sap.ui.define([
|
|
|
76
76
|
*
|
|
77
77
|
* @public
|
|
78
78
|
* @author SAP SE
|
|
79
|
-
* @version 1.
|
|
79
|
+
* @version 1.140.0
|
|
80
80
|
* @extends sap.ui.vk.ViewportBase
|
|
81
81
|
* @alias sap.ui.vk.svg.Viewport
|
|
82
82
|
*/
|
|
@@ -389,7 +389,6 @@ sap.ui.define([
|
|
|
389
389
|
this._currentViewIndex = 0;
|
|
390
390
|
this._currentView = null;
|
|
391
391
|
this._styles.clear();
|
|
392
|
-
this._isEcad = undefined;
|
|
393
392
|
|
|
394
393
|
if (scene) {
|
|
395
394
|
this.setCamera(new OrthographicCamera());
|
|
@@ -581,7 +580,7 @@ sap.ui.define([
|
|
|
581
580
|
var node = this.hitTest(x, y, true);
|
|
582
581
|
|
|
583
582
|
if (this.isECAD() && node) {
|
|
584
|
-
const element = this.
|
|
583
|
+
const element = this.findElement(node);
|
|
585
584
|
if (element == null) {
|
|
586
585
|
return this; // nothing found, must be ECAD orphan node
|
|
587
586
|
}
|
|
@@ -748,7 +747,7 @@ sap.ui.define([
|
|
|
748
747
|
}
|
|
749
748
|
};
|
|
750
749
|
selection.forEach(ref => {
|
|
751
|
-
const element = this.
|
|
750
|
+
const element = this.findElement(ref);
|
|
752
751
|
if (element != null) {
|
|
753
752
|
include(element, output);
|
|
754
753
|
}
|
|
@@ -1755,17 +1754,7 @@ sap.ui.define([
|
|
|
1755
1754
|
};
|
|
1756
1755
|
|
|
1757
1756
|
Viewport.prototype.isECAD = function() {
|
|
1758
|
-
|
|
1759
|
-
return this._isEcad; // cached value
|
|
1760
|
-
}
|
|
1761
|
-
if (this._scene) {
|
|
1762
|
-
const metadata = this._scene.getSceneMetadata();
|
|
1763
|
-
if (metadata && metadata.length !== 0) {
|
|
1764
|
-
const data = metadata.find((el) => el.category === "ecad" && el.tag === "version" && el.value === "8");
|
|
1765
|
-
return (this._isEcad = !!data);
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
return (this._isEcad = false);
|
|
1757
|
+
return this._scene?.isECADScene() ?? false;
|
|
1769
1758
|
};
|
|
1770
1759
|
|
|
1771
1760
|
Viewport.prototype._extractMetadata = function(metadata) {
|
|
@@ -1830,7 +1819,7 @@ sap.ui.define([
|
|
|
1830
1819
|
root.setMatrix(ElementSVG._multiplyMatrices(reflect, rotate));
|
|
1831
1820
|
};
|
|
1832
1821
|
|
|
1833
|
-
Viewport.prototype.
|
|
1822
|
+
Viewport.prototype.findElement = function(ref) {
|
|
1834
1823
|
while (ref != null) {
|
|
1835
1824
|
const metadata = this._extractMetadata(ref.userData.metadata ?? {});
|
|
1836
1825
|
|
|
@@ -1844,7 +1833,9 @@ sap.ui.define([
|
|
|
1844
1833
|
|
|
1845
1834
|
Viewport.prototype.rotatePcbCW = function() {
|
|
1846
1835
|
if (this.isECAD()) {
|
|
1847
|
-
this._pcbRotateAngle
|
|
1836
|
+
this._pcbRotateAngle += this._pcbVisibleSurface === EcadLayerZone.Top
|
|
1837
|
+
? -Math.PI / 2
|
|
1838
|
+
: Math.PI / 2;
|
|
1848
1839
|
this._setRootTransform();
|
|
1849
1840
|
this.zoomTo(ZoomTo.Visible);
|
|
1850
1841
|
}
|
|
@@ -1852,7 +1843,9 @@ sap.ui.define([
|
|
|
1852
1843
|
|
|
1853
1844
|
Viewport.prototype.rotatePcbCCW = function() {
|
|
1854
1845
|
if (this.isECAD()) {
|
|
1855
|
-
this._pcbRotateAngle +=
|
|
1846
|
+
this._pcbRotateAngle += this._pcbVisibleSurface === EcadLayerZone.Top
|
|
1847
|
+
? Math.PI / 2
|
|
1848
|
+
: -Math.PI / 2;
|
|
1856
1849
|
this._setRootTransform();
|
|
1857
1850
|
this.zoomTo(ZoomTo.Visible);
|
|
1858
1851
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright 2010-
|
|
3
|
+
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -14,6 +14,30 @@ sap.ui.define([
|
|
|
14
14
|
var Module = (function (exports, three) {
|
|
15
15
|
'use strict';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @module BufferGeometryUtils
|
|
19
|
+
* @three_import import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js';
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Computes vertex tangents using the MikkTSpace algorithm. MikkTSpace generates the same tangents consistently,
|
|
24
|
+
* and is used in most modelling tools and normal map bakers. Use MikkTSpace for materials with normal maps,
|
|
25
|
+
* because inconsistent tangents may lead to subtle visual issues in the normal map, particularly around mirrored
|
|
26
|
+
* UV seams.
|
|
27
|
+
*
|
|
28
|
+
* In comparison to this method, {@link BufferGeometry#computeTangents} (a custom algorithm) generates tangents that
|
|
29
|
+
* probably will not match the tangents in other software. The custom algorithm is sufficient for general use with a
|
|
30
|
+
* custom material, and may be faster than MikkTSpace.
|
|
31
|
+
*
|
|
32
|
+
* Returns the original BufferGeometry. Indexed geometries will be de-indexed. Requires position, normal, and uv attributes.
|
|
33
|
+
*
|
|
34
|
+
* @param {BufferGeometry} geometry - The geometry to compute tangents for.
|
|
35
|
+
* @param {Object} MikkTSpace - Instance of `examples/jsm/libs/mikktspace.module.js`, or `mikktspace` npm package.
|
|
36
|
+
* Await `MikkTSpace.ready` before use.
|
|
37
|
+
* @param {boolean} [negateSign=true] - Whether to negate the sign component (.w) of each tangent.
|
|
38
|
+
* Required for normal map conventions in some formats, including glTF.
|
|
39
|
+
* @return {BufferGeometry} The updated geometry.
|
|
40
|
+
*/
|
|
17
41
|
function computeMikkTSpaceTangents( geometry, MikkTSpace, negateSign = true ) {
|
|
18
42
|
|
|
19
43
|
if ( ! MikkTSpace || ! MikkTSpace.isReady ) {
|
|
@@ -103,9 +127,11 @@ var Module = (function (exports, three) {
|
|
|
103
127
|
}
|
|
104
128
|
|
|
105
129
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* @
|
|
130
|
+
* Merges a set of geometries into a single instance. All geometries must have compatible attributes.
|
|
131
|
+
*
|
|
132
|
+
* @param {Array<BufferGeometry>} geometries - The geometries to merge.
|
|
133
|
+
* @param {boolean} [useGroups=false] - Whether to use groups or not.
|
|
134
|
+
* @return {?BufferGeometry} The merged geometry. Returns `null` if the merge does not succeed.
|
|
109
135
|
*/
|
|
110
136
|
function mergeGeometries( geometries, useGroups = false ) {
|
|
111
137
|
|
|
@@ -299,8 +325,11 @@ var Module = (function (exports, three) {
|
|
|
299
325
|
}
|
|
300
326
|
|
|
301
327
|
/**
|
|
302
|
-
*
|
|
303
|
-
* @
|
|
328
|
+
* Merges a set of attributes into a single instance. All attributes must have compatible properties and types.
|
|
329
|
+
* Instances of {@link InterleavedBufferAttribute} are not supported.
|
|
330
|
+
*
|
|
331
|
+
* @param {Array<BufferAttribute>} attributes - The attributes to merge.
|
|
332
|
+
* @return {?BufferAttribute} The merged attribute. Returns `null` if the merge does not succeed.
|
|
304
333
|
*/
|
|
305
334
|
function mergeAttributes( attributes ) {
|
|
306
335
|
|
|
@@ -392,8 +421,10 @@ var Module = (function (exports, three) {
|
|
|
392
421
|
}
|
|
393
422
|
|
|
394
423
|
/**
|
|
395
|
-
*
|
|
396
|
-
*
|
|
424
|
+
* Performs a deep clone of the given buffer attribute.
|
|
425
|
+
*
|
|
426
|
+
* @param {BufferAttribute} attribute - The attribute to clone.
|
|
427
|
+
* @return {BufferAttribute} The cloned attribute.
|
|
397
428
|
*/
|
|
398
429
|
function deepCloneAttribute( attribute ) {
|
|
399
430
|
|
|
@@ -414,8 +445,11 @@ var Module = (function (exports, three) {
|
|
|
414
445
|
}
|
|
415
446
|
|
|
416
447
|
/**
|
|
417
|
-
*
|
|
418
|
-
* @
|
|
448
|
+
* Interleaves a set of attributes and returns a new array of corresponding attributes that share a
|
|
449
|
+
* single {@link InterleavedBuffer} instance. All attributes must have compatible types.
|
|
450
|
+
*
|
|
451
|
+
* @param {Array<BufferAttribute>} attributes - The attributes to interleave.
|
|
452
|
+
* @return {Array<InterleavedBufferAttribute>} An array of interleaved attributes. If interleave does not succeed, the method returns `null`.
|
|
419
453
|
*/
|
|
420
454
|
function interleaveAttributes( attributes ) {
|
|
421
455
|
|
|
@@ -478,7 +512,12 @@ var Module = (function (exports, three) {
|
|
|
478
512
|
|
|
479
513
|
}
|
|
480
514
|
|
|
481
|
-
|
|
515
|
+
/**
|
|
516
|
+
* Returns a new, non-interleaved version of the given attribute.
|
|
517
|
+
*
|
|
518
|
+
* @param {InterleavedBufferAttribute} attribute - The interleaved attribute.
|
|
519
|
+
* @return {BufferAttribute} The non-interleaved attribute.
|
|
520
|
+
*/
|
|
482
521
|
function deinterleaveAttribute( attribute ) {
|
|
483
522
|
|
|
484
523
|
const cons = attribute.data.array.constructor;
|
|
@@ -526,7 +565,11 @@ var Module = (function (exports, three) {
|
|
|
526
565
|
|
|
527
566
|
}
|
|
528
567
|
|
|
529
|
-
|
|
568
|
+
/**
|
|
569
|
+
* Deinterleaves all attributes on the given geometry.
|
|
570
|
+
*
|
|
571
|
+
* @param {BufferGeometry} geometry - The geometry to deinterleave.
|
|
572
|
+
*/
|
|
530
573
|
function deinterleaveGeometry( geometry ) {
|
|
531
574
|
|
|
532
575
|
const attributes = geometry.attributes;
|
|
@@ -570,8 +613,10 @@ var Module = (function (exports, three) {
|
|
|
570
613
|
}
|
|
571
614
|
|
|
572
615
|
/**
|
|
573
|
-
*
|
|
574
|
-
*
|
|
616
|
+
* Returns the amount of bytes used by all attributes to represent the geometry.
|
|
617
|
+
*
|
|
618
|
+
* @param {BufferGeometry} geometry - The geometry.
|
|
619
|
+
* @return {number} The estimate bytes used.
|
|
575
620
|
*/
|
|
576
621
|
function estimateBytesUsed( geometry ) {
|
|
577
622
|
|
|
@@ -593,9 +638,11 @@ var Module = (function (exports, three) {
|
|
|
593
638
|
}
|
|
594
639
|
|
|
595
640
|
/**
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
* @
|
|
641
|
+
* Returns a new geometry with vertices for which all similar vertex attributes (within tolerance) are merged.
|
|
642
|
+
*
|
|
643
|
+
* @param {BufferGeometry} geometry - The geometry to merge vertices for.
|
|
644
|
+
* @param {number} [tolerance=1e-4] - The tolerance value.
|
|
645
|
+
* @return {BufferGeometry} - The new geometry with merged vertices.
|
|
599
646
|
*/
|
|
600
647
|
function mergeVertices( geometry, tolerance = 1e-4 ) {
|
|
601
648
|
|
|
@@ -756,9 +803,12 @@ var Module = (function (exports, three) {
|
|
|
756
803
|
}
|
|
757
804
|
|
|
758
805
|
/**
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
806
|
+
* Returns a new indexed geometry based on `TrianglesDrawMode` draw mode.
|
|
807
|
+
* This mode corresponds to the `gl.TRIANGLES` primitive in WebGL.
|
|
808
|
+
*
|
|
809
|
+
* @param {BufferGeometry} geometry - The geometry to convert.
|
|
810
|
+
* @param {number} drawMode - The current draw mode.
|
|
811
|
+
* @return {BufferGeometry} The new geometry using `TrianglesDrawMode`.
|
|
762
812
|
*/
|
|
763
813
|
function toTrianglesDrawMode( geometry, drawMode ) {
|
|
764
814
|
|
|
@@ -867,9 +917,13 @@ var Module = (function (exports, three) {
|
|
|
867
917
|
|
|
868
918
|
/**
|
|
869
919
|
* Calculates the morphed attributes of a morphed/skinned BufferGeometry.
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
920
|
+
*
|
|
921
|
+
* Helpful for Raytracing or Decals (i.e. a `DecalGeometry` applied to a morphed Object with a `BufferGeometry`
|
|
922
|
+
* will use the original `BufferGeometry`, not the morphed/skinned one, generating an incorrect result.
|
|
923
|
+
* Using this function to create a shadow `Object3`D the `DecalGeometry` can be correctly generated).
|
|
924
|
+
*
|
|
925
|
+
* @param {Mesh|Line|Points} object - The 3D object to compute morph attributes for.
|
|
926
|
+
* @return {Object} An object with original position/normal attributes and morphed ones.
|
|
873
927
|
*/
|
|
874
928
|
function computeMorphedAttributes( object ) {
|
|
875
929
|
|
|
@@ -1145,6 +1199,12 @@ var Module = (function (exports, three) {
|
|
|
1145
1199
|
|
|
1146
1200
|
}
|
|
1147
1201
|
|
|
1202
|
+
/**
|
|
1203
|
+
* Merges the {@link BufferGeometry#groups} for the given geometry.
|
|
1204
|
+
*
|
|
1205
|
+
* @param {BufferGeometry} geometry - The geometry to modify.
|
|
1206
|
+
* @return {BufferGeometry} - The updated geometry
|
|
1207
|
+
*/
|
|
1148
1208
|
function mergeGroups( geometry ) {
|
|
1149
1209
|
|
|
1150
1210
|
if ( geometry.groups.length === 0 ) {
|
|
@@ -1247,15 +1307,14 @@ var Module = (function (exports, three) {
|
|
|
1247
1307
|
|
|
1248
1308
|
}
|
|
1249
1309
|
|
|
1250
|
-
|
|
1251
1310
|
/**
|
|
1252
1311
|
* Modifies the supplied geometry if it is non-indexed, otherwise creates a new,
|
|
1253
1312
|
* non-indexed geometry. Returns the geometry with smooth normals everywhere except
|
|
1254
1313
|
* faces that meet at an angle greater than the crease angle.
|
|
1255
1314
|
*
|
|
1256
|
-
* @param {BufferGeometry} geometry
|
|
1257
|
-
* @param {number} [creaseAngle]
|
|
1258
|
-
* @return {BufferGeometry}
|
|
1315
|
+
* @param {BufferGeometry} geometry - The geometry to modify.
|
|
1316
|
+
* @param {number} [creaseAngle=Math.PI/3] - The crease angle in radians.
|
|
1317
|
+
* @return {BufferGeometry} - The updated geometry
|
|
1259
1318
|
*/
|
|
1260
1319
|
function toCreasedNormals( geometry, creaseAngle = Math.PI / 3 /* 60 degrees */ ) {
|
|
1261
1320
|
|
|
@@ -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.
|
|
54309
|
+
warn(`Invalid PDF header version: 1.140.0`);
|
|
54310
54310
|
}
|
|
54311
54311
|
}
|
|
54312
54312
|
parseStartXRef() {
|