Skip to content

Commit c7cdfc0

Browse files
committed
chore: fix ts docs
1 parent 68b5661 commit c7cdfc0

File tree

54 files changed

+391
-643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+391
-643
lines changed

index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ <h3>Choose an example</h3>
3131
<a style="width: fit-content;" href="./packages\front\src\fragments\Outliner\example.html">front/Outliner</a>
3232
<a style="width: fit-content;" href="./packages\front\src\fragments\Hoverer\example.html">front/Hoverer</a>
3333
<a style="width: fit-content;" href="./packages\front\src\fragments\Highlighter\example.html">front/Highlighter</a>
34+
<a style="width: fit-content;" href="./packages\front\src\drawings\DrawingEditor\example.html">front/DrawingEditor</a>
3435
<a style="width: fit-content;" href="./packages\front\src\core\PostproductionRenderer\example.html">front/PostproductionRenderer</a>
3536
<a style="width: fit-content;" href="./packages\front\src\core\Marker\example.html">front/Marker</a>
3637
<a style="width: fit-content;" href="./packages\front\src\core\ClipStyler\example.html">front/ClipStyler</a>
@@ -41,8 +42,17 @@ <h3>Choose an example</h3>
4142
<a style="width: fit-content;" href="./packages\core\src\fragments\IfcLoader\example.html">core/IfcLoader</a>
4243
<a style="width: fit-content;" href="./packages\core\src\fragments\Hider\example.html">core/Hider</a>
4344
<a style="width: fit-content;" href="./packages\core\src\fragments\FragmentsManager\example.html">core/FragmentsManager</a>
45+
<a style="width: fit-content;" href="./packages\core\src\fragments\EdgeProjector\example.html">core/EdgeProjector</a>
4446
<a style="width: fit-content;" href="./packages\core\src\fragments\Classifier\example.html">core/Classifier</a>
4547
<a style="width: fit-content;" href="./packages\core\src\fragments\BoundingBoxer\example.html">core/BoundingBoxer</a>
48+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\example.html">core/TechnicalDrawings</a>
49+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\examples\MultiDrawingViewports\example.html">core/MultiDrawingViewports</a>
50+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\examples\ModelDrivenAnnotations\example.html">core/ModelDrivenAnnotations</a>
51+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\examples\DrawingLayers\example.html">core/DrawingLayers</a>
52+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\examples\DrawingBlocks\example.html">core/DrawingBlocks</a>
53+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\examples\CustomAnnotationSystems\example.html">core/CustomAnnotationSystems</a>
54+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\examples\AnnotationSystems\example.html">core/AnnotationSystems</a>
55+
<a style="width: fit-content;" href="./packages\core\src\drawings\TechnicalDrawings\examples\AnnotationStyles\example.html">core/AnnotationStyles</a>
4656
<a style="width: fit-content;" href="./packages\core\src\core\Worlds\example.html">core/Worlds</a>
4757
<a style="width: fit-content;" href="./packages\core\src\core\Views\example.html">core/Views</a>
4858
<a style="width: fit-content;" href="./packages\core\src\core\Viewpoints\example.html">core/Viewpoints</a>

packages/core/src/core/Types/src/interfaces.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ export interface Serializable<
167167

168168
/**
169169
* Whether this component manages its interaction through an explicit state machine.
170-
* The machine is the single source of truth: the system can only be in one state at
171-
* a time, and every transition is deterministic given the current state and the event.
172-
*
173170
* @template TState - Discriminated union of all valid states (each with a `kind` string).
174171
* @template TEvent - Discriminated union of all accepted events (each with a `type` string).
175172
*/

packages/core/src/drawings/DxfManager/index.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@ import { DxfExporter } from "./src/DxfExporter";
33

44
export * from "./src";
55

