@bimdata/bcf-components 6.3.0-rc.1 → 6.3.0-rc.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bimdata/bcf-components",
3
- "version": "6.3.0-rc.1",
3
+ "version": "6.3.0-rc.3",
4
4
  "files": [
5
5
  "src",
6
6
  "vue3-plugin.js"
@@ -199,6 +199,7 @@
199
199
  import { computed, inject, ref, watch } from "vue";
200
200
  import service from "../../service.js";
201
201
  import { setViewpointDefaults } from "../../utils/viewpoints.js";
202
+ import { getViewerViewpoint } from "../../utils/viewer.js";
202
203
  // Components
203
204
  import BcfTopicImages from "./bcf-topic-images/BcfTopicImages.vue";
204
205
  import BcfTopicSnapshots from "./bcf-topic-snapshots/BcfTopicSnapshots.vue";
@@ -349,8 +350,7 @@ export default {
349
350
  ($viewer?.globalContext.localContexts ?? [])
350
351
  .filter(ctx => ctx.viewer && ctx.loadedModels.length > 0)
351
352
  .map(async ctx => {
352
- const viewpoint = ctx.getViewpoint();
353
- viewpoint.snapshot = await ctx.getSnapshot();
353
+ const viewpoint = await getViewerViewpoint(ctx);
354
354
  viewpointsToCreate.value.push(viewpoint);
355
355
  })
356
356
  );
package/src/config.js CHANGED
@@ -40,7 +40,7 @@ const VIEWPOINT_TYPES = Object.freeze({
40
40
  IFC2D: "ifc2d",
41
41
  DWG: "dwg",
42
42
  PLAN: "plan",
43
- PANORAMA: "panorama",
43
+ PHOTOSPHERE: "photosphere",
44
44
  });
45
45
 
46
46
  const VIEWPOINT_CONFIG = Object.freeze({
@@ -68,9 +68,9 @@ const VIEWPOINT_CONFIG = Object.freeze({
68
68
  plugin: "plan",
69
69
  icon: "filePlanPolychrome",
70
70
  },
71
- [VIEWPOINT_TYPES.PANORAMA]: {
72
- window: "panorama",
73
- plugin: "panorama",
71
+ [VIEWPOINT_TYPES.PHOTOSPHERE]: {
72
+ window: "photosphere",
73
+ plugin: "photosphere",
74
74
  icon: "filePlanPolychrome",
75
75
  },
76
76
  });
@@ -6,10 +6,9 @@ export function getViewerOptions($viewer) {
6
6
 
7
7
  export async function getViewerViewpoint(context) {
8
8
  const ctx = context.viewer.$viewer.localContext;
9
- return {
10
- ...ctx.getViewpoint(),
11
- snapshot: await ctx.getSnapshot()
12
- };
9
+ const viewpoint = await ctx.getViewpoint();
10
+ viewpoint.snapshot = await ctx.getSnapshot();
11
+ return viewpoint;
13
12
  }
14
13
 
15
14
  export function highlightViewer(context) {