Explorar o código

ColorKeyframeTrack: Convert to es6 class

Ian Purvis %!s(int64=5) %!d(string=hai) anos
pai
achega
29bf1ba42a
Modificáronse 1 ficheiros con 2 adicións e 9 borrados
  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'