Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Don McCurdy committed Oct 9, 2018
1 parent ce0d2a8 commit 315ba26
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/unit/src/animation/AnimationUtils.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
*/
/* global QUnit */

import { AnimationClip } from '../../../../src/animation/AnimationClip';
import { AnimationUtils } from '../../../../src/animation/AnimationUtils';
import { BufferAttribute } from '../../../../src/core/BufferAttribute';
import { BufferGeometry } from '../../../../src/core/BufferGeometry';
import { Mesh } from '../../../../src/objects/Mesh';
import { Object3D } from '../../../../src/core/Object3D';
import { NumberKeyframeTrack } from '../../../../src/animation/tracks/NumberKeyframeTrack';
import { VectorKeyframeTrack } from '../../../../src/animation/tracks/VectorKeyframeTrack';
import {
Expand Down Expand Up @@ -86,20 +91,20 @@ export default QUnit.module( 'Animation', () => {
InterpolateLinear
);

var geometry = new THREE.BufferGeometry();
var position = new THREE.BufferAttribute( new Float32Array( [ 0, 0, 0, 0, 0, 1, 1, 0, 1 ] ), 3 );
var geometry = new BufferGeometry();
var position = new BufferAttribute( new Float32Array( [ 0, 0, 0, 0, 0, 1, 1, 0, 1 ] ), 3 );
geometry.addAttribute( 'position', position );
geometry.morphAttributes.position = [ position, position ];

var mesh = new THREE.Mesh( geometry );
var mesh = new Mesh( geometry );
mesh.name = 'foo';
mesh.morphTargetDictionary.a = 0;
mesh.morphTargetDictionary.b = 1;

var root = new THREE.Object3D();
var root = new Object3D();
root.add( mesh );

var clip = new THREE.AnimationClip( 'waltz', undefined, [ trackA, trackB ] );
var clip = new AnimationClip( 'waltz', undefined, [ trackA, trackB ] );
clip = AnimationUtils.mergeMorphTargetTracks( clip, root );

assert.equal( clip.tracks.length, 1, 'tracks are merged' );
Expand Down

0 comments on commit 315ba26

Please sign in to comment.