three-cad-viewer 4.3.4 → 4.3.6
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/scene/clipping.d.ts +6 -0
- package/dist/three-cad-viewer.esm.js +20 -5
- package/dist/three-cad-viewer.esm.js.map +1 -1
- package/dist/three-cad-viewer.esm.min.js +1 -1
- package/dist/three-cad-viewer.js +20 -5
- package/dist/three-cad-viewer.min.js +1 -1
- package/package.json +2 -3
- package/src/_version.ts +0 -1
- package/src/camera/camera.ts +0 -445
- package/src/camera/controls/CADOrbitControls.ts +0 -241
- package/src/camera/controls/CADTrackballControls.ts +0 -598
- package/src/camera/controls.ts +0 -380
- package/src/core/patches.ts +0 -16
- package/src/core/studio-manager.ts +0 -652
- package/src/core/types.ts +0 -892
- package/src/core/viewer-state.ts +0 -784
- package/src/core/viewer.ts +0 -4821
- package/src/index.ts +0 -151
- package/src/rendering/environment.ts +0 -840
- package/src/rendering/light-detection.ts +0 -327
- package/src/rendering/material-factory.ts +0 -735
- package/src/rendering/material-presets.ts +0 -289
- package/src/rendering/raycast.ts +0 -291
- package/src/rendering/room-environment.ts +0 -192
- package/src/rendering/studio-composer.ts +0 -577
- package/src/rendering/studio-floor.ts +0 -108
- package/src/rendering/texture-cache.ts +0 -324
- package/src/rendering/tree-model.ts +0 -542
- package/src/rendering/triplanar.ts +0 -329
- package/src/scene/animation.ts +0 -343
- package/src/scene/axes.ts +0 -108
- package/src/scene/bbox.ts +0 -223
- package/src/scene/clipping.ts +0 -640
- package/src/scene/grid.ts +0 -864
- package/src/scene/nestedgroup.ts +0 -1444
- package/src/scene/objectgroup.ts +0 -866
- package/src/scene/orientation.ts +0 -259
- package/src/scene/render-shape.ts +0 -634
- package/src/tools/cad_tools/measure.ts +0 -811
- package/src/tools/cad_tools/select.ts +0 -100
- package/src/tools/cad_tools/tools.ts +0 -231
- package/src/tools/cad_tools/ui.ts +0 -454
- package/src/tools/cad_tools/zebra.ts +0 -369
- package/src/types/html.d.ts +0 -5
- package/src/types/n8ao.d.ts +0 -28
- package/src/types/three-augmentation.d.ts +0 -60
- package/src/ui/display.ts +0 -3295
- package/src/ui/index.html +0 -505
- package/src/ui/info.ts +0 -177
- package/src/ui/slider.ts +0 -206
- package/src/ui/toolbar.ts +0 -347
- package/src/ui/treeview.ts +0 -945
- package/src/utils/decode-instances.ts +0 -233
- package/src/utils/font.ts +0 -60
- package/src/utils/gpu-tracker.ts +0 -265
- package/src/utils/logger.ts +0 -92
- package/src/utils/sizeof.ts +0 -116
- package/src/utils/timer.ts +0 -69
- package/src/utils/utils.ts +0 -446
package/dist/three-cad-viewer.js
CHANGED
|
@@ -83221,9 +83221,11 @@ void main() {
|
|
|
83221
83221
|
const roleForCache = colorSpace === SRGBColorSpace
|
|
83222
83222
|
? "baseColorTexture"
|
|
83223
83223
|
: "normalTexture";
|
|
83224
|
-
|
|
83224
|
+
let tex = await textureCache.get(textureRef, roleForCache);
|
|
83225
83225
|
if (tex) {
|
|
83226
|
-
if (textureRepeat) {
|
|
83226
|
+
if (textureRepeat && (textureRepeat[0] !== 1 || textureRepeat[1] !== 1)) {
|
|
83227
|
+
// Clone to avoid mutating shared cached texture
|
|
83228
|
+
tex = tex.clone();
|
|
83227
83229
|
tex.repeat.set(textureRepeat[0], textureRepeat[1]);
|
|
83228
83230
|
}
|
|
83229
83231
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -84137,11 +84139,15 @@ float metalnessFactor = metalness;
|
|
|
84137
84139
|
logger.warn(`Unknown builtin preset '${presetName}' referenced by '${tag}' on '${objectPath}'`);
|
|
84138
84140
|
return null;
|
|
84139
84141
|
}
|
|
84140
|
-
|
|
84142
|
+
// Strip preset color unless the user explicitly provides one,
|
|
84143
|
+
// so the leaf node's CAD color is used as fallback.
|
|
84144
|
+
const { color: presetColor, ...presetRest } = preset;
|
|
84145
|
+
const resolved = "color" in appearance
|
|
84146
|
+
? { ...preset, ...appearance }
|
|
84147
|
+
: { ...presetRest, ...appearance };
|
|
84141
84148
|
this.resolvedMaterials.set(tag, resolved);
|
|
84142
84149
|
return resolved;
|
|
84143
84150
|
}
|
|
84144
|
-
// Should not happen with current type, but guard anyway
|
|
84145
84151
|
logger.warn(`Unrecognised material entry for tag '${tag}' on '${objectPath}'`);
|
|
84146
84152
|
return null;
|
|
84147
84153
|
}
|
|
@@ -87480,6 +87486,15 @@ float metalnessFactor = metalness;
|
|
|
87480
87486
|
const z = this.distanceToPoint(new Vector3(0, 0, 0));
|
|
87481
87487
|
this.constant = z - c + value;
|
|
87482
87488
|
}
|
|
87489
|
+
/**
|
|
87490
|
+
* Clone this CenteredPlane.
|
|
87491
|
+
* Overrides THREE.Plane.clone() which calls `new this.constructor()` without
|
|
87492
|
+
* arguments, causing `center` to be undefined during shadow map generation.
|
|
87493
|
+
*/
|
|
87494
|
+
// @ts-expect-error -- THREE.Plane.clone() returns `this`, but we need a concrete CenteredPlane
|
|
87495
|
+
clone() {
|
|
87496
|
+
return new CenteredPlane(this.normal.clone(), this.centeredConstant, [...this.center]);
|
|
87497
|
+
}
|
|
87483
87498
|
}
|
|
87484
87499
|
// ============================================================================
|
|
87485
87500
|
// PlaneMesh - Visual representation of a clipping plane
|
|
@@ -94294,7 +94309,7 @@ float metalnessFactor = metalness;
|
|
|
94294
94309
|
}
|
|
94295
94310
|
}
|
|
94296
94311
|
|
|
94297
|
-
const version = "4.3.
|
|
94312
|
+
const version = "4.3.6";
|
|
94298
94313
|
|
|
94299
94314
|
/**
|
|
94300
94315
|
* Clean room environment for Studio mode PMREM generation.
|