UNPKG

three

Version:

JavaScript 3D library

35 lines (24 loc) 844 B
/** * * A Track of Boolean keyframe values. * * * @author Ben Houston / http://clara.io/ * @author David Sarno / http://lighthaus.us/ * @author tschw */ THREE.BooleanKeyframeTrack = function ( name, times, values ) { THREE.KeyframeTrack.call( this, name, times, values ); }; THREE.BooleanKeyframeTrack.prototype = Object.assign( Object.create( THREE.KeyframeTrack.prototype ), { constructor: THREE.BooleanKeyframeTrack, ValueTypeName: 'bool', ValueBufferType: Array, DefaultInterpolation: THREE.InterpolateDiscrete, InterpolantFactoryMethodLinear: undefined, InterpolantFactoryMethodSmooth: undefined // Note: Actually this track could have a optimized / compressed // representation of a single value and a custom interpolant that // computes "firstValue ^ isOdd( index )". } );