Skip to content

esengine/nova-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Nova Editor

Nova Editor Logo

Next-generation visual editor for NovaECS game framework ไธ‹ไธ€ไปฃNovaECSๆธธๆˆๆก†ๆžถๅฏ่ง†ๅŒ–็ผ–่พ‘ๅ™จ

License: MIT TypeScript React NovaECS

English | ไธญๆ–‡


English

โœจ Features

  • ๐ŸŽจ Modern UI: Built with Ant Design and React 18, featuring a dark theme optimized for game development
  • ๐Ÿ—๏ธ Modular Architecture: Clean separation of concerns with TypeScript for maximum maintainability
  • ๐ŸŽฎ 3D Scene Editor: Integrated Three.js viewport with intuitive camera controls and gizmo manipulation
  • ๐Ÿ“ Code Editor: Monaco Editor with full TypeScript support, IntelliSense, and syntax highlighting
  • ๐Ÿ”ง Component Inspector: Visual component editing with real-time property updates and type-safe validation
  • ๐Ÿ“ Asset Management: Comprehensive asset browser with drag-and-drop import and preview capabilities
  • ๐ŸŽฏ ECS Integration: Seamless integration with NovaECS framework for entity-component-system development
  • โšก Real-time Updates: Live synchronization between editor UI and game world state
  • ๐Ÿ”„ Undo/Redo System: Complete command history with granular operation tracking
  • ๐ŸŽจ Customizable Layout: Draggable and resizable panels with persistent workspace configuration

๐Ÿš€ Quick Start

Prerequisites

  • Node.js >= 16.0.0
  • npm >= 7.0.0

Installation

# Clone the repository
git clone https://github.com/esengine/nova-editor.git
cd nova-editor

# Install dependencies
npm install

# Start development server
npm run dev

The editor will open at http://localhost:3000

Development Scripts

# Development mode with hot reload
npm run dev

# Build for production
npm run build

# Run tests
npm run test

# Run tests with coverage
npm run test:coverage

# Lint code
npm run lint

# Fix linting issues
npm run lint:fix

# Format code
npm run format

# Generate documentation
npm run docs

๐Ÿ—๏ธ Architecture

Nova Editor
โ”œโ”€โ”€ Core (ๆ ธๅฟƒๅฑ‚)
โ”‚   โ”œโ”€โ”€ EditorWorld - Extended NovaECS World
โ”‚   โ”œโ”€โ”€ EditorEvents - Event system integration
โ”‚   โ””โ”€โ”€ EditorStoreIntegration - State synchronization
โ”œโ”€โ”€ Editor Panels (็ผ–่พ‘ๅ™จ้ขๆฟ)
โ”‚   โ”œโ”€โ”€ HierarchyPanel - Entity tree view
โ”‚   โ”œโ”€โ”€ InspectorPanel - Component property editor
โ”‚   โ”œโ”€โ”€ SceneViewPanel - 3D viewport
โ”‚   โ””โ”€โ”€ AssetBrowserPanel - Asset management
โ”œโ”€โ”€ Render System (ๆธฒๆŸ“็ณป็ปŸ)
โ”‚   โ”œโ”€โ”€ Three.js Integration - 3D scene rendering
โ”‚   โ”œโ”€โ”€ Gizmo System - Transform manipulation
โ”‚   โ””โ”€โ”€ Debug Visualizer - Development aids
โ”œโ”€โ”€ State Management (็Šถๆ€็ฎก็†)
โ”‚   โ”œโ”€โ”€ Zustand Store - Global editor state
โ”‚   โ”œโ”€โ”€ Immer Integration - Immutable updates
โ”‚   โ””โ”€โ”€ Real-time Sync - ECS world synchronization
โ””โ”€โ”€ Extensions (ๆ‰ฉๅฑ•็ณป็ปŸ)
    โ”œโ”€โ”€ Plugin Architecture - Extensible functionality
    โ”œโ”€โ”€ Custom Components - User-defined components
    โ””โ”€โ”€ Theme System - Customizable appearance

๐Ÿ› ๏ธ Technology Stack

