]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wip #6194 @2:00 animation outro, score
authorsoufiane <soufiane@cubedesigners.com>
Fri, 25 Aug 2023 16:35:35 +0000 (18:35 +0200)
committersoufiane <soufiane@cubedesigners.com>
Fri, 25 Aug 2023 16:35:35 +0000 (18:35 +0200)
js/quiz.animations.js
js/quiz.screen.intro.js
js/quiz.screen.outro.js
js/quiz.screens.js

index 4a5a66cfc7018436cb1aacf60488c9e05aa1d307..ee4915ef148cd4c187d398aea27ea1063bc425e2 100644 (file)
@@ -68,7 +68,7 @@ QuizAnimations.prototype = {
         this.quiz.animations.load("RUNNINGMAN_BTN", ".active-screen .runningman", '', true);
     },
 
-    footer: function(activeScreen) {
+    switchValidateContinueButton: function(activeScreen) {
         const $this = this
         gsap.timeline().to(".active-screen .footer-question", {
             opacity: 0,
index 623b42c68f60e5d0a05caabb9df62024493ba6ca..a6677ee3bf2c7a8f4d5044205053130d207205b8 100644 (file)
@@ -28,9 +28,6 @@ QuizScreenIntro.prototype = {
         .to(".active-screen .title-header", {
             y: 0
         })
-        .from("#Ellipse_33_00000130640493289073085310000003655705460857783465_", {
-            drawSVG: 0
-        })
         .to("#start", {
             y: 0,
         },.2)
index 79eb432a1753291ac0bcc0047d7ad8b94b7610f9..6cd50e5c406a8cd883c926ccc6c05617896559c0 100644 (file)
@@ -17,7 +17,7 @@ QuizScreenOutro.prototype = {
         })
     },
 
-    animate: function (percent) {
+    animate: function (score, percent) {
         console.log("percent",percent)
         gsap.to(".active-screen #progress-circle", {drawSVG: 0, duration: 0})
         gsap.timeline({delay: .4})
@@ -32,6 +32,14 @@ QuizScreenOutro.prototype = {
                 duration: 2,
                 ease: "power4.easeIn"
             })
+            .from("#score-counter", {
+                innerText: 0,
+                duration: 2,
+                ease: "power4.easeIn",
+                snap : {
+                    innerText: 1
+                }
+            }, "<")
     },
 
     show: function () {
@@ -50,7 +58,8 @@ QuizScreenOutro.prototype = {
 
         const percent = (score/maxScore) * 100
 
-        this.animate(percent)
+        $("[id^=score-]").text(score)
+        this.animate(score,percent)
 
         reviewList = reviewList.map((c, i) => {
             return {
@@ -63,7 +72,7 @@ QuizScreenOutro.prototype = {
         })
         let $ul = $("#answers-list")
 
-        $("[id^=score-]").text(score)
+        //$("[id^=score-]").text(score)
         $("[id^=maxScore-]").text(maxScore)
 
         //
index 338041bf0675519eff0051ce18e3188812779584..2747d676e438b6f41002eee8b191092bb5731fea 100644 (file)
@@ -69,7 +69,7 @@ QuizScreens.prototype = {
         // Disable form, we don't want the user be able to click on items
         $(form).addClass('disabled');
 
-        this.quiz.animations.footer(activeScreen)
+        this.quiz.animations.switchValidateContinueButton(activeScreen)
 
         let results = review.answersStatus;