@@ -12,16 +12,18 @@ Example
12
12
=======
13
13
Here is how to compute the vertex and face normals for the Stanford bunny:
14
14
15
+ ``` js
15
16
var bunny = require (" bunny" );
16
- var bunny.vertexNormals = require("normals").vertexNormals(bunny.positions, bunny.faces);
17
- var bunny.faceNormals = require("normals").faceNormals(bunny.positions, bunny.faces);
17
+ bunny .vertexNormals = require (" normals" ).vertexNormals (bunny .cells , bunny .positions );
18
+ bunny .faceNormals = require (" normals" ).faceNormals (bunny .cells , bunny .positions );
19
+ ```
18
20
19
21
` require("normals").vertexNormals(cells, positions) `
20
22
----------------------------------------------------
21
23
This estimates the vertex normals for an oriented mesh.
22
24
25
+ * ` cells ` is an array of indexed vertex positions
23
26
* ` positions ` is an array of vertex positions
24
- * ` faces ` is an array of indexed vertex positions
25
27
26
28
Returns: An array of length = ` positions.length ` of the per-vertex normals.
27
29
@@ -30,12 +32,12 @@ Returns: An array of length = `positions.length` of the per-vertex normals.
30
32
----------------------------------------------------
31
33
This estimates the face normals for an oriented mesh.
32
34
35
+ * ` cells ` is an array of indexed vertex positions
33
36
* ` positions ` is an array of vertex positions
34
- * ` faces ` is an array of indexed vertex positions
35
37
36
- Returns: An array of length = ` faces .length` of the per-face normals.
38
+ Returns: An array of length = ` cells .length` of the per-face normals.
37
39
38
40
39
41
Credits
40
42
=======
41
- (c) 2013 Mikola Lysenko. BSD
43
+ (c) 2013 Mikola Lysenko. BSD
0 commit comments