Bone.js 585 字节
Newer Older
1 2
/**
 * @author mikael emtinger / http://gomo.se/
A
alteredq 已提交
3
 * @author alteredq / http://alteredqualia.com/
4
 * @author ikerr / http://verold.com
5 6
 */

M
Mr.doob 已提交
7
THREE.Bone = function ( skin ) {
8

9
	THREE.Object3D.call( this );
10

M
makc 已提交
11
	this.type = 'Bone';
M
Mr.doob 已提交
12 13 14

	this.skin = skin;

15 16
};

17
THREE.Bone.prototype = Object.create( THREE.Object3D.prototype );
18
THREE.Bone.prototype.constructor = THREE.Bone;
H
hena-3 已提交
19 20 21 22 23 24 25 26 27 28 29

THREE.Bone.prototype.clone = function ( object ) {

	if ( object === undefined ) object = new THREE.Bone( this.skin );

	THREE.Object3D.prototype.clone.call( this, object );
	object.skin = this.skin; 

	return object;

};