Core Framework

  • React 18 - Modern React with Concurrent Features and Suspense
  • TypeScript 5.5 - Type-safe development with strict mode enabled
  • Vite 5 - Fast build tool with SWC for optimal performance

UI & Components

  • Ant Design 5 - Enterprise-class UI design language with dark theme
  • React DnD - Drag and drop functionality for intuitive interactions
  • React Grid Layout - Draggable and resizable panel system

State Management

  • Zustand - Lightweight state management with TypeScript support
  • Immer - Immutable state updates with structural sharing

3D Graphics & Rendering

  • Three.js - Industry-standard 3D graphics library
  • React Three Fiber - React renderer for Three.js with declarative API
  • React Three Drei - Useful helpers and abstractions

Code Editor

  • Monaco Editor - VS Code editor experience in the browser
  • Prism.js - Syntax highlighting for various languages

ECS Integration

  • NovaECS - High-performance Entity-Component-System framework
  • Custom EditorWorld - Extended World class with editor-specific features

Testing & Quality

  • Vitest - Fast unit test framework with native TypeScript support
  • React Testing Library - Simple and complete testing utilities
  • ESLint + Prettier - Code quality and formatting

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ components/          # Reusable UI components
โ”‚   โ””โ”€โ”€ panels/         # Editor panel components
โ”œโ”€โ”€ ecs/                # NovaECS integration
โ”‚   โ”œโ”€โ”€ EditorWorld.ts  # Extended World class
โ”‚   โ”œโ”€โ”€ EditorEvents.ts # Event system
โ”‚   โ””โ”€โ”€ EditorStoreIntegration.ts
โ”œโ”€โ”€ hooks/              # Custom React hooks
โ”œโ”€โ”€ stores/             # Zustand state management
โ”œโ”€โ”€ types/              # TypeScript type definitions
โ”œโ”€โ”€ utils/              # Utility functions
โ””โ”€โ”€ test/               # Test utilities and setup

๐ŸŽฏ Current Features

โœ… Implemented

  • HierarchyPanel - Entity tree view with search and selection
  • InspectorPanel - Component property editor with type-safe inputs
  • SceneViewPanel - Basic 3D viewport with Three.js integration
  • EditorWorld - Extended NovaECS World with editor features
  • State Management - Zustand store with Immer integration
  • Real-time Sync - Bidirectional synchronization between UI and ECS
  • Dark Theme - Professional dark theme optimized for development

๐Ÿšง In Development

  • Gizmo System - 3D transform manipulation handles
  • Asset Browser - File management and import system
  • Undo/Redo - Command pattern implementation
  • Plugin System - Extensible architecture for custom tools

๐Ÿ“‹ Planned

  • Physics Debug - Visual physics debugging tools
  • Animation Editor - Timeline-based animation system
  • Material Editor - Visual shader and material editing
  • Build System - Project packaging and deployment

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes with tests
  4. Run quality checks: npm run lint && npm test
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Submit a pull request

๐Ÿ“– Documentation

๐Ÿ“„ License

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

๐Ÿ”— Related Projects


ไธญๆ–‡

