Skip to main content

EditorApp

Struct EditorApp 

Source
pub struct EditorApp {
Show 16 fields camera: Arc<Mutex<EditorCamera>>, editor_state: Arc<Mutex<EditorState>>, command_history: Arc<Mutex<CommandHistory>>, log_handle: Arc<Mutex<Vec<LogEntry>>>, shell: Option<Arc<Mutex<Box<dyn EditorShell>>>>, overlay: Option<Arc<Mutex<Box<dyn EditorOverlay>>>>, raw_window: Option<Arc<Window>>, monitors: Option<MonitorRegistry>, agent_registry: Option<Arc<Mutex<AgentRegistry>>>, dcc_context: Option<Arc<RwLock<DccContext>>>, last_view_info: Option<ViewInfo>, input: InputState, wireframe_enabled: bool, last_frame_time: Instant, viewport_override: EditorViewportOverride, project_vfs: Option<Arc<Mutex<ProjectVfs>>>,
}

Fields§

§camera: Arc<Mutex<EditorCamera>>§editor_state: Arc<Mutex<EditorState>>§command_history: Arc<Mutex<CommandHistory>>§log_handle: Arc<Mutex<Vec<LogEntry>>>§shell: Option<Arc<Mutex<Box<dyn EditorShell>>>>§overlay: Option<Arc<Mutex<Box<dyn EditorOverlay>>>>§raw_window: Option<Arc<Window>>

Cached Arc<winit::window::Window> retrieved from services in setup(). Needed because the overlay’s begin_frame and handle_window_event both expect a winit window reference.

§monitors: Option<MonitorRegistry>

Live monitor handle exposed by the engine (Phase 2.1). Cloned in setup from the ServiceRegistry; queried each frame to push CPU/GPU load, VRAM, draw calls and triangles into EditorState::status.

§agent_registry: Option<Arc<Mutex<AgentRegistry>>>

Live agent registry (Phase 2.3). Used by the Control Plane workspace to enumerate agents instead of the previous mock list.

§dcc_context: Option<Arc<RwLock<DccContext>>>

DCC context handle (Phase 2.2). Locked each frame for the Control Plane summary bar — exposes mode, budget multiplier, hardware load.

§last_view_info: Option<ViewInfo>

View info computed in before_agents and re-used by after_agents for gizmo rendering.

§input: InputState§wireframe_enabled: bool

Whether the wireframe debug overlay is on. Toggled from the command palette (“Toggle Wireframe”) and pushed into the shared WireframeConfig each frame in before_agents.

§last_frame_time: Instant§viewport_override: EditorViewportOverride

Editor viewport override — read by RenderFlow as fallback when no active scene Camera exists (i.e. Editing mode). Updated each frame in before_agents from the editor’s free camera.

§project_vfs: Option<Arc<Mutex<ProjectVfs>>>

Project-scoped VFS — instantiated in setup once the project path resolves. All scene I/O, asset enumeration and hot-reload routes through this. None when the editor was launched without a project (rare; the hub always passes --project).

Implementations§

Source§

impl EditorApp

Source

fn cache_services(&mut self, runtime: &Runtime)

Source

fn scene_layout() -> DockTree

Default Scene arrangement: hierarchy left, inspector right, viewport in the middle, assets and console sharing a dock below it.

Expressed as a sequence of drops because that is exactly what the user would do by hand — which keeps the default honest about what the dock can express.

Source

fn control_plane_layout() -> DockTree

Control Plane is a single full-bleed workspace. The hierarchy and the bottom dock used to stay on screen here with nothing to show, because the old shell could only hide one slot.

Source

fn register_panels(&mut self, runtime: &Runtime)

Source

fn open_cli_project(&mut self, world: &mut GameWorld)

Source

fn tick_state(&mut self, world: &mut GameWorld)

Trait Implementations§

Source§

impl AgentProvider for EditorApp

Source§

fn register_agents(&self, dcc: &DccService, runtime: &mut Runtime)

Register agents with the DCC service. Read more
Source§

impl EngineApp for EditorApp

Source§

fn window_config() -> WindowConfig

Returns the window configuration for the application.
Source§

fn new() -> Self

Creates a new instance of the application.
Source§

fn setup(&mut self, world: &mut GameWorld, runtime: &Runtime)

Called once during engine initialization to set up the game world.
Source§

fn update(&mut self, world: &mut GameWorld, inputs: &[InputEvent])

Called every frame to update game logic.
Source§

fn on_shutdown(&mut self)

Called during shutdown to clean up application resources.
Source§

fn intercept_window_event( &mut self, event: &dyn Any, _window: &dyn KhoraWindow, ) -> bool

Optional: intercept a raw window event before the engine translates it into an [InputEvent]. Return true if the event was consumed (e.g., by an egui overlay) and should NOT be forwarded to game logic. Read more
Source§

fn before_frame( &mut self, _world: &mut GameWorld, runtime: &Runtime, window: &dyn KhoraWindow, )

Optional: called once per frame BEFORE update. Use to begin a UI overlay frame (e.g., egui::Context::begin_frame) and render shell chrome (menus, docks, panels) that produces UI commands.
Source§

fn before_agents(&mut self, world: &mut GameWorld, runtime: &Runtime)

Optional: called after the renderer’s begin_frame and before the scheduler dispatches agents. Use to switch the renderer to an offscreen viewport target (e.g., set_render_to_viewport(true)).
Source§

fn after_agents(&mut self, _world: &mut GameWorld, runtime: &Runtime)

Optional: called after agent execution and submit_frame_graph, but BEFORE the renderer’s end_frame. Use to render gizmos to the offscreen viewport, switch back to the swapchain (set_render_to_viewport(false)), and present a UI overlay (render_overlay).
Source§

impl PhaseProvider for EditorApp

Source§

fn custom_phases(&self) -> Vec<ExecutionPhase>

Returns additional phases to insert into the scheduler’s phase order.
Source§

fn removed_phases(&self) -> Vec<ExecutionPhase>

Returns phases to remove from the default order.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AppLifecycle for T
where T: ?Sized,

§

fn on_start(&mut self, ctx: &mut dyn AppContext)

Called once after the backend is up but before the first update. Apps install their theme / fonts here.
§

fn on_exit(&mut self)

Called once when the window is closing. Persist state here.
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a reference to the inner value as &dyn Any.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(value: T, _simd: S) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,