Skip to content

gearscrafter/atlas_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Atlas Code

VR Code Editor OpenXR Android NDK Meta Quest

A fully-featured VR code editor for Meta Quest devices, bringing modal editing and multi-panel architecture to immersive development environments.

Features β€’ Demo β€’ Installation β€’ Development β€’ Contributing


Overview

Quest Code Editor is an ambitious VR development environment designed for Meta Quest Pro, Meta Quest 3, and Meta Quest 2 devices. It implements a professional code editing experience in immersive space with Vim-style modal editing, real-time syntax highlighting, file operations, and integrated terminal with command execution.

Current Status: ~85% complete with core features stable and thoroughly tested on Meta Quest Pro and Meta Quest 3.

Features

Core Editor Capabilities

  • Modal Editing System - NORMAL/INSERT/VISUAL modes with full hjkl navigation
  • Multi-Language Syntax Highlighting - C++, Java, Python, Dart, and more
  • Multi-Panel Architecture - Organized layout with resizable floating panels
  • File Operations - Create, read, edit, delete files with persistence
  • Text Rendering - High-quality typography with Skia integration and matrix transformations

VR-Specific Features

  • OpenXR Integration - Cross-platform XR support for Meta Quest devices
  • Spatial Panels - World-locked and hand-relative positioning
  • Modal Input System - Gesture and controller input handling
  • Network Detection - Real-time internet connectivity via JNI/ConnectivityManager
  • Terminal Integration - Execute commands directly in VR environment

Architecture

  • C++ Core - Performance-optimized rendering and event handling
  • Android NDK - Native platform integration
  • JNI Bridges - Seamless Java/C++ interoperability
  • CMake Build System - Cross-platform compilation

Demo

Video Walkthrough

See the editor in action with DevLog videos documenting development progress:

  • Text rendering and coordinate systems
  • Modal editing implementation
  • Panel positioning and spatial anchors
  • Terminal integration and command execution

Watch on YouTube | Read Technical Articles on Medium

Installation

Requirements

Target Devices (Tested & Verified)

  • Meta Quest Pro βœ… Fully tested and verified
  • Meta Quest 3 βœ… Fully tested and verified
  • Meta Quest 2 (compatible)

Build Machine (Tested & Verified)

  • Chip: Apple M1 Pro
  • Memory: 16 GB RAM
  • OS: macOS 26.3.1 (25D2128)
  • Storage: ~20 GB free (SDK, NDK, build artifacts)

Software Requirements

  • Android SDK: API level 34 (target), API level 24+ (minimum)
  • Android NDK: r25 or later
  • CMake: 3.22 or later
  • Gradle: 7.0 or later
  • OpenXR SDK: ovr_openxr_mobile_sdk_78.0

Build Instructions

1. Clone the Repository

git clone https://github.com/yourusername/quest-code-editor.git
cd quest-code-editor

2. Setup OpenXR SDK

The project uses the OpenXR Mobile SDK v78.0. Ensure the SDK is in the correct location:

# Directory structure should be:
meta_sdk/ovr_openxr_mobile_sdk_78.0/
β”œβ”€β”€ OpenXR/
β”œβ”€β”€ Samples/
β”œβ”€β”€ CODE_OF_CONDUCT.md
└── README.md

3. Configure Local Build Environment

Create local.properties with your machine's paths:

# Android SDK path
sdk.dir=/path/to/android-sdk

# Android NDK path (r25+)
ndk.dir=/path/to/android-ndk

# Optional: CMake path
cmake.dir=/usr/local/bin/cmake

4. Build with Gradle

# Clean build (recommended for first build)
./gradlew clean

# Build debug APK (fastest)
./gradlew assembleDebug

# Or build and install directly to connected device
./gradlew installDebug

# Build release APK (optimized)
./gradlew assembleRelease

Build times on Apple M1 Pro:

  • Clean build: ~4-6 minutes (first time)
  • Incremental build: ~1-2 minutes
  • Full release build: ~8-10 minutes

5. Deploy to Device

Option A: Using Gradle (Recommended)

# Connect Meta Quest via USB, enable Developer Mode
./gradlew installDebug

Option B: Using Android Studio

  1. Open the project in Android Studio
  2. Connect Meta Quest device via USB
  3. On Meta Quest: Settings β†’ System β†’ Developer β†’ Enable USB Debugging
  4. Accept USB debugging prompt on headset
  5. Click Run (β–Ά) or Run β†’ Run 'app'

Option C: Manual adb Installation

# Build APK
./gradlew assembleDebug

# List connected devices
adb devices

# Install
adb install app/build/outputs/apk/debug/app-debug.apk

# Force reinstall
adb install -r app/build/outputs/apk/debug/app-debug.apk

# Launch app
adb shell am start -n com.manu.questcodeeditor/.MainActivity

# View logs
adb logcat | grep quest_code_editor

6. Enable Developer Mode

