# Vision Cycling Modes in Cockpit Mode: A Complete Guide to God's Eye View Visual Styles

> Explore God's Eye View's five vision cycling modes in cockpit mode optical crt nvg thermal noir Understand how each mode uses unique map style shaders for enhanced visuals

- Repository: [Bilawal Sidhu/gods-eye-view](https://github.com/bilawalsidhu/gods-eye-view)
- Tags: how-to-guide
- Published: 2026-09-09

---

**God's Eye View provides five distinct vision cycling modes in cockpit mode: optical, crt, nvg, thermal, and noir, each mapped to specific map-style shaders defined in the source code.**

The cockpit interface in the `bilawalsidhu/gods-eye-view` repository offers pilots a tactical advantage through visual feedback systems. Understanding how these vision cycling modes function requires examining the underlying policy definitions and UI controller logic that manage the display pipeline.

## The Five Vision Cycling Modes

The cockpit vision system maintains a frozen array of exactly five visual styles. These modes are defined in [`src/cockpitVisionPolicy.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/cockpitVisionPolicy.js) and represent the complete set of available options for the pilot.

### Optical Mode

**Optical** serves as the default "real-world" view without special shader intensity. This mode inherits the normal map style and provides unfiltered visual feedback. When the cockpit initializes, it defaults to this mode before any user cycling occurs.

### CRT Mode

**CRT** applies a retro computer-screen aesthetic to the cockpit view. This mode maps to the `retro` style defined in [`src/styles/retro.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/styles/retro.js), simulating vintage monitor phosphor glow and scanline effects for a tactical computer interface feel.

### NVG Mode

**NVG** (Night Vision Goggles) provides a surveillance-grade night-vision effect. This mode activates the `surveillance` style from [`src/styles/surveillance.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/styles/surveillance.js), applying green-tinted light amplification shaders suitable for low-light operational environments.

### Thermal Mode

**Thermal** renders a FLIR-style heat-map view that detects temperature differentials. The mode utilizes the `thermal` style defined in [`src/styles/thermal.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/styles/thermal.js), highlighting heat signatures against cooler backgrounds for target acquisition scenarios.

### Noir Mode

**Noir** creates a high-contrast black-and-white cinematic view. This mode implements the `noir` style from [`src/styles/noir.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/styles/noir.js), stripping color data while enhancing edge definition and shadow detail for stylized reconnaissance.

## How Vision Cycling Works

The vision cycling mechanism relies on two primary components: the static policy definition and the dynamic UI controller.

### The COCKPIT_VISION_MODES Array

In [`src/cockpitVisionPolicy.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/cockpitVisionPolicy.js), the system defines a frozen array named `COCKPIT_VISION_MODES` containing the five valid mode strings. This array acts as the single source of truth for permitted vision states, ensuring type safety and preventing invalid mode injection.

### Cycling Logic in ui.js

The `cycleVisionMode` method in [`src/ui.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/ui.js) handles user input from the **previous**, **current**, and **next** vision-control UI elements. When invoked, this method advances or retreats through the `COCKPIT_VISION_MODES` array index and calls the internal `setVisionMode` method.

The `setVisionMode` implementation normalizes requests via `normalizeCockpitVisionMode` and updates the UI labels to reflect the active visual state.

## Programmatic Control

Developers can manipulate vision cycling modes directly through the cockpit view API:

```javascript
// Cycle forward through modes (optical → crt → nvg → thermal → noir)
cockpitView.cycleVisionMode();

// Cycle backward through the mode array
cockpitView.cycleVisionMode(-1);

// Set a specific mode directly without cycling
cockpitView.setVisionMode('thermal');

```

All programmatic calls route through the normalization layer in [`ui.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/ui.js) (lines 89-101), ensuring that only values present in `COCKPIT_VISION_MODES` are accepted.

## Summary

- **Five fixed modes**: optical, crt, nvg, thermal, and noir constitute the complete vision cycling set in cockpit mode.
- **Policy definition**: [`src/cockpitVisionPolicy.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/cockpitVisionPolicy.js) stores valid modes in the frozen `COCKPIT_VISION_MODES` array.
- **Style mapping**: Each mode (except optical) maps to a dedicated style file in `src/styles/` (retro.js, surveillance.js, thermal.js, noir.js).
- **UI control**: [`src/ui.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/ui.js) implements `cycleVisionMode()` for sequential navigation and `setVisionMode()` for direct access.
- **Normalization**: All mode changes pass through validation logic to ensure only defined vision cycling modes are rendered.

## Frequently Asked Questions

### How many vision cycling modes are available in cockpit mode?

God's Eye View implements exactly five vision cycling modes in cockpit mode. The system enforces this limitation through the frozen `COCKPIT_VISION_MODES` array in [`src/cockpitVisionPolicy.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/cockpitVisionPolicy.js), preventing extension or modification of available visual styles at runtime.

### What is the default vision mode when entering cockpit view?

**Optical** mode serves as the default state. This mode applies no special shader intensity and inherits the standard map style, providing an unfiltered real-world view immediately upon cockpit initialization.

### Can I jump directly to thermal or night vision without cycling through all modes?

Yes. While the UI provides previous/next buttons for cycling, the `setVisionMode()` method accepts string arguments like `'thermal'` or `'nvg'` to switch directly to any valid mode. This approach bypasses the sequential cycling logic in `cycleVisionMode()` and updates the display immediately.

### Where are the visual effects for each mode defined?

Each specialized mode maps to a dedicated style implementation in the `src/styles/` directory. CRT uses [`retro.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/retro.js), NVG uses [`surveillance.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/surveillance.js), thermal uses [`thermal.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/thermal.js), and noir uses [`noir.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/noir.js). The optical mode does not load an external style file, instead inheriting the base map rendering pipeline.