Skip to content

Commit 9c8af29

Browse files
juliassermrdoob
authored andcommitted
Missing "new" keyword
I think the line 41 should be var armSkeleton = new THREE.Skeleton(bones);
1 parent 6075b47 commit 9c8af29

File tree

1 file changed

+132
-132
lines changed

1 file changed

+132
-132
lines changed

docs/api/objects/Skeleton.html

Lines changed: 132 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,133 +1,133 @@
1-
<!DOCTYPE html>
2-
<html lang="en">
3-
<head>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
44
<meta charset="utf-8" />
5-
<base href="../../" />
6-
<script src="list.js"></script>
7-
<script src="page.js"></script>
8-
<link type="text/css" rel="stylesheet" href="page.css" />
9-
</head>
10-
<body>
11-
12-
<h1>[name]</h1>
13-
14-
<div class="desc">
15-
Use an array of [page:Bone bones] to create a skeleton that can be used by a [page:SkinnedMesh].
16-
WebGL only.
17-
</div>
18-
19-
<h2>Example</h2>
20-
21-
<code>
22-
// Create a simple "arm"
23-
24-
var bones = [];
25-
26-
var shoulder = new THREE.Bone();
27-
var elbow = new THREE.Bone();
28-
var hand = new THREE.Bone();
29-
30-
shoulder.add( elbow );
31-
elbow.add( hand );
32-
33-
bones.push( shoulder );
34-
bones.push( elbow );
35-
bones.push( hand );
36-
37-
shoulder.position.y = -5;
38-
elbow.position.y = 0;
39-
hand.position.y = 5;
40-
41-
var armSkeleton = THREE.Skeleton( bones );
42-
43-
// See THREE.SkinnedMesh for an example of usage with a mesh
44-
</code>
45-
46-
<h2>Constructor</h2>
47-
48-
49-
<h3>[name]( [page:Array bones], [page:Array boneInverses], [page:Boolean useVertexTexture] )</h3>
50-
<div>
51-
bones — The array of [page:bone bones]<br/>
52-
boneInverses — (optional) An array of [page:Matrix4 Matrix4s]<br/>
53-
useVertexTexture — (optional) Whether or not to use a vertex texture in the shader.
54-
</div>
55-
<div>
56-
The constructor automatically sets up all of the properties below.
57-
</div>
58-
59-
60-
<h2>Properties</h2>
61-
62-
<h3>[property:Array bones]</h3>
63-
<div>
64-
The array of [page:bone bones]
65-
</div>
66-
67-
68-
<h3>[property:Boolean useVertexTexture]</h3>
69-
<div>
70-
Whether or not to use a vertex texture in the shader, set in the constructor. Not all devices
71-
support floating point pixel textures. If this option is set then the bone matrices will be packed into
72-
a texture and sent to the shader. This method allows a much larger set of bones to be used. Otherwise
73-
the vertex shader will use uniforms, which do not allow for as many bones to be used. The exact
74-
numbers vary between devices.
75-
</div>
76-
77-
78-
<h3>[property:Array boneInverses]</h3>
79-
<div>
80-
An array of [page:Matrix4 Matrix4s] that represent the inverse of the matrixWorld of the individual bones.
81-
</div>
82-
83-
84-
<h3>[property:Integer boneTextureWidth]</h3>
85-
<div>
86-
The width of the vertex data texture.
87-
</div>
88-
89-
90-
<h3>[property:Integer boneTextureHeight]</h3>
91-
<div>
92-
The height of the vertex data texture.
93-
</div>
94-
95-
96-
<h3>[property:Float32Array boneMatrices]</h3>
97-
<div>
98-
The array buffer holding the bone data when using a vertex texture.
99-
</div>
100-
101-
102-
<h3>[property:DataTexture boneTexture]</h3>
103-
<div>
104-
The [page:DataTexture] holding the bone data when using a vertex texture.
105-
</div>
106-
107-
108-
<h2>Methods</h2>
109-
110-
<h3>[method:null calculateInverses]()</h3>
111-
<div>Generates the boneInverses.</div>
112-
113-
114-
<h3>[method:null pose]()</h3>
115-
<div>Returns the skeleton to the base pose.</div>
116-
117-
118-
<h3>[method:null update]()</h3>
119-
<div>
120-
Updates the [page:Float32Array boneMatrices] and [page:DataTexture boneTexture] after changing the bones.
121-
This is called automatically by the [page:WebGLRenderer] if the skeleton is used with a [page:SkinnedMesh].
122-
</div>
123-
124-
<h3>[method:Skeleton clone]()</h3>
125-
<div>
126-
Clone a Skeleton Object.
127-
</div>
128-
129-
<h2>Source</h2>
130-
131-
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
132-
</body>
133-
</html>
5+
<base href="../../" />
6+
<script src="list.js"></script>
7+
<script src="page.js"></script>
8+
<link type="text/css" rel="stylesheet" href="page.css" />
9+
</head>
10+
<body>
11+
12+
<h1>[name]</h1>
13+
14+
<div class="desc">
15+
Use an array of [page:Bone bones] to create a skeleton that can be used by a [page:SkinnedMesh].
16+
WebGL only.
17+
</div>
18+
19+
<h2>Example</h2>
20+
21+
<code>
22+
// Create a simple "arm"
23+
24+
var bones = [];
25+
26+
var shoulder = new THREE.Bone();
27+
var elbow = new THREE.Bone();
28+
var hand = new THREE.Bone();
29+
30+
shoulder.add( elbow );
31+
elbow.add( hand );
32+
33+
bones.push( shoulder );
34+
bones.push( elbow );
35+
bones.push( hand );
36+
37+
shoulder.position.y = -5;
38+
elbow.position.y = 0;
39+
hand.position.y = 5;
40+
41+
var armSkeleton = new THREE.Skeleton( bones );
42+
43+
// See THREE.SkinnedMesh for an example of usage with a mesh
44+
</code>
45+
46+
<h2>Constructor</h2>
47+
48+
49+
<h3>[name]( [page:Array bones], [page:Array boneInverses], [page:Boolean useVertexTexture] )</h3>
50+
<div>
51+
bones — The array of [page:bone bones]<br/>
52+
boneInverses — (optional) An array of [page:Matrix4 Matrix4s]<br/>
53+
useVertexTexture — (optional) Whether or not to use a vertex texture in the shader.
54+
</div>
55+
<div>
56+
The constructor automatically sets up all of the properties below.
57+
</div>
58+
59+
60+
<h2>Properties</h2>
61+
62+
<h3>[property:Array bones]</h3>
63+
<div>
64+
The array of [page:bone bones]
65+
</div>
66+
67+
68+
<h3>[property:Boolean useVertexTexture]</h3>
69+
<div>
70+
Whether or not to use a vertex texture in the shader, set in the constructor. Not all devices
71+
support floating point pixel textures. If this option is set then the bone matrices will be packed into
72+
a texture and sent to the shader. This method allows a much larger set of bones to be used. Otherwise
73+
the vertex shader will use uniforms, which do not allow for as many bones to be used. The exact
74+
numbers vary between devices.
75+
</div>
76+
77+
78+
<h3>[property:Array boneInverses]</h3>
79+
<div>
80+
An array of [page:Matrix4 Matrix4s] that represent the inverse of the matrixWorld of the individual bones.
81+
</div>
82+
83+
84+
<h3>[property:Integer boneTextureWidth]</h3>
85+
<div>
86+
The width of the vertex data texture.
87+
</div>
88+
89+
90+
<h3>[property:Integer boneTextureHeight]</h3>
91+
<div>
92+
The height of the vertex data texture.
93+
</div>
94+
95+
96+
<h3>[property:Float32Array boneMatrices]</h3>
97+
<div>
98+
The array buffer holding the bone data when using a vertex texture.
99+
</div>
100+
101+
102+
<h3>[property:DataTexture boneTexture]</h3>
103+
<div>
104+
The [page:DataTexture] holding the bone data when using a vertex texture.
105+
</div>
106+
107+
108+
<h2>Methods</h2>
109+
110+
<h3>[method:null calculateInverses]()</h3>
111+
<div>Generates the boneInverses.</div>
112+
113+
114+
<h3>[method:null pose]()</h3>
115+
<div>Returns the skeleton to the base pose.</div>
116+
117+
118+
<h3>[method:null update]()</h3>
119+
<div>
120+
Updates the [page:Float32Array boneMatrices] and [page:DataTexture boneTexture] after changing the bones.
121+
This is called automatically by the [page:WebGLRenderer] if the skeleton is used with a [page:SkinnedMesh].
122+
</div>
123+
124+
<h3>[method:Skeleton clone]()</h3>
125+
<div>
126+
Clone a Skeleton Object.
127+
</div>
128+
129+
<h2>Source</h2>
130+
131+
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
132+
</body>
133+
</html>

0 commit comments

Comments
 (0)