Skip to content

Commit

Permalink
Merge pull request #11 from Carifio24/opacity-between-modes
Browse files Browse the repository at this point in the history
Adjust opacity of cluster layers when changing modes
  • Loading branch information
patudom authored Feb 16, 2024
2 parents b0483cc + b7792d2 commit 7617830
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Radwave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ export default defineComponent({
phaseOpacityIntercept,
clusterColor: "#1f3cf1",
defaultClusterDecay: 15,
opacity2Dto3DFactor: 2.5,
sunColor: "#ffff0a",
sunLayer: null as SpreadSheetLayer | null,
Expand Down Expand Up @@ -726,6 +727,7 @@ export default defineComponent({
bestFitOffsets = bestFitOffsets2D;
this.clusterLayers.forEach(layer => {
layer.set_decay(1);
layer.set_opacity(this.opacity2Dto3DFactor * layer.get_opacity());
});
this.setBackgroundImageByName(this.background2DImageset);
Expand All @@ -751,27 +753,24 @@ export default defineComponent({
},
set3DMode() {
bestFitOffsets = bestFitOffsets3D;
this.clusterLayers.forEach(layer => {
layer.set_decay(this.defaultClusterDecay);
layer.set_opacity(layer.get_opacity() / this.opacity2Dto3DFactor);
});
this.setBackgroundImageByName("Solar System");
this.setForegroundImageByName("Solar System");
this.sunLayer?.set_opacity(1);
updateBestFitAnnotations(phase);
return this.gotoRADecZoom({
...this.position3D,
instant: true,
}).catch((err) => {
console.log(err);
});
},
Expand Down

0 comments on commit 7617830

Please sign in to comment.