@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.
- package/esm2020/lib/services/matterport.service.mjs +31 -3
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +32 -2
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +30 -2
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/matterport.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3849,10 +3849,18 @@ class MatterportService {
|
|
|
3849
3849
|
}
|
|
3850
3850
|
this.lastObject3D = modelNode.obj3D;
|
|
3851
3851
|
// Store this in memory Map dictionnary
|
|
3852
|
-
console.log("Adding object: ");
|
|
3853
|
-
console.log(modelNode);
|
|
3852
|
+
//console.log("Adding object: ");
|
|
3853
|
+
//console.log(modelNode);
|
|
3854
3854
|
this.dictionnaryObjects3D.set(modelNode.obj3D.uuid, modelNode);
|
|
3855
3855
|
this.dictionnarySceneObjects3D.set(modelNode.obj3D.uuid, sceneObject);
|
|
3856
|
+
/*const poiObject = {
|
|
3857
|
+
coordinate: JSON.stringify(obj.position),
|
|
3858
|
+
type: PoiType.OBJECT3D,
|
|
3859
|
+
elementID: modelNode.obj3D.uuid, //todo: be careful with this
|
|
3860
|
+
} as POI;
|
|
3861
|
+
const objectDb = {id: modelNode.obj3D.uuid} as DbObjectType;
|
|
3862
|
+
|
|
3863
|
+
this.createMattertagFromPOI(PoiType.OBJECT3D, objectDb, poiObject);*/
|
|
3856
3864
|
/*this.sdk.Camera.pose.subscribe(
|
|
3857
3865
|
function (pose: any) {
|
|
3858
3866
|
//console.log("in callback")
|
|
@@ -3946,6 +3954,26 @@ class MatterportService {
|
|
|
3946
3954
|
obj.obj3D.visible = !obj.obj3D.visible;
|
|
3947
3955
|
//return obj.obj3D.visible;
|
|
3948
3956
|
}
|
|
3957
|
+
async pointCameraTo3DObject(objectId) {
|
|
3958
|
+
let obj = this.dictionnaryObjects3D.get(objectId);
|
|
3959
|
+
//We create a temporary Tag
|
|
3960
|
+
const poiObject = {
|
|
3961
|
+
coordinate: JSON.stringify(obj.obj3D.position),
|
|
3962
|
+
type: PoiType.OBJECT3D,
|
|
3963
|
+
elementID: objectId, //todo: be careful with this
|
|
3964
|
+
};
|
|
3965
|
+
const objectDb = { id: objectId };
|
|
3966
|
+
try {
|
|
3967
|
+
await this.createMattertagFromPOI(PoiType.OBJECT3D, objectDb, poiObject);
|
|
3968
|
+
}
|
|
3969
|
+
catch (err) { }
|
|
3970
|
+
//Not really necessary anymore since the tag will disappear quick
|
|
3971
|
+
//this.sdk.Tag.editOpacity(mattertagID, 0.0);//opacity);
|
|
3972
|
+
//this.sdk.Tag.allowAction(mattertagID, {}); //disables every action
|
|
3973
|
+
let result = this.getTagFromElementId(objectId);
|
|
3974
|
+
await this.goToTag(result.tag);
|
|
3975
|
+
this.deleteLastMattertag();
|
|
3976
|
+
}
|
|
3949
3977
|
getSceneNodeFromObject3DId(uuid) {
|
|
3950
3978
|
return this.dictionnarySceneObjects3D.get(uuid);
|
|
3951
3979
|
}
|