This repository was archived by the owner on Jun 23, 2023. It is now read-only.
File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { minify } from 'uglify-js-harmony'
5
5
const { BUILD } = process . env
6
6
7
7
const plugins = [ buble ( {
8
- objectAssign : 'Object.assign'
8
+ objectAssign : 'Object.assign'
9
9
} ) ]
10
10
11
11
let moduleName = 'Tween'
Original file line number Diff line number Diff line change @@ -233,11 +233,11 @@ class Tween {
233
233
234
234
this . _startTime = _startTime ;
235
235
236
- for ( let property in _valuesEnd ) {
236
+ if ( typeof _valuesEnd === "object" ) {
237
237
238
- property = object [ + property ] !== undefined ? + property : property ;
238
+ for ( let property in _valuesEnd ) {
239
239
240
- if ( typeof _valuesEnd [ property ] === "object" ) {
240
+ if ( typeof _valuesEnd [ property ] === "object" && _valuesEnd [ property ] ) {
241
241
242
242
this . _valuesEnd [ property ] = SubTween ( object [ property ] , _valuesEnd [ property ] ) ;
243
243
@@ -269,6 +269,8 @@ class Tween {
269
269
270
270
}
271
271
272
+ }
273
+
272
274
add ( this ) ;
273
275
274
276
this . _isPlaying = true ;
@@ -452,7 +454,7 @@ class Tween {
452
454
if ( typeof ( end ) === 'number' ) {
453
455
object [ property ] = start + ( end - start ) * value ;
454
456
}
455
- } else if ( typeof ( end ) === 'number' ) {
457
+ } else if ( typeof ( start ) === 'number' ) {
456
458
object [ property ] = start + ( end - start ) * value ;
457
459
}
458
460
Original file line number Diff line number Diff line change 216
216
var obj = { x : true } ,
217
217
t = new TWEEN . Tween ( obj )
218
218
219
- t . to ( { x : function ( ) { } } )
219
+ t . to ( { x : false } )
220
220
t . start ( 0 )
221
221
t . update ( 1000 )
222
222
You can’t perform that action at this time.
0 commit comments