Fluxion Engine - VS Code Extension
Official Visual Studio Code extension for Fluxion Engine - The powerful Python framework for creating mathematical animations programmatically.
✨ Features
🎨 Code Snippets & Templates
Get instant access to 40+ code snippets for:
- Scene templates (Scene, VoiceOverScene, 3DScene, MovingCameraScene)
- Shapes (Circle, Square, Rectangle, Triangle, Arrow, Dot, Line)
- Animations (Create, Transform, FadeIn/Out, Write, Rotate, Scale)
- Math objects (MathTex, Text, NumberLine, NumberPlane)
- Voice integration for narrated animations
- Complete animation templates
Just type flux in any Python file and explore all available snippets!
🚀 Quickstart Project Generator
Create a new Fluxion project with one command:
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac)
- Type "Fluxion: Create New Project"
- Enter project name and location
- Get a fully structured project with example scenes!
🧠 IntelliSense & API Hints
Intelligent autocomplete for the Fluxion API:
- Class and method suggestions
- Parameter hints
- Inline documentation
- Type definitions
🎬 Run & Preview Panel
Execute and preview animations directly in VS Code:
- Run scenes with keyboard shortcut
Ctrl+Shift+R
- Quality selection (Low, Medium, High, Production)
- Live preview of rendered animations
- Error highlighting in integrated output
- Video/Image preview in side panel
📦 Installation
- Install from VS Code Marketplace: Search for "Fluxion Engine"
- Install Fluxion Engine:
pip install fluxion-engine
- Start creating animations!
🎯 Usage
Creating Your First Animation
Create a new project:
- Press
Ctrl+Shift+P
- Run "Fluxion: Create New Project"
- Open the generated
scenes/example.py
Use snippets for quick coding:
- Type
fluxScene for a basic scene template
- Type
fluxCircle to create a circle
- Type
fluxPlay to animate objects
Run your scene:
- Press
Ctrl+Shift+R or right-click → "Fluxion: Run Current Scene"
- Select quality preset
- Watch the preview appear automatically!
Keyboard Shortcuts
| Shortcut |
Command |
Ctrl+Shift+R |
Run Current Scene |
Ctrl+Shift+P → "Fluxion" |
Show all Fluxion commands |
Available Commands
- Fluxion: Create New Project - Scaffold a new Fluxion project
- Fluxion: Run Current Scene - Render the current Python scene
- Fluxion: Preview Last Render - View recent renders
- Fluxion: Select Quality Preset - Change default quality
- Fluxion: Open Documentation - Open Fluxion docs
⚙️ Configuration
Access settings via File > Preferences > Settings and search for "Fluxion":
- fluxion.executablePath - Path to Fluxion executable (default:
fluxion)
- fluxion.defaultQuality - Default render quality:
low, medium, high, production
- fluxion.autoPreview - Automatically show preview after rendering
- fluxion.previewInEditor - Show preview in VS Code vs external player
- fluxion.additionalFlags - Custom CLI flags (e.g.,
--fps 60 --format gif)
- fluxion.pythonPath - Python interpreter path
📚 Example Snippets
Basic Scene
# Type: fluxScene
from fluxion import *
class MyScene(Scene):
def construct(self):
# Create your animation here
VoiceOver Scene
# Type: fluxVoiceScene
from fluxion import *
class MyVoiceScene(VoiceOverScene):
def construct(self):
self.camera.background_color = "#1a1a1a"
self.speak("Your narration here")
Complete Animation
# Type: fluxTemplate
from fluxion import *
class MyAnimation(Scene):
def construct(self):
self.camera.background_color = "#1a1a1a"
title = Text("My Animation", font_size=56, color=BLUE)
self.play(Write(title))
self.play(title.animate.to_edge(UP))
circle = Circle(radius=1.5, color=YELLOW, fill_opacity=0.7)
self.play(Create(circle))
self.wait(1)
self.play(FadeOut(title), FadeOut(circle))
🐛 Troubleshooting
"Fluxion is not installed"
Make sure Fluxion Engine is installed:
pip install fluxion-engine
"No scenes found in this file"
Ensure your class inherits from Scene, VoiceOverScene, or another Scene type:
class MyScene(Scene): # ✅ Correct
def construct(self):
pass
Preview not showing
- Check the "Fluxion" output channel for errors
- Verify the media file was created in the
media/ folder
- Try manually opening the file from the output message
🤝 Contributing
Found a bug or want to contribute? Visit our GitHub repository.
📜 License
MIT License - see LICENSE for details.
🔗 Resources
Made with ❤️ by The Fluxion Community