6-
/**
7-
* Manages DXF import and export for technical drawings.
8-
*
9-
* ```ts
10-
* const manager = components.get(OBC.DxfManager);
11-
* const dxf = manager.exporter.export([{ drawing, viewports: [{ viewport }] }]);
12-
* ```
13-
*/
6+
/** Manages DXF import and export for technical drawings. */
147
export class DxfManager extends Component {
158
static readonly uuid = "e9a2c3d4-5f67-4b89-a012-1c3d5e7f9b2a" as const;
169

@@ -19,6 +12,12 @@ export class DxfManager extends Component {
1912
/** Handles DXF serialisation of {@link TechnicalDrawing} content. */
2013
readonly exporter = new DxfExporter(this.components);
2114

15+
/**
16+
* ```ts
17+
* const manager = components.get(OBC.DxfManager);
18+
* const dxf = manager.exporter.export([{ drawing, viewports: [{ viewport }] }]);
19+
* ```
20+
*/
2221
constructor(components: Components) {
2322
super(components);
2423
components.add(DxfManager.uuid, this);

packages/core/src/drawings/DxfManager/src/DxfExporter.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,7 @@ export interface DxfPaperOptions {
134134

135135
// ─── DxfExporter ──────────────────────────────────────────────────────────────
136136

137-
/**
138-
* Serializes {@link TechnicalDrawing} content to DXF format (AC1015 / AutoCAD R2000).
139-
*
140-
* Used through {@link DxfManager}:
141-
* ```ts
142-
* const dxf = components.get(OBC.DxfManager).exporter.export([
143-
* { drawing, viewports: [{ viewport, x: 10, y: 10 }] },
144-
* ], { widthMm: 420, heightMm: 297, margin: 10 });
145-
* ```
146-
*/
137+
/** Serializes {@link TechnicalDrawing} content to DXF format (AC1015 / AutoCAD R2000). */
147138
export class DxfExporter {
148139
/** Decimal places used when formatting measurement text in DXF. */
149140
precision = 2;
@@ -169,6 +160,14 @@ export class DxfExporter {
169160
(sys: DrawingSystem<any>, ctx: DxfWriteContext) => void
170161
>();
171162

163+
/**
164+
* Used through {@link DxfManager}:
165+
* ```ts
166+
* const dxf = components.get(OBC.DxfManager).exporter.export([
167+
* { drawing, viewports: [{ viewport, x: 10, y: 10 }] },
168+
* ], { widthMm: 420, heightMm: 297, margin: 10 });
169+
* ```
170+
*/
172171
constructor(private readonly _components: Components) {}
173172

174173
/**

packages/core/src/drawings/TechnicalDrawings/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fragments.core.models.materials.list.onItemSet.add(({ value: material }) => {
8080
}
8181
});
8282

83-
const arqFile = await fetch("/resources/frags/school_arq.frag");
83+
const arqFile = await fetch("https://thatopen.github.io/engine_components/resources/frags/school_arq.frag");
8484
const arqBuffer = await arqFile.arrayBuffer();
8585
await fragments.core.load(arqBuffer, { modelId: "school_arq" });
8686

packages/core/src/drawings/TechnicalDrawings/examples/AnnotationStyles/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fragments.core.models.materials.list.onItemSet.add(({ value: material }) => {
8282
}
8383
});
8484

85-
const arqFile = await fetch("/resources/frags/school_arq.frag");
85+
const arqFile = await fetch("https://thatopen.github.io/engine_components/resources/frags/school_arq.frag");
8686
const arqBuffer = await arqFile.arrayBuffer();
8787
await fragments.core.load(arqBuffer, { modelId: "school_arq" });
8888

packages/core/src/drawings/TechnicalDrawings/examples/AnnotationSystems/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fragments.core.models.materials.list.onItemSet.add(({ value: material }) => {
8282
}
8383
});
8484

85-
const arqFile = await fetch("/resources/frags/school_arq.frag");
85+
const arqFile = await fetch("https://thatopen.github.io/engine_components/resources/frags/school_arq.frag");
8686
const arqBuffer = await arqFile.arrayBuffer();
8787
await fragments.core.load(arqBuffer, { modelId: "school_arq" });
8888

packages/core/src/drawings/TechnicalDrawings/examples/CustomAnnotationSystems/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fragments.core.models.materials.list.onItemSet.add(({ value: material }) => {
8383
}
8484
});
8585

86-
const arqFile = await fetch("/resources/frags/school_arq.frag");
86+
const arqFile = await fetch("https://thatopen.github.io/engine_components/resources/frags/school_arq.frag");
8787
const arqBuffer = await arqFile.arrayBuffer();
8888
await fragments.core.load(arqBuffer, { modelId: "school_arq" });
8989

packages/core/src/drawings/TechnicalDrawings/examples/DrawingBlocks/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fragments.core.models.materials.list.onItemSet.add(({ value: material }) => {
7979
}
8080
});
8181

82-
const arqFile = await fetch("/resources/frags/school_arq.frag");
82+
const arqFile = await fetch("https://thatopen.github.io/engine_components/resources/frags/school_arq.frag");
8383
const arqBuffer = await arqFile.arrayBuffer();
8484
await fragments.core.load(arqBuffer, { modelId: "school_arq" });
8585

packages/core/src/drawings/TechnicalDrawings/examples/DrawingLayers/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fragments.core.models.materials.list.onItemSet.add(({ value: material }) => {
8484
}
8585
});
8686

87-
const arqFile = await fetch("/resources/frags/school_arq.frag");
87+
const arqFile = await fetch("https://thatopen.github.io/engine_components/resources/frags/school_arq.frag");
8888
const arqBuffer = await arqFile.arrayBuffer();
8989
await fragments.core.load(arqBuffer, { modelId: "school_arq" });
9090

0 commit comments

Comments
 (0)