BooleanKeyframeTrack.js 810 字节
Newer Older
1 2
/**
 *
3 4 5
 * A Track of Boolean keyframe values.
 *
 *
6 7
 * @author Ben Houston / http://clara.io/
 * @author David Sarno / http://lighthaus.us/
8
 * @author tschw
9 10
 */

11
THREE.BooleanKeyframeTrack = function ( name, times, values ) {
12

13
	THREE.KeyframeTrack.call( this, name, times, values );
14

15
};
16

T
tschw 已提交
17 18
THREE.BooleanKeyframeTrack.prototype =
		Object.assign( Object.create( THREE.KeyframeTrack.prototype ), {
19

20
	constructor: THREE.BooleanKeyframeTrack,
21

22 23
	ValueTypeName: 'bool',
	ValueBufferType: Array,
24

25
	DefaultInterpolation: THREE.InterpolateDiscrete,
26

27 28
	InterpolantFactoryMethodLinear: undefined,
	InterpolantFactoryMethodSmooth: undefined
29

30 31 32
	// Note: Actually this track could have a optimized / compressed
	// representation of a single value and a custom interpolant that
	// computes "firstValue ^ isOdd( index )".
33

34
} );