@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,88 +1,88 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { GMaterial3D } from "../../../core3D/GMaterial3D.js";
|
|
11
|
-
import { GMaterialClassic } from "../../../core3D/GMaterialClassic.js";
|
|
12
|
-
import { GMaterialPBR } from "../../../core3D/GMaterialPBR.js";
|
|
13
|
-
import { MultiGMaterial3D } from "../../../core3D/MultiGMaterial3D.js";
|
|
14
|
-
import { DexObj } from "../../dex/DexObj.js";
|
|
15
|
-
import { SymComponent } from "./SymComponent.js";
|
|
16
|
-
export class SymGMaterial extends SymComponent {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.id = "symGMaterial";
|
|
20
|
-
}
|
|
21
|
-
load(logger, dexObj, _env) {
|
|
22
|
-
const result = this.dexNodeMaterial(logger, dexObj);
|
|
23
|
-
if (result === undefined) {
|
|
24
|
-
throw logger.errorAsObject("bad material");
|
|
25
|
-
}
|
|
26
|
-
this.gm = result;
|
|
27
|
-
}
|
|
28
|
-
dexNodeMaterial(logger, obj) {
|
|
29
|
-
const material = obj.get("gm");
|
|
30
|
-
if (material instanceof GMaterial3D) {
|
|
31
|
-
return material;
|
|
32
|
-
}
|
|
33
|
-
else if (material instanceof DexObj && material.type === "gm") {
|
|
34
|
-
return dexToGMaterial3D(logger, material);
|
|
35
|
-
}
|
|
36
|
-
throw logger.errorAsObject("Unknown SymGMaterial object:", material);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export function dexToGMaterial3D(log, obj) {
|
|
40
|
-
if (obj.type !== "gm") {
|
|
41
|
-
throw log.errorAsObject("bad obj.type:", obj.type);
|
|
42
|
-
}
|
|
43
|
-
const pbr = obj.get("pbr");
|
|
44
|
-
if (pbr instanceof DexObj) {
|
|
45
|
-
return new GMaterialPBR(log, obj);
|
|
46
|
-
}
|
|
47
|
-
return new GMaterialClassic(log, obj);
|
|
48
|
-
}
|
|
49
|
-
export function dexToMultiGMaterial3D(logger, obj) {
|
|
50
|
-
const multiMaterial = new MultiGMaterial3D();
|
|
51
|
-
if (obj.type === "multiMaterial") {
|
|
52
|
-
for (const key of obj.props.keys()) {
|
|
53
|
-
const prop = obj.get(key);
|
|
54
|
-
if (!(prop instanceof DexObj)) {
|
|
55
|
-
throw logger.errorAsObject(`obj.${key}: ${prop} != DexObj`);
|
|
56
|
-
}
|
|
57
|
-
if (prop.type !== "gm") {
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
const material = dexToGMaterial3D(logger, prop);
|
|
61
|
-
multiMaterial.materialMap.set(key, material);
|
|
62
|
-
}
|
|
63
|
-
return multiMaterial;
|
|
64
|
-
}
|
|
65
|
-
else if (obj.type === "gm") {
|
|
66
|
-
const material = dexToGMaterial3D(logger, obj);
|
|
67
|
-
multiMaterial.materialMap.set("super", material);
|
|
68
|
-
return multiMaterial;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
throw logger.errorAsObject("unknown obj.type:", obj.type);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export function loadMaterialFromUrl(logger, url, dexManager, abortSignal) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const root = yield dexManager.load(logger, url, abortSignal);
|
|
77
|
-
return finishMaterial(logger, url, root);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
export function makeMaterialFromBuffer(logger, buffer, dexManager) {
|
|
81
|
-
const root = dexManager.arrayBufferToDexObj(logger, "", buffer);
|
|
82
|
-
return finishMaterial(logger, "", root);
|
|
83
|
-
}
|
|
84
|
-
function finishMaterial(logger, url, dex) {
|
|
85
|
-
const material = dexToMultiGMaterial3D(logger, dex);
|
|
86
|
-
material.gmFile = url;
|
|
87
|
-
return material;
|
|
88
|
-
}
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { GMaterial3D } from "../../../core3D/GMaterial3D.js";
|
|
11
|
+
import { GMaterialClassic } from "../../../core3D/GMaterialClassic.js";
|
|
12
|
+
import { GMaterialPBR } from "../../../core3D/GMaterialPBR.js";
|
|
13
|
+
import { MultiGMaterial3D } from "../../../core3D/MultiGMaterial3D.js";
|
|
14
|
+
import { DexObj } from "../../dex/DexObj.js";
|
|
15
|
+
import { SymComponent } from "./SymComponent.js";
|
|
16
|
+
export class SymGMaterial extends SymComponent {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.id = "symGMaterial";
|
|
20
|
+
}
|
|
21
|
+
load(logger, dexObj, _env) {
|
|
22
|
+
const result = this.dexNodeMaterial(logger, dexObj);
|
|
23
|
+
if (result === undefined) {
|
|
24
|
+
throw logger.errorAsObject("bad material");
|
|
25
|
+
}
|
|
26
|
+
this.gm = result;
|
|
27
|
+
}
|
|
28
|
+
dexNodeMaterial(logger, obj) {
|
|
29
|
+
const material = obj.get("gm");
|
|
30
|
+
if (material instanceof GMaterial3D) {
|
|
31
|
+
return material;
|
|
32
|
+
}
|
|
33
|
+
else if (material instanceof DexObj && material.type === "gm") {
|
|
34
|
+
return dexToGMaterial3D(logger, material);
|
|
35
|
+
}
|
|
36
|
+
throw logger.errorAsObject("Unknown SymGMaterial object:", material);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function dexToGMaterial3D(log, obj) {
|
|
40
|
+
if (obj.type !== "gm") {
|
|
41
|
+
throw log.errorAsObject("bad obj.type:", obj.type);
|
|
42
|
+
}
|
|
43
|
+
const pbr = obj.get("pbr");
|
|
44
|
+
if (pbr instanceof DexObj) {
|
|
45
|
+
return new GMaterialPBR(log, obj);
|
|
46
|
+
}
|
|
47
|
+
return new GMaterialClassic(log, obj);
|
|
48
|
+
}
|
|
49
|
+
export function dexToMultiGMaterial3D(logger, obj) {
|
|
50
|
+
const multiMaterial = new MultiGMaterial3D();
|
|
51
|
+
if (obj.type === "multiMaterial") {
|
|
52
|
+
for (const key of obj.props.keys()) {
|
|
53
|
+
const prop = obj.get(key);
|
|
54
|
+
if (!(prop instanceof DexObj)) {
|
|
55
|
+
throw logger.errorAsObject(`obj.${key}: ${prop} != DexObj`);
|
|
56
|
+
}
|
|
57
|
+
if (prop.type !== "gm") {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const material = dexToGMaterial3D(logger, prop);
|
|
61
|
+
multiMaterial.materialMap.set(key, material);
|
|
62
|
+
}
|
|
63
|
+
return multiMaterial;
|
|
64
|
+
}
|
|
65
|
+
else if (obj.type === "gm") {
|
|
66
|
+
const material = dexToGMaterial3D(logger, obj);
|
|
67
|
+
multiMaterial.materialMap.set("super", material);
|
|
68
|
+
return multiMaterial;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
throw logger.errorAsObject("unknown obj.type:", obj.type);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export function loadMaterialFromUrl(logger, url, dexManager, abortSignal) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const root = yield dexManager.load(logger, url, abortSignal);
|
|
77
|
+
return finishMaterial(logger, url, root);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
export function makeMaterialFromBuffer(logger, buffer, dexManager) {
|
|
81
|
+
const root = dexManager.arrayBufferToDexObj(logger, "", buffer);
|
|
82
|
+
return finishMaterial(logger, "", root);
|
|
83
|
+
}
|
|
84
|
+
function finishMaterial(logger, url, dex) {
|
|
85
|
+
const material = dexToMultiGMaterial3D(logger, dex);
|
|
86
|
+
material.gmFile = url;
|
|
87
|
+
return material;
|
|
88
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Logger } from "@configura/web-utilities";
|
|
2
|
-
import { GMaterial3D } from "../../../core3D/GMaterial3D.js";
|
|
3
|
-
import { DexObj } from "../../dex/DexObj.js";
|
|
4
|
-
import { SymImportEnv } from "../SymImportEnv.js";
|
|
5
|
-
import { SymComponent, SymComponentKey } from "./SymComponent.js";
|
|
6
|
-
import { SymGMaterial } from "./SymGMaterial.js";
|
|
7
|
-
/**
|
|
8
|
-
* The specification says that the last option is the default / fallback if there isn't any match
|
|
9
|
-
* among the layers, so we only load and use that one.
|
|
10
|
-
* @see http://web.git.configura.com/webteam/docs/cmsym/#SymGMaterialSelector
|
|
11
|
-
*/
|
|
12
|
-
export declare class SymGMaterialSelector extends SymComponent {
|
|
13
|
-
id: SymComponentKey;
|
|
14
|
-
gm?: GMaterial3D;
|
|
15
|
-
symGMaterial?: SymGMaterial;
|
|
16
|
-
load(logger: Logger, obj: DexObj, _env: SymImportEnv): void;
|
|
17
|
-
}
|
|
1
|
+
import { Logger } from "@configura/web-utilities";
|
|
2
|
+
import { GMaterial3D } from "../../../core3D/GMaterial3D.js";
|
|
3
|
+
import { DexObj } from "../../dex/DexObj.js";
|
|
4
|
+
import { SymImportEnv } from "../SymImportEnv.js";
|
|
5
|
+
import { SymComponent, SymComponentKey } from "./SymComponent.js";
|
|
6
|
+
import { SymGMaterial } from "./SymGMaterial.js";
|
|
7
|
+
/**
|
|
8
|
+
* The specification says that the last option is the default / fallback if there isn't any match
|
|
9
|
+
* among the layers, so we only load and use that one.
|
|
10
|
+
* @see http://web.git.configura.com/webteam/docs/cmsym/#SymGMaterialSelector
|
|
11
|
+
*/
|
|
12
|
+
export declare class SymGMaterialSelector extends SymComponent {
|
|
13
|
+
id: SymComponentKey;
|
|
14
|
+
gm?: GMaterial3D;
|
|
15
|
+
symGMaterial?: SymGMaterial;
|
|
16
|
+
load(logger: Logger, obj: DexObj, _env: SymImportEnv): void;
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=SymGMaterialSelector.d.ts.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { SymComponent } from "./SymComponent.js";
|
|
2
|
-
import { SymGMaterial } from "./SymGMaterial.js";
|
|
3
|
-
/**
|
|
4
|
-
* The specification says that the last option is the default / fallback if there isn't any match
|
|
5
|
-
* among the layers, so we only load and use that one.
|
|
6
|
-
* @see http://web.git.configura.com/webteam/docs/cmsym/#SymGMaterialSelector
|
|
7
|
-
*/
|
|
8
|
-
export class SymGMaterialSelector extends SymComponent {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.id = "symGMaterialSelector";
|
|
12
|
-
}
|
|
13
|
-
load(logger, obj, _env) {
|
|
14
|
-
const options = obj.get("options");
|
|
15
|
-
if (Array.isArray(options) && options.length > 0) {
|
|
16
|
-
const last = new SymGMaterial();
|
|
17
|
-
last.load(logger, options[options.length - 1], _env);
|
|
18
|
-
this.gm = last.gm;
|
|
19
|
-
this.symGMaterial = last;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
import { SymComponent } from "./SymComponent.js";
|
|
2
|
+
import { SymGMaterial } from "./SymGMaterial.js";
|
|
3
|
+
/**
|
|
4
|
+
* The specification says that the last option is the default / fallback if there isn't any match
|
|
5
|
+
* among the layers, so we only load and use that one.
|
|
6
|
+
* @see http://web.git.configura.com/webteam/docs/cmsym/#SymGMaterialSelector
|
|
7
|
+
*/
|
|
8
|
+
export class SymGMaterialSelector extends SymComponent {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.id = "symGMaterialSelector";
|
|
12
|
+
}
|
|
13
|
+
load(logger, obj, _env) {
|
|
14
|
+
const options = obj.get("options");
|
|
15
|
+
if (Array.isArray(options) && options.length > 0) {
|
|
16
|
+
const last = new SymGMaterial();
|
|
17
|
+
last.load(logger, options[options.length - 1], _env);
|
|
18
|
+
this.gm = last.gm;
|
|
19
|
+
this.symGMaterial = last;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SymRep } from "./SymRep.js";
|
|
2
|
-
export declare class SymGetMeshEnv {
|
|
3
|
-
rep?: SymRep | undefined;
|
|
4
|
-
load: boolean;
|
|
5
|
-
doubleSided: boolean;
|
|
6
|
-
requiresUVs: boolean;
|
|
7
|
-
insideOut: boolean;
|
|
8
|
-
constructor(rep?: SymRep | undefined, load?: boolean, doubleSided?: boolean, requiresUVs?: boolean, insideOut?: boolean);
|
|
9
|
-
}
|
|
1
|
+
import { SymRep } from "./SymRep.js";
|
|
2
|
+
export declare class SymGetMeshEnv {
|
|
3
|
+
rep?: SymRep | undefined;
|
|
4
|
+
load: boolean;
|
|
5
|
+
doubleSided: boolean;
|
|
6
|
+
requiresUVs: boolean;
|
|
7
|
+
insideOut: boolean;
|
|
8
|
+
constructor(rep?: SymRep | undefined, load?: boolean, doubleSided?: boolean, requiresUVs?: boolean, insideOut?: boolean);
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=SymGetMeshEnv.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export class SymGetMeshEnv {
|
|
2
|
-
constructor(rep, load = true, doubleSided = false, requiresUVs = false, insideOut = false) {
|
|
3
|
-
this.rep = rep;
|
|
4
|
-
this.load = load;
|
|
5
|
-
this.doubleSided = doubleSided;
|
|
6
|
-
this.requiresUVs = requiresUVs;
|
|
7
|
-
this.insideOut = insideOut;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
export class SymGetMeshEnv {
|
|
2
|
+
constructor(rep, load = true, doubleSided = false, requiresUVs = false, insideOut = false) {
|
|
3
|
+
this.rep = rep;
|
|
4
|
+
this.load = load;
|
|
5
|
+
this.doubleSided = doubleSided;
|
|
6
|
+
this.requiresUVs = requiresUVs;
|
|
7
|
+
this.insideOut = insideOut;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Logger } from "@configura/web-utilities";
|
|
2
|
-
import { DexObj } from "../../dex/DexObj.js";
|
|
3
|
-
import { SymImportEnv } from "../SymImportEnv.js";
|
|
4
|
-
import { SymComponent, SymComponentKey } from "./SymComponent.js";
|
|
5
|
-
export declare class SymLODGroup extends SymComponent {
|
|
6
|
-
id: SymComponentKey;
|
|
7
|
-
load(logger: Logger, obj: DexObj, env: SymImportEnv, force?: boolean): void;
|
|
8
|
-
level(): number;
|
|
9
|
-
}
|
|
1
|
+
import { Logger } from "@configura/web-utilities";
|
|
2
|
+
import { DexObj } from "../../dex/DexObj.js";
|
|
3
|
+
import { SymImportEnv } from "../SymImportEnv.js";
|
|
4
|
+
import { SymComponent, SymComponentKey } from "./SymComponent.js";
|
|
5
|
+
export declare class SymLODGroup extends SymComponent {
|
|
6
|
+
id: SymComponentKey;
|
|
7
|
+
load(logger: Logger, obj: DexObj, env: SymImportEnv, force?: boolean): void;
|
|
8
|
+
level(): number;
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=SymLODGroup.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { SymComponent } from "./SymComponent.js";
|
|
2
|
-
export class SymLODGroup extends SymComponent {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.id = "symLODGroup";
|
|
6
|
-
}
|
|
7
|
-
load(logger, obj, env, force = false) {
|
|
8
|
-
// This method has been left intentionally blank
|
|
9
|
-
}
|
|
10
|
-
level() {
|
|
11
|
-
return 1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
import { SymComponent } from "./SymComponent.js";
|
|
2
|
+
export class SymLODGroup extends SymComponent {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.id = "symLODGroup";
|
|
6
|
+
}
|
|
7
|
+
load(logger, obj, env, force = false) {
|
|
8
|
+
// This method has been left intentionally blank
|
|
9
|
+
}
|
|
10
|
+
level() {
|
|
11
|
+
return 1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Logger } from "@configura/web-utilities";
|
|
2
|
-
import { DexObj } from "../../dex/DexObj.js";
|
|
3
|
-
import { SymImportEnv } from "../SymImportEnv.js";
|
|
4
|
-
import { SymComponent, SymComponentKey } from "./SymComponent.js";
|
|
5
|
-
export declare class SymLight extends SymComponent {
|
|
6
|
-
id: SymComponentKey;
|
|
7
|
-
load(logger: Logger, _obj: DexObj, _env: SymImportEnv, _force?: boolean): void;
|
|
8
|
-
}
|
|
1
|
+
import { Logger } from "@configura/web-utilities";
|
|
2
|
+
import { DexObj } from "../../dex/DexObj.js";
|
|
3
|
+
import { SymImportEnv } from "../SymImportEnv.js";
|
|
4
|
+
import { SymComponent, SymComponentKey } from "./SymComponent.js";
|
|
5
|
+
export declare class SymLight extends SymComponent {
|
|
6
|
+
id: SymComponentKey;
|
|
7
|
+
load(logger: Logger, _obj: DexObj, _env: SymImportEnv, _force?: boolean): void;
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=SymLight.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SymComponent } from "./SymComponent.js";
|
|
2
|
-
export class SymLight extends SymComponent {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.id = "symLight";
|
|
6
|
-
}
|
|
7
|
-
load(logger, _obj, _env, _force = false) {
|
|
8
|
-
logger.warn("Mesh light source not supported.", "SymLight is not yet implemented and will be ignored.");
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
import { SymComponent } from "./SymComponent.js";
|
|
2
|
+
export class SymLight extends SymComponent {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.id = "symLight";
|
|
6
|
+
}
|
|
7
|
+
load(logger, _obj, _env, _force = false) {
|
|
8
|
+
logger.warn("Mesh light source not supported.", "SymLight is not yet implemented and will be ignored.");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SymComponentKey } from "./SymComponent.js";
|
|
2
|
-
import { SymPrimitive2D } from "./SymPrimitive2D.js";
|
|
3
|
-
export declare class SymLines2D extends SymPrimitive2D {
|
|
4
|
-
id: SymComponentKey;
|
|
5
|
-
}
|
|
1
|
+
import { SymComponentKey } from "./SymComponent.js";
|
|
2
|
+
import { SymPrimitive2D } from "./SymPrimitive2D.js";
|
|
3
|
+
export declare class SymLines2D extends SymPrimitive2D {
|
|
4
|
+
id: SymComponentKey;
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=SymLines2D.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SymPrimitive2D } from "./SymPrimitive2D.js";
|
|
2
|
-
export class SymLines2D extends SymPrimitive2D {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.id = "symLines2D";
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
import { SymPrimitive2D } from "./SymPrimitive2D.js";
|
|
2
|
+
export class SymLines2D extends SymPrimitive2D {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.id = "symLines2D";
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { Logger } from "@configura/web-utilities";
|
|
2
|
-
import { DexObj } from "../../dex/DexObj.js";
|
|
3
|
-
import { SymImportEnv } from "../SymImportEnv.js";
|
|
4
|
-
import { SymComponent, SymComponentKey, SymGfxMode } from "./SymComponent.js";
|
|
5
|
-
import { SymMultiSelector } from "./SymMultiSelector.js";
|
|
6
|
-
export declare class SymMeasure extends SymComponent {
|
|
7
|
-
id: SymComponentKey;
|
|
8
|
-
private _sections;
|
|
9
|
-
private _dividerSubpaths;
|
|
10
|
-
private _originalLength;
|
|
11
|
-
private _measureParam;
|
|
12
|
-
private _spOffsetParam;
|
|
13
|
-
private _stretchingEPParam;
|
|
14
|
-
load(logger: Logger, obj: DexObj, _env: SymImportEnv, force?: boolean): void;
|
|
15
|
-
get measureParam(): string | undefined;
|
|
16
|
-
get originalLength(): number | undefined;
|
|
17
|
-
get spOffsetParam(): string | undefined;
|
|
18
|
-
get stretchingEPParam(): string | undefined;
|
|
19
|
-
get sections(): SymMeasureSection[];
|
|
20
|
-
get dividerSubpaths(): SymMeasureDivider[];
|
|
21
|
-
}
|
|
22
|
-
export declare class SymMeasureDivider {
|
|
23
|
-
readonly repToPath: Map<string, string>;
|
|
24
|
-
readonly currentStretch: number;
|
|
25
|
-
constructor(obj: DexObj, logger: Logger);
|
|
26
|
-
}
|
|
27
|
-
export declare class SymMeasureSection {
|
|
28
|
-
readonly sizeChange: number;
|
|
29
|
-
readonly move: boolean;
|
|
30
|
-
readonly currentStretch: number;
|
|
31
|
-
readonly gfxModeToDetailLevelToMultiSelector: Map<SymGfxMode, Map<number, SymMultiSelector>>;
|
|
32
|
-
constructor(obj: DexObj, logger: Logger);
|
|
33
|
-
}
|
|
1
|
+
import { Logger } from "@configura/web-utilities";
|
|
2
|
+
import { DexObj } from "../../dex/DexObj.js";
|
|
3
|
+
import { SymImportEnv } from "../SymImportEnv.js";
|
|
4
|
+
import { SymComponent, SymComponentKey, SymGfxMode } from "./SymComponent.js";
|
|
5
|
+
import { SymMultiSelector } from "./SymMultiSelector.js";
|
|
6
|
+
export declare class SymMeasure extends SymComponent {
|
|
7
|
+
id: SymComponentKey;
|
|
8
|
+
private _sections;
|
|
9
|
+
private _dividerSubpaths;
|
|
10
|
+
private _originalLength;
|
|
11
|
+
private _measureParam;
|
|
12
|
+
private _spOffsetParam;
|
|
13
|
+
private _stretchingEPParam;
|
|
14
|
+
load(logger: Logger, obj: DexObj, _env: SymImportEnv, force?: boolean): void;
|
|
15
|
+
get measureParam(): string | undefined;
|
|
16
|
+
get originalLength(): number | undefined;
|
|
17
|
+
get spOffsetParam(): string | undefined;
|
|
18
|
+
get stretchingEPParam(): string | undefined;
|
|
19
|
+
get sections(): SymMeasureSection[];
|
|
20
|
+
get dividerSubpaths(): SymMeasureDivider[];
|
|
21
|
+
}
|
|
22
|
+
export declare class SymMeasureDivider {
|
|
23
|
+
readonly repToPath: Map<string, string>;
|
|
24
|
+
readonly currentStretch: number;
|
|
25
|
+
constructor(obj: DexObj, logger: Logger);
|
|
26
|
+
}
|
|
27
|
+
export declare class SymMeasureSection {
|
|
28
|
+
readonly sizeChange: number;
|
|
29
|
+
readonly move: boolean;
|
|
30
|
+
readonly currentStretch: number;
|
|
31
|
+
readonly gfxModeToDetailLevelToMultiSelector: Map<SymGfxMode, Map<number, SymMultiSelector>>;
|
|
32
|
+
constructor(obj: DexObj, logger: Logger);
|
|
33
|
+
}
|
|
34
34
|
//# sourceMappingURL=SymMeasure.d.ts.map
|