Skip to content

Commit 8174168

Browse files
author
Julien Poulton
committed
Merge branch 'frame-zero-animated-in-demo' into 'master'
[SDK][FIX] frame zero animated in the demo See merge request codingame/game-engine!137
2 parents 57f5dc8 + 45907bd commit 8174168

File tree

1 file changed

+5
-1
lines changed
  • engine/core/src/main/resources/view/core

1 file changed

+5
-1
lines changed

engine/core/src/main/resources/view/core/Drawer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,11 @@ export class Drawer {
319319

320320
if (scope.updateTime >= updateInterval) {
321321
scope.updateTime -= updateInterval
322-
this.progress = unlerp(0, frameInterval, scope.frameTime)
322+
if (this.currentFrame === 0) {
323+
this.progress = 1
324+
} else {
325+
this.progress = unlerp(0, frameInterval, scope.frameTime)
326+
}
323327
this.updateScene(this.scope, this.question, this.frames, this.currentFrame, this.progress, 1, this.reasons[this.currentFrame], true)
324328
}
325329

0 commit comments

Comments
 (0)