Meta Quest 3:

  1. Put on the headset
  2. Settings β†’ System β†’ Developer β†’ Enable USB Debugging
  3. Accept prompt when device connects to computer

Meta Quest Pro:

  1. Put on the headset
  2. Settings β†’ System β†’ Developer β†’ Enable USB Debugging
  3. Accept security prompt

Verify Connection:

adb devices
# Should show: XXXXXXXXXXXXX    device

Configuration

gradle.properties (Committed to Git)

# SDK/API Configuration
android.minSdkVersion=24
android.targetSdkVersion=34
android.buildToolsVersion=34.0.0

# Support libraries
android.useAndroidX=true
android.enableJetifier=true

# OpenXR SDK location
openxr.sdk.path=../meta_sdk/ovr_openxr_mobile_sdk_78.0

local.properties (Local Machine Only)

# Android SDK path (adjust based on installation location)
sdk.dir=/Users/YOUR_USERNAME/Library/Android/sdk

# Android NDK path (r25+)
ndk.dir=/Users/YOUR_USERNAME/Library/Android/sdk/ndk/25.0.8677664

# Optional: CMake path (if not in system PATH)
cmake.dir=/usr/local/Cellar/cmake/3.27.x/bin

macOS-Specific Setup

For Apple Silicon Macs (M1/Pro/Max):

# Add to ~/.zshrc (or ~/.bash_profile for Intel Macs)
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/ndk/25.0.8677664/bin:$PATH

# Reload shell
source ~/.zshrc

# Verify installations
cmake --version    # Should be 3.22+
gradle --version   # Should be 7.0+
adb --version      # Should work

Development

Build Environment

This project was successfully developed and tested on:

Component Specification
Chip Apple M1 Pro
Memory 16 GB RAM
OS macOS 26.3.1 (25D2128)
Architecture ARM64 (Apple Silicon)
SDK Android SDK API 34
NDK Android NDK r25+
Build System Gradle 7.0+ / CMake 3.22+

All C++ code is compiled with clang++ via CMake, with cross-compilation to ARM64/ARMv8 for Android NDK.

Tested Devices

The application has been thoroughly tested and verified on:

Device Result Notes
Meta Quest Pro βœ… Fully Working Primary development device
Meta Quest 3 βœ… Fully Working All features tested
Meta Quest 2 βœ… Compatible Expected to work (runtime tested)

All testing performed with proper USB debugging enabled and OpenXR validation layers.

Project Structure

quest_code_editor/
β”œβ”€β”€ android-app/              # Android application layer
β”‚   β”œβ”€β”€ app/                  # Main app module
β”‚   β”œβ”€β”€ .gradle/              # Gradle build files
β”‚   └── build/                # Build outputs
β”œβ”€β”€ src/main/cpp/             # C++ source code
β”‚   β”œβ”€β”€ editor/               # Text editing engine
β”‚   β”œβ”€β”€ openxr/               # OpenXR integration
β”‚   β”œβ”€β”€ rendering/            # Graphics and text rendering
β”‚   β”œβ”€β”€ ui/                   # UI panel management
β”‚   β”œβ”€β”€ network/              # Network operations
β”‚   β”œβ”€β”€ parser/               # Syntax highlighting parser
β”‚   └── io/                   # File operations
β”œβ”€β”€ CMakeLists.txt            # CMake build configuration
└── README.md                 # This file

Architecture Overview

Rendering Pipeline

  • Skia Graphics Engine - Vector graphics and text rendering
  • Matrix Transformations - Proper coordinate system handling
  • OpenXR Compositor - Frame composition and timing

Input System

  • Modal Dispatcher - Routes input based on editor mode
  • JNI Connectivity Bridge - Android connectivity status
  • Gesture Recognition - VR controller input handling

File System

  • Persistent Storage - Device file access via Android APIs
  • File Browser - Hierarchical navigation
  • Command Terminal - Execute shell commands with output capture

Building from Source

Compile C++ Core

# From project root
mkdir build && cd build
cmake ..
make

Run Tests

# Unit tests for editor components
ctest

Testing Commands

For local development and testing on your build machine (macOS, Linux, or Windows with appropriate toolchain):

Build & Test Locally

# Clean build
./gradlew clean

# Build debug version
./gradlew assembleDebug

# Build release version (optimized)
./gradlew assembleRelease

# Run tests (if available)
./gradlew test

# Check for build issues without full build
./gradlew check

Android NDK Compilation

# Build with Android NDK (for Quest deployment)
./gradlew build

# Build specific architecture
./gradlew build -Pbuild_arch=arm64-v8a

# Verbose output for debugging
./gradlew build --info

Device Deployment (Meta Quest)

# Connect Quest via USB and enable developer mode
adb devices  # Verify device is connected

# Install debug build
./gradlew installDebug

# View live logs
adb logcat | grep quest_code_editor

# Uninstall from device
./gradlew uninstallDebug

Performance Profiling

# Start CPU profiling (5 seconds)
adb shell am profile start --sampling 1000

