Skip to content

Commit

Permalink
refactor: 🚚 move interface to interface folder
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Jan 9, 2024
1 parent c2b7224 commit 065116b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/viewer/Earth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ShaderMaterial, UniformsUtils, Texture } from 'three';
import { Color, TextureLoader, MeshPhongMaterial, SphereGeometry, Mesh, Group, BackSide, AdditiveBlending } from '../utils/three';
import SceneComponent from './interfaces/SceneComponent';
import SatelliteOrbitScene from './SatelliteOrbitScene';
import { ViewerContext } from '.';
import { ViewerContext } from './interfaces/ViewerContext';

class Earth implements SceneComponent {
baseUrl = '';
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/Orbits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SatelliteOrbitScene from './SatelliteOrbitScene';
import logger from '../utils/logger';
import SatelliteGroups from './SatelliteGroups';
import SelectableSatellite from './interfaces/SelectableSatellite';
import { ViewerContext } from '.';
import { ViewerContext } from './interfaces/ViewerContext';

class Orbits implements SceneComponent, SelectableSatellite {
config: Record<string, any> = {};
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/Satellites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import SelectableSatellite from './interfaces/SelectableSatellite';
import ShaderStore from './ShaderStore';
import GroupColorScheme from './color-schemes/GroupColorScheme';
import { SatelliteObject } from './interfaces/SatelliteObject';
import { ViewerContext } from '.';
import { ViewerContext } from './interfaces/ViewerContext';

class Satellites implements SceneComponent, SelectableSatellite {
baseUrl = '';
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/Universe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ViewerContext } from '.';
import { ViewerContext } from './interfaces/ViewerContext';
import { TextureLoader } from '../utils/three';
import SceneComponent from './interfaces/SceneComponent';
import SatelliteOrbitScene from './SatelliteOrbitScene';
Expand Down
8 changes: 1 addition & 7 deletions src/viewer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ import ShaderStore from './ShaderStore';
import logger from '@/utils/logger';
import { ArrowHelper, Raycaster, Vector2, Vector3 } from 'three';
import { SatelliteObject } from './interfaces/SatelliteObject';

export interface ViewerContext {
satelliteGroups: SatelliteGroups;
config: Record<string, any>;
satelliteStore: SatelliteStore;
shaderStore: ShaderStore;
}
import { ViewerContext } from './interfaces/ViewerContext';

class Viewer {
config: Record<string, any> = {
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/interfaces/SceneComponent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ViewerContext } from '..';
import { ViewerContext } from './ViewerContext';
import SatelliteOrbitScene from '../SatelliteOrbitScene';

interface SceneComponent {
Expand Down
11 changes: 11 additions & 0 deletions src/viewer/interfaces/ViewerContext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type SatelliteGroups from '../SatelliteGroups';
import type SatelliteStore from '../SatelliteStore';
import type ShaderStore from '../ShaderStore';


export interface ViewerContext {
satelliteGroups: SatelliteGroups;
config: Record<string, any>;
satelliteStore: SatelliteStore;
shaderStore: ShaderStore;
}

0 comments on commit 065116b

Please sign in to comment.