three-cad-viewer 4.3.5 → 4.3.7
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/three-cad-viewer.esm.js +8 -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 +8 -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 -650
- package/src/scene/grid.ts +0 -864
- package/src/scene/nestedgroup.ts +0 -1448
- 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
|
@@ -83215,9 +83215,11 @@ class MaterialFactory {
|
|
|
83215
83215
|
const roleForCache = colorSpace === SRGBColorSpace
|
|
83216
83216
|
? "baseColorTexture"
|
|
83217
83217
|
: "normalTexture";
|
|
83218
|
-
|
|
83218
|
+
let tex = await textureCache.get(textureRef, roleForCache);
|
|
83219
83219
|
if (tex) {
|
|
83220
|
-
if (textureRepeat) {
|
|
83220
|
+
if (textureRepeat && (textureRepeat[0] !== 1 || textureRepeat[1] !== 1)) {
|
|
83221
|
+
// Clone to avoid mutating shared cached texture
|
|
83222
|
+
tex = tex.clone();
|
|
83221
83223
|
tex.repeat.set(textureRepeat[0], textureRepeat[1]);
|
|
83222
83224
|
}
|
|
83223
83225
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -83906,8 +83908,9 @@ function applyTriplanarMapping(material, geometry) {
|
|
|
83906
83908
|
// Uniform values (captured by closure, per-object)
|
|
83907
83909
|
const offset = bb.min.clone();
|
|
83908
83910
|
const scale = 1.0 / maxDim;
|
|
83909
|
-
// Read texture repeat from the
|
|
83910
|
-
const repeat = material.map
|
|
83911
|
+
// Read texture repeat from the first available texture map
|
|
83912
|
+
const repeat = (material.map ?? material.roughnessMap ?? material.normalMap ??
|
|
83913
|
+
material.metalnessMap ?? material.emissiveMap ?? material.aoMap)?.repeat?.clone() ?? new Vector2(1, 1);
|
|
83911
83914
|
material.onBeforeCompile = (shader) => {
|
|
83912
83915
|
// Custom uniforms
|
|
83913
83916
|
shader.uniforms.triplanarOffset = { value: offset };
|
|
@@ -94301,7 +94304,7 @@ class Tools {
|
|
|
94301
94304
|
}
|
|
94302
94305
|
}
|
|
94303
94306
|
|
|
94304
|
-
const version = "4.3.
|
|
94307
|
+
const version = "4.3.7";
|
|
94305
94308
|
|
|
94306
94309
|
/**
|
|
94307
94310
|
* Clean room environment for Studio mode PMREM generation.
|