# ... run your app ...

# Stop and dump profile
adb shell am profile stop --dump-on-exit

# View results
adb logcat | grep "Profiling"

Development on macOS (Apple Silicon)

When developing on Apple M1/Pro/Max Macs, ensure:

# Verify architecture
uname -m  # Should output: arm64

# CMake for native compilation
cmake --version  # 3.22+

# Clang compiler
clang++ --version  # Should use Apple Clang

# For Android NDK cross-compilation
export ANDROID_NDK_HOME=/path/to/android-ndk-r25
export ANDROID_HOME=/path/to/android-sdk

Key Technologies

Component Technology Version
VR Platform OpenXR 0.1
Graphics Skia Latest
Build System CMake 3.22+
Native Development Android NDK r25+
Android Framework Android API 24+
Font Rendering FreeType 2.x
Compiler Clang (Apple/LLVM) Latest

Usage

Basic Editing

  1. Launch the App - Open Quest Code Editor on your Meta Quest device
  2. Navigation - Use controller to select and position panels
  3. Enter Insert Mode - Press trigger to start typing
  4. Modal Commands - Exit insert mode to execute Vim-style commands

Keyboard Shortcuts (In Insert Mode)

  • ESC - Return to NORMAL mode
  • i - Enter INSERT mode
  • h/j/k/l - Navigate in NORMAL mode
  • :q! - Quit without saving
  • :w - Save current file

Advanced Features

Spatial Panel Management

  • World Lock - Pin panels to world space
  • Hand Relative - Attach panels to hand
  • Pan/Zoom - Adjust panel size and position with gestures

Terminal

  • Open Terminal - Available in file explorer
  • Command Execution - Type shell commands and execute
  • Output Display - Real-time command output rendering

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes with clear commits
  4. Push to your fork: git push origin feature/your-feature
  5. Open a Pull Request with description of changes

Reporting Issues

Found a bug? Please open an issue with:

  • Detailed description of the problem
  • Steps to reproduce
  • Device model and software version
  • Relevant logs or screenshots

Areas for Contribution

  • 🎨 UI/UX improvements and additional themes
  • 🌍 Internationalization and localization
  • πŸ“š Documentation and tutorials
  • πŸ§ͺ Test coverage expansion
  • πŸ› Bug fixes and optimization

Roadmap

Current (v0.0.1)

  • βœ… Modal editing system
  • βœ… Syntax highlighting
  • βœ… File operations
  • βœ… Terminal integration
  • βœ… Network detection

Next

  • Advanced debugging integration
  • Code completion engine
  • Collaborative editing
  • Custom themes
  • Performance profiling tools

Future (v1.0)

  • Python REPL integration
  • AI-assisted code suggestions
  • Visual debugging
  • Extended language support

Technical Articles

I document the development journey on Medium and LinkedIn:

  • Text Rendering Challenges - "FreeType vs Skia: Rendering Text in VR"
  • Coordinate Systems - "OpenXR Spatial Positioning: A Deep Dive"
  • Modal Editing - "Implementing Vim-Style Editing in VR"
  • Architecture - "Building a VR IDE: Multi-Panel Design Patterns"

Read more on Medium | Follow on LinkedIn

Performance

Optimized for Quest 2/3 hardware:

Metric Target Status
Frame Rate 72 FPS βœ… Achieved
Memory Usage <500MB βœ… Optimized
Text Render Time <2ms βœ… Optimized
Startup Time <3s βœ… Optimized

Troubleshooting

Application Crashes on Startup

  • Verify OpenXR SDK is correctly installed
  • Check Android API level compatibility (24+)
  • Enable USB debugging and check device logs: adb logcat

Text Rendering Issues

  • Ensure proper matrix transformations in rendering pipeline
  • Check coordinate system alignment with OpenXR frames
  • Verify Skia font loading and cache

Controller Input Not Responding

  • Verify JNI bridge compilation
  • Check controller pairing in Quest settings
  • Review input dispatcher event routing

Network Detection Failing

  • Ensure app has INTERNET permission in manifest
  • Check ConnectivityManager JNI implementation
  • Verify network is available on device

Performance Tips

  • Close unused panels to reduce render load
  • Use world-locked panels for static content
  • Limit syntax highlighting scope for large files
  • Monitor memory usage in VR settings

License

This project is licensed under the Apache License 2.0 - see LICENSE file for details.

Acknowledgments

  • Meta/Khronos - OpenXR specification and tools
  • Google - Android NDK and development platform
  • Skia Project - Graphics engine
  • Flutter Community - Cross-platform development patterns

Contact & Community


Built with ❀️ for the VR development community

⭐ If you find this project useful, please consider giving it a star!

About

Quest Code Editor is an ambitious VR development environment designed for Meta Quest devices. It implements a professional code editing experience in immersive space with Vim-style modal editing, real-time syntax highlighting, file operations, and integrated terminal with command execution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors