LCOV - code coverage report
Current view: top level - modules/script/tweener - tweenList.js (source / functions) Hit Total Coverage
Test: gjs- Code Coverage Lines: 20 53 37.7 %
Date: 2023-09-17 02:39:54 Functions: 4 5 80.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil; -*- */
       2                 :            : // SPDX-License-Identifier: MIT
       3                 :            : // SPDX-FileCopyrightText: 2006-2007 Zeh Fernando and Nate Chatellier
       4                 :            : // SPDX-FileCopyrightText: 2008 litl, LLC.
       5                 :            : 
       6                 :            : /**
       7                 :            :  * The tween list object. Stores all of the properties and information that pertain to individual tweens.
       8                 :            :  *
       9                 :            :  * @author              Nate Chatellier, Zeh Fernando
      10                 :            :  * @version             1.0.4
      11                 :            :  * @private
      12                 :            :  */
      13                 :            : /* exported makePropertiesChain, TweenList */
      14                 :            : /*
      15                 :            : http://code.google.com/p/tweener/
      16                 :            : http://code.google.com/p/tweener/wiki/License
      17                 :            : */
      18                 :            : 
      19                 :            : function TweenList(scope, timeStart, timeComplete,
      20                 :            :     useFrames, transition, transitionParams) {
      21                 :         66 :     this._init(scope, timeStart, timeComplete, useFrames, transition,
      22                 :         33 :         transitionParams);
      23                 :            : }
      24                 :            : 
      25                 :          1 : TweenList.prototype = {
      26                 :          1 :     _init(scope, timeStart, timeComplete,
      27                 :            :         userFrames, transition, transitionParams) {
      28                 :         33 :         this.scope = scope;
      29                 :         33 :         this.timeStart = timeStart;
      30                 :         33 :         this.timeComplete = timeComplete;
      31                 :         33 :         this.userFrames = userFrames;
      32                 :         33 :         this.transition = transition;
      33                 :         33 :         this.transitionParams = transitionParams;
      34                 :            : 
      35                 :            :         /* Other default information */
      36                 :         33 :         this.properties = {};
      37                 :         33 :         this.isPaused = false;
      38                 :         33 :         this.timePaused = undefined;
      39                 :         33 :         this.isCaller = false;
      40                 :         33 :         this.updatesSkipped = 0;
      41                 :         33 :         this.timesCalled = 0;
      42                 :         33 :         this.skipUpdates = 0;
      43                 :         33 :         this.hasStarted = false;
      44                 :            :     },
      45                 :            : 
      46                 :          1 :     clone(omitEvents) {
      47                 :          0 :         var tween = new TweenList(this.scope, this.timeStart, this.timeComplete, this.userFrames,
      48                 :          0 :             this.transition, this.transitionParams);
      49                 :          0 :         tween.properties = [];
      50         [ #  # ]:          0 :         for (let name in this.properties)
      51                 :          0 :             tween.properties[name] = this.properties[name];
      52                 :          0 :         tween.skipUpdates = this.skipUpdates;
      53                 :          0 :         tween.updatesSkipped = this.updatesSkipped;
      54                 :            : 
      55         [ #  # ]:          0 :         if (!omitEvents) {
      56                 :          0 :             tween.onStart = this.onStart;
      57                 :          0 :             tween.onUpdate = this.onUpdate;
      58                 :          0 :             tween.onComplete = this.onComplete;
      59                 :          0 :             tween.onOverwrite = this.onOverwrite;
      60                 :          0 :             tween.onError = this.onError;
      61                 :          0 :             tween.onStartParams = this.onStartParams;
      62                 :          0 :             tween.onUpdateParams = this.onUpdateParams;
      63                 :          0 :             tween.onCompleteParams = this.onCompleteParams;
      64                 :          0 :             tween.onOverwriteParams = this.onOverwriteParams;
      65                 :          0 :             tween.onStartScope = this.onStartScope;
      66                 :          0 :             tween.onUpdateScope = this.onUpdateScope;
      67                 :          0 :             tween.onCompleteScope = this.onCompleteScope;
      68                 :          0 :             tween.onOverwriteScope = this.onOverwriteScope;
      69                 :          0 :             tween.onErrorScope = this.onErrorScope;
      70                 :            :         }
      71                 :          0 :         tween.rounded = this.rounded;
      72                 :          0 :         tween.min = this.min;
      73                 :          0 :         tween.max = this.max;
      74                 :          0 :         tween.isPaused = this.isPaused;
      75                 :          0 :         tween.timePaused = this.timePaused;
      76                 :          0 :         tween.isCaller = this.isCaller;
      77                 :          0 :         tween.count = this.count;
      78                 :          0 :         tween.timesCalled = this.timesCalled;
      79                 :          0 :         tween.waitFrames = this.waitFrames;
      80                 :          0 :         tween.hasStarted = this.hasStarted;
      81                 :            : 
      82                 :          0 :         return tween;
      83                 :            :     },
      84                 :            : };
      85                 :            : 
      86                 :            : function makePropertiesChain(obj) {
      87                 :            :     /* Tweener has a bunch of code here to get all the properties of all
      88                 :            :      * the objects we inherit from (the objects in the 'base' property).
      89                 :            :      * I don't think that applies to JavaScript...
      90                 :            :      */
      91                 :         32 :     return obj;
      92                 :            : }

Generated by: LCOV version 1.14