BooleanKeyframeTrack.js 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { InterpolateDiscrete } from '../../constants';
  2. import { KeyframeTrackPrototype } from '../KeyframeTrackPrototype';
  3. import { KeyframeTrackConstructor } from '../KeyframeTrackConstructor';
  4. /**
  5. *
  6. * A Track of Boolean keyframe values.
  7. *
  8. *
  9. * @author Ben Houston / http://clara.io/
  10. * @author David Sarno / http://lighthaus.us/
  11. * @author tschw
  12. */
  13. function BooleanKeyframeTrack( name, times, values ) {
  14. KeyframeTrackConstructor.call( this, name, times, values );
  15. }
  16. BooleanKeyframeTrack.prototype =
  17. Object.assign( Object.create( KeyframeTrackPrototype ), {
  18. constructor: BooleanKeyframeTrack,
  19. ValueTypeName: 'bool',
  20. ValueBufferType: Array,
  21. DefaultInterpolation: InterpolateDiscrete,
  22. InterpolantFactoryMethodLinear: undefined,
  23. InterpolantFactoryMethodSmooth: undefined
  24. // Note: Actually this track could have a optimized / compressed
  25. // representation of a single value and a custom interpolant that
  26. // computes "firstValue ^ isOdd( index )".
  27. } );
  28. export { BooleanKeyframeTrack };
粤ICP备19079148号