@configura/web-core 2.1.0-alpha.2 → 2.1.0-alpha.3
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/.eslintrc.json +5 -5
- package/LICENSE +201 -201
- package/README.md +1 -1
- package/dist/cm/basic/Color.d.ts +16 -16
- package/dist/cm/basic/Color.js +18 -18
- package/dist/cm/basic/ColorF.d.ts +9 -9
- package/dist/cm/basic/ColorF.js +10 -10
- package/dist/cm/basic/boolean.d.ts +2 -2
- package/dist/cm/basic/boolean.js +11 -11
- package/dist/cm/basic/number.d.ts +3 -3
- package/dist/cm/basic/number.js +18 -18
- package/dist/cm/basic/string.d.ts +2 -2
- package/dist/cm/basic/string.js +11 -11
- package/dist/cm/core3D/ATriMeshF.d.ts +96 -96
- package/dist/cm/core3D/ATriMeshF.js +197 -197
- package/dist/cm/core3D/GMaterial3D.d.ts +62 -62
- package/dist/cm/core3D/GMaterial3D.js +112 -112
- package/dist/cm/core3D/GMaterialClassic.d.ts +55 -55
- package/dist/cm/core3D/GMaterialClassic.js +171 -171
- package/dist/cm/core3D/GMaterialPBR.d.ts +73 -73
- package/dist/cm/core3D/GMaterialPBR.js +314 -314
- package/dist/cm/core3D/MultiGMaterial3D.d.ts +8 -8
- package/dist/cm/core3D/MultiGMaterial3D.js +17 -17
- package/dist/cm/core3D/uvmapper/UVMapEnv.d.ts +19 -19
- package/dist/cm/core3D/uvmapper/UVMapEnv.js +47 -47
- package/dist/cm/core3D/uvmapper/UVMapper.d.ts +41 -41
- package/dist/cm/core3D/uvmapper/UVMapper.js +94 -94
- package/dist/cm/core3D/uvmapper/UVMapperBox.d.ts +4 -4
- package/dist/cm/core3D/uvmapper/UVMapperBox.js +181 -181
- package/dist/cm/core3D/uvmapper/UVMapperCylinder.d.ts +9 -9
- package/dist/cm/core3D/uvmapper/UVMapperCylinder.js +96 -96
- package/dist/cm/core3D/uvmapper/UVMapperPlane.d.ts +3 -3
- package/dist/cm/core3D/uvmapper/UVMapperPlane.js +84 -84
- package/dist/cm/core3D/uvmapper/UVTransformer.d.ts +5 -5
- package/dist/cm/core3D/uvmapper/UVTransformer.js +5 -5
- package/dist/cm/core3D/uvmapper/instantiateUVMapper.d.ts +3 -3
- package/dist/cm/core3D/uvmapper/instantiateUVMapper.js +4 -4
- package/dist/cm/format/cmsym/InvalidationEnv.d.ts +9 -9
- package/dist/cm/format/cmsym/InvalidationEnv.js +13 -13
- package/dist/cm/format/cmsym/SymImportEnv.d.ts +9 -9
- package/dist/cm/format/cmsym/SymImportEnv.js +9 -9
- package/dist/cm/format/cmsym/SymInv.d.ts +8 -8
- package/dist/cm/format/cmsym/SymInv.js +17 -17
- package/dist/cm/format/cmsym/SymNode.d.ts +94 -94
- package/dist/cm/format/cmsym/SymNode.js +652 -652
- package/dist/cm/format/cmsym/components/SymBox.d.ts +15 -15
- package/dist/cm/format/cmsym/components/SymBox.js +39 -39
- package/dist/cm/format/cmsym/components/SymComponent.d.ts +29 -29
- package/dist/cm/format/cmsym/components/SymComponent.js +56 -56
- package/dist/cm/format/cmsym/components/SymConnector.d.ts +5 -5
- package/dist/cm/format/cmsym/components/SymConnector.js +10 -10
- package/dist/cm/format/cmsym/components/SymDexObj.d.ts +11 -11
- package/dist/cm/format/cmsym/components/SymDexObj.js +10 -10
- package/dist/cm/format/cmsym/components/SymGFX.d.ts +11 -11
- package/dist/cm/format/cmsym/components/SymGFX.js +20 -20
- package/dist/cm/format/cmsym/components/SymGMaterial.d.ts +19 -19
- package/dist/cm/format/cmsym/components/SymGMaterial.js +88 -88
- package/dist/cm/format/cmsym/components/SymGMaterialSelector.d.ts +17 -17
- package/dist/cm/format/cmsym/components/SymGMaterialSelector.js +22 -22
- package/dist/cm/format/cmsym/components/SymGetMeshEnv.d.ts +9 -9
- package/dist/cm/format/cmsym/components/SymGetMeshEnv.js +9 -9
- package/dist/cm/format/cmsym/components/SymLODGroup.d.ts +9 -9
- package/dist/cm/format/cmsym/components/SymLODGroup.js +13 -13
- package/dist/cm/format/cmsym/components/SymLight.d.ts +8 -8
- package/dist/cm/format/cmsym/components/SymLight.js +10 -10
- package/dist/cm/format/cmsym/components/SymLines2D.d.ts +5 -5
- package/dist/cm/format/cmsym/components/SymLines2D.js +7 -7
- package/dist/cm/format/cmsym/components/SymMeasure.d.ts +33 -33
- package/dist/cm/format/cmsym/components/SymMeasure.js +149 -149
- package/dist/cm/format/cmsym/components/SymMesh.d.ts +29 -29
- package/dist/cm/format/cmsym/components/SymMesh.js +130 -130
- package/dist/cm/format/cmsym/components/SymMeshLight.d.ts +8 -8
- package/dist/cm/format/cmsym/components/SymMeshLight.js +10 -10
- package/dist/cm/format/cmsym/components/SymMultiSelector.d.ts +13 -13
- package/dist/cm/format/cmsym/components/SymMultiSelector.js +48 -48
- package/dist/cm/format/cmsym/components/SymParams.d.ts +16 -16
- package/dist/cm/format/cmsym/components/SymParams.js +58 -58
- package/dist/cm/format/cmsym/components/SymPlane.d.ts +15 -15
- package/dist/cm/format/cmsym/components/SymPlane.js +30 -30
- package/dist/cm/format/cmsym/components/SymPlaneDivider.d.ts +4 -4
- package/dist/cm/format/cmsym/components/SymPlaneDivider.js +7 -7
- package/dist/cm/format/cmsym/components/SymPrimitive2D.d.ts +3 -3
- package/dist/cm/format/cmsym/components/SymPrimitive2D.js +3 -3
- package/dist/cm/format/cmsym/components/SymProgs.d.ts +32 -32
- package/dist/cm/format/cmsym/components/SymProgs.js +120 -120
- package/dist/cm/format/cmsym/components/SymProps.d.ts +54 -54
- package/dist/cm/format/cmsym/components/SymProps.js +171 -171
- package/dist/cm/format/cmsym/components/SymRep.d.ts +13 -13
- package/dist/cm/format/cmsym/components/SymRep.js +28 -28
- package/dist/cm/format/cmsym/components/SymReps.d.ts +36 -36
- package/dist/cm/format/cmsym/components/SymReps.js +230 -230
- package/dist/cm/format/cmsym/components/SymShape.d.ts +10 -10
- package/dist/cm/format/cmsym/components/SymShape.js +17 -17
- package/dist/cm/format/cmsym/components/SymSphere.d.ts +18 -18
- package/dist/cm/format/cmsym/components/SymSphere.js +33 -33
- package/dist/cm/format/cmsym/components/SymSpotlight.d.ts +8 -8
- package/dist/cm/format/cmsym/components/SymSpotlight.js +10 -10
- package/dist/cm/format/cmsym/components/SymTags.d.ts +11 -11
- package/dist/cm/format/cmsym/components/SymTags.js +20 -20
- package/dist/cm/format/cmsym/components/SymText2D.d.ts +5 -5
- package/dist/cm/format/cmsym/components/SymText2D.js +8 -8
- package/dist/cm/format/cmsym/components/SymText3D.d.ts +5 -5
- package/dist/cm/format/cmsym/components/SymText3D.js +8 -8
- package/dist/cm/format/cmsym/components/SymTransform.d.ts +23 -23
- package/dist/cm/format/cmsym/components/SymTransform.js +101 -101
- package/dist/cm/format/cmsym/components/SymUVMapper.d.ts +13 -13
- package/dist/cm/format/cmsym/components/SymUVMapper.js +50 -50
- package/dist/cm/format/cmsym/components/instantiate.d.ts +2 -2
- package/dist/cm/format/cmsym/components/instantiate.js +121 -121
- package/dist/cm/format/cmsym/components/legacy.d.ts +7 -7
- package/dist/cm/format/cmsym/components/legacy.js +27 -27
- package/dist/cm/format/cmsym/components/mesh.d.ts +8 -8
- package/dist/cm/format/cmsym/components/mesh.js +28 -28
- package/dist/cm/format/cmsym/invalidation.d.ts +4 -4
- package/dist/cm/format/cmsym/invalidation.js +72 -72
- package/dist/cm/format/dex/DexIRef.d.ts +9 -9
- package/dist/cm/format/dex/DexIRef.js +18 -18
- package/dist/cm/format/dex/DexInt.d.ts +11 -11
- package/dist/cm/format/dex/DexInt.js +18 -18
- package/dist/cm/format/dex/DexInternalizedXRef.d.ts +19 -19
- package/dist/cm/format/dex/DexInternalizedXRef.js +65 -65
- package/dist/cm/format/dex/DexLoader.d.ts +8 -8
- package/dist/cm/format/dex/DexLoader.js +12 -12
- package/dist/cm/format/dex/DexManager.d.ts +20 -20
- package/dist/cm/format/dex/DexManager.js +78 -78
- package/dist/cm/format/dex/DexObj.d.ts +15 -15
- package/dist/cm/format/dex/DexObj.js +86 -86
- package/dist/cm/format/dex/DexReader.d.ts +90 -90
- package/dist/cm/format/dex/DexReader.js +532 -532
- package/dist/cm/format/dex/DexRef.d.ts +6 -6
- package/dist/cm/format/dex/DexRef.js +8 -8
- package/dist/cm/format/dex/DexReplacedXRefs.d.ts +9 -9
- package/dist/cm/format/dex/DexReplacedXRefs.js +22 -22
- package/dist/cm/format/dex/DexURL.d.ts +4 -4
- package/dist/cm/format/dex/DexURL.js +5 -5
- package/dist/cm/format/dex/DexVersion.d.ts +15 -15
- package/dist/cm/format/dex/DexVersion.js +53 -53
- package/dist/cm/format/dex/DexXRef.d.ts +18 -18
- package/dist/cm/format/dex/DexXRef.js +51 -51
- package/dist/cm/format/dex/DexXRefTargetFilter.d.ts +4 -4
- package/dist/cm/format/dex/DexXRefTargetFilter.js +5 -5
- package/dist/cm/geometry/Angle.d.ts +9 -9
- package/dist/cm/geometry/Angle.js +18 -18
- package/dist/cm/geometry/AngleF.d.ts +5 -5
- package/dist/cm/geometry/AngleF.js +8 -8
- package/dist/cm/geometry/Box.d.ts +7 -7
- package/dist/cm/geometry/Box.js +9 -9
- package/dist/cm/geometry/DetailMask.d.ts +37 -37
- package/dist/cm/geometry/DetailMask.js +114 -114
- package/dist/cm/geometry/LayerExpr.d.ts +2 -2
- package/dist/cm/geometry/LayerExpr.js +2 -2
- package/dist/cm/geometry/Matrix22.d.ts +7 -7
- package/dist/cm/geometry/Matrix22.js +9 -9
- package/dist/cm/geometry/Matrix33.d.ts +42 -42
- package/dist/cm/geometry/Matrix33.js +124 -124
- package/dist/cm/geometry/Orientation.d.ts +7 -7
- package/dist/cm/geometry/Orientation.js +7 -7
- package/dist/cm/geometry/Plane.d.ts +8 -8
- package/dist/cm/geometry/Plane.js +14 -14
- package/dist/cm/geometry/Point.d.ts +21 -21
- package/dist/cm/geometry/Point.js +65 -65
- package/dist/cm/geometry/Point2D.d.ts +9 -9
- package/dist/cm/geometry/Point2D.js +23 -23
- package/dist/cm/geometry/PointF.d.ts +11 -11
- package/dist/cm/geometry/PointF.js +27 -27
- package/dist/cm/geometry/Transform.d.ts +11 -11
- package/dist/cm/geometry/Transform.js +61 -61
- package/dist/cm/geometry/Transform2D.d.ts +7 -7
- package/dist/cm/geometry/Transform2D.js +6 -6
- package/dist/cm/io/Semver.d.ts +18 -18
- package/dist/cm/io/Semver.js +61 -61
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { UVMapper } from "./UVMapper.js";
|
|
2
|
-
/**
|
|
3
|
-
* Calculate base vectors for the mapping plane where the first is orthogonal with the
|
|
4
|
-
* normal-vector and flat along the ground and the other is orthogonal to the first two.
|
|
5
|
-
*/
|
|
6
|
-
function calculateMappingPlaneVectors(normal) {
|
|
7
|
-
const [normalX, normalY, normalZ] = normal;
|
|
8
|
-
const normalLen = Math.sqrt(normalX * normalX + normalY * normalY + normalZ * normalZ);
|
|
9
|
-
// Probably already normalized, but just to be sure
|
|
10
|
-
const normalNormalized = normal.map((n) => n / normalLen);
|
|
11
|
-
if (normalNormalized[0] === 0 && normalNormalized[1] === 0 && normalNormalized[2] === 1) {
|
|
12
|
-
return [
|
|
13
|
-
[0, 1, 0],
|
|
14
|
-
[-1, 0, 0],
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
const [normalNormalizedX, normalNormalizedY, normalNormalizedZ] = normalNormalized;
|
|
18
|
-
const base0Len = Math.sqrt(normalNormalizedX * normalNormalizedX + normalNormalizedY * normalNormalizedY);
|
|
19
|
-
// Along the ground (z is 0) as in CET
|
|
20
|
-
const base0 = [-normalNormalizedY / base0Len, normalNormalizedX / base0Len, 0];
|
|
21
|
-
const [base0X, base0Y, base0Z] = base0;
|
|
22
|
-
// Cross product, orthogonal to the plane normal and the "along the ground vector"
|
|
23
|
-
const base1 = [
|
|
24
|
-
normalNormalizedY * base0Z - normalNormalizedZ * base0Y,
|
|
25
|
-
normalNormalizedZ * base0X - normalNormalizedX * base0Z,
|
|
26
|
-
normalNormalizedX * base0Y - normalNormalizedY * base0X,
|
|
27
|
-
];
|
|
28
|
-
return [base0, base1];
|
|
29
|
-
}
|
|
30
|
-
/** From a point over to the UV-coordinates by projecting */
|
|
31
|
-
function toUv(point, mappingPlaneVectors) {
|
|
32
|
-
const [b0, b1] = mappingPlaneVectors;
|
|
33
|
-
const [x, y, z] = point;
|
|
34
|
-
return [b0[0] * x + b0[1] * y + b0[2] * z, b1[0] * x + b1[1] * y + b1[2] * z];
|
|
35
|
-
}
|
|
36
|
-
export function createUVPlaneCoordinates(env, positions) {
|
|
37
|
-
return createUV(env, positions, undefined);
|
|
38
|
-
}
|
|
39
|
-
export function createUVPlaneCoordinatesForStretched(env, positions, refPositions) {
|
|
40
|
-
return createUV(env, positions, refPositions);
|
|
41
|
-
}
|
|
42
|
-
function createUV(env, positions, refPositions) {
|
|
43
|
-
var _a;
|
|
44
|
-
if (env === undefined) {
|
|
45
|
-
throw new Error("env needed for plane mapper");
|
|
46
|
-
}
|
|
47
|
-
const xyzCount = positions.length;
|
|
48
|
-
const vertexCount = xyzCount / 3;
|
|
49
|
-
if (refPositions !== undefined && refPositions.length !== xyzCount) {
|
|
50
|
-
throw new Error(`Position count differs: ${refPositions.length} vs ${xyzCount}.`);
|
|
51
|
-
}
|
|
52
|
-
refPositions = refPositions || positions;
|
|
53
|
-
const normal = env.normal;
|
|
54
|
-
const transform = (_a = env.transforms) === null || _a === void 0 ? void 0 : _a[0];
|
|
55
|
-
const mappingPlaneVectors = calculateMappingPlaneVectors([normal.x, normal.y, normal.z]);
|
|
56
|
-
let refMinU = Number.POSITIVE_INFINITY;
|
|
57
|
-
let refMaxU = Number.NEGATIVE_INFINITY;
|
|
58
|
-
let refMinV = Number.POSITIVE_INFINITY;
|
|
59
|
-
let refMaxV = Number.NEGATIVE_INFINITY;
|
|
60
|
-
for (let i = 0; i < vertexCount; i++) {
|
|
61
|
-
const xyzOffset = i * 3;
|
|
62
|
-
const [u, v] = toUv([refPositions[xyzOffset], refPositions[xyzOffset + 1], refPositions[xyzOffset + 2]], mappingPlaneVectors);
|
|
63
|
-
refMinU = Math.min(refMinU, u);
|
|
64
|
-
refMaxU = Math.max(refMaxU, u);
|
|
65
|
-
refMinV = Math.min(refMinV, v);
|
|
66
|
-
refMaxV = Math.max(refMaxV, v);
|
|
67
|
-
}
|
|
68
|
-
const refSizeU = refMaxU - refMinU;
|
|
69
|
-
const refSizeV = refMaxV - refMinV;
|
|
70
|
-
const newUvs = new Float32Array(vertexCount * 2);
|
|
71
|
-
for (let i = 0; i < vertexCount; i++) {
|
|
72
|
-
const xyzOffset = i * 3;
|
|
73
|
-
const uvOffset = i * 2;
|
|
74
|
-
let [u, v] = toUv([positions[xyzOffset], positions[xyzOffset + 1], positions[xyzOffset + 2]], mappingPlaneVectors);
|
|
75
|
-
u = (u - refMinU) / refSizeU;
|
|
76
|
-
v = (v - refMinV) / refSizeV;
|
|
77
|
-
if (transform !== undefined) {
|
|
78
|
-
[u, v] = UVMapper.applyUvTransform([u, v], transform);
|
|
79
|
-
}
|
|
80
|
-
newUvs[uvOffset] = u;
|
|
81
|
-
newUvs[uvOffset + 1] = v;
|
|
82
|
-
}
|
|
83
|
-
return newUvs;
|
|
84
|
-
}
|
|
1
|
+
import { UVMapper } from "./UVMapper.js";
|
|
2
|
+
/**
|
|
3
|
+
* Calculate base vectors for the mapping plane where the first is orthogonal with the
|
|
4
|
+
* normal-vector and flat along the ground and the other is orthogonal to the first two.
|
|
5
|
+
*/
|
|
6
|
+
function calculateMappingPlaneVectors(normal) {
|
|
7
|
+
const [normalX, normalY, normalZ] = normal;
|
|
8
|
+
const normalLen = Math.sqrt(normalX * normalX + normalY * normalY + normalZ * normalZ);
|
|
9
|
+
// Probably already normalized, but just to be sure
|
|
10
|
+
const normalNormalized = normal.map((n) => n / normalLen);
|
|
11
|
+
if (normalNormalized[0] === 0 && normalNormalized[1] === 0 && normalNormalized[2] === 1) {
|
|
12
|
+
return [
|
|
13
|
+
[0, 1, 0],
|
|
14
|
+
[-1, 0, 0],
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
const [normalNormalizedX, normalNormalizedY, normalNormalizedZ] = normalNormalized;
|
|
18
|
+
const base0Len = Math.sqrt(normalNormalizedX * normalNormalizedX + normalNormalizedY * normalNormalizedY);
|
|
19
|
+
// Along the ground (z is 0) as in CET
|
|
20
|
+
const base0 = [-normalNormalizedY / base0Len, normalNormalizedX / base0Len, 0];
|
|
21
|
+
const [base0X, base0Y, base0Z] = base0;
|
|
22
|
+
// Cross product, orthogonal to the plane normal and the "along the ground vector"
|
|
23
|
+
const base1 = [
|
|
24
|
+
normalNormalizedY * base0Z - normalNormalizedZ * base0Y,
|
|
25
|
+
normalNormalizedZ * base0X - normalNormalizedX * base0Z,
|
|
26
|
+
normalNormalizedX * base0Y - normalNormalizedY * base0X,
|
|
27
|
+
];
|
|
28
|
+
return [base0, base1];
|
|
29
|
+
}
|
|
30
|
+
/** From a point over to the UV-coordinates by projecting */
|
|
31
|
+
function toUv(point, mappingPlaneVectors) {
|
|
32
|
+
const [b0, b1] = mappingPlaneVectors;
|
|
33
|
+
const [x, y, z] = point;
|
|
34
|
+
return [b0[0] * x + b0[1] * y + b0[2] * z, b1[0] * x + b1[1] * y + b1[2] * z];
|
|
35
|
+
}
|
|
36
|
+
export function createUVPlaneCoordinates(env, positions) {
|
|
37
|
+
return createUV(env, positions, undefined);
|
|
38
|
+
}
|
|
39
|
+
export function createUVPlaneCoordinatesForStretched(env, positions, refPositions) {
|
|
40
|
+
return createUV(env, positions, refPositions);
|
|
41
|
+
}
|
|
42
|
+
function createUV(env, positions, refPositions) {
|
|
43
|
+
var _a;
|
|
44
|
+
if (env === undefined) {
|
|
45
|
+
throw new Error("env needed for plane mapper");
|
|
46
|
+
}
|
|
47
|
+
const xyzCount = positions.length;
|
|
48
|
+
const vertexCount = xyzCount / 3;
|
|
49
|
+
if (refPositions !== undefined && refPositions.length !== xyzCount) {
|
|
50
|
+
throw new Error(`Position count differs: ${refPositions.length} vs ${xyzCount}.`);
|
|
51
|
+
}
|
|
52
|
+
refPositions = refPositions || positions;
|
|
53
|
+
const normal = env.normal;
|
|
54
|
+
const transform = (_a = env.transforms) === null || _a === void 0 ? void 0 : _a[0];
|
|
55
|
+
const mappingPlaneVectors = calculateMappingPlaneVectors([normal.x, normal.y, normal.z]);
|
|
56
|
+
let refMinU = Number.POSITIVE_INFINITY;
|
|
57
|
+
let refMaxU = Number.NEGATIVE_INFINITY;
|
|
58
|
+
let refMinV = Number.POSITIVE_INFINITY;
|
|
59
|
+
let refMaxV = Number.NEGATIVE_INFINITY;
|
|
60
|
+
for (let i = 0; i < vertexCount; i++) {
|
|
61
|
+
const xyzOffset = i * 3;
|
|
62
|
+
const [u, v] = toUv([refPositions[xyzOffset], refPositions[xyzOffset + 1], refPositions[xyzOffset + 2]], mappingPlaneVectors);
|
|
63
|
+
refMinU = Math.min(refMinU, u);
|
|
64
|
+
refMaxU = Math.max(refMaxU, u);
|
|
65
|
+
refMinV = Math.min(refMinV, v);
|
|
66
|
+
refMaxV = Math.max(refMaxV, v);
|
|
67
|
+
}
|
|
68
|
+
const refSizeU = refMaxU - refMinU;
|
|
69
|
+
const refSizeV = refMaxV - refMinV;
|
|
70
|
+
const newUvs = new Float32Array(vertexCount * 2);
|
|
71
|
+
for (let i = 0; i < vertexCount; i++) {
|
|
72
|
+
const xyzOffset = i * 3;
|
|
73
|
+
const uvOffset = i * 2;
|
|
74
|
+
let [u, v] = toUv([positions[xyzOffset], positions[xyzOffset + 1], positions[xyzOffset + 2]], mappingPlaneVectors);
|
|
75
|
+
u = (u - refMinU) / refSizeU;
|
|
76
|
+
v = (v - refMinV) / refSizeV;
|
|
77
|
+
if (transform !== undefined) {
|
|
78
|
+
[u, v] = UVMapper.applyUvTransform([u, v], transform);
|
|
79
|
+
}
|
|
80
|
+
newUvs[uvOffset] = u;
|
|
81
|
+
newUvs[uvOffset + 1] = v;
|
|
82
|
+
}
|
|
83
|
+
return newUvs;
|
|
84
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Transform2D } from "../../geometry/Transform2D.js";
|
|
2
|
-
export declare class UVTransformer {
|
|
3
|
-
transform: Transform2D;
|
|
4
|
-
constructor(transform: Transform2D);
|
|
5
|
-
}
|
|
1
|
+
import { Transform2D } from "../../geometry/Transform2D.js";
|
|
2
|
+
export declare class UVTransformer {
|
|
3
|
+
transform: Transform2D;
|
|
4
|
+
constructor(transform: Transform2D);
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=UVTransformer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export class UVTransformer {
|
|
2
|
-
constructor(transform) {
|
|
3
|
-
this.transform = transform;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
1
|
+
export class UVTransformer {
|
|
2
|
+
constructor(transform) {
|
|
3
|
+
this.transform = transform;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Logger } from "@configura/web-utilities";
|
|
2
|
-
import { UVMapper } from "./UVMapper.js";
|
|
3
|
-
export declare function instantiateUVMapper(logger: Logger, className: string): UVMapper;
|
|
1
|
+
import { Logger } from "@configura/web-utilities";
|
|
2
|
+
import { UVMapper } from "./UVMapper.js";
|
|
3
|
+
export declare function instantiateUVMapper(logger: Logger, className: string): UVMapper;
|
|
4
4
|
//# sourceMappingURL=instantiateUVMapper.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UVMapper } from "./UVMapper.js";
|
|
2
|
-
export function instantiateUVMapper(logger, className) {
|
|
3
|
-
return new UVMapper();
|
|
4
|
-
}
|
|
1
|
+
import { UVMapper } from "./UVMapper.js";
|
|
2
|
+
export function instantiateUVMapper(logger, className) {
|
|
3
|
+
return new UVMapper();
|
|
4
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SymInv } from "./SymInv.js";
|
|
2
|
-
import { SymNode } from "./SymNode.js";
|
|
3
|
-
export declare class InvalidationEnv {
|
|
4
|
-
node: SymNode;
|
|
5
|
-
invalidation: SymInv[];
|
|
6
|
-
n: number;
|
|
7
|
-
constructor(node: SymNode, invalidation: SymInv[], n?: number);
|
|
8
|
-
dump(): void;
|
|
9
|
-
}
|
|
1
|
+
import { SymInv } from "./SymInv.js";
|
|
2
|
+
import { SymNode } from "./SymNode.js";
|
|
3
|
+
export declare class InvalidationEnv {
|
|
4
|
+
node: SymNode;
|
|
5
|
+
invalidation: SymInv[];
|
|
6
|
+
n: number;
|
|
7
|
+
constructor(node: SymNode, invalidation: SymInv[], n?: number);
|
|
8
|
+
dump(): void;
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=InvalidationEnv.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export class InvalidationEnv {
|
|
2
|
-
constructor(node, invalidation, n = 0) {
|
|
3
|
-
this.node = node;
|
|
4
|
-
this.invalidation = invalidation;
|
|
5
|
-
this.n = n;
|
|
6
|
-
}
|
|
7
|
-
dump() {
|
|
8
|
-
console.log(`${" ".repeat(this.n)}${this.node}`);
|
|
9
|
-
for (const inv of this.invalidation) {
|
|
10
|
-
console.log(`${" ".repeat(this.n + 1)}${inv}`);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
export class InvalidationEnv {
|
|
2
|
+
constructor(node, invalidation, n = 0) {
|
|
3
|
+
this.node = node;
|
|
4
|
+
this.invalidation = invalidation;
|
|
5
|
+
this.n = n;
|
|
6
|
+
}
|
|
7
|
+
dump() {
|
|
8
|
+
console.log(`${" ".repeat(this.n)}${this.node}`);
|
|
9
|
+
for (const inv of this.invalidation) {
|
|
10
|
+
console.log(`${" ".repeat(this.n + 1)}${inv}`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Semver } from "../../io/Semver.js";
|
|
2
|
-
import { DexObj } from "../dex/DexObj.js";
|
|
3
|
-
import { SymNode } from "./SymNode.js";
|
|
4
|
-
export declare class SymImportEnv {
|
|
5
|
-
fileVersion: Semver;
|
|
6
|
-
sharedNodeMap: Map<DexObj, SymNode>;
|
|
7
|
-
constructor(fileVersion: Semver);
|
|
8
|
-
copy(): SymImportEnv;
|
|
9
|
-
}
|
|
1
|
+
import { Semver } from "../../io/Semver.js";
|
|
2
|
+
import { DexObj } from "../dex/DexObj.js";
|
|
3
|
+
import { SymNode } from "./SymNode.js";
|
|
4
|
+
export declare class SymImportEnv {
|
|
5
|
+
fileVersion: Semver;
|
|
6
|
+
sharedNodeMap: Map<DexObj, SymNode>;
|
|
7
|
+
constructor(fileVersion: Semver);
|
|
8
|
+
copy(): SymImportEnv;
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=SymImportEnv.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export class SymImportEnv {
|
|
2
|
-
constructor(fileVersion) {
|
|
3
|
-
this.fileVersion = fileVersion;
|
|
4
|
-
this.sharedNodeMap = new Map();
|
|
5
|
-
}
|
|
6
|
-
copy() {
|
|
7
|
-
return new SymImportEnv(this.fileVersion);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
export class SymImportEnv {
|
|
2
|
+
constructor(fileVersion) {
|
|
3
|
+
this.fileVersion = fileVersion;
|
|
4
|
+
this.sharedNodeMap = new Map();
|
|
5
|
+
}
|
|
6
|
+
copy() {
|
|
7
|
+
return new SymImportEnv(this.fileVersion);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SymNode } from "./SymNode.js";
|
|
2
|
-
export declare class SymInv {
|
|
3
|
-
needToInvalidate(node: SymNode): boolean;
|
|
4
|
-
skip(node: SymNode): boolean;
|
|
5
|
-
propagate(): boolean;
|
|
6
|
-
invalidate(node: SymNode): void;
|
|
7
|
-
toString(): string;
|
|
8
|
-
}
|
|
1
|
+
import { SymNode } from "./SymNode.js";
|
|
2
|
+
export declare class SymInv {
|
|
3
|
+
needToInvalidate(node: SymNode): boolean;
|
|
4
|
+
skip(node: SymNode): boolean;
|
|
5
|
+
propagate(): boolean;
|
|
6
|
+
invalidate(node: SymNode): void;
|
|
7
|
+
toString(): string;
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=SymInv.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export class SymInv {
|
|
2
|
-
needToInvalidate(node) {
|
|
3
|
-
return true;
|
|
4
|
-
}
|
|
5
|
-
skip(node) {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
propagate() {
|
|
9
|
-
return true;
|
|
10
|
-
}
|
|
11
|
-
invalidate(node) {
|
|
12
|
-
// This method has been left intentionally blank
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return `SymInv()`;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
export class SymInv {
|
|
2
|
+
needToInvalidate(node) {
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
skip(node) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
propagate() {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
invalidate(node) {
|
|
12
|
+
// This method has been left intentionally blank
|
|
13
|
+
}
|
|
14
|
+
toString() {
|
|
15
|
+
return `SymInv()`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { Logger } from "@configura/web-utilities";
|
|
2
|
-
import { DetailLevel } from "../../geometry/DetailMask.js";
|
|
3
|
-
import { DexManager } from "../dex/DexManager.js";
|
|
4
|
-
import { DexObj } from "../dex/DexObj.js";
|
|
5
|
-
import { TaggedNode } from "./components/mesh.js";
|
|
6
|
-
import { SymBox } from "./components/SymBox.js";
|
|
7
|
-
import { DexObjKey, SymComponent, SymComponentKey } from "./components/SymComponent.js";
|
|
8
|
-
import { SymDexObj } from "./components/SymDexObj.js";
|
|
9
|
-
import { SymGMaterial } from "./components/SymGMaterial.js";
|
|
10
|
-
import { SymGMaterialSelector } from "./components/SymGMaterialSelector.js";
|
|
11
|
-
import { SymMeasure } from "./components/SymMeasure.js";
|
|
12
|
-
import { SymMesh } from "./components/SymMesh.js";
|
|
13
|
-
import { SymPlane } from "./components/SymPlane.js";
|
|
14
|
-
import { SymProps } from "./components/SymProps.js";
|
|
15
|
-
import { SymReps } from "./components/SymReps.js";
|
|
16
|
-
import { SymSphere } from "./components/SymSphere.js";
|
|
17
|
-
import { SymTags } from "./components/SymTags.js";
|
|
18
|
-
import { SymTransform } from "./components/SymTransform.js";
|
|
19
|
-
import { SymUVMapper } from "./components/SymUVMapper.js";
|
|
20
|
-
import { SymImportEnv } from "./SymImportEnv.js";
|
|
21
|
-
export declare const VERBOSE_SYM_LOGGING = false;
|
|
22
|
-
export declare class SymNode {
|
|
23
|
-
id: string;
|
|
24
|
-
_children?: Map<string, SymNode>;
|
|
25
|
-
components: Map<string, SymComponent>;
|
|
26
|
-
_parents?: SymNode[];
|
|
27
|
-
constructor(id: string);
|
|
28
|
-
setId(logger: Logger, newId: string): void;
|
|
29
|
-
children(logger: Logger, safe: true, load: boolean): Map<string, SymNode>;
|
|
30
|
-
children(logger: Logger, safe?: boolean, load?: boolean): Map<string, SymNode> | undefined;
|
|
31
|
-
ensureChildrenLoaded(logger: Logger): void;
|
|
32
|
-
dexChildrenCount(): number;
|
|
33
|
-
loadDexChildren(logger: Logger): void;
|
|
34
|
-
addChild(logger: Logger, child: SymNode, invalidate?: boolean): void;
|
|
35
|
-
loadChild(logger: Logger, dexChildren: DexObj, id: string, env?: SymImportEnv): SymNode | undefined;
|
|
36
|
-
addParent(parent?: SymNode, safe?: boolean): void;
|
|
37
|
-
invalidateParent(parent: SymNode, removed: boolean): void;
|
|
38
|
-
invalidate(removed: boolean): void;
|
|
39
|
-
importEnv(ascend?: boolean): SymImportEnv | undefined;
|
|
40
|
-
setImportEnv(env: SymImportEnv): (SymDexObj & Error) | undefined;
|
|
41
|
-
set(key: string, value: unknown): void;
|
|
42
|
-
get(key: string): unknown;
|
|
43
|
-
has(key: string): boolean;
|
|
44
|
-
fillPropsAfterLoad(): (SymProps | Error) | undefined;
|
|
45
|
-
hasDexComponent(key: string): boolean | Error;
|
|
46
|
-
breakDexConnection(loadChildren?: boolean, descend?: boolean): void;
|
|
47
|
-
_breakDexConnection(env: SymImportEnv, loadChildren: boolean, descend: boolean): void;
|
|
48
|
-
dexObj(): DexObj | undefined;
|
|
49
|
-
symDexObj(): SymDexObj | undefined;
|
|
50
|
-
symGMaterial(safe: true): SymGMaterial;
|
|
51
|
-
symGMaterial(safe?: boolean): SymGMaterial | undefined;
|
|
52
|
-
symGMaterialSelector(safe: true): SymGMaterialSelector;
|
|
53
|
-
symGMaterialSelector(safe?: boolean): SymGMaterialSelector | undefined;
|
|
54
|
-
symMesh(safe: true): SymMesh;
|
|
55
|
-
symMesh(safe?: boolean): SymMesh | undefined;
|
|
56
|
-
symSphere(safe: true): SymSphere;
|
|
57
|
-
symSphere(safe?: boolean): SymSphere | undefined;
|
|
58
|
-
symBox(safe: true): SymBox;
|
|
59
|
-
symBox(safe?: boolean): SymBox | undefined;
|
|
60
|
-
symPlane(safe: true): SymPlane;
|
|
61
|
-
symPlane(safe?: boolean): SymPlane | undefined;
|
|
62
|
-
symProps(safe: true): SymProps;
|
|
63
|
-
symProps(safe?: boolean): SymProps | undefined;
|
|
64
|
-
symReps(safe: true): SymReps;
|
|
65
|
-
symReps(safe?: boolean): SymReps | undefined;
|
|
66
|
-
symTags(safe: true): SymTags;
|
|
67
|
-
symTags(safe?: boolean): SymTags | undefined;
|
|
68
|
-
symTransform(safe: true): SymTransform;
|
|
69
|
-
symTransform(safe?: boolean): SymTransform | undefined;
|
|
70
|
-
symUVMapper(safe: true): SymUVMapper;
|
|
71
|
-
symUVMapper(safe?: boolean): SymUVMapper | undefined;
|
|
72
|
-
getMeasure(): SymMeasure | undefined;
|
|
73
|
-
private _isStretch;
|
|
74
|
-
isStretch(logger: Logger, detailLevel: DetailLevel): boolean;
|
|
75
|
-
getComponent(key: SymComponentKey): SymComponent | undefined;
|
|
76
|
-
addComponent(component: SymComponent, invalidate?: boolean): void;
|
|
77
|
-
hasComponent(key: SymComponentKey | DexObjKey): boolean;
|
|
78
|
-
removeComponent(key: SymComponentKey, invalidate?: boolean): void;
|
|
79
|
-
loadComponents(logger: Logger, force?: boolean): void;
|
|
80
|
-
loadComponent(logger: Logger, key: SymComponentKey | DexObjKey, obj: DexObj, env?: SymImportEnv, force?: boolean): boolean;
|
|
81
|
-
prepareAfterLoad(): void;
|
|
82
|
-
features(create?: boolean): Map<string, SymComponentKey>;
|
|
83
|
-
featureProviderKey(feature: string): SymComponentKey | undefined;
|
|
84
|
-
featureProvider(feature: string): SymComponent | undefined;
|
|
85
|
-
buildFeatures(): Map<string, SymComponentKey>;
|
|
86
|
-
addFeaturesFrom(component: SymComponent): void;
|
|
87
|
-
childrenProvider(): SymComponent | undefined;
|
|
88
|
-
meshProvider(): SymComponent | undefined;
|
|
89
|
-
get3DTmp(logger: Logger, detail: DetailLevel): TaggedNode[];
|
|
90
|
-
toString(): string;
|
|
91
|
-
}
|
|
92
|
-
export declare function toSymNode(logger: Logger, obj: DexObj, parent?: SymNode, env?: SymImportEnv, putImportEnv?: boolean): SymNode;
|
|
93
|
-
export declare function loadSymFile(logger: Logger, url: string, manager: DexManager, abortSignal?: AbortSignal): Promise<SymNode>;
|
|
94
|
-
export declare function makeSymFromDex(logger: Logger, root: DexObj): SymNode;
|
|
1
|
+
import { Logger } from "@configura/web-utilities";
|
|
2
|
+
import { DetailLevel } from "../../geometry/DetailMask.js";
|
|
3
|
+
import { DexManager } from "../dex/DexManager.js";
|
|
4
|
+
import { DexObj } from "../dex/DexObj.js";
|
|
5
|
+
import { TaggedNode } from "./components/mesh.js";
|
|
6
|
+
import { SymBox } from "./components/SymBox.js";
|
|
7
|
+
import { DexObjKey, SymComponent, SymComponentKey } from "./components/SymComponent.js";
|
|
8
|
+
import { SymDexObj } from "./components/SymDexObj.js";
|
|
9
|
+
import { SymGMaterial } from "./components/SymGMaterial.js";
|
|
10
|
+
import { SymGMaterialSelector } from "./components/SymGMaterialSelector.js";
|
|
11
|
+
import { SymMeasure } from "./components/SymMeasure.js";
|
|
12
|
+
import { SymMesh } from "./components/SymMesh.js";
|
|
13
|
+
import { SymPlane } from "./components/SymPlane.js";
|
|
14
|
+
import { SymProps } from "./components/SymProps.js";
|
|
15
|
+
import { SymReps } from "./components/SymReps.js";
|
|
16
|
+
import { SymSphere } from "./components/SymSphere.js";
|
|
17
|
+
import { SymTags } from "./components/SymTags.js";
|
|
18
|
+
import { SymTransform } from "./components/SymTransform.js";
|
|
19
|
+
import { SymUVMapper } from "./components/SymUVMapper.js";
|
|
20
|
+
import { SymImportEnv } from "./SymImportEnv.js";
|
|
21
|
+
export declare const VERBOSE_SYM_LOGGING = false;
|
|
22
|
+
export declare class SymNode {
|
|
23
|
+
id: string;
|
|
24
|
+
_children?: Map<string, SymNode>;
|
|
25
|
+
components: Map<string, SymComponent>;
|
|
26
|
+
_parents?: SymNode[];
|
|
27
|
+
constructor(id: string);
|
|
28
|
+
setId(logger: Logger, newId: string): void;
|
|
29
|
+
children(logger: Logger, safe: true, load: boolean): Map<string, SymNode>;
|
|
30
|
+
children(logger: Logger, safe?: boolean, load?: boolean): Map<string, SymNode> | undefined;
|
|
31
|
+
ensureChildrenLoaded(logger: Logger): void;
|
|
32
|
+
dexChildrenCount(): number;
|
|
33
|
+
loadDexChildren(logger: Logger): void;
|
|
34
|
+
addChild(logger: Logger, child: SymNode, invalidate?: boolean): void;
|
|
35
|
+
loadChild(logger: Logger, dexChildren: DexObj, id: string, env?: SymImportEnv): SymNode | undefined;
|
|
36
|
+
addParent(parent?: SymNode, safe?: boolean): void;
|
|
37
|
+
invalidateParent(parent: SymNode, removed: boolean): void;
|
|
38
|
+
invalidate(removed: boolean): void;
|
|
39
|
+
importEnv(ascend?: boolean): SymImportEnv | undefined;
|
|
40
|
+
setImportEnv(env: SymImportEnv): (SymDexObj & Error) | undefined;
|
|
41
|
+
set(key: string, value: unknown): void;
|
|
42
|
+
get(key: string): unknown;
|
|
43
|
+
has(key: string): boolean;
|
|
44
|
+
fillPropsAfterLoad(): (SymProps | Error) | undefined;
|
|
45
|
+
hasDexComponent(key: string): boolean | Error;
|
|
46
|
+
breakDexConnection(loadChildren?: boolean, descend?: boolean): void;
|
|
47
|
+
_breakDexConnection(env: SymImportEnv, loadChildren: boolean, descend: boolean): void;
|
|
48
|
+
dexObj(): DexObj | undefined;
|
|
49
|
+
symDexObj(): SymDexObj | undefined;
|
|
50
|
+
symGMaterial(safe: true): SymGMaterial;
|
|
51
|
+
symGMaterial(safe?: boolean): SymGMaterial | undefined;
|
|
52
|
+
symGMaterialSelector(safe: true): SymGMaterialSelector;
|
|
53
|
+
symGMaterialSelector(safe?: boolean): SymGMaterialSelector | undefined;
|
|
54
|
+
symMesh(safe: true): SymMesh;
|
|
55
|
+
symMesh(safe?: boolean): SymMesh | undefined;
|
|
56
|
+
symSphere(safe: true): SymSphere;
|
|
57
|
+
symSphere(safe?: boolean): SymSphere | undefined;
|
|
58
|
+
symBox(safe: true): SymBox;
|
|
59
|
+
symBox(safe?: boolean): SymBox | undefined;
|
|
60
|
+
symPlane(safe: true): SymPlane;
|
|
61
|
+
symPlane(safe?: boolean): SymPlane | undefined;
|
|
62
|
+
symProps(safe: true): SymProps;
|
|
63
|
+
symProps(safe?: boolean): SymProps | undefined;
|
|
64
|
+
symReps(safe: true): SymReps;
|
|
65
|
+
symReps(safe?: boolean): SymReps | undefined;
|
|
66
|
+
symTags(safe: true): SymTags;
|
|
67
|
+
symTags(safe?: boolean): SymTags | undefined;
|
|
68
|
+
symTransform(safe: true): SymTransform;
|
|
69
|
+
symTransform(safe?: boolean): SymTransform | undefined;
|
|
70
|
+
symUVMapper(safe: true): SymUVMapper;
|
|
71
|
+
symUVMapper(safe?: boolean): SymUVMapper | undefined;
|
|
72
|
+
getMeasure(): SymMeasure | undefined;
|
|
73
|
+
private _isStretch;
|
|
74
|
+
isStretch(logger: Logger, detailLevel: DetailLevel): boolean;
|
|
75
|
+
getComponent(key: SymComponentKey): SymComponent | undefined;
|
|
76
|
+
addComponent(component: SymComponent, invalidate?: boolean): void;
|
|
77
|
+
hasComponent(key: SymComponentKey | DexObjKey): boolean;
|
|
78
|
+
removeComponent(key: SymComponentKey, invalidate?: boolean): void;
|
|
79
|
+
loadComponents(logger: Logger, force?: boolean): void;
|
|
80
|
+
loadComponent(logger: Logger, key: SymComponentKey | DexObjKey, obj: DexObj, env?: SymImportEnv, force?: boolean): boolean;
|
|
81
|
+
prepareAfterLoad(): void;
|
|
82
|
+
features(create?: boolean): Map<string, SymComponentKey>;
|
|
83
|
+
featureProviderKey(feature: string): SymComponentKey | undefined;
|
|
84
|
+
featureProvider(feature: string): SymComponent | undefined;
|
|
85
|
+
buildFeatures(): Map<string, SymComponentKey>;
|
|
86
|
+
addFeaturesFrom(component: SymComponent): void;
|
|
87
|
+
childrenProvider(): SymComponent | undefined;
|
|
88
|
+
meshProvider(): SymComponent | undefined;
|
|
89
|
+
get3DTmp(logger: Logger, detail: DetailLevel): TaggedNode[];
|
|
90
|
+
toString(): string;
|
|
91
|
+
}
|
|
92
|
+
export declare function toSymNode(logger: Logger, obj: DexObj, parent?: SymNode, env?: SymImportEnv, putImportEnv?: boolean): SymNode;
|
|
93
|
+
export declare function loadSymFile(logger: Logger, url: string, manager: DexManager, abortSignal?: AbortSignal): Promise<SymNode>;
|
|
94
|
+
export declare function makeSymFromDex(logger: Logger, root: DexObj): SymNode;
|
|
95
95
|
//# sourceMappingURL=SymNode.d.ts.map
|