Play from beginning if on last frame
This commit is contained in:
parent
9058ed4989
commit
b3a05944e9
|
|
@ -4267,6 +4267,9 @@ window.addEventListener("keydown", (e) => {
|
||||||
function playPause() {
|
function playPause() {
|
||||||
playing = !playing;
|
playing = !playing;
|
||||||
if (playing) {
|
if (playing) {
|
||||||
|
if (context.activeObject.currentFrameNum >= context.activeObject.maxFrame - 1) {
|
||||||
|
context.activeObject.setFrameNum(0);
|
||||||
|
}
|
||||||
for (let audioLayer of context.activeObject.audioLayers) {
|
for (let audioLayer of context.activeObject.audioLayers) {
|
||||||
if (audioLayer.audible) {
|
if (audioLayer.audible) {
|
||||||
for (let i in audioLayer.sounds) {
|
for (let i in audioLayer.sounds) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue