Files
SciFi-XZBT/core_animation_improvement.md
T

8.1 KiB

Existing Settings-Page Core Animations

This document summarizes the current implementation of the core visualizer card in the settings/control screen's right sidebar (warp-core-canvas). It covers all ten universe themes. Findings come from reading the source; they have not been visually verified in a browser. Observation-mode scenes and the separate audio spectrum display are outside this inventory.

Theme inventory

Theme Settings card title / overlay Existing renderer and appearance
Starfleet Command MATTER / ANTIMATTER CORE / INTERMIX CHAMBER // ACTIVE warp-core: a vertical blue glass intermix chamber in a dark housing, orange injectors at the top and bottom, a white/cyan central reaction glow, 14 horizontal cyan coils, and pale blue plasma particles traveling vertically along a sinusoidal path. Pulses enlarge and brighten the central glow and particles, strengthen the coils, and launch extra particles from the center in both directions.
The Whoniverse CENTRAL TIME ROTOR COLUMN / VORTEX ROTOR // OPERATIONAL time-rotor: a cyan glass cylinder with brass/gold end collars. An inner assembly of three illuminated rods and four gold elliptical rings rises and falls continuously. A white/cyan glow follows the moving assembly, while cyan particles drift through a winding path around it. Audio pulses increase the glow and particle emphasis; the vertical travel runs on its own animation phase. All seven TARDIS console presets share this drawing.
Industrial Space HEAVY FUSION REACTOR / CONTAINMENT CORE // ACTIVE industrial-reactor: a dark brown cast-iron-style vertical housing, top/bottom warning-band rectangles, a white/yellow/amber central plasma glow, and nine horizontal coil clamps alternating amber and brown. Pulses expand the glow and increase the clamps' shadow glow. There are no moving mechanical parts or rendered plasma particles in this mode.
Bioships ORGANIC BIO-HEART SAC / VASCULAR NEXUS // PULSING bio-heart: a soft mint/emerald central aura fading into violet, with six curved green neural veins radiating outward. Audio pulses expand the aura and vein reach and increase its brightness. The visible form is an abstract radial glow and veins. Its additional phase-based breathing and vein rotation do not advance while this mode is selected; see the behavior notes below.
Retro Future ASTROGATOR OSCILLOSCOPE / ANALOG BEAM // ROTATING retro-oscilloscope: a circular dark green CRT face with a green rim, crosshairs, and a glowing pale green closed waveform. Forty-eight points form a ring whose radius is distorted by live audio time-domain samples; pulse energy increases the distortion scale. Despite the overlay, its angular phase does not advance in this mode. Drawing requires an initialized audio analyser.
Military Space DRADIS TACTICAL COMBAT CORE / CONDITION ONE // ARMED warp-core: the same blue/cyan chamber, orange injectors, central glow, 14 coils, and traveling particles used by Starfleet. The title and overlay provide the military identity; the core renderer contains no dedicated DRADIS or tactical geometry.
Deep Space GRAVITY SINGULARITY CORE / EVENT HORIZON // LOCKED singularity-core: a flattened elliptical indigo/blue accretion glow behind a small black circular event horizon, outlined in indigo. Pulses change disk opacity and the event horizon's halo strength. Disk and sphere sizes remain fixed. The disk has a phase-based rotation transform, but its phase does not advance in this mode, so it does not continuously rotate.
Outlaw / Frontier MODIFIED SUB-LIGHT REACTOR / KINETIC THRUSTERS // PRIMED warp-core: the same Starfleet-style blue/cyan chamber animation, including orange injectors, pulsing central glow, 14 coils, and plasma particles. There is no separate sub-light reactor or thruster animation.
Space Stations CENTRIFUGAL ROTATION CORE / STATION ROTOR // DOCKED industrial-reactor: the same amber glow, dark housing, warning-band rectangles, and nine coil clamps as Industrial Space. Pulses change glow size and coil illumination. Despite its title, no centrifugal rotor or station rotation is drawn.
Comedy / Adventure IMPROBABILITY CORE / REALITY FIELD // SHIFTING warp-core: the same Starfleet-style blue/cyan chamber, orange injectors, 14 coils, central glow, and traveling particles. There is no dedicated improbability distortion or shifting reality animation.

Shared behavior and implementation details

  • Ten themes use six renderers. Starfleet, Military, Outlaw, and Comedy share warp-core. Industrial and Space Stations share industrial-reactor. Whoniverse, Bioships, Retro Future, and Deep Space each select one of the other four renderers.
  • Universe selection chooses the drawing. switchUniverse applies the universe's theme class, updates the card text, and calls visualizer.setMode(...). Selecting a ship/room preset changes sound parameters but does not select another core renderer. Starfleet's TNG, Voyager, Defiant, DS9, TOS, and NX preset theme values do not produce distinct core drawings in the current settings-page wiring.
  • Most pulse responses come from a synth callback. Each WarpCoreSynth pulse resets visual pulseEnergy to 1.0 and adds six particles at the reaction center. Energy decays by a factor of 0.94 per animation frame, down to a floor of 0.15. The callback receives pulse phase and duration, but the core visualizer does not use either value to shape the flash. BPM affects callback timing; the visual flash does not reproduce each preset's detailed audio envelope.
  • Only the retro waveform directly samples the audio signal. Its ring deformation uses the analyser's time-domain data. The other core drawings use pulse energy and/or procedural particle movement rather than measured audio amplitude.
  • The TARDIS owns the only advancing phase. rotorPhase starts at zero and advances by 0.038 per frame only inside renderTimeRotor(). Bio-heart breathing/vein rotation, retro waveform orientation, and singularity disk rotation read that same value without advancing it. Switching away from the TARDIS preserves its last phase, leaving those other renderers at a fixed phase until TARDIS mode advances it again.
  • Animation continues independently of master playback. The visualizer starts a recurring requestAnimationFrame loop at initialization. When synth pulses stop, energy settles to its minimum. Warp particles and TARDIS travel continue, while the pulse-only reactor/heart/singularity effects settle. The retro drawing depends on analyser availability and data.
  • Particles are shared, but only two modes draw them. The initial pool contains 36 particles. Warp-core and time-rotor modes move, recycle, and trim them. Other modes still receive pulse-created particles through the shared callback but do not render or trim that pool. setMode only changes the mode; it does not reset particles, energy, or phase.
  • Core colors are defined in JavaScript. The canvas renderers use literal color values rather than reading each theme's CSS palette. Themes sharing a renderer therefore share its internal colors and geometry, even though their surrounding interface styling and labels differ.
  • Motion and decay are frame-based. Particle movement, TARDIS phase advancement, and pulse decay use per-frame increments rather than elapsed time, so their real-time speed can vary with rendering frame rate.

Source references

  • index.html: core visualizer card, title, label, and canvas.
  • js/config.js: UniverseRegistry theme-to-renderer assignments and ship/room presets.
  • js/app.js: visualizer construction, switchUniverse, title map, selectPreset, and visualizer initialization.
  • js/visualizer.js: pulse callback, mode selection, render loop, particle handling, and all six core renderers.
  • js/audio.js: WarpCoreSynth.startPulseLoop() and scheduleNextPulse() supply pulse timing.
  • css/style.css: shared canvas wrapper and 240px core wrapper height.

This is an inventory of existing behavior. No application code changes or proposed redesigns are included.