@smarterplan/ngx-smarterplan-core 1.2.33 → 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 +36 -1
- package/esm2020/lib/services/models/object3D.service.mjs +1 -1
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +37 -0
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +35 -0
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/matterport.service.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3849,8 +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
3854
|
this.dictionnaryObjects3D.set(modelNode.obj3D.uuid, modelNode);
|
|
3853
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);*/
|
|
3854
3864
|
/*this.sdk.Camera.pose.subscribe(
|
|
3855
3865
|
function (pose: any) {
|
|
3856
3866
|
//console.log("in callback")
|
|
@@ -3939,6 +3949,31 @@ class MatterportService {
|
|
|
3939
3949
|
resolve(this.lastObject3D);
|
|
3940
3950
|
});
|
|
3941
3951
|
}
|
|
3952
|
+
toggleObjectVisibility(objectId) {
|
|
3953
|
+
let obj = this.dictionnaryObjects3D.get(objectId);
|
|
3954
|
+
obj.obj3D.visible = !obj.obj3D.visible;
|
|
3955
|
+
//return obj.obj3D.visible;
|
|
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
|
+
}
|
|
3942
3977
|
getSceneNodeFromObject3DId(uuid) {
|
|
3943
3978
|
return this.dictionnarySceneObjects3D.get(uuid);
|
|
3944
3979
|
}
|