Plugin features: - Token-based authentication (user pastes token from website) - Browse and load official levels - Browse, load, and save personal levels - Export current scene as level config JSON - Import level config into Editor scene - Editor script components for game objects (asteroid, ship, planet, etc.) - Floating UI panel for quick access to tools - Camera speed controls for editor navigation Note: Uses public Supabase anon key (same as website client bundle) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| editorScripts | ||
| src | ||
| .gitignore | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Space Game BabylonJS Editor Plugin
Export BabylonJS Editor scenes to Space Game LevelConfig format.
Installation
-
Build the plugin:
cd bjsEditorPlugin npm install npm run build -
Install in BabylonJS Editor:
- Open BabylonJS Editor
- Edit → Preferences → Plugins
- Click "Add" and select this folder
- Apply and restart Editor
Usage
- Create a workspace in BabylonJS Editor
- Copy the script components from
editorScripts/to your workspace'ssrc/scenes/folder - Place meshes in your scene and attach the appropriate scripts:
AsteroidComponent- for asteroidsShipComponent- for player spawn pointSunComponent- for the sunPlanetComponent- for planetsTargetComponent- for orbit/movement targets
- Configure properties in the Inspector panel
- Space Game → Export Level Config...
Script Components
The editorScripts/ folder contains TypeScript components to use in your Editor workspace.
These expose game-specific properties (velocities, targets, etc.) in the Inspector.
Plugin Menu
- Export Level Config... - Downloads level.json file
- Export to Clipboard - Copies JSON to clipboard
Development
npm run watch # Watch mode for development
npm run build # Production build
Debug in Editor: CTRL+ALT+i to open DevTools, F5 to reload plugin.