javascript - js Model Animation Using three.js r68 -
As stated in the title, I can not find the animation to work. I am pretty sure that I Something is missing because it works, but not.
I will create an animation object in the player. With character JS
this.init = function () (in this var k.mesh.material.materials) {this.mesh.material.materials [k]. Skinning = true;} this.animation = new three.Animation (this.mesh, this.mesh.geometry.animations [0] .name); This.animation.play (); }
I use this in the update function:
this.animation.update (0.017);
And when I see the console logs:
Unkit type error: the 'length' property of the undefined can not be read
So it seems that in three. AnimationHandler, the datashearr is undefined, so I think if I can define it somehow, then the problem will be solved. Except I do not know how, or even why, has not been defined. Any help?
You are only passing the name of the animation, not the entire data object Use it instead:
this.animation = new three.Animation (this.mash, this.mesh.geometry.animations [0]);
Comments
Post a Comment