提交 58bd51ef 编写于 作者: T Takahiro

Update skeleton only once in a frame

上级 6abf9cc9
......@@ -16,6 +16,8 @@ function Skeleton( bones, boneInverses ) {
this.bones = bones.slice( 0 );
this.boneMatrices = new Float32Array( this.bones.length * 16 );
this.version = - 1;
// use the supplied bone inverses or calculate the inverses
if ( boneInverses === undefined ) {
......
......@@ -1306,7 +1306,14 @@ function WebGLRenderer( parameters ) {
if ( object.isSkinnedMesh ) {
object.skeleton.update();
// update skeleton only once in a frame
if ( object.skeleton.version !== info.render.frame ) {
object.skeleton.update();
object.skeleton.version = info.render.frame;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册