Ver código fonte

ColorKeyframeTrack: Convert to es6 class

Ian Purvis 5 anos atrás
pai
commit
29bf1ba42a
1 arquivos alterados com 2 adições e 9 exclusões
  1. 2 9
      src/animation/tracks/ColorKeyframeTrack.js

+ 2 - 9
src/animation/tracks/ColorKeyframeTrack.js

@@ -3,16 +3,9 @@ import { KeyframeTrack } from '../KeyframeTrack.js';
 /**
  * A Track of keyframe values that represent color.
  */
+class ColorKeyframeTrack extends KeyframeTrack {}
 
-function ColorKeyframeTrack( name, times, values, interpolation ) {
-
-	KeyframeTrack.call( this, name, times, values, interpolation );
-
-}
-
-ColorKeyframeTrack.prototype = Object.assign( Object.create( KeyframeTrack.prototype ), {
-
-	constructor: ColorKeyframeTrack,
+Object.assign( ColorKeyframeTrack.prototype, {
 
 	ValueTypeName: 'color'