Skip to content

Commit

Permalink
Fix build issues in webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Nov 21, 2024
1 parent aeec8ae commit f0d813d
Show file tree
Hide file tree
Showing 34 changed files with 177 additions and 179 deletions.
2 changes: 1 addition & 1 deletion packages/phoenix-event-display/configs/webpack.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
exclude: /node_modules/,
options: {
loader: 'ts',
target: 'es2018',
target: 'es2020',
},
},
],
Expand Down
42 changes: 21 additions & 21 deletions packages/phoenix-event-display/src/browser.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { LoadingManager } from 'three';
import { EventDisplay } from './event-display.js';
import { Cut } from './lib/models/cut.model.js';
import { PresetView } from './lib/models/preset-view.model.js';
import { PrettySymbols } from './helpers/pretty-symbols.js';
import { RKHelper } from './helpers/rk-helper.js';
import { RungeKutta } from './helpers/runge-kutta.js';
import { InfoLogger } from './helpers/info-logger.js';
import { CMSLoader } from './loaders/cms-loader.js';
import { JiveXMLLoader } from './loaders/jivexml-loader.js';
import { JSRootEventLoader } from './loaders/jsroot-event-loader.js';
import { CMSObjects } from './loaders/objects/cms-objects.js';
import { PhoenixObjects } from './loaders/objects/phoenix-objects.js';
import { PhoenixLoader } from './loaders/phoenix-loader.js';
import { Edm4hepJsonLoader } from './loaders/edm4hep-json-loader.js';
import { ScriptLoader } from './loaders/script-loader.js';
import { TrackmlLoader } from './loaders/trackml-loader.js';
import { StateManager } from './managers/state-manager.js';
import { URLOptionsManager } from './managers/url-options-manager.js';
import { ThreeManager } from './managers/three-manager/index.js';
import { UIManager } from './managers/ui-manager/index.js';
import { PhoenixMenuNode } from './managers/ui-manager/phoenix-menu/phoenix-menu-node.js';
import { EventDisplay } from './event-display';
import { Cut } from './lib/models/cut.model';
import { PresetView } from './lib/models/preset-view.model';
import { PrettySymbols } from './helpers/pretty-symbols';
import { RKHelper } from './helpers/rk-helper';
import { RungeKutta } from './helpers/runge-kutta';
import { InfoLogger } from './helpers/info-logger';
import { CMSLoader } from './loaders/cms-loader';
import { JiveXMLLoader } from './loaders/jivexml-loader';
import { JSRootEventLoader } from './loaders/jsroot-event-loader';
import { CMSObjects } from './loaders/objects/cms-objects';
import { PhoenixObjects } from './loaders/objects/phoenix-objects';
import { PhoenixLoader } from './loaders/phoenix-loader';
import { Edm4hepJsonLoader } from './loaders/edm4hep-json-loader';
import { ScriptLoader } from './loaders/script-loader';
import { TrackmlLoader } from './loaders/trackml-loader';
import { StateManager } from './managers/state-manager';
import { URLOptionsManager } from './managers/url-options-manager';
import { ThreeManager } from './managers/three-manager/index';
import { UIManager } from './managers/ui-manager/index';
import { PhoenixMenuNode } from './managers/ui-manager/phoenix-menu/phoenix-menu-node';