โœจ ็‰นๆ€ง

  • ๐ŸŽจ ็ŽฐไปฃๅŒ–UI: ๅŸบไบŽAnt Designๅ’ŒReact 18ๆž„ๅปบ๏ผŒ้‡‡็”จไธบๆธธๆˆๅผ€ๅ‘ไผ˜ๅŒ–็š„ๆทฑ่‰ฒไธป้ข˜
  • ๐Ÿ—๏ธ ๆจกๅ—ๅŒ–ๆžถๆž„: TypeScriptๅฎž็Žฐ็š„ๆธ…ๆ™ฐๅ…ณๆณจ็‚นๅˆ†็ฆป๏ผŒ็กฎไฟๆœ€ๅคงๅฏ็ปดๆŠคๆ€ง
  • ๐ŸŽฎ 3Dๅœบๆ™ฏ็ผ–่พ‘ๅ™จ: ้›†ๆˆThree.js่ง†ๅฃ๏ผŒๅ…ทๆœ‰็›ด่ง‚็š„็›ธๆœบๆŽงๅˆถๅ’Œๆ“ไฝœๆ‰‹ๆŸ„
  • ๐Ÿ“ ไปฃ็ ็ผ–่พ‘ๅ™จ: Monaco็ผ–่พ‘ๅ™จ๏ผŒๅฎŒๆ•ด็š„TypeScriptๆ”ฏๆŒใ€ๆ™บ่ƒฝๆ„Ÿ็Ÿฅๅ’Œ่ฏญๆณ•้ซ˜ไบฎ
  • ๐Ÿ”ง ็ป„ไปถๆฃ€ๆŸฅๅ™จ: ๅฏ่ง†ๅŒ–็ป„ไปถ็ผ–่พ‘๏ผŒๅฎžๆ—ถๅฑžๆ€งๆ›ดๆ–ฐๅ’Œ็ฑปๅž‹ๅฎ‰ๅ…จ้ชŒ่ฏ
  • ๐Ÿ“ ่ต„ๆบ็ฎก็†: ๅ…จ้ข็š„่ต„ๆบๆต่งˆๅ™จ๏ผŒๆ”ฏๆŒๆ‹–ๆ‹ฝๅฏผๅ…ฅๅ’Œ้ข„่งˆๅŠŸ่ƒฝ
  • ๐ŸŽฏ ECS้›†ๆˆ: ไธŽNovaECSๆก†ๆžถๆ— ็ผ้›†ๆˆ๏ผŒๆ”ฏๆŒๅฎžไฝ“-็ป„ไปถ-็ณป็ปŸๅผ€ๅ‘
  • โšก ๅฎžๆ—ถๆ›ดๆ–ฐ: ็ผ–่พ‘ๅ™จUIไธŽๆธธๆˆไธ–็•Œ็Šถๆ€็š„ๅฎžๆ—ถๅŒๆญฅ
  • ๐Ÿ”„ ๆ’ค้”€/้‡ๅš็ณป็ปŸ: ๅฎŒๆ•ด็š„ๅ‘ฝไปคๅކๅฒ่ฎฐๅฝ•ๅ’Œ็ป†็ฒ’ๅบฆๆ“ไฝœ่ทŸ่ธช
  • ๐ŸŽจ ๅฏๅฎšๅˆถๅธƒๅฑ€: ๅฏๆ‹–ๆ‹ฝๅ’Œ่ฐƒๆ•ดๅคงๅฐ็š„้ขๆฟ๏ผŒๆŒไน…ๅŒ–ๅทฅไฝœๅŒบ้…็ฝฎ

๐Ÿš€ ๅฟซ้€Ÿๅผ€ๅง‹

ๅ‰็ฝฎ่ฆๆฑ‚

  • Node.js >= 16.0.0
  • npm >= 7.0.0

ๅฎ‰่ฃ…

# ๅ…‹้š†ไป“ๅบ“
git clone https://github.com/esengine/nova-editor.git
cd nova-editor

# ๅฎ‰่ฃ…ไพ่ต–
npm install

# ๅฏๅŠจๅผ€ๅ‘ๆœๅŠกๅ™จ
npm run dev

็ผ–่พ‘ๅ™จๅฐ†ๅœจ http://localhost:3000 ๆ‰“ๅผ€

๐Ÿ’ฌ ๆ”ฏๆŒ

ๅฆ‚ๆžœๆ‚จๅœจไฝฟ็”จ่ฟ‡็จ‹ไธญ้‡ๅˆฐ้—ฎ้ข˜๏ผŒ่ฏท๏ผš

  1. ๆŸฅ็œ‹ ๆ–‡ๆกฃ
  2. ๆœ็ดขๅทฒๆœ‰็š„ Issues
  3. ๅˆ›ๅปบๆ–ฐ็š„ Issue ๆ่ฟฐๆ‚จ็š„้—ฎ้ข˜

๐Ÿ™ ่‡ด่ฐข

ๆ„Ÿ่ฐขๆ‰€ๆœ‰ไธบNova Editor้กน็›ฎๅšๅ‡บ่ดก็Œฎ็š„ๅผ€ๅ‘่€…ๅ’Œ็คพๅŒบๆˆๅ‘˜ใ€‚


Built with โค๏ธ by the esengine team

About

Next-generation visual editor for NovaECS game framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published