Desktop Editor

The MathViz Desktop Editor is a native application for writing MathViz code with syntax highlighting, live preview, and integrated rendering. Built with Tauri for a fast, lightweight experience across Windows, macOS, and Linux.

Beta Software

The desktop editor is currently in beta. Some features may be incomplete or change in future releases.

Installation

Download

Download the latest release for your platform:

Build from Source

To build the editor from source, you need Node.js and Rust installed:

Shell
# Clone the repository
git clone https://github.com/CyberSnakeH/MathViz.git
cd MathViz/editor

# Install dependencies
npm install

# Run in development mode
npm run tauri dev

# Build for production
npm run tauri build

Interface Overview

The editor interface is divided into several key areas:

MathViz File Edit View Run Help
Explorer
src/
main.mviz
utils.mviz
scenes/
intro.mviz
main.mviz
scene Demo {
fn construct(self) {
let c = Circle()
play(Create(c))
}
}
Preview
Ready MathViz | UTF-8 | LF | Ln 4, Col 12

Layout Components

Code Editor

The code editor provides a modern editing experience with features designed for MathViz development.

Syntax Highlighting

Full syntax highlighting for MathViz code using the Tokyo Night color scheme:

Auto-completion

Intelligent code completion suggests relevant items as you type:

Error Highlighting

Syntax and type errors are highlighted inline with descriptive messages. Hover over underlined code to see the error details.

Code Folding

Collapse functions, scenes, and blocks to focus on specific sections. Click the fold icons in the gutter or use keyboard shortcuts.

Live Preview

The preview panel shows a real-time visualization of your animation as you code.

Preview Modes

Mode Description Use Case
Static Shows the final frame of the animation Positioning and layout
Interactive Step through animation frames manually Debugging timing
Live Plays animation automatically on save Rapid iteration

Preview Controls

Preview Quality

Adjust preview quality for faster iteration or higher fidelity:

Settings
Preview Quality:
  Draft    - 480p, 15fps (fastest)
  Standard - 720p, 30fps (balanced)
  High     - 1080p, 60fps (best quality)

Rendering

Export your animations to video files directly from the editor.

Render Dialog

Access via Run > Render or press Ctrl + Shift + R:

Option Values Description
Quality 480p, 720p, 1080p, 1440p, 4K Output resolution
Format MP4, WebM, GIF Output file format
Frame Rate 24, 30, 60 fps Frames per second
Background Black, White, Transparent Background color
Scene All, Specific Which scenes to render

Batch Rendering

Render multiple scenes or files at once:

  1. Select files in the explorer (Ctrl+Click)
  2. Right-click and choose "Add to Render Queue"
  3. Configure settings for each item
  4. Click "Start Batch Render"

Render Progress

Monitor rendering progress in the status bar. Click to open the detailed progress panel showing:

Settings

Access settings via File > Preferences or Ctrl + ,.

Editor Settings

Setting Default Description
Font Family JetBrains Mono Editor font
Font Size 14px Editor font size
Tab Size 4 Spaces per tab
Word Wrap Off Wrap long lines
Line Numbers On Show line numbers
Minimap On Show code minimap
Auto Save After Delay Auto save behavior

Theme Settings

The editor uses the Tokyo Night theme by default. Additional themes:

Preview Settings

Setting Default Description
Preview Quality Standard Preview render quality
Auto Preview On Update preview on save
Preview Delay 500ms Debounce time for auto preview
Show Grid Off Show coordinate grid
Show Axes Off Show X/Y axes

Keyboard Shortcuts

File Operations

Action Windows/Linux macOS
New File Ctrl + N Cmd + N
Open File Ctrl + O Cmd + O
Save Ctrl + S Cmd + S
Save As Ctrl + Shift + S Cmd + Shift + S
Close Tab Ctrl + W Cmd + W

Editing

Action Windows/Linux macOS
Undo Ctrl + Z Cmd + Z
Redo Ctrl + Y Cmd + Shift + Z
Find Ctrl + F Cmd + F
Replace Ctrl + H Cmd + Option + F
Comment Line Ctrl + / Cmd + /
Duplicate Line Ctrl + Shift + D Cmd + Shift + D
Move Line Up Alt + Up Option + Up
Move Line Down Alt + Down Option + Down
Format Document Ctrl + Shift + F Cmd + Shift + F

Navigation

Action Windows/Linux macOS
Go to Line Ctrl + G Cmd + G
Go to File Ctrl + P Cmd + P
Go to Symbol Ctrl + Shift + O Cmd + Shift + O
Command Palette Ctrl + Shift + P Cmd + Shift + P
Toggle Sidebar Ctrl + B Cmd + B

Run & Preview

Action Windows/Linux macOS
Run/Preview F5 F5
Render Ctrl + Shift + R Cmd + Shift + R
Stop Shift + F5 Shift + F5
Toggle Preview Ctrl + Shift + V Cmd + Shift + V
Play/Pause Preview Space (in preview) Space (in preview)

Troubleshooting

Preview Not Updating

Rendering Fails

Performance Issues

Next Steps