@configura/babylon-view 1.6.1-alpha.2 → 1.6.1-alpha.4
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.
|
@@ -383,7 +383,7 @@ export class CfgProductNode extends CfgTransformNode {
|
|
|
383
383
|
this._anchorTarget = anchorTarget;
|
|
384
384
|
}
|
|
385
385
|
refreshStretch() {
|
|
386
|
-
const updated = updatedStretchedAnchorPointMatrix(this.anchorRef, this._anchorTarget, this._stretchedAnchorPointMatrix
|
|
386
|
+
const updated = updatedStretchedAnchorPointMatrix(this.anchorRef, this._anchorTarget, this._stretchedAnchorPointMatrix);
|
|
387
387
|
if (updated !== undefined) {
|
|
388
388
|
this._stretchedAnchorPointMatrix = updated;
|
|
389
389
|
this.refreshTransform();
|
|
@@ -193,7 +193,7 @@ export class CfgSymRootNode extends CfgSymNode {
|
|
|
193
193
|
}
|
|
194
194
|
refreshStretch() {
|
|
195
195
|
super.refreshStretch();
|
|
196
|
-
const updated = updatedStretchedAnchorPointMatrix(this.anchorRef, this._anchorTarget, this._stretchedAnchorPointMatrix
|
|
196
|
+
const updated = updatedStretchedAnchorPointMatrix(this.anchorRef, this._anchorTarget, this._stretchedAnchorPointMatrix);
|
|
197
197
|
if (updated === undefined) {
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
@@ -45,12 +45,7 @@ export declare function getRawAnchorPoint(anchorTarget: CfgAnchorTargetNode | un
|
|
|
45
45
|
*
|
|
46
46
|
* Application of anchoring happens from anchor tree root and out, so that originalMatrix of
|
|
47
47
|
* anchorTarget will already have any anchoring and stretch applied.
|
|
48
|
-
*
|
|
49
|
-
* @param ignoreTargetTransformation If true, ignore anchorTarget's originalMatrix. This is a
|
|
50
|
-
* workaround for that CET (as of this writing) somewhat unexpectedly mostly does not apply the
|
|
51
|
-
* transformation when anchoring Additional Products. We have noticed some cases when it actually
|
|
52
|
-
* apply the transform as you would expect. When the bug is solved this should be removed.
|
|
53
48
|
*/
|
|
54
|
-
export declare function getStretchedAnchorPointMatrix(anchorRef: CfgAnchorRef | undefined, anchorTarget: CfgAnchorTargetNode | undefined
|
|
55
|
-
export declare function updatedStretchedAnchorPointMatrix(anchorRef: CfgAnchorRef | undefined, anchorTarget: CfgAnchorTargetNode | undefined, currentStretchedAnchorPointMatrix: Matrix | undefined
|
|
49
|
+
export declare function getStretchedAnchorPointMatrix(anchorRef: CfgAnchorRef | undefined, anchorTarget: CfgAnchorTargetNode | undefined): Matrix | undefined;
|
|
50
|
+
export declare function updatedStretchedAnchorPointMatrix(anchorRef: CfgAnchorRef | undefined, anchorTarget: CfgAnchorTargetNode | undefined, currentStretchedAnchorPointMatrix: Matrix | undefined): Matrix | undefined;
|
|
56
51
|
//# sourceMappingURL=anchor.d.ts.map
|
|
@@ -103,13 +103,8 @@ export function getRawAnchorPoint(anchorTarget, anchorRef) {
|
|
|
103
103
|
*
|
|
104
104
|
* Application of anchoring happens from anchor tree root and out, so that originalMatrix of
|
|
105
105
|
* anchorTarget will already have any anchoring and stretch applied.
|
|
106
|
-
*
|
|
107
|
-
* @param ignoreTargetTransformation If true, ignore anchorTarget's originalMatrix. This is a
|
|
108
|
-
* workaround for that CET (as of this writing) somewhat unexpectedly mostly does not apply the
|
|
109
|
-
* transformation when anchoring Additional Products. We have noticed some cases when it actually
|
|
110
|
-
* apply the transform as you would expect. When the bug is solved this should be removed.
|
|
111
106
|
*/
|
|
112
|
-
export function getStretchedAnchorPointMatrix(anchorRef, anchorTarget
|
|
107
|
+
export function getStretchedAnchorPointMatrix(anchorRef, anchorTarget) {
|
|
113
108
|
const rawAnchorPoint = getRawAnchorPoint(anchorTarget, anchorRef);
|
|
114
109
|
if (rawAnchorPoint === undefined || anchorTarget === undefined) {
|
|
115
110
|
return undefined;
|
|
@@ -118,15 +113,13 @@ export function getStretchedAnchorPointMatrix(anchorRef, anchorTarget, ignoreTar
|
|
|
118
113
|
const stretchedAnchorPoint = toStretchedPoint(rawAnchorPoint, anchorTarget.stretchDatas, anchorTarget.cfgProductNode.product.configuration._internal
|
|
119
114
|
.stretchReferenceLengthsByMeasureParamCode);
|
|
120
115
|
// Sometimes, apply the anchorTarget matrix, as if the point was a child to the anchorTarget.
|
|
121
|
-
const anchorTargetMatrixApplied =
|
|
122
|
-
? stretchedAnchorPoint
|
|
123
|
-
: Vector3.TransformCoordinates(stretchedAnchorPoint, anchorTarget.originalMatrix);
|
|
116
|
+
const anchorTargetMatrixApplied = Vector3.TransformCoordinates(stretchedAnchorPoint, anchorTarget.originalMatrix);
|
|
124
117
|
// We use translation as when we anchor things we do not change their orientation,
|
|
125
118
|
// we only move them to snap to this point
|
|
126
119
|
return Matrix.Identity().setTranslation(anchorTargetMatrixApplied);
|
|
127
120
|
}
|
|
128
|
-
export function updatedStretchedAnchorPointMatrix(anchorRef, anchorTarget, currentStretchedAnchorPointMatrix
|
|
129
|
-
const stretchedAnchorPointMatrix = getStretchedAnchorPointMatrix(anchorRef, anchorTarget
|
|
121
|
+
export function updatedStretchedAnchorPointMatrix(anchorRef, anchorTarget, currentStretchedAnchorPointMatrix) {
|
|
122
|
+
const stretchedAnchorPointMatrix = getStretchedAnchorPointMatrix(anchorRef, anchorTarget);
|
|
130
123
|
if (currentStretchedAnchorPointMatrix === undefined &&
|
|
131
124
|
stretchedAnchorPointMatrix === undefined) {
|
|
132
125
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/babylon-view",
|
|
3
|
-
"version": "1.6.1-alpha.
|
|
3
|
+
"version": "1.6.1-alpha.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babylonjs/core": "4.2.0",
|
|
19
|
-
"@configura/web-core": "1.6.1-alpha.
|
|
20
|
-
"@configura/web-utilities": "1.6.1-alpha.
|
|
19
|
+
"@configura/web-core": "1.6.1-alpha.4",
|
|
20
|
+
"@configura/web-utilities": "1.6.1-alpha.4"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@configura/web-api": "1.6.1-alpha.
|
|
23
|
+
"@configura/web-api": "1.6.1-alpha.4",
|
|
24
24
|
"del-cli": "^3.0.0",
|
|
25
25
|
"typescript": "4.2"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "e4dc2f02eff0ea5b4b69fa14e3ae456f505b3e58"
|
|
31
31
|
}
|