Replay fixes (#17)

Fixes to work with our game.
Replay fixes and improvements.
Removed shape names (save memory).
B3_DEFAULT_CATEGORY_BITS  is now UINT64_MAX to make selection easier.
This commit is contained in:
Erin Catto 2026-06-26 21:10:10 -07:00 • committed by GitHub
commit 0c8ef46931
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 5653 additions and 3853 deletions

View file

@ -79,6 +79,10 @@ struct SampleContext
bool enableShadows = true;
bool enableGtao = true;
// View-only: treat simulation +Z as up when drawing. Does not touch the
// simulation. The frame loop hands this to the camera's render transform.
bool viewZUp = false;
float sunStrength = 1.0f;
int debugView = 0;
@ -115,6 +119,25 @@ public:
return true;
}
// Width of the right info panel in em. The bottom drawer clears to the same width. A sample that
// hosts heavier content there, such as the replay viewer's detail pane, can widen it.
virtual float InfoPanelWidthEm() const;
// Bounds the Frame shortcut should fit when the selection is not a body, e.g. a recorded query.
// Takes priority over FocusBody so an explicit selection wins over a hovered body. Returns false
// by default, leaving the body and whole-scene paths in charge.
virtual bool FocusBounds( b3AABB* bounds );
// Body the Frame shortcut should fit. Defaults to whatever the cursor is over.
// The replay viewer overrides this to fit its persistent selection instead, so
// framing works regardless of where the cursor sits.
virtual b3BodyId FocusBody() const;
// Frame shortcut with nothing selected: fit the whole scene. Defaults to the live world bounds.
// The replay viewer overrides this to fit the recording, whose world is player-owned and separate
// from the empty base world.
virtual void FocusHome();
// Arm recording on the live world, snapshotting it as the seed so capture can begin at any
// step boundary. Stop writes the file named by the context and frees the buffer.
void StartRecording();