@smarterplan/ngx-smarterplan-core 1.2.35 → 1.2.37
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 +19 -13
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +17 -12
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +17 -12
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/matterport.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3743,9 +3743,9 @@ class MatterportService {
|
|
|
3743
3743
|
var node = sceneObject.addNode();
|
|
3744
3744
|
// TODO change this 🤮
|
|
3745
3745
|
node.addComponent('mp.lights');
|
|
3746
|
-
node.addComponent('mp.lights');
|
|
3747
|
-
node.addComponent('mp.lights');
|
|
3748
|
-
node.addComponent('mp.lights')
|
|
3746
|
+
//node.addComponent('mp.lights');
|
|
3747
|
+
/*node.addComponent('mp.lights');
|
|
3748
|
+
node.addComponent('mp.lights');*/
|
|
3749
3749
|
node.start();
|
|
3750
3750
|
const nodeControl = sceneObject.addNode();
|
|
3751
3751
|
this.objectControl = nodeControl.addComponent('mp.transformControls');
|
|
@@ -3816,6 +3816,16 @@ class MatterportService {
|
|
|
3816
3816
|
console.log('Format not supported');
|
|
3817
3817
|
break;
|
|
3818
3818
|
}
|
|
3819
|
+
//cache system (i'll try to make it work later ...)
|
|
3820
|
+
/*let objContentsJSON = JSON.stringify(modelNode);
|
|
3821
|
+
console.log(modelNode);
|
|
3822
|
+
console.log(objContentsJSON);
|
|
3823
|
+
console.log(JSON.stringify(modelNode));
|
|
3824
|
+
localStorage.setItem(`testObj_${obj.object}`, objContentsJSON);
|
|
3825
|
+
console.log("stored ?!");
|
|
3826
|
+
console.log(typeof modelNode);*/
|
|
3827
|
+
//let dataS = serialijse.serialize(modelNode);
|
|
3828
|
+
//console.log(dataS);
|
|
3819
3829
|
// Use 3 ?! Ambient lightings
|
|
3820
3830
|
if (this.noLightForObjects) {
|
|
3821
3831
|
const lightsNode = sceneObject.addNode();
|
|
@@ -3853,14 +3863,6 @@ class MatterportService {
|
|
|
3853
3863
|
//console.log(modelNode);
|
|
3854
3864
|
this.dictionnaryObjects3D.set(modelNode.obj3D.uuid, modelNode);
|
|
3855
3865
|
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);*/
|
|
3864
3866
|
/*this.sdk.Camera.pose.subscribe(
|
|
3865
3867
|
function (pose: any) {
|
|
3866
3868
|
//console.log("in callback")
|
|
@@ -3952,7 +3954,10 @@ class MatterportService {
|
|
|
3952
3954
|
toggleObjectVisibility(objectId) {
|
|
3953
3955
|
let obj = this.dictionnaryObjects3D.get(objectId);
|
|
3954
3956
|
obj.obj3D.visible = !obj.obj3D.visible;
|
|
3955
|
-
|
|
3957
|
+
}
|
|
3958
|
+
isObjectVisible(objectId) {
|
|
3959
|
+
let obj = this.dictionnaryObjects3D.get(objectId);
|
|
3960
|
+
return obj.obj3D.visible;
|
|
3956
3961
|
}
|
|
3957
3962
|
async pointCameraTo3DObject(objectId) {
|
|
3958
3963
|
let obj = this.dictionnaryObjects3D.get(objectId);
|