소스 검색

ColorKeyframeTrack: Convert to es6 class

Ian Purvis 5 년 전
부모
커밋
29bf1ba42a
1개의 변경된 파일2개의 추가작업 그리고 9개의 파일을 삭제
  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'