@roomle/web-sdk 3.4.0 → 3.5.0-alpha.2
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/lib/{BufferGeometry-Br8QIDeK.mjs → BufferGeometry-zhwL66xZ.mjs} +170 -178
- package/lib/BufferGeometry-zhwL66xZ.mjs.map +1 -0
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/{GLTFExporter-DUjuGznV.mjs → GLTFExporter-DmFnAzRr.mjs} +24 -24
- package/lib/GLTFExporter-DmFnAzRr.mjs.map +1 -0
- package/lib/{PointLightHelper-_pWwb-rd.mjs → PointLightHelper-SLT01bR2.mjs} +19 -19
- package/lib/PointLightHelper-SLT01bR2.mjs.map +1 -0
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{SpotLightHelper-DiuKfHVi.mjs → SpotLightHelper-CC4_xqY4.mjs} +24 -24
- package/lib/SpotLightHelper-CC4_xqY4.mjs.map +1 -0
- package/lib/USDZExporter-Cpnpkq95.mjs +545 -0
- package/lib/USDZExporter-Cpnpkq95.mjs.map +1 -0
- package/lib/{banana-for-scale-Bio4mpMQ.mjs → banana-for-scale-evc4Yb9f.mjs} +2 -2
- package/lib/{banana-for-scale-Bio4mpMQ.mjs.map → banana-for-scale-evc4Yb9f.mjs.map} +1 -1
- package/lib/component-dimensioning-Dvorqw_7.mjs +229 -0
- package/lib/component-dimensioning-Dvorqw_7.mjs.map +1 -0
- package/lib/{continuous-drawing-helper-BYjzGaWD.mjs → continuous-drawing-helper-BfZl8h5N.mjs} +2 -2
- package/lib/{continuous-drawing-helper-BYjzGaWD.mjs.map → continuous-drawing-helper-BfZl8h5N.mjs.map} +1 -1
- package/lib/homag-intelligence-CJgnNjgW.mjs +547 -0
- package/lib/homag-intelligence-CJgnNjgW.mjs.map +1 -0
- package/lib/{imos-ix-poc-export-helper-Bl13RKd1.mjs → imos-ix-poc-export-helper--y8HNzbW.mjs} +2 -2
- package/lib/{imos-ix-poc-export-helper-Bl13RKd1.mjs.map → imos-ix-poc-export-helper--y8HNzbW.mjs.map} +1 -1
- package/lib/{index-DYoZpNEJ.mjs → index-E00NytVZ.mjs} +18423 -15546
- package/lib/index-E00NytVZ.mjs.map +1 -0
- package/lib/{material-viewer-DqZ9kv7j.mjs → material-viewer-DdvFNwKG.mjs} +2 -2
- package/lib/{material-viewer-DqZ9kv7j.mjs.map → material-viewer-DdvFNwKG.mjs.map} +1 -1
- package/lib/roomle-sdk.d.ts +46 -14
- package/lib/roomle-sdk.js +22 -22
- package/lib/static/roomle-core-hsc/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleServiceCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleToolsCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.d.ts +8 -4
- package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.js +6 -2
- package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/plannerCoreInterface.d.ts +8 -4
- package/lib/static/roomle-core-hsc/plannerCoreInterface.js +6 -2
- package/lib/static/roomle-core-hsc/plannerCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +8 -4
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js +6 -2
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleServiceCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-BedaceYL.mjs → stats-helper-NaTxB7Fu.mjs} +2 -2
- package/lib/{stats-helper-BedaceYL.mjs.map → stats-helper-NaTxB7Fu.mjs.map} +1 -1
- package/lib/{three.webgpu-Bk8XgilA.mjs → three.webgpu-DN1k7B0u.mjs} +7222 -4815
- package/lib/three.webgpu-DN1k7B0u.mjs.map +1 -0
- package/lib/{tools-core-D1vOTlAR.mjs → tools-core-By95pE-u.mjs} +2 -2
- package/lib/{tools-core-D1vOTlAR.mjs.map → tools-core-By95pE-u.mjs.map} +1 -1
- package/package.json +3 -3
- package/lib/BufferGeometry-Br8QIDeK.mjs.map +0 -1
- package/lib/GLTFExporter-DUjuGznV.mjs.map +0 -1
- package/lib/PointLightHelper-_pWwb-rd.mjs.map +0 -1
- package/lib/SpotLightHelper-DiuKfHVi.mjs.map +0 -1
- package/lib/USDZExporter-B9ygWQMw.mjs +0 -545
- package/lib/USDZExporter-B9ygWQMw.mjs.map +0 -1
- package/lib/component-dimensioning-Bar2YYNs.mjs +0 -148
- package/lib/component-dimensioning-Bar2YYNs.mjs.map +0 -1
- package/lib/homag-intelligence-Bb8gfi80.mjs +0 -1626
- package/lib/homag-intelligence-Bb8gfi80.mjs.map +0 -1
- package/lib/index-DYoZpNEJ.mjs.map +0 -1
- package/lib/three.webgpu-Bk8XgilA.mjs.map +0 -1
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { at as v, au as L, as as s, av as S, aw as x, ax as f, ay as m, az as y, aA as D, aB as o, r as w } from "./index-DYoZpNEJ.mjs";
|
|
2
|
-
var E = Object.defineProperty, z = (_, e, t, a) => {
|
|
3
|
-
for (var i = void 0, n = _.length - 1, r; n >= 0; n--)
|
|
4
|
-
(r = _[n]) && (i = r(e, t, i) || i);
|
|
5
|
-
return i && E(e, t, i), i;
|
|
6
|
-
};
|
|
7
|
-
const u = "component_dimensioning_line_material", g = 0.02, b = 0.025, M = 3618615, T = 0.05;
|
|
8
|
-
class l {
|
|
9
|
-
constructor(e, t, a) {
|
|
10
|
-
this._direction = l._getDirection(e);
|
|
11
|
-
const i = l._getDefaultLabelDirection(
|
|
12
|
-
e,
|
|
13
|
-
this._direction
|
|
14
|
-
), n = a.dot(i) >= 0;
|
|
15
|
-
this._labelDirection = l._calculateActualLabelDirection(
|
|
16
|
-
e,
|
|
17
|
-
n,
|
|
18
|
-
i
|
|
19
|
-
), this._origin = l._calculateOrigin(
|
|
20
|
-
e,
|
|
21
|
-
t,
|
|
22
|
-
n
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
get direction() {
|
|
26
|
-
return this._direction;
|
|
27
|
-
}
|
|
28
|
-
get labelDirection() {
|
|
29
|
-
return this._labelDirection;
|
|
30
|
-
}
|
|
31
|
-
getEdge(e, t, a) {
|
|
32
|
-
const i = this._origin.clone().add(this._direction.clone().multiplyScalar(e)).add(this._labelDirection.clone().multiplyScalar(a)), n = this._origin.clone().add(this._direction.clone().multiplyScalar(t)).add(this._labelDirection.clone().multiplyScalar(a));
|
|
33
|
-
return new D(i, n);
|
|
34
|
-
}
|
|
35
|
-
static _getDirection(e) {
|
|
36
|
-
return e.axis ? o(e.axis.direction).normalize() : e.dimensioning.axis === "x" ? new s(1, 0, 0) : e.dimensioning.axis === "y" ? new s(0, 0, 1) : new s(0, 1, 0);
|
|
37
|
-
}
|
|
38
|
-
static _getDefaultLabelDirection(e, t) {
|
|
39
|
-
if (e.axis) {
|
|
40
|
-
const a = o(
|
|
41
|
-
e.axis.labelDirection
|
|
42
|
-
);
|
|
43
|
-
return t.clone().cross(a).cross(t).normalize();
|
|
44
|
-
} else {
|
|
45
|
-
if (e.dimensioning.axis === "x")
|
|
46
|
-
return new s(0, 1, 0);
|
|
47
|
-
if (e.dimensioning.axis === "y")
|
|
48
|
-
return new s(-1, 0, 0);
|
|
49
|
-
}
|
|
50
|
-
return new s(-1, 0, 0);
|
|
51
|
-
}
|
|
52
|
-
static _calculateActualLabelDirection(e, t, a) {
|
|
53
|
-
if (t) {
|
|
54
|
-
if (e.axis) {
|
|
55
|
-
if (e.axis.alternativeOrigin)
|
|
56
|
-
return a.clone().multiplyScalar(-1);
|
|
57
|
-
} else if (e.dimensioning.axis === "y" || e.dimensioning.axis === "z")
|
|
58
|
-
return a.clone().multiplyScalar(-1);
|
|
59
|
-
}
|
|
60
|
-
return a;
|
|
61
|
-
}
|
|
62
|
-
static _calculateOrigin(e, t, a) {
|
|
63
|
-
const i = t.getCenter(new s()), n = t.getSize(new s());
|
|
64
|
-
return e.axis ? a && e.axis.alternativeOrigin ? o(e.axis.alternativeOrigin) : o(e.axis.origin) : e.dimensioning.axis === "x" ? new s(0, i.y + n.y * 0.5, i.z - n.z * 0.5) : e.dimensioning.axis === "y" ? new s(
|
|
65
|
-
i.x + n.x * (a ? 0.5 : -0.5),
|
|
66
|
-
i.y - n.y * 0.5,
|
|
67
|
-
0
|
|
68
|
-
) : new s(
|
|
69
|
-
i.x + n.x * (a ? 0.5 : -0.5),
|
|
70
|
-
0,
|
|
71
|
-
i.z - n.z * 0.5
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
class p extends v {
|
|
76
|
-
constructor(e, t, a) {
|
|
77
|
-
super(), this.name = L, this._size = t.getSize(new s()), this._dimensioning = S(
|
|
78
|
-
e.dimensioning
|
|
79
|
-
), this._axis = new l(
|
|
80
|
-
e,
|
|
81
|
-
t,
|
|
82
|
-
a
|
|
83
|
-
), this._level = this._dimensioning.maxLevel - this._dimensioning.level, this._init();
|
|
84
|
-
}
|
|
85
|
-
clone() {
|
|
86
|
-
console.warn("Will not clone ComponentDimensioning");
|
|
87
|
-
}
|
|
88
|
-
_initMaterials() {
|
|
89
|
-
this._cacheHolder.materialCache && (this._cacheHolder.materialCache.has(u) ? this._lineMaterial = this._cacheHolder.materialCache.get(
|
|
90
|
-
u
|
|
91
|
-
) : (this._lineMaterial = new x({
|
|
92
|
-
color: M
|
|
93
|
-
}), this._cacheHolder.materialCache.set(u, this._lineMaterial)));
|
|
94
|
-
}
|
|
95
|
-
_init() {
|
|
96
|
-
this._initMaterials();
|
|
97
|
-
const e = Math.round(
|
|
98
|
-
Math.max(this._size.y, this._size.x, this._size.z)
|
|
99
|
-
), t = Math.abs(this._dimensioning.to - this._dimensioning.from);
|
|
100
|
-
let a = b + (e < 4 ? 0 : e * 5e-3);
|
|
101
|
-
t < 0.3 && (a *= 0.5 + t);
|
|
102
|
-
const i = a * 1.4, n = T + (3 * g + i) * this._level, r = this._axis.getEdge(
|
|
103
|
-
this._dimensioning.from,
|
|
104
|
-
this._dimensioning.to,
|
|
105
|
-
n
|
|
106
|
-
);
|
|
107
|
-
this._addEdgeSideLines(
|
|
108
|
-
i,
|
|
109
|
-
r,
|
|
110
|
-
this._axis.labelDirection.clone()
|
|
111
|
-
);
|
|
112
|
-
const c = new f(), h = [
|
|
113
|
-
r.start.x,
|
|
114
|
-
r.start.y,
|
|
115
|
-
r.start.z,
|
|
116
|
-
r.end.x,
|
|
117
|
-
r.end.y,
|
|
118
|
-
r.end.z
|
|
119
|
-
];
|
|
120
|
-
c.setAttribute(
|
|
121
|
-
"position",
|
|
122
|
-
new m(new Float32Array(h), 3)
|
|
123
|
-
);
|
|
124
|
-
const d = new y(c, this._lineMaterial);
|
|
125
|
-
d.name = "component dimension line " + this._dimensioning.axis, this.add(d);
|
|
126
|
-
}
|
|
127
|
-
_addEdgeSideLines(e, t, a) {
|
|
128
|
-
const i = -(3 * g + e) * 0.5, n = t.start.clone(), r = t.start.clone().add(a.clone().multiplyScalar(i)), c = t.end.clone(), h = t.end.clone().add(a.clone().multiplyScalar(i));
|
|
129
|
-
this._addLine(r, n), this._addLine(h, c);
|
|
130
|
-
}
|
|
131
|
-
_addLine(e, t) {
|
|
132
|
-
const a = new f(), i = [e.x, e.y, e.z, t.x, t.y, t.z];
|
|
133
|
-
a.setAttribute(
|
|
134
|
-
"position",
|
|
135
|
-
new m(new Float32Array(i), 3)
|
|
136
|
-
), this.add(new y(a, this._lineMaterial));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
z([
|
|
140
|
-
w
|
|
141
|
-
], p.prototype, "_cacheHolder");
|
|
142
|
-
z([
|
|
143
|
-
w
|
|
144
|
-
], p.prototype, "_unitFormatter");
|
|
145
|
-
export {
|
|
146
|
-
p as default
|
|
147
|
-
};
|
|
148
|
-
//# sourceMappingURL=component-dimensioning-Bar2YYNs.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-dimensioning-Bar2YYNs.mjs","sources":["../../packages/configurator-core/src/utils/component-dimensioning.ts"],"sourcesContent":["import inject from '../../../common-core/src/di/inject';\nimport type CacheHolder from '../../../common-core/src/services/cache-holder';\nimport type UnitFormatter from '../services/unit-formatter';\nimport type { Dimensioning, DimensioningAxis } from '../../../typings/kernel';\n\nimport type { Box3 } from 'three';\nimport {\n BufferAttribute,\n BufferGeometry,\n Line,\n Line3,\n LineBasicMaterial,\n Object3D,\n Vector3,\n} from 'three';\nimport { kernelDimensioningToThree } from '../../../common-core/src/utils/threejs-utils';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport { DIMENSIONING_GEOMETRY } from './dimensioning-helper';\n\nconst LINE_MATERIAL = 'component_dimensioning_line_material';\n\nconst TEXT_SPACING = 0.02;\nconst TEXT_SIZE = 0.025;\nconst TEXT_COLOR = 0x373737;\nconst LINE_SPACING = 0.05;\n\nexport interface DimensioningAndAxis {\n dimensioning: Dimensioning;\n axis?: DimensioningAxis;\n}\n\nclass ComponentDimensioningAxis {\n private _origin: Vector3;\n private _direction: Vector3;\n private _labelDirection: Vector3;\n\n constructor(\n dimensioningAndAxis: DimensioningAndAxis,\n boundingBox: Box3,\n cameraPosition: Vector3,\n ) {\n this._direction =\n ComponentDimensioningAxis._getDirection(dimensioningAndAxis);\n const defaultLabelDirection =\n ComponentDimensioningAxis._getDefaultLabelDirection(\n dimensioningAndAxis,\n this._direction,\n );\n const lookAtOppositeSide = cameraPosition.dot(defaultLabelDirection) >= 0;\n this._labelDirection =\n ComponentDimensioningAxis._calculateActualLabelDirection(\n dimensioningAndAxis,\n lookAtOppositeSide,\n defaultLabelDirection,\n );\n this._origin = ComponentDimensioningAxis._calculateOrigin(\n dimensioningAndAxis,\n boundingBox,\n lookAtOppositeSide,\n );\n }\n\n get direction(): Vector3 {\n return this._direction;\n }\n\n get labelDirection(): Vector3 {\n return this._labelDirection;\n }\n\n getEdge(from: number, to: number, lineOffset: number): Line3 {\n const start = this._origin\n .clone()\n .add(this._direction.clone().multiplyScalar(from))\n .add(this._labelDirection.clone().multiplyScalar(lineOffset));\n const end = this._origin\n .clone()\n .add(this._direction.clone().multiplyScalar(to))\n .add(this._labelDirection.clone().multiplyScalar(lineOffset));\n return new Line3(start, end);\n }\n\n private static _getDirection(\n dimensioningAndAxis: DimensioningAndAxis,\n ): Vector3 {\n if (dimensioningAndAxis.axis) {\n return convertToTHREE(dimensioningAndAxis.axis.direction).normalize();\n } else if (dimensioningAndAxis.dimensioning.axis === 'x') {\n return new Vector3(1, 0, 0);\n } else if (dimensioningAndAxis.dimensioning.axis === 'y') {\n return new Vector3(0, 0, 1);\n }\n return new Vector3(0, 1, 0);\n }\n\n private static _getDefaultLabelDirection(\n dimensioningAndAxis: DimensioningAndAxis,\n direction: Vector3,\n ): Vector3 {\n if (dimensioningAndAxis.axis) {\n const labelDirection = convertToTHREE(\n dimensioningAndAxis.axis.labelDirection,\n );\n const planeNormal = direction.clone().cross(labelDirection);\n return planeNormal.cross(direction).normalize();\n } else if (dimensioningAndAxis.dimensioning.axis === 'x') {\n return new Vector3(0, 1, 0);\n } else if (dimensioningAndAxis.dimensioning.axis === 'y') {\n return new Vector3(-1, 0, 0);\n }\n return new Vector3(-1, 0, 0);\n }\n\n private static _calculateActualLabelDirection(\n dimensioningAndAxis: DimensioningAndAxis,\n lookAtOppositeSide: boolean,\n labelDirection: Vector3,\n ): Vector3 {\n if (lookAtOppositeSide) {\n if (dimensioningAndAxis.axis) {\n if (dimensioningAndAxis.axis.alternativeOrigin) {\n return labelDirection.clone().multiplyScalar(-1);\n }\n } else if (\n dimensioningAndAxis.dimensioning.axis === 'y' ||\n dimensioningAndAxis.dimensioning.axis === 'z'\n ) {\n return labelDirection.clone().multiplyScalar(-1);\n }\n }\n return labelDirection;\n }\n\n private static _calculateOrigin(\n dimensioningAndAxis: DimensioningAndAxis,\n boundingBox: Box3,\n lookAtOppositeSide: boolean,\n ): Vector3 {\n const center = boundingBox.getCenter(new Vector3());\n const size = boundingBox.getSize(new Vector3());\n if (dimensioningAndAxis.axis) {\n return lookAtOppositeSide && dimensioningAndAxis.axis.alternativeOrigin\n ? convertToTHREE(dimensioningAndAxis.axis.alternativeOrigin)\n : convertToTHREE(dimensioningAndAxis.axis.origin);\n } else if (dimensioningAndAxis.dimensioning.axis === 'x') {\n return new Vector3(0, center.y + size.y * 0.5, center.z - size.z * 0.5);\n } else if (dimensioningAndAxis.dimensioning.axis === 'y') {\n return new Vector3(\n center.x + size.x * (lookAtOppositeSide ? 0.5 : -0.5),\n center.y - size.y * 0.5,\n 0,\n );\n }\n return new Vector3(\n center.x + size.x * (lookAtOppositeSide ? 0.5 : -0.5),\n 0,\n center.z - size.z * 0.5,\n );\n }\n}\n\nexport default class ComponentDimensioning extends Object3D {\n @inject\n private _cacheHolder: CacheHolder;\n\n @inject\n private _unitFormatter: UnitFormatter;\n\n private _dimensioning: Dimensioning;\n private _axis: ComponentDimensioningAxis;\n private _size: Vector3;\n\n private _level: number;\n private _lineMaterial: LineBasicMaterial;\n\n constructor(\n dimensioningAndAxis: DimensioningAndAxis,\n boundingBox: Box3,\n relativeCameraDirection: Vector3,\n ) {\n super();\n this.name = DIMENSIONING_GEOMETRY;\n this._size = boundingBox.getSize(new Vector3());\n this._dimensioning = kernelDimensioningToThree(\n dimensioningAndAxis.dimensioning,\n );\n this._axis = new ComponentDimensioningAxis(\n dimensioningAndAxis,\n boundingBox,\n relativeCameraDirection,\n );\n this._level = this._dimensioning.maxLevel - this._dimensioning.level;\n\n this._init();\n }\n\n clone() {\n // We do not clone ComponentDimensioning because this can break the\n // generation of perspective images. If the ComponentDimensioning is\n // visible during the generation of the perspective image, three.js\n // tries to clone it but clone does not give any parameters to the\n // constructor and therefore the clone breaks. Since we do not need\n // to clone ComponentDimensioning, we return undefined\n console.warn('Will not clone ComponentDimensioning');\n return undefined as any;\n }\n\n private _initMaterials() {\n if (!this._cacheHolder.materialCache) {\n return;\n }\n\n if (this._cacheHolder.materialCache.has(LINE_MATERIAL)) {\n this._lineMaterial = this._cacheHolder.materialCache.get(\n LINE_MATERIAL,\n ) as LineBasicMaterial;\n } else {\n this._lineMaterial = new LineBasicMaterial({\n color: TEXT_COLOR,\n });\n this._cacheHolder.materialCache.set(LINE_MATERIAL, this._lineMaterial);\n }\n }\n\n private _init() {\n this._initMaterials();\n\n const maxSize = Math.round(\n Math.max(this._size.y, this._size.x, this._size.z),\n );\n const length = Math.abs(this._dimensioning.to - this._dimensioning.from);\n\n let fontSize = TEXT_SIZE + (maxSize < 4 ? 0 : maxSize * 0.005);\n if (length < 0.3) {\n fontSize *= 0.5 + length;\n }\n\n // Approximate text height for spacing calculations\n // Based on typical font metrics (height is roughly 1.4x the font size)\n const levelSpacing = fontSize * 1.4;\n\n const lineOffset =\n LINE_SPACING + (3 * TEXT_SPACING + levelSpacing) * this._level;\n\n const line = this._axis.getEdge(\n this._dimensioning.from,\n this._dimensioning.to,\n lineOffset,\n );\n\n this._addEdgeSideLines(\n levelSpacing,\n line,\n this._axis.labelDirection.clone(),\n );\n\n const lineGeometry = new BufferGeometry();\n const vertices = [\n line.start.x,\n line.start.y,\n line.start.z,\n line.end.x,\n line.end.y,\n line.end.z,\n ];\n lineGeometry.setAttribute(\n 'position',\n new BufferAttribute(new Float32Array(vertices), 3),\n );\n\n const lineObject = new Line(lineGeometry, this._lineMaterial);\n lineObject.name = 'component dimension line ' + this._dimensioning.axis;\n\n this.add(lineObject);\n }\n\n private _addEdgeSideLines(\n levelSpacing: number,\n line: Line3,\n labelDirection: Vector3,\n ) {\n const sideOffset = -(3 * TEXT_SPACING + levelSpacing) * 0.5;\n const endFrom = line.start.clone();\n const startFrom = line.start\n .clone()\n .add(labelDirection.clone().multiplyScalar(sideOffset));\n const endTo = line.end.clone();\n const startTo = line.end\n .clone()\n .add(labelDirection.clone().multiplyScalar(sideOffset));\n this._addLine(startFrom, endFrom);\n this._addLine(startTo, endTo);\n }\n\n private _addLine(start: Vector3, end: Vector3) {\n const lineGeometry = new BufferGeometry();\n const vertices = [start.x, start.y, start.z, end.x, end.y, end.z];\n lineGeometry.setAttribute(\n 'position',\n new BufferAttribute(new Float32Array(vertices), 3),\n );\n this.add(new Line(lineGeometry, this._lineMaterial));\n }\n}\n"],"names":["LINE_MATERIAL","TEXT_SPACING","TEXT_SIZE","TEXT_COLOR","LINE_SPACING","ComponentDimensioningAxis","dimensioningAndAxis","boundingBox","cameraPosition","defaultLabelDirection","lookAtOppositeSide","from","to","lineOffset","start","end","Line3","convertToTHREE","Vector3","direction","labelDirection","center","size","ComponentDimensioning","Object3D","relativeCameraDirection","DIMENSIONING_GEOMETRY","kernelDimensioningToThree","LineBasicMaterial","maxSize","length","fontSize","levelSpacing","line","lineGeometry","BufferGeometry","vertices","BufferAttribute","lineObject","Line","sideOffset","endFrom","startFrom","endTo","startTo","__decorateClass","inject"],"mappings":";;;;;;AAmBA,MAAMA,IAAgB,wCAEhBC,IAAe,MACfC,IAAY,OACZC,IAAa,SACbC,IAAe;AAOrB,MAAMC,EAA0B;AAAA,EAK9B,YACEC,GACAC,GACAC,GACA;AACA,SAAK,aACHH,EAA0B,cAAcC,CAAmB;AAC7D,UAAMG,IACJJ,EAA0B;AAAA,MACxBC;AAAA,MACA,KAAK;AAAA,IAAA,GAEHI,IAAqBF,EAAe,IAAIC,CAAqB,KAAK;AACxE,SAAK,kBACHJ,EAA0B;AAAA,MACxBC;AAAA,MACAI;AAAA,MACAD;AAAA,IAAA,GAEJ,KAAK,UAAUJ,EAA0B;AAAA,MACvCC;AAAA,MACAC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