Support storage of multiple recordings that can be selected via a recording name.
Move from localStorage to Indexed DB with recordingdb system that interfaces with the recording database and store. This allows us to have more than the 10MB limit of localStorage which would only store about 4-5 recordings.
avatar-recorder
Added recordingName property which specifies where to store the recording in Indexed DB. Defaults to default.
Remove shortcut workflow and promote the Inspector UI instead since it's much easier to use. Remove keyboard shortcuts, file saving, and file uploading features.
Remove avatar-replayer proxies. We had duplicate logic with the replayer (autoPlay, spectator CameraPosition, spectatorPlay).
avatar-replayer
Added recordingName property to specify which recording from Indexed DB to replay. Defaults to default.
Added cameraOverride feature to specify what the camera key in the recording data points to. This was because it was trying to use the active Inspector camera to replay, we can tell it to replay on the original camera.
Added keyboard shortcut q to toggle between the player camera and the spectator camera. This can be toggled at any time during replay, which means I had to always create the spectator camera for it to be available. This will automatically toggle the pink box mesh as well. This gives us three cameras to view during replay: Inspector camera, spectator camera (with wasd-controls), and player camera. I didn't use <tab> because the browser would make us lose focus on the canvas and start tabbing between bookmarks toolbar.
Add autoPlay to avatar-replayer so we can control if it starts playing immediately when set on the scene.
Allow spectator camera to fly with wasd-controls.
Change replayRecordingFromSource to try to fetch recordings in this order: query parameter pointing with recording name to Indexed DB, query parameter pointing to URL, src property pointing to URL, recordingName property pointing to Indexed DB.
Allow recording query parameter on top of avatar-recording query parameter which the name I found awkward.
Use three.js for the pink box mesh. Don't create entities because they would pop up in the Inspector and have a greater chance of impacting the scene with their presence.
miscellaneous
Added googly eyes to the pink box mesh during spectator mode.
Fix tests.
When motion-capture-replayer is detached, then make sure we remove its gamepad metadata from the replayer system so we don't have duplicate gamepads on subsequent replays. Fixes if we try to replay a recording more than once after stopping.
Changes Proposed
Overall
recordingdb
system that interfaces with the recording database and store. This allows us to have more than the 10MB limit of localStorage which would only store about 4-5 recordings.avatar-recorder
recordingName
property which specifies where to store the recording in Indexed DB. Defaults todefault
.avatar-replayer
proxies. We had duplicate logic with the replayer (autoPlay, spectator CameraPosition, spectatorPlay).avatar-replayer
recordingName
property to specify which recording from Indexed DB to replay. Defaults todefault
.cameraOverride
feature to specify what thecamera
key in the recording data points to. This was because it was trying to use the active Inspector camera to replay, we can tell it to replay on the original camera.q
to toggle between the player camera and the spectator camera. This can be toggled at any time during replay, which means I had to always create the spectator camera for it to be available. This will automatically toggle the pink box mesh as well. This gives us three cameras to view during replay: Inspector camera, spectator camera (with wasd-controls), and player camera. I didn't use<tab>
because the browser would make us lose focus on the canvas and start tabbing between bookmarks toolbar.autoPlay
to avatar-replayer so we can control if it starts playing immediately when set on the scene.replayRecordingFromSource
to try to fetch recordings in this order: query parameter pointing with recording name to Indexed DB, query parameter pointing to URL,src
property pointing to URL,recordingName
property pointing to Indexed DB.recording
query parameter on top ofavatar-recording
query parameter which the name I found awkward.miscellaneous