@smarterplan/ngx-smarterplan-core 1.2.15 → 1.2.16
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 +75 -74
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +74 -75
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +74 -73
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2927,81 +2927,80 @@ class MatterportService {
|
|
|
2927
2927
|
// renderer.shadowMap.type = three.PCFSoftShadowMap;
|
|
2928
2928
|
// });
|
|
2929
2929
|
// Wait until Showcase is actually playing....
|
|
2930
|
-
this.sdk.Tag.data.subscribe({
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
});
|
|
2930
|
+
// this.sdk.Tag.data.subscribe({
|
|
2931
|
+
// onAdded: async function (index, item, collection) {
|
|
2932
|
+
//
|
|
2933
|
+
// let thisOpacity = 0.2;
|
|
2934
|
+
// this.sdk.Tag.editOpacity(index, thisOpacity);
|
|
2935
|
+
//
|
|
2936
|
+
// let source = null;
|
|
2937
|
+
// try {
|
|
2938
|
+
// source = await Promise.all([
|
|
2939
|
+
// this.sdk.Sensor.createSource(this.sdk.Sensor.SourceType.SPHERE, {
|
|
2940
|
+
// origin: item.anchorPosition,
|
|
2941
|
+
// radius: Number(3),
|
|
2942
|
+
// userData: {
|
|
2943
|
+
// id: index + '-sphere-source',
|
|
2944
|
+
// },
|
|
2945
|
+
// })
|
|
2946
|
+
// ]);
|
|
2947
|
+
// } catch (e) {
|
|
2948
|
+
// console.log('could not create Sphere sensor')
|
|
2949
|
+
// console.error(e);
|
|
2950
|
+
// }
|
|
2951
|
+
// if (!source) {
|
|
2952
|
+
// return;
|
|
2953
|
+
// }
|
|
2954
|
+
//
|
|
2955
|
+
// let sensor = null;
|
|
2956
|
+
// try {
|
|
2957
|
+
// sensor = await this.sdk.Sensor.createSensor(this.sdk.Sensor.SensorType.CAMERA);
|
|
2958
|
+
// } catch (e) {
|
|
2959
|
+
// console.log('could not create Camera sensor')
|
|
2960
|
+
// console.error(e);
|
|
2961
|
+
// }
|
|
2962
|
+
// if (!sensor) {
|
|
2963
|
+
// return;
|
|
2964
|
+
// }
|
|
2965
|
+
//
|
|
2966
|
+
// sensor.addSource(...source);
|
|
2967
|
+
// sensor.readings.subscribe({
|
|
2968
|
+
// onUpdated(source, reading) {
|
|
2969
|
+
// console.log(thisOpacity);
|
|
2970
|
+
// let oldOpacity = thisOpacity;
|
|
2971
|
+
// if (reading.inRange) {
|
|
2972
|
+
// thisOpacity = 1;
|
|
2973
|
+
// console.log(index + ' is inRange');
|
|
2974
|
+
// } else if (reading.inView) {
|
|
2975
|
+
// console.log(index + ' is inView but not inRange');
|
|
2976
|
+
// thisOpacity = 0.5;
|
|
2977
|
+
// } else {
|
|
2978
|
+
// thisOpacity = 0.2;
|
|
2979
|
+
// console.log(index + ' is not inView or inRange');
|
|
2980
|
+
// }
|
|
2981
|
+
//
|
|
2982
|
+
// this.sdk.Tag.editOpacity(index, thisOpacity);
|
|
2983
|
+
// /*
|
|
2984
|
+
// let inc = 0.01;
|
|
2985
|
+
// if (oldOpacity > thisOpacity) {
|
|
2986
|
+
// inc = -0.01;
|
|
2987
|
+
// }
|
|
2988
|
+
//
|
|
2989
|
+
// for(var i = oldOpacity; i != thisOpacity; i=i+inc) {
|
|
2990
|
+
// setTimeout(function() {
|
|
2991
|
+
// mpSdk.Tag.editOpacity(index, i);
|
|
2992
|
+
// console.log('Delay', i);
|
|
2993
|
+
// },10);
|
|
2994
|
+
// }
|
|
2995
|
+
// */
|
|
2996
|
+
// }
|
|
2997
|
+
// });
|
|
2998
|
+
// //sensor.showDebug(true);
|
|
2999
|
+
// }.bind(this),
|
|
3000
|
+
// onCollectionUpdated: function (collection) {
|
|
3001
|
+
// console.log('Collection received. There are ', Object.keys(collection).length, ' Tags in the collection', collection);
|
|
3002
|
+
// }
|
|
3003
|
+
// });
|
|
3005
3004
|
resolve(true);
|
|
3006
3005
|
});
|
|
3007
3006
|
}.bind(this));
|