Skip to content

Architecture Overview

tsatsuamable edited this page Apr 10, 2026 · 1 revision

Architecture Overview

Nemosyne transforms data into immersive VR experiences through a sophisticated pipeline.

High-Level Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Raw Data   │────▢│   Nemosyne  │────▢│ A-Frame     │────▢│  Display    β”‚
β”‚  (JSON/CSV) β”‚     β”‚   Core      β”‚     β”‚   Scene     β”‚     β”‚  (VR/2D)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
                    β”‚  Datumplane   β”‚
                    β”‚  (3D Space)   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚            β”‚            β”‚
              β–Ό            β–Ό            β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ Layout  β”‚ β”‚ Transformβ”‚ β”‚ Behaviourβ”‚
         β”‚ Engine  β”‚ β”‚ Engine   β”‚ β”‚ Engine   β”‚
         β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Three.js/   β”‚
                    β”‚  WebGL       β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components

1. SceneManager

The central orchestrator that manages the VR scene and component lifecycle.

Responsibilities:

  • Initialize and configure the VR environment
  • Register and manage artefacts
  • Handle data updates and synchronization
  • Coordinate between layout, transform, and behaviour engines

2. Layout Engine

Calculates spatial positions for data elements using 7 algorithms:

  • Grid (O(n))
  • Radial (O(n))
  • Timeline (O(n log n))
  • Spiral (O(n))
  • Tree (O(n))
  • Force (O(nΒ²))
  • Scatter (O(n))

3. Transform Engine

Maps data values to visual properties using a declarative DSL:

  • Scale transforms (linear, log)
  • Color transforms (ordinal, threshold)
  • Position transforms (time, custom functions)

4. Behaviour Engine

Manages interactivity and animations:

  • Hover/click handlers
  • Idle animations
  • Data-update reactions
  • Custom behaviour registration

5. Physics Engine (Optional)

Ammo.js integration for realistic dynamics:

  • Rigid body simulation
  • Collision detection
  • Force fields

Data Flow

[Data Source]
     ↓
[Validation]          ← Schema enforcement
     ↓
[Transformation]      ← Scale, normalize, map
     ↓
[Layout]              ← Calculate positions
     ↓
[Rendering]           ← Create Three.js meshes
     ↓
[Interaction]         ← Events, behaviours, physics
     ↓
[Update]              ← Live data sync

Component Hierarchy

Artefact (abstract base)
β”œβ”€β”€ PrimitiveArtefact
β”‚   β”œβ”€β”€ Crystal
β”‚   β”œβ”€β”€ Sphere
β”‚   β”œβ”€β”€ Pillar
β”‚   └── Ring
β”œβ”€β”€ CompositeArtefact
β”‚   β”œβ”€β”€ Node (with connections)
β”‚   └── Cluster
└── SpecialArtefact
    β”œβ”€β”€ Shrike
    β”œβ”€β”€ Farcaster
    └── TemplarTree

Performance Architecture

Optimizations

  • Instanced Mesh Rendering - Batch identical geometries
  • LOD System - Reduce detail with distance
  • Frustum Culling - Skip off-screen objects
  • Object Pooling - Reuse DOM/WebGL objects
  • Batch Updates - Group transforms into single render call
  • Physics Sleeping - Pause simulation for static objects

Benchmarks

Metric Target Achieved
Nodes 10,000+ βœ… @ 60fps
Memory < 500MB βœ… ~300MB
Load Time < 3s βœ… ~2s

Extension Points

Nemosyne is designed for extensibility:

Custom Artefacts

class MyArtefact extends Artefact {
  createMesh() {
    // Custom Three.js geometry
  }
}
Nemosyne.registerArtefact('my-custom', MyArtefact);

Custom Layouts

Nemosyne.registerLayout('my-layout', {
  calculate: (records, options) => {
    // Return position array
  }
});

Custom Transforms

Nemosyne.registerTransform('my-transform', {
  apply: (value, options) => {
    // Return transformed value
  }
});

Technology Stack

Layer Technology
Rendering Three.js, WebGL 2.0
VR Framework A-Frame
Physics Ammo.js (Bullet)
Layout D3.js algorithms
Build Vite, Rollup
Testing Vitest
Docs VitePress

Further Reading

Clone this wiki locally