因此,我一直在尝试使用SkeletonHelper渲染动画可视化器的基本骨架,但无法弄清楚如何让SkeletonHelper接受我传递给构造函数的Skeleton变量armSkeleton。该文档指出SkeletonHelper确实接受Skeleton类型的对象,这使我感到非常悲伤。我得到的控制台错误是“ TypeError:object.children未定义”。有人能指出正确的方向吗?
var bones = [];
var shoulder = new THREE.Bone();
var elbow = new THREE.Bone();
var hand = new THREE.Bone();
shoulder.add( elbow );
elbow.add( hand );
bones.push( shoulder );
bones.push( elbow );
bones.push( hand );
shoulder.position.y = -5;
elbow.position.y = 0;
hand.position.y = 5;
armSkeleton = new THREE.Skeleton( bones );
var helper = new THREE.SkeletonHelper(armSkeleton); <Error at this line>
答案 0 :(得分:0)
#include <stdio.h>
int main()
{
char x[] = "gate2011";
char *ptr = x;
printf ("%s", ptr+4);
return 0;
}
不接受框架作为构造函数参数。就您而言,您必须传递最上层的骨骼。请看以下示例以获取更多信息: