three-cad-viewer 4.3.4 → 4.3.5

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.
@@ -84137,11 +84137,15 @@ float metalnessFactor = metalness;
84137
84137
  logger.warn(`Unknown builtin preset '${presetName}' referenced by '${tag}' on '${objectPath}'`);
84138
84138
  return null;
84139
84139
  }
84140
- const resolved = { ...preset, ...appearance };
84140
+ // Strip preset color unless the user explicitly provides one,
84141
+ // so the leaf node's CAD color is used as fallback.
84142
+ const { color: presetColor, ...presetRest } = preset;
84143
+ const resolved = "color" in appearance
84144
+ ? { ...preset, ...appearance }
84145
+ : { ...presetRest, ...appearance };
84141
84146
  this.resolvedMaterials.set(tag, resolved);
84142
84147
  return resolved;
84143
84148
  }
84144
- // Should not happen with current type, but guard anyway
84145
84149
  logger.warn(`Unrecognised material entry for tag '${tag}' on '${objectPath}'`);
84146
84150
  return null;
84147
84151
  }
@@ -87480,6 +87484,15 @@ float metalnessFactor = metalness;
87480
87484
  const z = this.distanceToPoint(new Vector3(0, 0, 0));
87481
87485
  this.constant = z - c + value;
87482
87486
  }
87487
+ /**
87488
+ * Clone this CenteredPlane.
87489
+ * Overrides THREE.Plane.clone() which calls `new this.constructor()` without
87490
+ * arguments, causing `center` to be undefined during shadow map generation.
87491
+ */
87492
+ // @ts-expect-error -- THREE.Plane.clone() returns `this`, but we need a concrete CenteredPlane
87493
+ clone() {
87494
+ return new CenteredPlane(this.normal.clone(), this.centeredConstant, [...this.center]);
87495
+ }
87483
87496
  }
87484
87497
  // ============================================================================
87485
87498
  // PlaneMesh - Visual representation of a clipping plane
@@ -94294,7 +94307,7 @@ float metalnessFactor = metalness;
94294
94307
  }
94295
94308
  }
94296
94309
 
94297
- const version = "4.3.4";
94310
+ const version = "4.3.5";
94298
94311
 
94299
94312
  /**
94300
94313
  * Clean room environment for Studio mode PMREM generation.