@smarterplan/ngx-smarterplan-core 1.2.34 → 1.2.35

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.
@@ -4016,10 +4016,18 @@ class MatterportService {
4016
4016
  }
4017
4017
  this.lastObject3D = modelNode.obj3D;
4018
4018
  // Store this in memory Map dictionnary
4019
- console.log("Adding object: ");
4020
- console.log(modelNode);
4019
+ //console.log("Adding object: ");
4020
+ //console.log(modelNode);
4021
4021
  this.dictionnaryObjects3D.set(modelNode.obj3D.uuid, modelNode);
4022
4022
  this.dictionnarySceneObjects3D.set(modelNode.obj3D.uuid, sceneObject);
4023
+ /*const poiObject = {
4024
+ coordinate: JSON.stringify(obj.position),
4025
+ type: PoiType.OBJECT3D,
4026
+ elementID: modelNode.obj3D.uuid, //todo: be careful with this
4027
+ } as POI;
4028
+ const objectDb = {id: modelNode.obj3D.uuid} as DbObjectType;
4029
+
4030
+ this.createMattertagFromPOI(PoiType.OBJECT3D, objectDb, poiObject);*/
4023
4031
  /*this.sdk.Camera.pose.subscribe(
4024
4032
  function (pose: any) {
4025
4033
  //console.log("in callback")
@@ -4114,6 +4122,28 @@ class MatterportService {
4114
4122
  obj.obj3D.visible = !obj.obj3D.visible;
4115
4123
  //return obj.obj3D.visible;
4116
4124
  }
4125
+ pointCameraTo3DObject(objectId) {
4126
+ return __awaiter(this, void 0, void 0, function* () {
4127
+ let obj = this.dictionnaryObjects3D.get(objectId);
4128
+ //We create a temporary Tag
4129
+ const poiObject = {
4130
+ coordinate: JSON.stringify(obj.obj3D.position),
4131
+ type: PoiType.OBJECT3D,
4132
+ elementID: objectId, //todo: be careful with this
4133
+ };
4134
+ const objectDb = { id: objectId };
4135
+ try {
4136
+ yield this.createMattertagFromPOI(PoiType.OBJECT3D, objectDb, poiObject);
4137
+ }
4138
+ catch (err) { }
4139
+ //Not really necessary anymore since the tag will disappear quick
4140
+ //this.sdk.Tag.editOpacity(mattertagID, 0.0);//opacity);
4141
+ //this.sdk.Tag.allowAction(mattertagID, {}); //disables every action
4142
+ let result = this.getTagFromElementId(objectId);
4143
+ yield this.goToTag(result.tag);
4144
+ this.deleteLastMattertag();
4145
+ });
4146
+ }
4117
4147
  getSceneNodeFromObject3DId(uuid) {
4118
4148
  return this.dictionnarySceneObjects3D.get(uuid);
4119
4149
  }