BooleanKeyframeTrack.js 800 B

1234567891011121314151617181920212223242526272829303132
  1. import { InterpolateDiscrete } from '../../constants.js';
  2. import { KeyframeTrack } from '../KeyframeTrack.js';
  3. /**
  4. * A Track of Boolean keyframe values.
  5. */
  6. function BooleanKeyframeTrack( name, times, values ) {
  7. KeyframeTrack.call( this, name, times, values );
  8. }
  9. BooleanKeyframeTrack.prototype = Object.assign( Object.create( KeyframeTrack.prototype ), {
  10. constructor: BooleanKeyframeTrack,
  11. ValueTypeName: 'bool',
  12. ValueBufferType: Array,
  13. DefaultInterpolation: InterpolateDiscrete,
  14. InterpolantFactoryMethodLinear: undefined,
  15. InterpolantFactoryMethodSmooth: undefined
  16. // Note: Actually this track could have a optimized / compressed
  17. // representation of a single value and a custom interpolant that
  18. // computes "firstValue ^ isOdd( index )".
  19. } );
  20. export { BooleanKeyframeTrack };
粤ICP备19079148号