if (typeof globalThis !== 'undefined') {
// `globalThis` makes Phoenix modules available in the browser
Expand Down
24 changes: 12 additions & 12 deletions packages/phoenix-event-display/src/event-display.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { httpRequest, openFile } from 'jsroot';
import { settings as jsrootSettings } from 'jsroot';
import { build } from 'jsroot/geom';
import { ThreeManager } from './managers/three-manager/index.js';
import { UIManager } from './managers/ui-manager/index.js';
import { InfoLogger } from './helpers/info-logger.js';
import type { Configuration } from './lib/types/configuration.js';
import { StateManager } from './managers/state-manager.js';
import { LoadingManager } from './managers/loading-manager.js';
import { URLOptionsManager } from './managers/url-options-manager.js';
import { ActiveVariable } from './helpers/active-variable.js';
import type { AnimationPreset } from './managers/three-manager/animations-manager.js';
import { XRSessionType } from './managers/three-manager/xr/xr-manager.js';
import { getLabelTitle } from './helpers/labels.js';
import { PhoenixLoader } from './loaders/phoenix-loader.js';
import { ThreeManager } from './managers/three-manager/index';
import { UIManager } from './managers/ui-manager/index';
import { InfoLogger } from './helpers/info-logger';
import type { Configuration } from './lib/types/configuration';
import { StateManager } from './managers/state-manager';
import { LoadingManager } from './managers/loading-manager';
import { URLOptionsManager } from './managers/url-options-manager';
import { ActiveVariable } from './helpers/active-variable';
import type { AnimationPreset } from './managers/three-manager/animations-manager';
import { XRSessionType } from './managers/three-manager/xr/xr-manager';
import { getLabelTitle } from './helpers/labels';
import { PhoenixLoader } from './loaders/phoenix-loader';

declare global {
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/phoenix-event-display/src/helpers/rk-helper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RungeKutta } from './runge-kutta.js';
import { RungeKutta } from './runge-kutta';
import { Vector3 } from 'three';
import { CoordinateHelper } from './coordinate-helper.js';
import { CoordinateHelper } from './coordinate-helper';

/**
* Helper methods for RungeKutta functions.
Expand Down
74 changes: 37 additions & 37 deletions packages/phoenix-event-display/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
// Event display
export * from './event-display.js';
export * from './event-display';

// Three
export * from './managers/three-manager/index.js';
export * from './managers/three-manager/animations-manager.js';
export * from './managers/three-manager/controls-manager.js';
export * from './managers/three-manager/effects-manager.js';
export * from './managers/three-manager/export-manager.js';
export * from './managers/three-manager/import-manager.js';
export * from './managers/three-manager/renderer-manager.js';
export * from './managers/three-manager/scene-manager.js';
export * from './managers/three-manager/selection-manager.js';
export * from './managers/three-manager/xr/xr-manager.js';
export * from './managers/three-manager/xr/vr-manager.js';
export * from './managers/three-manager/xr/ar-manager.js';
export * from './managers/three-manager/index';
export * from './managers/three-manager/animations-manager';
export * from './managers/three-manager/controls-manager';
export * from './managers/three-manager/effects-manager';
export * from './managers/three-manager/export-manager';
export * from './managers/three-manager/import-manager';
export * from './managers/three-manager/renderer-manager';
export * from './managers/three-manager/scene-manager';
export * from './managers/three-manager/selection-manager';
export * from './managers/three-manager/xr/xr-manager';
export * from './managers/three-manager/xr/vr-manager';
export * from './managers/three-manager/xr/ar-manager';

// UI
export * from './managers/ui-manager/index.js';
export * from './managers/ui-manager/phoenix-menu/phoenix-menu-node.js';
export * from './managers/ui-manager/index';
export * from './managers/ui-manager/phoenix-menu/phoenix-menu-node';

// Extras
export * from './lib/types/configuration.js';
export * from './lib/models/cut.model.js';
export * from './lib/models/preset-view.model.js';
export * from './lib/types/configuration';
export * from './lib/models/cut.model';
export * from './lib/models/preset-view.model';

// Helpers
export * from './helpers/info-logger.js';
export * from './helpers/rk-helper.js';
export * from './helpers/runge-kutta.js';
export * from './helpers/pretty-symbols.js';
export * from './helpers/active-variable.js';
export * from './helpers/zip.js';
export * from './helpers/info-logger';
export * from './helpers/rk-helper';
export * from './helpers/runge-kutta';
export * from './helpers/pretty-symbols';
export * from './helpers/active-variable';
export * from './helpers/zip';

// Loaders
export * from './loaders/event-data-loader.js';
export * from './loaders/cms-loader.js';
export * from './loaders/jivexml-loader.js';
export * from './loaders/jsroot-event-loader.js';
export * from './loaders/phoenix-loader.js';
export * from './loaders/edm4hep-json-loader.js';
export * from './loaders/script-loader.js';
export * from './loaders/trackml-loader.js';
export * from './loaders/objects/cms-objects.js';
export * from './loaders/objects/phoenix-objects.js';
export * from './loaders/event-data-loader';
export * from './loaders/cms-loader';
export * from './loaders/jivexml-loader';
export * from './loaders/jsroot-event-loader';
export * from './loaders/phoenix-loader';
export * from './loaders/edm4hep-json-loader';
export * from './loaders/script-loader';
export * from './loaders/trackml-loader';
export * from './loaders/objects/cms-objects';
export * from './loaders/objects/phoenix-objects';

// Managers
export * from './managers/state-manager.js';
export * from './managers/loading-manager.js';
export * from './managers/url-options-manager.js';
export * from './managers/state-manager';
export * from './managers/loading-manager';
export * from './managers/url-options-manager';
8 changes: 4 additions & 4 deletions packages/phoenix-event-display/src/lib/types/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PresetView } from '../models/preset-view.model.js';
import type { EventDataLoader } from '../../loaders/event-data-loader.js';
import type { PhoenixMenuNode } from '../../managers/ui-manager/phoenix-menu/phoenix-menu-node.js';
import type { AnimationPreset } from '../../managers/three-manager/animations-manager.js';
import { PresetView } from '../models/preset-view.model';
import type { EventDataLoader } from '../../loaders/event-data-loader';
import type { PhoenixMenuNode } from '../../managers/ui-manager/phoenix-menu/phoenix-menu-node';
import type { AnimationPreset } from '../../managers/three-manager/animations-manager';

/**
* Configuration of the event display.
Expand Down
4 changes: 2 additions & 2 deletions packages/phoenix-event-display/src/loaders/cms-loader.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PhoenixLoader } from './phoenix-loader.js';
import { PhoenixLoader } from './phoenix-loader';
import { Vector3, QuadraticBezierCurve3 } from 'three';
import { CMSObjects } from './objects/cms-objects.js';
import { CMSObjects } from './objects/cms-objects';
import JSZip from 'jszip';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PhoenixLoader } from './phoenix-loader.js';
import { PhoenixLoader } from './phoenix-loader';

/**
* Edm4hepJsonLoader for loading EDM4hep json dumps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ThreeManager } from '../managers/three-manager/index.js';
import { UIManager } from '../managers/ui-manager/index.js';
import { InfoLogger } from '../helpers/info-logger.js';
import { ThreeManager } from '../managers/three-manager/index';
import { UIManager } from '../managers/ui-manager/index';
import { InfoLogger } from '../helpers/info-logger';

/**
* Event data loader for implementing different event data loaders.
Expand Down
4 changes: 2 additions & 2 deletions packages/phoenix-event-display/src/loaders/jivexml-loader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PhoenixLoader } from './phoenix-loader.js';
import { CoordinateHelper } from '../helpers/coordinate-helper.js';
import { PhoenixLoader } from './phoenix-loader';
import { CoordinateHelper } from '../helpers/coordinate-helper';

/**
* PhoenixLoader for processing and loading an event from the JiveXML data format.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PhoenixLoader } from './phoenix-loader.js';
import { PhoenixLoader } from './phoenix-loader';
import { openFile } from 'jsroot';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
BufferGeometry,
BufferAttribute,
} from 'three';
import { EVENT_DATA_TYPE_COLORS } from '../../helpers/constants.js';
import { EVENT_DATA_TYPE_COLORS } from '../../helpers/constants';

/**
* Physics objects that make up an event in CMS that are not a part of {@link PhoenixObjects}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import {
CanvasTexture,
} from 'three';
import { ConvexGeometry } from 'three/examples/jsm/geometries/ConvexGeometry.js';
import { EVENT_DATA_TYPE_COLORS } from '../../helpers/constants.js';
import { RKHelper } from '../../helpers/rk-helper.js';
import { CoordinateHelper } from '../../helpers/coordinate-helper.js';
import { EVENT_DATA_TYPE_COLORS } from '../../helpers/constants';
import { RKHelper } from '../../helpers/rk-helper';
import { CoordinateHelper } from '../../helpers/coordinate-helper';
import { mergeGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
import { TracksMaterial, TracksMesh } from './tracks.js';
import { TracksMaterial, TracksMesh } from './tracks';
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';

/**
Expand Down
26 changes: 13 additions & 13 deletions packages/phoenix-event-display/src/loaders/phoenix-loader.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Group, Object3D, Vector3 } from 'three';
import { GUI } from 'dat.gui';
import type { EventDataLoader } from './event-data-loader.js';
import { UIManager } from '../managers/ui-manager/index.js';
import { ThreeManager } from '../managers/three-manager/index.js';
import { Cut } from '../lib/models/cut.model.js';
import { PhoenixObjects } from './objects/phoenix-objects.js';
import { InfoLogger } from '../helpers/info-logger.js';
import { PhoenixMenuNode } from '../managers/ui-manager/phoenix-menu/phoenix-menu-node.js';
import { LoadingManager } from '../managers/loading-manager.js';
import { StateManager } from '../managers/state-manager.js';
import { CoordinateHelper } from '../helpers/coordinate-helper.js';
import { getLabelTitle } from '../helpers/labels.js';
import { DatGUIMenuUI } from '../managers/ui-manager/dat-gui-ui.js';
import { PhoenixMenuUI } from '../managers/ui-manager/phoenix-menu/phoenix-menu-ui.js';
import type { EventDataLoader } from './event-data-loader';
import { UIManager } from '../managers/ui-manager/index';
import { ThreeManager } from '../managers/three-manager/index';
import { Cut } from '../lib/models/cut.model';
import { PhoenixObjects } from './objects/phoenix-objects';
import { InfoLogger } from '../helpers/info-logger';
import { PhoenixMenuNode } from '../managers/ui-manager/phoenix-menu/phoenix-menu-node';
import { LoadingManager } from '../managers/loading-manager';
import { StateManager } from '../managers/state-manager';
import { CoordinateHelper } from '../helpers/coordinate-helper';
import { getLabelTitle } from '../helpers/labels';
import { DatGUIMenuUI } from '../managers/ui-manager/dat-gui-ui';
import { PhoenixMenuUI } from '../managers/ui-manager/phoenix-menu/phoenix-menu-ui';
import * as _ from 'lodash';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PhoenixLoader } from './phoenix-loader.js';
import { PhoenixLoader } from './phoenix-loader';

/**
* PhoenixLoader for processing and loading an event from TrackML.
Expand Down
8 changes: 4 additions & 4 deletions packages/phoenix-event-display/src/managers/state-manager.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { EventDisplay } from '../event-display.js';
import { EventDisplay } from '../event-display';
import { Camera } from 'three';
import { PhoenixMenuNode } from './ui-manager/phoenix-menu/phoenix-menu-node.js';
import { loadFile, saveFile } from '../helpers/file.js';
import { ActiveVariable } from '../helpers/active-variable.js';
import { PhoenixMenuNode } from './ui-manager/phoenix-menu/phoenix-menu-node';
import { loadFile, saveFile } from '../helpers/file';
import { ActiveVariable } from '../helpers/active-variable';

/**
* A singleton manager for managing the scene's state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
Plane,
Group,
} from 'three';
import { SceneManager } from './scene-manager.js';
import { RendererManager } from './renderer-manager.js';
import { TracksMesh } from '../../loaders/objects/tracks.js';
import { SceneManager } from './scene-manager';
import { RendererManager } from './renderer-manager';
import { TracksMesh } from '../../loaders/objects/tracks';

/** Type for animation preset. */
export interface AnimationPreset {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Material,
type Object3DEventMap,
} from 'three';
import { SceneManager } from './scene-manager.js';
import { SceneManager } from './scene-manager';

/**
* Color manager for three.js functions related to coloring of objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TubeGeometry,
} from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
import { RendererManager } from './renderer-manager.js';
import { RendererManager } from './renderer-manager';

/**
* Manager for managing event display controls.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OBJExporter } from 'three/examples/jsm/exporters/OBJExporter.js';
import { Scene, Object3D } from 'three';
import { GLTFExporter } from 'three/examples/jsm/exporters/GLTFExporter.js';
import { saveFile } from '../../helpers/file.js';
import { saveFile } from '../../helpers/file';

/**
* Manager for managing event display's export related functionality.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
import type { GeometryUIParameters } from '../../lib/types/geometry-ui-parameters.js';
import type { GeometryUIParameters } from '../../lib/types/geometry-ui-parameters';
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
import JSZip from 'jszip';

Expand Down
Loading

0 comments on commit f0d813d

Please sign in to comment.