Add DirEnv to Orbital-CLI templates #868
No reviewers
Labels
No labels
Context: Bug
Context: Enhancements
Platform: Android
Platform: Linux
Platform: Web
Platform: Windows
Platform: iOS
Platform: macOS
Release
Target: CI
Target: CLI
Target: Dependency
Target: Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SakulFlee/Orbital!868
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/direnv-orbital-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two pieces of data a debug overlay needs that today only exist as a printed log line, or not at all. `FrameTimings` (orbital_ecs_bridge) replaces the runtime's private `TimingAccumulator`. That struct summed the 11 CPU and 3 GPU frame stages and then reset itself every second before printing, so there was no history and nothing an overlay could read. The new resource exposes: - per-stage `last_ms`/`avg_ms`/`min_ms`/`max_ms`, which keep accumulating until `clear()` rather than resetting on each print; - a bounded 240-frame history, per-stage and for whole-frame time; - `try_log()`, which still emits the existing `info!` TIMING line at most once a second. The one-second log window keeps its own totals, so emitting the summary never perturbs what an overlay is showing. The log format is unchanged. min/max are seeded from the first sample of a window rather than starting at 0.0, which would pin `min_ms` at 0 forever since durations are never negative. `clear()` zeroes the derived statistics instead of leaving a stale `avg_ms` behind. `orbital_core::logging` gains an in-memory ring of the last 1024 records (`LogLine { level, target, message }`), readable via `log_buffer()` or `with_log_buffer()`. There was previously no in-memory capture at all: everything went to stdout and `game-N.log`. Two fern quirks shaped the implementation: - A chained `log::Log` sink sees the *decorated* record, because `FormatCallback::finish` rebuilds the record with the formatted args. So the capture happens in the `format` closure instead, which still gets the raw record. - The level filter had to move from the inner chained dispatch to the outer one: fern checks `shallow_enabled` before invoking `format`, so a filter on the inner dispatch would let the buffer capture records the log itself drops. Filtering is equivalent, and the global max level is now the configured one rather than Trace. The Android logger is not fern-based and is not wrapped, so its buffer stays empty; that is called out on `log_buffer()`.