84 lines
1.4 KiB
JavaScript
84 lines
1.4 KiB
JavaScript
|
|
// Shared mutable state — imported by all modules that need cross-module scalar access
|
||
|
|
import * as THREE from 'three';
|
||
|
|
|
||
|
|
export const S = {
|
||
|
|
// Mouse & camera
|
||
|
|
mouseX: 0,
|
||
|
|
mouseY: 0,
|
||
|
|
targetRotX: 0,
|
||
|
|
targetRotY: 0,
|
||
|
|
|
||
|
|
// Overview
|
||
|
|
overviewMode: false,
|
||
|
|
overviewT: 0,
|
||
|
|
|
||
|
|
// Zoom
|
||
|
|
zoomT: 0,
|
||
|
|
zoomTargetT: 0,
|
||
|
|
zoomActive: false,
|
||
|
|
_zoomCamTarget: new THREE.Vector3(),
|
||
|
|
_zoomLookTarget: new THREE.Vector3(),
|
||
|
|
|
||
|
|
// Photo
|
||
|
|
photoMode: false,
|
||
|
|
|
||
|
|
// Warp
|
||
|
|
isWarping: false,
|
||
|
|
warpStartTime: 0,
|
||
|
|
warpNavigated: false,
|
||
|
|
warpDestinationUrl: null,
|
||
|
|
warpPortalColor: new THREE.Color(0x4488ff),
|
||
|
|
|
||
|
|
// Stars
|
||
|
|
_starPulseIntensity: 0,
|
||
|
|
|
||
|
|
// Energy beam
|
||
|
|
energyBeamPulse: 0,
|
||
|
|
_activeAgentCount: 0,
|
||
|
|
|
||
|
|
// Batcave
|
||
|
|
batcaveProbeLastUpdate: -999,
|
||
|
|
|
||
|
|
// Lightning
|
||
|
|
lastLightningRefreshTime: 0,
|
||
|
|
|
||
|
|
// Oath
|
||
|
|
oathActive: false,
|
||
|
|
oathLines: [],
|
||
|
|
oathRevealTimer: null,
|
||
|
|
|
||
|
|
// Speech
|
||
|
|
timmySpeechSprite: null,
|
||
|
|
timmySpeechState: null,
|
||
|
|
|
||
|
|
// Timelapse
|
||
|
|
timelapseActive: false,
|
||
|
|
timelapseRealStart: 0,
|
||
|
|
timelapseProgress: 0,
|
||
|
|
timelapseNextCommitIdx: 0,
|
||
|
|
|
||
|
|
// Bitcoin
|
||
|
|
lastKnownBlockHeight: null,
|
||
|
|
|
||
|
|
// Audio
|
||
|
|
audioCtx: null,
|
||
|
|
masterGain: null,
|
||
|
|
audioRunning: false,
|
||
|
|
portalHumsStarted: false,
|
||
|
|
sparkleTimer: null,
|
||
|
|
|
||
|
|
// Debug
|
||
|
|
debugMode: false,
|
||
|
|
|
||
|
|
// Matrix
|
||
|
|
_matrixCommitHashes: [],
|
||
|
|
|
||
|
|
// Sovereignty easter egg
|
||
|
|
sovereigntyBuffer: '',
|
||
|
|
sovereigntyBufferTimer: null,
|
||
|
|
|
||
|
|
// Sovereignty score
|
||
|
|
sovereigntyScore: 85,
|
||
|
|
sovereigntyLabel: 'Mostly Sovereign',
|
||
|
|
};
|