brepjs-bim 0.26.0 → 0.27.1

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.
@@ -16,6 +16,7 @@ export interface BcfContainerData {
16
16
  }
17
17
  export interface BcfVersion {
18
18
  readonly versionId: '3.0';
19
+ /** BCF 2.1's element, outside the 3.0 schema; written only when set. */
19
20
  readonly detailedVersion?: string | undefined;
20
21
  }
21
22
  export interface BcfProject {
@@ -25,6 +26,7 @@ export interface BcfProject {
25
26
  export interface BcfTopic {
26
27
  readonly guid: string;
27
28
  readonly title: string;
29
+ /** Required by the BCF 3.0 schema, as are `topicStatus`, `creationDate` and `creationAuthor`. */
28
30
  readonly topicType?: string | undefined;
29
31
  readonly topicStatus?: string | undefined;
30
32
  readonly priority?: string | undefined;
@@ -58,6 +60,31 @@ export interface BcfViewpoint {
58
60
  readonly snapshotFile?: string | undefined;
59
61
  readonly index?: number | undefined;
60
62
  readonly components?: BcfComponents | undefined;
63
+ /** Required by the BCF 3.0 schema in every viewpoint file. */
64
+ readonly camera?: BcfCamera | undefined;
65
+ }
66
+ /** A point or direction in model coordinates, in metres. */
67
+ export type BcfVector = readonly [number, number, number];
68
+ export type BcfCamera = BcfOrthogonalCamera | BcfPerspectiveCamera;
69
+ export interface BcfOrthogonalCamera {
70
+ readonly kind: 'ORTHOGONAL';
71
+ readonly viewPoint: BcfVector;
72
+ readonly direction: BcfVector;
73
+ readonly upVector: BcfVector;
74
+ /** The view's visible height, in metres. */
75
+ readonly viewToWorldScale: number;
76
+ /** Width over height of the view. */
77
+ readonly aspectRatio: number;
78
+ }
79
+ export interface BcfPerspectiveCamera {
80
+ readonly kind: 'PERSPECTIVE';
81
+ readonly viewPoint: BcfVector;
82
+ readonly direction: BcfVector;
83
+ readonly upVector: BcfVector;
84
+ /** Vertical field of view, in degrees. */
85
+ readonly fieldOfView: number;
86
+ /** Width over height of the view. */
87
+ readonly aspectRatio: number;
61
88
  }
62
89
  export interface BcfComponents {
63
90
  readonly selection?: readonly BcfComponent[] | undefined;
@@ -6,6 +6,7 @@ import { BcfContainerData, BcfFiles } from './bcfTypes.js';
6
6
  * - `bcf.version` — container version marker
7
7
  * - `project.bcfp` — project metadata
8
8
  * - `{topicGuid}/markup.bcf` — one markup file per topic (topic, comments, viewpoints)
9
+ * - `{topicGuid}/{viewpoint}.bcfv`: one visualization file per viewpoint (components, camera)
9
10
  *
10
11
  * `FLAG: BCF_ZIP_PACKAGING_ABSENT` — to produce an actual `.bcfzip`, ZIP these
11
12
  * entries with an external library; no ZIP dependency is declared in the
@@ -1,3 +1,3 @@
1
- export type { BcfColoring, BcfComment, BcfComponent, BcfComponents, BcfContainerData, BcfFiles, BcfProject, BcfTopic, BcfVersion, BcfViewpoint, BcfVisibility, } from './bcfTypes.js';
1
+ export type { BcfCamera, BcfColoring, BcfComment, BcfComponent, BcfComponents, BcfContainerData, BcfFiles, BcfOrthogonalCamera, BcfPerspectiveCamera, BcfProject, BcfTopic, BcfVector, BcfVersion, BcfViewpoint, BcfVisibility, } from './bcfTypes.js';
2
2
  export { serializeBcfFiles } from './bcfWrite.js';
3
3
  export { parseBcfFiles } from './bcfRead.js';