Skip to content

Commit

Permalink
Adjust values to better match paper interactive figure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Feb 16, 2024
1 parent da2eea6 commit 579b5e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@
"vue-eslint-parser": "^9.4.2",
"webpack": "^5.89.0"
},
"name": "@cosmicds/radwave-in-motion",
"packageManager": "[email protected]"
"name": "@cosmicds/radwave-in-motion"
}
17 changes: 8 additions & 9 deletions src/Radwave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ export default defineComponent({
}
},
data() {
const initialOpacity = 0.5;
const initialOpacity = 0.2;
const fadeStartPhase = 100;
const fadeEndPhase = 270;
const phaseOpacitySlope = -initialOpacity / (fadeEndPhase - fadeStartPhase);
Expand Down Expand Up @@ -549,7 +549,7 @@ export default defineComponent({
phaseOpacitySlope,
phaseOpacityIntercept,
clusterColor: "#1f3cf1",
defaultClusterDecay: 5,
defaultClusterDecay: 15,
sunColor: "#ffff0a",
sunLayer: null as SpreadSheetLayer | null,
Expand Down Expand Up @@ -616,7 +616,7 @@ export default defineComponent({
});
this.resizeObserver = new ResizeObserver((_entries) => {
this.shinkWWT();
this.shrinkWWT();
});
// Pin the min and max zoom in 3D mode
Expand Down Expand Up @@ -790,7 +790,7 @@ export default defineComponent({
this.mode = "full";
phase = 0;
this.shinkWWT();
this.shrinkWWT();
this.resizeObserver?.observe(document.body);
return this.gotoRADecZoom({
Expand Down Expand Up @@ -865,12 +865,12 @@ export default defineComponent({
this.setTime(new Date(time));
},
shinkWWT(aspect: number = null as unknown as number) {
shrinkWWT(aspect: number = null as unknown as number) {
// default aspect = 5.7
if (aspect == null) {
aspect = 5.7;
}
console.log('shinkWWT');
console.log('shrinkWWT');
const mainContent = document.querySelector(".wwtelescope-component") as HTMLElement;
const width = mainContent.clientWidth;
Expand Down Expand Up @@ -955,14 +955,13 @@ export default defineComponent({
},
opacityForPhase(phase: number): number {
const adjustedPhase = 180 - Math.abs(180 - phase);
return Math.min(Math.max(this.phaseOpacitySlope * adjustedPhase + this.phaseOpacityIntercept, 0), this.initialOpacity);
return Math.min(Math.max(this.phaseOpacitySlope * phase + this.phaseOpacityIntercept, 0), this.initialOpacity);
},
setupClusterLayers(): Promise<SpreadSheetLayer[]> {
const color = Color.load(this.clusterColor);
const promises: Promise<SpreadSheetLayer>[] = [];
for (let phase = -15; phase < this.fadeEndPhase; phase++) {
for (let phase = -15; phase <= this.fadeEndPhase; phase++) {
const prom = import(`./assets/radwave/RW_cluster_oscillation_${phase}_updated_radec.csv`).then(res => {
let text = res.default;
text = text.replace(/\n/g, "\r\n");
Expand Down

0 comments on commit 579b5e8

Please sign in to comment.