three-cad-viewer 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/studio-manager.d.ts +0 -1
- package/dist/core/types.d.ts +1 -22
- package/dist/index.d.ts +1 -1
- package/dist/rendering/texture-cache.d.ts +8 -50
- package/dist/scene/nestedgroup.d.ts +1 -2
- package/dist/three-cad-viewer.esm.js +18 -641
- package/dist/three-cad-viewer.esm.js.map +1 -1
- package/dist/three-cad-viewer.esm.min.js +3 -3
- package/dist/three-cad-viewer.js +18 -641
- package/dist/three-cad-viewer.min.js +3 -3
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/core/studio-manager.ts +4 -34
- package/src/core/types.ts +1 -27
- package/src/index.ts +0 -1
- package/src/rendering/material-factory.ts +2 -0
- package/src/rendering/material-presets.ts +0 -14
- package/src/rendering/texture-cache.ts +11 -712
- package/src/scene/nestedgroup.ts +0 -7
package/src/scene/nestedgroup.ts
CHANGED
|
@@ -16,7 +16,6 @@ import type {
|
|
|
16
16
|
ColoredMaterial,
|
|
17
17
|
MaterialAppearance,
|
|
18
18
|
MaterialXMaterial,
|
|
19
|
-
TextureEntry,
|
|
20
19
|
} from "../core/types";
|
|
21
20
|
import { isMaterialXMaterial } from "../core/types";
|
|
22
21
|
import { MATERIAL_PRESETS } from "../rendering/material-presets.js";
|
|
@@ -172,7 +171,6 @@ class NestedGroup {
|
|
|
172
171
|
groups!: GroupsMap; // Initialized to {} in constructor
|
|
173
172
|
clipPlanes: THREE.Plane[] | null;
|
|
174
173
|
materialFactory: MaterialFactory;
|
|
175
|
-
texturesTable: Record<string, TextureEntry> | null;
|
|
176
174
|
materialsTable: Record<string, string | MaterialXMaterial | MaterialAppearance> | null;
|
|
177
175
|
resolvedMaterials: Map<string, MaterialAppearance>;
|
|
178
176
|
/** Cache for threejs-materials entries resolved from the materials table */
|
|
@@ -229,7 +227,6 @@ class NestedGroup {
|
|
|
229
227
|
|
|
230
228
|
this.clipPlanes = null;
|
|
231
229
|
|
|
232
|
-
this.texturesTable = null;
|
|
233
230
|
this.materialsTable = null;
|
|
234
231
|
this.resolvedMaterials = new Map();
|
|
235
232
|
this.resolvedMaterialX = new Map();
|
|
@@ -262,7 +259,6 @@ class NestedGroup {
|
|
|
262
259
|
this._disposeStudioResources();
|
|
263
260
|
this.resolvedMaterials.clear();
|
|
264
261
|
this.resolvedMaterialX.clear();
|
|
265
|
-
this.texturesTable = null;
|
|
266
262
|
this.materialsTable = null;
|
|
267
263
|
}
|
|
268
264
|
|
|
@@ -997,7 +993,6 @@ class NestedGroup {
|
|
|
997
993
|
if (this.shapes.format == "GDS") {
|
|
998
994
|
this.instances = this.shapes.instances || null;
|
|
999
995
|
}
|
|
1000
|
-
this.texturesTable = this.shapes.textures || null;
|
|
1001
996
|
this.materialsTable = this.shapes.materials || null;
|
|
1002
997
|
this.resolvedMaterials.clear();
|
|
1003
998
|
this.resolvedMaterialX.clear();
|
|
@@ -1224,8 +1219,6 @@ class NestedGroup {
|
|
|
1224
1219
|
if (!this._textureCache) {
|
|
1225
1220
|
this._textureCache = new TextureCache();
|
|
1226
1221
|
}
|
|
1227
|
-
this._textureCache.setTexturesTable(this.texturesTable ?? undefined);
|
|
1228
|
-
|
|
1229
1222
|
// Track material tags that failed to resolve
|
|
1230
1223
|
const unresolvedTags = new Set<string>();
|
|
1231
1224
|
|