Cleanup batch 5: Remove unused exported types
Made 75+ types internal (removed export keyword) across 24 files: - Analytics event types (kept GameEventMap, GameEventName, GameEventProperties) - Level config types (QuaternionArray, MaterialConfig, etc.) - Ship types (SightConfig, InputState, etc.) - Store state types (AuthState, GameConfigData, etc.) - Various config interfaces These types are still used internally but were never imported elsewhere. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e60280cf83
commit
44c685ac2d
@ -1,7 +1,7 @@
|
||||
import { AnalyticsAdapter, AnalyticsEvent } from './analyticsAdapter';
|
||||
import { BrowserAgent } from '@newrelic/browser-agent/loaders/browser-agent';
|
||||
|
||||
export interface NewRelicAdapterConfig {
|
||||
interface NewRelicAdapterConfig {
|
||||
/** Maximum events to batch before auto-flush */
|
||||
batchSize?: number;
|
||||
/** Maximum time (ms) to wait before auto-flush */
|
||||
|
||||
@ -7,25 +7,25 @@
|
||||
// Session Events
|
||||
// ============================================================================
|
||||
|
||||
export interface SessionStartEvent {
|
||||
interface SessionStartEvent {
|
||||
platform: 'desktop' | 'mobile' | 'vr';
|
||||
userAgent: string;
|
||||
screenWidth: number;
|
||||
screenHeight: number;
|
||||
}
|
||||
|
||||
export interface SessionEndEvent {
|
||||
interface SessionEndEvent {
|
||||
duration: number; // seconds
|
||||
totalLevelsPlayed: number;
|
||||
totalAsteroidsDestroyed: number;
|
||||
}
|
||||
|
||||
export interface WebXRSessionStartEvent {
|
||||
interface WebXRSessionStartEvent {
|
||||
deviceName: string;
|
||||
isImmersive: boolean;
|
||||
}
|
||||
|
||||
export interface WebXRSessionEndEvent {
|
||||
interface WebXRSessionEndEvent {
|
||||
duration: number; // seconds
|
||||
reason: 'user_exit' | 'error' | 'browser_tab_close';
|
||||
}
|
||||
@ -34,13 +34,13 @@ export interface WebXRSessionEndEvent {
|
||||
// Level Events
|
||||
// ============================================================================
|
||||
|
||||
export interface LevelStartEvent {
|
||||
interface LevelStartEvent {
|
||||
levelName: string;
|
||||
difficulty: 'recruit' | 'pilot' | 'captain' | 'commander' | 'test';
|
||||
playCount: number; // nth time playing this level/difficulty
|
||||
}
|
||||
|
||||
export interface LevelCompleteEvent {
|
||||
interface LevelCompleteEvent {
|
||||
levelName: string;
|
||||
difficulty: string;
|
||||
completionTime: number; // seconds
|
||||
@ -54,7 +54,7 @@ export interface LevelCompleteEvent {
|
||||
isNewBestAccuracy: boolean;
|
||||
}
|
||||
|
||||
export interface LevelFailedEvent {
|
||||
interface LevelFailedEvent {
|
||||
levelName: string;
|
||||
difficulty: string;
|
||||
survivalTime: number; // seconds
|
||||
@ -68,26 +68,26 @@ export interface LevelFailedEvent {
|
||||
// Gameplay Events
|
||||
// ============================================================================
|
||||
|
||||
export interface AsteroidDestroyedEvent {
|
||||
interface AsteroidDestroyedEvent {
|
||||
weaponType: string;
|
||||
distance: number;
|
||||
asteroidSize: number;
|
||||
remainingCount: number;
|
||||
}
|
||||
|
||||
export interface ShotFiredEvent {
|
||||
interface ShotFiredEvent {
|
||||
weaponType: string;
|
||||
consecutiveShotsCount: number;
|
||||
}
|
||||
|
||||
export interface HullDamageEvent {
|
||||
interface HullDamageEvent {
|
||||
damageAmount: number;
|
||||
remainingHull: number;
|
||||
damagePercent: number; // 0-1
|
||||
source: 'asteroid_collision' | 'environmental';
|
||||
}
|
||||
|
||||
export interface ShipCollisionEvent {
|
||||
interface ShipCollisionEvent {
|
||||
impactVelocity: number;
|
||||
damageDealt: number;
|
||||
objectType: 'asteroid' | 'station' | 'boundary';
|
||||
@ -97,7 +97,7 @@ export interface ShipCollisionEvent {
|
||||
// Performance Events
|
||||
// ============================================================================
|
||||
|
||||
export interface PerformanceSnapshotEvent {
|
||||
interface PerformanceSnapshotEvent {
|
||||
fps: number;
|
||||
drawCalls: number;
|
||||
activeMeshes: number;
|
||||
@ -106,7 +106,7 @@ export interface PerformanceSnapshotEvent {
|
||||
renderTime: number; // ms
|
||||
}
|
||||
|
||||
export interface AssetLoadingEvent {
|
||||
interface AssetLoadingEvent {
|
||||
assetType: 'mesh' | 'texture' | 'audio' | 'system';
|
||||
assetName: string;
|
||||
loadTimeMs: number;
|
||||
@ -118,14 +118,14 @@ export interface AssetLoadingEvent {
|
||||
// Error Events
|
||||
// ============================================================================
|
||||
|
||||
export interface JavaScriptErrorEvent {
|
||||
interface JavaScriptErrorEvent {
|
||||
errorMessage: string;
|
||||
errorStack?: string;
|
||||
componentName: string;
|
||||
isCritical: boolean;
|
||||
}
|
||||
|
||||
export interface WebXRErrorEvent {
|
||||
interface WebXRErrorEvent {
|
||||
errorType: 'initialization' | 'controller' | 'session' | 'feature';
|
||||
errorMessage: string;
|
||||
recoverable: boolean;
|
||||
@ -135,7 +135,7 @@ export interface WebXRErrorEvent {
|
||||
// Progression Events
|
||||
// ============================================================================
|
||||
|
||||
export interface ProgressionUpdateEvent {
|
||||
interface ProgressionUpdateEvent {
|
||||
levelName: string;
|
||||
difficulty: string;
|
||||
bestTime?: number;
|
||||
@ -144,7 +144,7 @@ export interface ProgressionUpdateEvent {
|
||||
firstPlayDate: string;
|
||||
}
|
||||
|
||||
export interface EditorUnlockedEvent {
|
||||
interface EditorUnlockedEvent {
|
||||
timestamp: string;
|
||||
levelsCompleted: number;
|
||||
}
|
||||
|
||||
@ -5,31 +5,3 @@
|
||||
|
||||
// Core service
|
||||
export { getAnalytics } from './analyticsService';
|
||||
|
||||
// Adapters (interfaces exported as types)
|
||||
export type { AnalyticsAdapter, EventOptions, AnalyticsConfig } from './adapters/analyticsAdapter';
|
||||
export type { NewRelicAdapterConfig } from './adapters/newRelicAdapter';
|
||||
|
||||
// Event types
|
||||
export type {
|
||||
GameEventName,
|
||||
GameEventProperties,
|
||||
GameEventMap,
|
||||
SessionStartEvent,
|
||||
SessionEndEvent,
|
||||
WebXRSessionStartEvent,
|
||||
WebXRSessionEndEvent,
|
||||
LevelStartEvent,
|
||||
LevelCompleteEvent,
|
||||
LevelFailedEvent,
|
||||
AsteroidDestroyedEvent,
|
||||
ShotFiredEvent,
|
||||
HullDamageEvent,
|
||||
ShipCollisionEvent,
|
||||
PerformanceSnapshotEvent,
|
||||
AssetLoadingEvent,
|
||||
JavaScriptErrorEvent,
|
||||
WebXRErrorEvent,
|
||||
ProgressionUpdateEvent,
|
||||
EditorUnlockedEvent
|
||||
} from './events/gameEvents';
|
||||
|
||||
@ -12,7 +12,7 @@ import debugLog from '../../core/debug';
|
||||
/**
|
||||
* Configuration for explosion effects
|
||||
*/
|
||||
export interface ExplosionConfig {
|
||||
interface ExplosionConfig {
|
||||
/** Duration of explosion in milliseconds */
|
||||
duration?: number;
|
||||
/** Maximum explosion force (how far pieces spread) */
|
||||
|
||||
@ -4,7 +4,7 @@ import debugLog from '../../core/debug';
|
||||
/**
|
||||
* Configuration options for background stars
|
||||
*/
|
||||
export interface BackgroundStarsConfig {
|
||||
interface BackgroundStarsConfig {
|
||||
/** Number of stars to generate */
|
||||
count?: number;
|
||||
/** Radius of the sphere containing the stars */
|
||||
|
||||
@ -11,7 +11,7 @@ import debugLog from "../../core/debug";
|
||||
import loadAsset from "../../utils/loadAsset";
|
||||
import {Vector3Array} from "../../levels/config/levelConfig";
|
||||
|
||||
export interface StarBaseResult {
|
||||
interface StarBaseResult {
|
||||
baseMesh: AbstractMesh;
|
||||
landingAggregate: PhysicsAggregate | null;
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ export interface LevelProgress {
|
||||
playCount: number;
|
||||
}
|
||||
|
||||
export interface ProgressionData {
|
||||
interface ProgressionData {
|
||||
version: string;
|
||||
completedLevels: Map<string, LevelProgress>;
|
||||
editorUnlocked: boolean;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
/**
|
||||
* Star rating levels (0-3 stars per category)
|
||||
*/
|
||||
export interface StarRatings {
|
||||
interface StarRatings {
|
||||
time: number; // 0-3 stars based on completion time
|
||||
accuracy: number; // 0-3 stars based on shot accuracy
|
||||
fuel: number; // 0-3 stars based on fuel efficiency
|
||||
@ -18,7 +18,7 @@ export interface StarRatings {
|
||||
/**
|
||||
* Debug information for score calculation
|
||||
*/
|
||||
export interface ScoreDebugInfo {
|
||||
interface ScoreDebugInfo {
|
||||
rawFuelConsumed: number; // Actual fuel consumed (can be >100%)
|
||||
rawHullDamage: number; // Actual hull damage (can be >100%)
|
||||
fuelEfficiency: number; // 0-100 display value (clamped)
|
||||
@ -42,7 +42,7 @@ export interface ScoreCalculation {
|
||||
/**
|
||||
* Configuration for score calculation
|
||||
*/
|
||||
export interface ScoreConfig {
|
||||
interface ScoreConfig {
|
||||
baseScore?: number; // Default: 10000
|
||||
minMultiplier?: number; // Minimum multiplier floor (default: 0.5)
|
||||
maxTimeMultiplier?: number; // Maximum time bonus (default: 3.0)
|
||||
|
||||
@ -10,17 +10,17 @@ export type Vector3Array = [number, number, number];
|
||||
/**
|
||||
* 4D quaternion stored as array [x, y, z, w]
|
||||
*/
|
||||
export type QuaternionArray = [number, number, number, number];
|
||||
type QuaternionArray = [number, number, number, number];
|
||||
|
||||
/**
|
||||
* 4D color stored as array [r, g, b, a] (0-1 range)
|
||||
*/
|
||||
export type Color4Array = [number, number, number, number];
|
||||
type Color4Array = [number, number, number, number];
|
||||
|
||||
/**
|
||||
* Material configuration for PBR materials
|
||||
*/
|
||||
export interface MaterialConfig {
|
||||
interface MaterialConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
type: "PBR" | "Standard" | "Basic";
|
||||
@ -43,7 +43,7 @@ export interface MaterialConfig {
|
||||
/**
|
||||
* Scene hierarchy node (TransformNode or Mesh)
|
||||
*/
|
||||
export interface SceneNodeConfig {
|
||||
interface SceneNodeConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
type: "TransformNode" | "Mesh" | "InstancedMesh";
|
||||
@ -73,7 +73,7 @@ export interface ShipConfig {
|
||||
* Start base configuration (yellow cylinder where asteroids are constrained to)
|
||||
* All fields optional to allow levels without start bases
|
||||
*/
|
||||
export interface StartBaseConfig {
|
||||
interface StartBaseConfig {
|
||||
position?: Vector3Array; // Defaults to [0, 0, 0] if not specified
|
||||
baseGlbPath?: string; // Path to base GLB model (defaults to 'base.glb')
|
||||
landingGlbPath?: string; // Path to landing zone GLB model (uses same file as base, different mesh name)
|
||||
@ -82,7 +82,7 @@ export interface StartBaseConfig {
|
||||
/**
|
||||
* Sun configuration
|
||||
*/
|
||||
export interface SunConfig {
|
||||
interface SunConfig {
|
||||
position: Vector3Array;
|
||||
diameter: number;
|
||||
intensity?: number; // Light intensity
|
||||
@ -91,7 +91,7 @@ export interface SunConfig {
|
||||
/**
|
||||
* Individual planet configuration
|
||||
*/
|
||||
export interface PlanetConfig {
|
||||
interface PlanetConfig {
|
||||
name: string;
|
||||
position: Vector3Array;
|
||||
diameter: number;
|
||||
@ -102,7 +102,7 @@ export interface PlanetConfig {
|
||||
/**
|
||||
* Individual asteroid configuration
|
||||
*/
|
||||
export interface AsteroidConfig {
|
||||
interface AsteroidConfig {
|
||||
id: string;
|
||||
position: Vector3Array;
|
||||
scale: number; // Uniform scale applied to all axes
|
||||
@ -114,7 +114,7 @@ export interface AsteroidConfig {
|
||||
/**
|
||||
* Difficulty configuration settings
|
||||
*/
|
||||
export interface DifficultyConfig {
|
||||
interface DifficultyConfig {
|
||||
rockCount: number;
|
||||
forceMultiplier: number;
|
||||
rockSizeMin: number;
|
||||
@ -160,7 +160,7 @@ export interface LevelConfig {
|
||||
/**
|
||||
* Validation result
|
||||
*/
|
||||
export interface ValidationResult {
|
||||
interface ValidationResult {
|
||||
valid: boolean;
|
||||
errors: string[];
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ const MIGRATION_STATUS_KEY = 'space-game-migration-status';
|
||||
/**
|
||||
* Migration status information
|
||||
*/
|
||||
export interface MigrationStatus {
|
||||
interface MigrationStatus {
|
||||
migrated: boolean;
|
||||
migratedAt?: Date;
|
||||
version: string;
|
||||
@ -19,7 +19,7 @@ export interface MigrationStatus {
|
||||
/**
|
||||
* Result of migration operation
|
||||
*/
|
||||
export interface MigrationResult {
|
||||
interface MigrationResult {
|
||||
success: boolean;
|
||||
customLevelsMigrated: number;
|
||||
defaultLevelsFound: number;
|
||||
|
||||
@ -3,7 +3,6 @@ import {
|
||||
Color3,
|
||||
CreateAudioEngineAsync,
|
||||
Engine,
|
||||
FreeCamera,
|
||||
HavokPlugin,
|
||||
ParticleHelper,
|
||||
Scene,
|
||||
@ -29,12 +28,9 @@ import {LevelRegistry} from "./levels/storage/levelRegistry";
|
||||
import debugLog from './core/debug';
|
||||
import {ReplaySelectionScreen} from "./replay/ReplaySelectionScreen";
|
||||
import {ReplayManager} from "./replay/ReplayManager";
|
||||
import {AuthService} from "./services/authService";
|
||||
import {updateUserProfile} from "./ui/screens/loginScreen";
|
||||
import {Preloader} from "./ui/screens/preloader";
|
||||
import {DiscordWidget} from "./ui/widgets/discordWidget";
|
||||
|
||||
// Svelte App
|
||||
import { mount } from 'svelte';
|
||||
import App from './components/layouts/App.svelte';
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import { LevelConfig } from "../../levels/config/levelConfig";
|
||||
/**
|
||||
* Represents the physics state of a single object at a point in time
|
||||
*/
|
||||
export interface PhysicsObjectState {
|
||||
interface PhysicsObjectState {
|
||||
id: string;
|
||||
position: [number, number, number];
|
||||
rotation: [number, number, number, number]; // Quaternion (x, y, z, w)
|
||||
@ -28,7 +28,7 @@ export interface PhysicsSnapshot {
|
||||
/**
|
||||
* Recording metadata
|
||||
*/
|
||||
export interface RecordingMetadata {
|
||||
interface RecordingMetadata {
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
frameCount: number;
|
||||
|
||||
@ -15,7 +15,7 @@ export type StickAction =
|
||||
/**
|
||||
* Available button actions
|
||||
*/
|
||||
export type ButtonAction =
|
||||
type ButtonAction =
|
||||
| 'fire' // Fire weapon
|
||||
| 'cameraUp' // Adjust camera up
|
||||
| 'cameraDown' // Adjust camera down
|
||||
|
||||
@ -6,7 +6,7 @@ import debugLog from "../../core/debug";
|
||||
/**
|
||||
* State change event emitted when ship controls or pointer selection state changes
|
||||
*/
|
||||
export interface InputControlStateChange {
|
||||
interface InputControlStateChange {
|
||||
shipControlsEnabled: boolean;
|
||||
pointerSelectionEnabled: boolean;
|
||||
requester: string; // e.g., "StatusScreen", "MissionBrief", "Level1"
|
||||
|
||||
@ -7,7 +7,7 @@ import { FreeCamera, Observable, Scene, Vector2 } from "@babylonjs/core";
|
||||
/**
|
||||
* Recording control action types
|
||||
*/
|
||||
export type RecordingAction =
|
||||
type RecordingAction =
|
||||
| "exportRingBuffer" // R key
|
||||
| "toggleLongRecording" // Ctrl+R
|
||||
| "exportLongRecording"; // Shift+R
|
||||
|
||||
@ -3,12 +3,12 @@ import { GameConfig } from "../core/gameConfig";
|
||||
import { ShipStatus } from "./shipStatus";
|
||||
import { GameStats } from "../game/gameStats";
|
||||
|
||||
export interface InputState {
|
||||
interface InputState {
|
||||
leftStick: Vector2;
|
||||
rightStick: Vector2;
|
||||
}
|
||||
|
||||
export interface ForceApplicationResult {
|
||||
interface ForceApplicationResult {
|
||||
linearMagnitude: number;
|
||||
angularMagnitude: number;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ export interface ShipStatusChangeEvent {
|
||||
/**
|
||||
* Ship status values container
|
||||
*/
|
||||
export interface ShipStatusValues {
|
||||
interface ShipStatusValues {
|
||||
fuel: number;
|
||||
hull: number;
|
||||
ammo: number;
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
/**
|
||||
* Configuration options for the sight reticle
|
||||
*/
|
||||
export interface SightConfig {
|
||||
interface SightConfig {
|
||||
/** Position relative to parent */
|
||||
position?: Vector3;
|
||||
/** Circle radius */
|
||||
|
||||
@ -6,7 +6,7 @@ import { ScoreEvent } from "../ui/hud/scoreboard";
|
||||
/**
|
||||
* Priority levels for voice messages
|
||||
*/
|
||||
export enum VoiceMessagePriority {
|
||||
enum VoiceMessagePriority {
|
||||
HIGH = 0, // Critical warnings (danger, immediate action needed)
|
||||
NORMAL = 1, // Standard warnings and status updates
|
||||
LOW = 2 // Informational messages
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { writable } from 'svelte/store';
|
||||
import { AuthService } from '../services/authService';
|
||||
|
||||
export interface AuthState {
|
||||
interface AuthState {
|
||||
isAuthenticated: boolean;
|
||||
user: any | null;
|
||||
isLoading: boolean;
|
||||
|
||||
@ -2,7 +2,7 @@ import { writable, get } from 'svelte/store';
|
||||
|
||||
const STORAGE_KEY = 'game-config';
|
||||
|
||||
export interface GameConfigData {
|
||||
interface GameConfigData {
|
||||
physicsEnabled: boolean;
|
||||
debugEnabled: boolean;
|
||||
progressionEnabled: boolean;
|
||||
|
||||
@ -3,7 +3,7 @@ import { LevelRegistry } from '../levels/storage/levelRegistry';
|
||||
import type { LevelConfig } from '../levels/config/levelConfig';
|
||||
import type { CloudLevelEntry } from '../services/cloudLevelService';
|
||||
|
||||
export interface LevelRegistryState {
|
||||
interface LevelRegistryState {
|
||||
isInitialized: boolean;
|
||||
levels: Map<string, CloudLevelEntry>;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export interface NavigationState {
|
||||
interface NavigationState {
|
||||
currentRoute: string;
|
||||
isLoading: boolean;
|
||||
loadingMessage: string;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Dynamically loads the widget script to avoid npm bundling issues
|
||||
*/
|
||||
|
||||
export interface DiscordWidgetOptions {
|
||||
interface DiscordWidgetOptions {
|
||||
server: string;
|
||||
channel: string;
|
||||
location?: string[];
|
||||
|
||||
@ -2,7 +2,7 @@ import {DefaultScene} from "../core/defaultScene";
|
||||
import {AbstractMesh, AssetContainer, LoadAssetContainerAsync} from "@babylonjs/core";
|
||||
import debugLog from "../core/debug";
|
||||
|
||||
export type LoadedAsset = {
|
||||
type LoadedAsset = {
|
||||
container: AssetContainer,
|
||||
meshes: Map<string, AbstractMesh>,
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user