|
@@ -13,19 +13,19 @@ import { LoopOnce, LoopRepeat, LoopPingPong } from '../../../../src/constants';
|
|
|
|
|
|
function createAnimation(){
|
|
function createAnimation(){
|
|
|
|
|
|
- var root = new Object3D();
|
|
|
|
|
|
+ var root = new Object3D();
|
|
var mixer = new AnimationMixer(root);
|
|
var mixer = new AnimationMixer(root);
|
|
var track = new NumberKeyframeTrack( ".rotation[x]", [ 0, 1000 ], [ 0, 360 ] );
|
|
var track = new NumberKeyframeTrack( ".rotation[x]", [ 0, 1000 ], [ 0, 360 ] );
|
|
var clip = new AnimationClip( "clip1", 1000, [track] );
|
|
var clip = new AnimationClip( "clip1", 1000, [track] );
|
|
|
|
|
|
- var animationAction = mixer.clipAction( clip );
|
|
|
|
- return {
|
|
|
|
- root: root,
|
|
|
|
- mixer: mixer,
|
|
|
|
- track: track,
|
|
|
|
- clip: clip,
|
|
|
|
- animationAction: animationAction
|
|
|
|
- };
|
|
|
|
|
|
+ var animationAction = mixer.clipAction( clip );
|
|
|
|
+ return {
|
|
|
|
+ root: root,
|
|
|
|
+ mixer: mixer,
|
|
|
|
+ track: track,
|
|
|
|
+ clip: clip,
|
|
|
|
+ animationAction: animationAction
|
|
|
|
+ };
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -306,25 +306,25 @@ export default QUnit.module( 'Animation', () => {
|
|
|
|
|
|
QUnit.test( "getMixer", ( assert ) => {
|
|
QUnit.test( "getMixer", ( assert ) => {
|
|
|
|
|
|
- var { mixer, animationAction } = createAnimation();
|
|
|
|
- var mixer2 = animationAction.getMixer();
|
|
|
|
- assert.equal( mixer, mixer2, "mixer should be returned by getMixer." );
|
|
|
|
|
|
+ var { mixer, animationAction } = createAnimation();
|
|
|
|
+ var mixer2 = animationAction.getMixer();
|
|
|
|
+ assert.equal( mixer, mixer2, "mixer should be returned by getMixer." );
|
|
|
|
|
|
} );
|
|
} );
|
|
|
|
|
|
- QUnit.test("getClip", (assert) => {
|
|
|
|
|
|
+ QUnit.test("getClip", (assert) => {
|
|
|
|
|
|
- var { clip, animationAction } = createAnimation();
|
|
|
|
- var clip2 = animationAction.getClip();
|
|
|
|
- assert.equal( clip, clip2, "clip should be returned by getClip." );
|
|
|
|
|
|
+ var { clip, animationAction } = createAnimation();
|
|
|
|
+ var clip2 = animationAction.getClip();
|
|
|
|
+ assert.equal( clip, clip2, "clip should be returned by getClip." );
|
|
|
|
|
|
} );
|
|
} );
|
|
|
|
|
|
QUnit.test( "getRoot", ( assert ) => {
|
|
QUnit.test( "getRoot", ( assert ) => {
|
|
|
|
|
|
- var { root, animationAction } = createAnimation();
|
|
|
|
- var root2 = animationAction.getRoot();
|
|
|
|
- assert.equal(root, root2, "root should be returned by getRoot." );
|
|
|
|
|
|
+ var { root, animationAction } = createAnimation();
|
|
|
|
+ var root2 = animationAction.getRoot();
|
|
|
|
+ assert.equal(root, root2, "root should be returned by getRoot." );
|
|
|
|
|
|
} );
|
|
} );
|
|
|
|
|