Play from beginning if on last frame

This commit is contained in:
Skyler Lehmkuhl
2025-01-15 18:36:32 -05:00
parent 9058ed4989
commit b3a05944e9
+3
View File
@@ -4267,6 +4267,9 @@ window.addEventListener("keydown", (e) => {
function playPause() {
playing = !playing;
if (playing) {
if (context.activeObject.currentFrameNum >= context.activeObject.maxFrame - 1) {
context.activeObject.setFrameNum(0);
}
for (let audioLayer of context.activeObject.audioLayers) {
if (audioLayer.audible) {
for (let i in audioLayer.sounds) {