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>
18 lines
592 B
TypeScript
18 lines
592 B
TypeScript
/**
|
|
* BabylonJS Editor script component for planets
|
|
* Copy this to your Editor workspace: src/scenes/scripts/PlanetComponent.ts
|
|
*
|
|
* Attach to a mesh to configure planet properties.
|
|
*/
|
|
import { Mesh } from "@babylonjs/core/Meshes/mesh";
|
|
|
|
import { visibleAsNumber, visibleAsString } from "babylonjs-editor-tools";
|
|
|
|
export default class PlanetComponent extends Mesh {
|
|
@visibleAsNumber("Diameter", { min: 10, max: 1000, step: 10 })
|
|
public diameter: number = 100;
|
|
|
|
@visibleAsString("Texture Path", { description: "Path to planet texture" })
|
|
public texturePath: string = "";
|
|
}
|