three-cad-viewer 4.3.7 → 4.3.9

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.
@@ -11,7 +11,7 @@ export declare const ToolTypes: {
11
11
  readonly PROPERTIES: "PropertiesMeasurement";
12
12
  readonly SELECT: "SelectObjects";
13
13
  };
14
- export type ToolType = typeof ToolTypes[keyof typeof ToolTypes];
14
+ export type ToolType = (typeof ToolTypes)[keyof typeof ToolTypes];
15
15
  /**
16
16
  * UI elements for measurement panels.
17
17
  */
@@ -517,6 +517,15 @@ declare class Display {
517
517
  closeMatEditor(): void;
518
518
  /** Dispose all cloned materials, restoring originals first (call on Studio mode exit) */
519
519
  disposeMatEditorClones(): void;
520
+ /**
521
+ * Outer-cycle boundary: discard saved Material Editor deltas so they don't
522
+ * replay on the next Studio entry in a new scene. Unlike viewer preferences
523
+ * (transparent, axes, grid) which persist across render cycles, Material
524
+ * Editor edits are per-scene PBR authoring and must reset on scene rebuild.
525
+ * Mid-cycle (Studio tab leave/enter) and inner-cycle (editor close/reopen)
526
+ * behavior is unaffected — this is only called from viewer.clear().
527
+ */
528
+ clearMaterialEditorSession(): void;
520
529
  /** Save material editor property deltas so they survive a Studio mode leave/enter cycle. */
521
530
  private _saveMatEditorChanges;
522
531
  /** Reapply saved material editor changes after re-entering Studio mode. */
@@ -143,4 +143,4 @@ declare class EventListenerManager {
143
143
  dispose(): void;
144
144
  }
145
145
  export { flatten, isEqual, sceneTraverse, prettyPrintVector, KeyMapper, scaleLight, deepDispose, disposeGeometry, EventListenerManager, isMesh, isLine, isPoints, isOrthographicCamera, isPerspectiveCamera, isLineSegments2, hasColor, hasEmissive, isMeshStandardMaterial, toVector3Tuple, toQuaternionTuple, };
146
- export type { KeyEventKey, KeyMappingConfig, DisposableTree, };
146
+ export type { KeyEventKey, KeyMappingConfig, DisposableTree };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-cad-viewer",
3
- "version": "4.3.7",
3
+ "version": "4.3.9",
4
4
  "type": "module",
5
5
  "description": "WebGL-based CAD viewer built on Three.js with clipping planes, measurement tools, and tree navigation",
6
6
  "repository": {
@@ -40,6 +40,8 @@
40
40
  "docs": "./scripts/build_docs.sh",
41
41
  "release": "./scripts/release.sh",
42
42
  "lint": "eslint src/",
43
+ "format": "prettier --write \"src/**/*.{ts,js,css}\" \"tests/**/*.{ts,js}\" \"*.{html,md,json}\" \".prettierrc\" \".vscode/*.json\"",
44
+ "format:check": "prettier --check \"src/**/*.{ts,js,css}\" \"tests/**/*.{ts,js}\" \"*.{html,md,json}\" \".prettierrc\" \".vscode/*.json\"",
43
45
  "test": "vitest",
44
46
  "test:ui": "vitest --ui",
45
47
  "test:run": "vitest run",
@@ -49,72 +51,44 @@
49
51
  "author": "Bernhard Walter",
50
52
  "license": "MIT",
51
53
  "dependencies": {
52
- "three": "0.183.0",
53
54
  "n8ao": "1.10.1",
54
- "postprocessing": "6.38.3"
55
+ "postprocessing": "6.39.0",
56
+ "three": "0.184.0"
55
57
  },
56
58
  "devDependencies": {
57
- "@babel/core": "^7.28.0",
58
- "@babel/eslint-parser": "^7.28.0",
59
- "@rollup/plugin-image": "^3.0.3",
60
- "@rollup/plugin-node-resolve": "^16.0.1",
61
- "@rollup/plugin-terser": "^0.4.4",
62
- "@rollup/plugin-typescript": "12.1.4",
63
- "@types/three": "0.180.0",
64
- "@vitest/coverage-v8": "3.2.4",
65
- "@vitest/ui": "3.2.4",
66
- "cross-spawn": "^7.0.6",
67
- "eslint": "^9.32.0",
68
- "eslint-config-prettier": "^10.1.8",
69
- "happy-dom": "18.0.1",
70
- "jsdoc": "^4.0.5",
71
- "postcss": "^8.0.0",
72
- "postcss-url": "^10.1.3",
73
- "prettier": "^3.6.2",
74
- "rimraf": "^6.0.1",
75
- "rollup": "^4.50.0",
76
- "rollup-plugin-import-css": "^4.0.1",
77
- "rollup-plugin-livereload": "^2.0.5",
78
- "rollup-plugin-postcss": "^4.0.2",
79
- "rollup-plugin-serve": "^3.0.0",
80
- "rollup-plugin-string": "^3.0.0",
59
+ "@babel/core": "7.29.0",
60
+ "@babel/eslint-parser": "7.28.6",
61
+ "@rollup/plugin-image": "3.0.3",
62
+ "@rollup/plugin-node-resolve": "16.0.3",
63
+ "@rollup/plugin-terser": "1.0.0",
64
+ "@rollup/plugin-typescript": "12.3.0",
65
+ "@types/three": "0.184.0",
66
+ "@vitest/coverage-v8": "4.1.4",
67
+ "@vitest/ui": "4.1.4",
68
+ "cross-spawn": "7.0.6",
69
+ "eslint": "10.2.0",
70
+ "eslint-config-prettier": "10.1.8",
71
+ "happy-dom": "20.8.9",
72
+ "jsdoc": "4.0.5",
73
+ "postcss": "8.5.9",
74
+ "postcss-url": "10.1.3",
75
+ "prettier": "3.8.2",
76
+ "rimraf": "6.1.3",
77
+ "rollup": "4.60.1",
78
+ "rollup-plugin-import-css": "4.2.0",
79
+ "rollup-plugin-livereload": "2.0.5",
80
+ "rollup-plugin-postcss": "4.0.2",
81
+ "rollup-plugin-serve": "3.0.0",
82
+ "rollup-plugin-string": "3.0.0",
81
83
  "tslib": "2.8.1",
82
- "typedoc": "^0.28.16",
84
+ "typedoc": "0.28.18",
83
85
  "typescript": "5.9.2",
84
- "typescript-eslint": "8.44.0",
85
- "vitest": "3.2.4",
86
- "yarn": "^1.22.22"
86
+ "typescript-eslint": "8.58.1",
87
+ "vitest": "4.1.4"
87
88
  },
88
89
  "babel": {},
89
90
  "packageManager": "yarn@1.22.22",
90
91
  "resolutions": {
91
- "esbuild": "0.25.9",
92
- "semver": "7.7.2",
93
- "glob": "10.4.5",
94
- "@babel/parser": "7.27.7",
95
- "@babel/types": "7.27.7",
96
- "@babel/helper-validator-identifier": "7.27.1",
97
- "typescript": "5.9.2",
98
- "@types/three": "0.180.0",
99
- "@rollup/plugin-typescript": "12.1.4",
100
- "tslib": "2.8.1",
101
- "@types/webxr": "0.5.23",
102
- "@webgpu/types": "0.1.65",
103
- "@types/stats.js": "0.17.4",
104
- "fflate": "0.8.2",
105
- "meshoptimizer": "0.22.0",
106
- "@tweenjs/tween.js": "23.1.3",
107
- "@dimforge/rapier3d-compat": "0.12.0",
108
- "resolve": "1.22.10",
109
- "@rollup/pluginutils": "5.1.4",
110
- "picomatch": "4.0.2",
111
- "@types/estree": "1.0.6",
112
- "estree-walker": "2.0.2",
113
- "path-parse": "1.0.7",
114
- "is-core-module": "2.16.1",
115
- "supports-preserve-symlinks-flag": "1.0.0",
116
- "hasown": "2.0.2",
117
- "function-bind": "1.1.2",
118
- "@eslint-community/regexpp": "4.12.1"
92
+ "minimatch": "10.2.5"
119
93
  }
120
- }
94
+ }