Files
YHH 0d33cf0097 feat(node-editor, blueprint): add group box and math/logic nodes (#438)
* feat(node-editor, blueprint): add group box and math/logic nodes

node-editor:
- Add visual group box for organizing nodes
- Dynamic bounds calculation based on node pin counts
- Groups auto-resize to wrap contained nodes
- Dragging group header moves all nodes together

blueprint:
- Add comprehensive math nodes (modulo, power, sqrt, trig, etc.)
- Add logic nodes (comparison, boolean, select)

docs:
- Update nodes.md with new math and logic nodes
- Add group feature documentation to editor-guide.md

* chore: remove unused debug and test scripts

Remove FBX animation debug scripts that are no longer needed:
- analyze-fbx, debug-*, test-*, verify-*, check-*, compare-*, trace-*, simple-fbx-test

Remove unused kill-dev-server.js from editor-app
2026-01-05 11:23:42 +08:00
..

ESEngine Editor

A cross-platform desktop visual editor built with Tauri 2.x + React 18.

Prerequisites

Before running the editor, ensure you have the following installed:

  • Node.js >= 18.x
  • pnpm >= 10.x
  • Rust >= 1.70 (for Tauri and WASM builds)
  • wasm-pack (for building Rapier2D physics engine)
  • Platform-specific dependencies:
    • Windows: Microsoft Visual Studio C++ Build Tools
    • macOS: Xcode Command Line Tools (xcode-select --install)
    • Linux: See Tauri prerequisites

Installing wasm-pack

# Using cargo
cargo install wasm-pack

# Or using the official installer script (Linux/macOS)
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

Quick Start

1. Clone and Install

git clone https://github.com/esengine/esengine.git
cd esengine
pnpm install

2. Build Rapier2D WASM

The editor depends on Rapier2D physics engine WASM artifacts. First-time setup only requires one command:

pnpm build:rapier2d

This command automatically:

  1. Prepares the Rust project
  2. Builds WASM
  3. Copies artifacts to packages/physics/rapier2d/pkg
  4. Generates TypeScript source code

Note

: Requires Rust and wasm-pack to be installed.

3. Build Editor

From the project root:

pnpm build:editor

4. Run Editor

cd packages/editor/editor-app
pnpm tauri:dev

Available Scripts

Script Description
pnpm build:rapier2d Build Rapier2D WASM (required for first-time setup)
pnpm build:editor Build editor and all dependencies
pnpm tauri:dev Run editor in development mode with hot-reload
pnpm tauri:build Build production application
pnpm build:sdk Build editor-runtime SDK

Project Structure

editor-app/
├── src/                    # React application source
│   ├── components/         # UI components
│   ├── panels/             # Editor panels
│   └── services/           # Core services
├── src-tauri/              # Tauri (Rust) backend
├── public/                 # Static assets
└── scripts/                # Build scripts

Troubleshooting

Rapier2D WASM Build Failed

Error: Could not resolve "../pkg/rapier_wasm2d"

Cause: Missing Rapier2D WASM artifacts.

Solution:

  1. Ensure wasm-pack is installed: cargo install wasm-pack
  2. Run pnpm build:rapier2d
  3. Verify packages/physics/rapier2d/pkg/ directory exists and contains rapier_wasm2d_bg.wasm file

Build Errors

pnpm clean
pnpm install
pnpm build:editor

Rust/Tauri Errors

rustup update

Windows Users Building WASM

The pnpm build:rapier2d script works directly on Windows. If you encounter issues:

  1. Use Git Bash or WSL
  2. Or download pre-built WASM artifacts from Releases

Documentation

License

MIT License