Skip to content

Commit d439927

Browse files
committed
Refactorings, tidy ups
1 parent dd7b01b commit d439927

8 files changed

Lines changed: 19 additions & 19 deletions

File tree

packages/sdk/src/inspect/sceneModel/Config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {clamp} from "../../base/math";
1818
* The result is a flat keyed bag the inspection's `run` consumes
1919
* in place of pulling fields off `params` directly.
2020
*
21-
* A Studio "Inspection settings" panel can walk every
21+
* A host-supplied "Inspection settings" UI can walk every
2222
* registered inspection's {@link ConfigSchema} and render a form
2323
* from the field metadata — labels, units, min/max, enumerations
2424
* — without any per-inspection UI code. Plugins inherit that UI

packages/sdk/src/inspect/sceneModel/DEFAULT_FIX_REGISTRY.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ import {dropDuplicateTriangles} from "./fixes/dropDuplicateTriangles";
2424
* The {@link FixRegistry} {@link applyFixes} reaches for
2525
* when no `registry` is supplied in its params. Pre-populated with
2626
* the built-in strategies that ship from
27-
* {@link demo/sceneModelInspector/fixes}.
27+
* {@link studio/sceneModelInspector/fixes}.
2828
*
2929
* Plugins are expected to register additional strategies into this
3030
* singleton on import:
3131
*
3232
* ```ts
33-
* import {DEFAULT_FIX_REGISTRY} from "@xeokit/sdk/studio";
33+
* import {DEFAULT_FIX_REGISTRY} from "@xeokit/sdk/inspect/sceneModel";
3434
*
3535
* DEFAULT_FIX_REGISTRY.register({
3636
* codes: ["MyApp/STALE_PROPERTY_SET"],

packages/sdk/src/inspect/sceneModel/DEFAULT_INSPECTION_REGISTRY.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {farFromOriginGeometries} from "./inspections/farFromOriginGeometries";
2020
* The {@link InspectionRegistry} {@link inspectSceneModel} reaches
2121
* for when no `registry` is supplied in its params. Pre-populated
2222
* with the built-in inspections that ship from
23-
* {@link demo/sceneModelInspector/inspections}.
23+
* {@link studio/sceneModelInspector/inspections}.
2424
*
2525
* Registration order:
2626
*
@@ -44,7 +44,7 @@ import {farFromOriginGeometries} from "./inspections/farFromOriginGeometries";
4444
* singleton on import:
4545
*
4646
* ```ts
47-
* import {DEFAULT_INSPECTION_REGISTRY} from "@xeokit/sdk/studio";
47+
* import {DEFAULT_INSPECTION_REGISTRY} from "@xeokit/sdk/inspect/sceneModel";
4848
*
4949
* DEFAULT_INSPECTION_REGISTRY.register({
5050
* codes: ["MyApp/CHECK_NAMING"],

packages/sdk/src/inspect/sceneModel/fixes/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* ```ts
1313
* // Mutate the singleton — applies to every applyFixes() call.
14-
* import {DEFAULT_FIX_REGISTRY, Fix} from "@xeokit/sdk/studio";
14+
* import {DEFAULT_FIX_REGISTRY, Fix} from "@xeokit/sdk/inspect/sceneModel";
1515
*
1616
* const myFix: Fix = {
1717
* codes: ["MY_CUSTOM_CODE"],
@@ -23,7 +23,7 @@
2323
*
2424
* ```ts
2525
* // Or build a fresh registry — leaves the default untouched.
26-
* import {FixRegistry, mergeDuplicateGeometries, applyFixes} from "@xeokit/sdk/studio";
26+
* import {FixRegistry, mergeDuplicateGeometries, applyFixes} from "@xeokit/sdk/inspect/sceneModel";
2727
*
2828
* const registry = new FixRegistry();
2929
* registry.register(mergeDuplicateGeometries); // pick what you want

packages/sdk/src/inspect/sceneModel/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
* ```ts
169169
* // Plug a strategy into the singleton — every applyFixes() call
170170
* // sees it from now on.
171-
* import {sceneModelInspector} from "@xeokit/sdk/studio";
171+
* import * as sceneModelInspector from "@xeokit/sdk/inspect/sceneModel";
172172
*
173173
* sceneModelInspector.DEFAULT_FIX_REGISTRY.register({
174174
* codes: ["MyApp/STALE_PROPERTY_SET"],
@@ -183,16 +183,16 @@
183183
* ```ts
184184
* // Or build a one-off registry — leaves the default untouched.
185185
* import {
186-
* sceneModelInspector,
187186
* FixRegistry,
188187
* mergeDuplicateGeometries,
189-
* } from "@xeokit/sdk/studio";
188+
* applyFixes,
189+
* } from "@xeokit/sdk/inspect/sceneModel";
190190
*
191191
* const registry = new FixRegistry([
192192
* mergeDuplicateGeometries, // pick the built-ins you want
193193
* myFix,
194194
* ]);
195-
* sceneModelInspector.applyFixes({sceneModel, report, registry});
195+
* applyFixes({sceneModel, report, registry});
196196
* ```
197197
*
198198
* Last registration wins for a given code, so plugins can
@@ -202,7 +202,7 @@
202202
* ## Built-in inspections
203203
*
204204
* One file per inspection under
205-
* {@link demo/sceneModelInspector/inspections}, all pre-registered into
205+
* {@link studio/sceneModelInspector/inspections}, all pre-registered into
206206
* {@link DEFAULT_INSPECTION_REGISTRY}. Each inspection groups
207207
* codes by topical concern — one walk, multiple codes — so the
208208
* file count stays low and the registration order is meaningful.
@@ -226,7 +226,7 @@
226226
*
227227
* ## Built-in fixes
228228
*
229-
* One file per fix under {@link demo/sceneModelInspector/fixes}, all
229+
* One file per fix under {@link studio/sceneModelInspector/fixes}, all
230230
* pre-registered into {@link DEFAULT_FIX_REGISTRY}.
231231
*
232232
* | Fix | Codes handled |
@@ -263,7 +263,7 @@
263263
* ## Putting it together
264264
*
265265
* ```ts
266-
* import {sceneModelInspector} from "@xeokit/sdk/studio";
266+
* import * as sceneModelInspector from "@xeokit/sdk/inspect/sceneModel";
267267
*
268268
* const report = sceneModelInspector.inspectSceneModel({
269269
* sceneModel,

packages/sdk/src/inspect/sceneModel/inspectSceneModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {getInspectionIndex} from "./internal/getInspectionIndex";
3030
* ## Custom inspections
3131
*
3232
* ```ts
33-
* import {DEFAULT_INSPECTION_REGISTRY} from "@xeokit/sdk/studio";
33+
* import {DEFAULT_INSPECTION_REGISTRY} from "@xeokit/sdk/inspect/sceneModel";
3434
*
3535
* DEFAULT_INSPECTION_REGISTRY.register({
3636
* codes: ["MyApp/CHECK_NAMING"],
@@ -44,7 +44,7 @@ import {getInspectionIndex} from "./internal/getInspectionIndex";
4444
* Or for tests / isolated runs, build a fresh registry:
4545
*
4646
* ```ts
47-
* import {InspectionRegistry, geometryDataIntegrity, inspectSceneModel} from "@xeokit/sdk/studio";
47+
* import {InspectionRegistry, geometryDataIntegrity, inspectSceneModel} from "@xeokit/sdk/inspect/sceneModel";
4848
*
4949
* const registry = new InspectionRegistry([geometryDataIntegrity]);
5050
* const report = inspectSceneModel({sceneModel, registry});

packages/sdk/src/inspect/sceneModel/inspections/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* ```ts
1515
* // Mutate the singleton — applies to every inspectSceneModel() call.
16-
* import {DEFAULT_INSPECTION_REGISTRY, Inspection} from "@xeokit/sdk/studio";
16+
* import {DEFAULT_INSPECTION_REGISTRY, Inspection} from "@xeokit/sdk/inspect/sceneModel";
1717
*
1818
* const myInspection: Inspection = {
1919
* codes: ["MyApp/STALE_PROPERTY_SET"],
@@ -25,7 +25,7 @@
2525
*
2626
* ```ts
2727
* // Or build a fresh registry — leaves the default untouched.
28-
* import {InspectionRegistry, geometryDataIntegrity, inspectSceneModel} from "@xeokit/sdk/studio";
28+
* import {InspectionRegistry, geometryDataIntegrity, inspectSceneModel} from "@xeokit/sdk/inspect/sceneModel";
2929
*
3030
* const registry = new InspectionRegistry();
3131
* registry.register(geometryDataIntegrity); // pick what you want

packages/sdk/src/inspect/sceneModel/internal/splitGeometryAndRebuildMeshes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {FixApplyResult} from "../Fix";
88
* Internal helper shared by every fix strategy that needs to split
99
* a {@link model!scene.SceneGeometry | SceneGeometry} in two and fan referencing meshes onto
1010
* the resulting pieces. Same supported pattern
11-
* {@link applyIFCMaterials} / {@link demo.materials.MaterialsPalette}
11+
* {@link applyIFCMaterials} / {@link studio.materials.MaterialsPalette}
1212
* use: detach + destroy + recreate + reattach, with a snapshot of
1313
* each mesh's id / matrix / opacity / parentTransform preserved
1414
* across the rebuild.

0 commit comments

Comments
 (0)