mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Stories: a tap pauses a story whose camera move stopped on the press
A camera move the scene drives frame by frame (an authored move, or a flight resumed partway) stops the run on pointerdown, so the story read as stopped when the tap ended and the tap played it again. The tap now goes by whether the story was playing when it began.
This commit is contained in:
1 parent
8f2155d6c7
commit
807e872731
2 files changed
+32
-1
No files matched your search
@@ -743,8 +743,13 @@ export function createStoriesController({
|
||||
// the picked story; on a phone, touching the map drops the context sheet
|
||||
// back to its peek.
|
||||
let downAt = null;
|
||||
// Whether the story was playing when the tap began: a camera move the
|
||||
// scene drives frame by frame stops on the press itself, before the tap
|
||||
// ends, and that tap still means pause.
|
||||
let playingAtDown = false;
|
||||
const onDown = (e) => {
|
||||
downAt = [e.clientX, e.clientY];
|
||||
playingAtDown = store.playback.playing;
|
||||
if (store.mode === 'story' && innerWidth <= 720 && store.sheet !== 'peek')
|
||||
store.sheet = 'peek';
|
||||
};
|
||||
@@ -758,7 +763,7 @@ export function createStoriesController({
|
||||
return;
|
||||
}
|
||||
if (store.mode !== 'story' || !player) return;
|
||||
if (store.playback.playing) {
|
||||
if (playingAtDown || store.playback.playing) {
|
||||
player.pause();
|
||||
store.bigPlay = true;
|
||||
} else player.play();
|
||||
|
||||
Reference in new issue
Block a user