Skip to content

Commit 2977bd0

Browse files
author
Farhad Ghayour
committed
Clean: Update a_normals to a_normal for consistency
1 parent dd29c70 commit 2977bd0

File tree

16 files changed

+38
-38
lines changed

16 files changed

+38
-38
lines changed

webgl-geometries/DynamicGeometry.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ DynamicGeometry.prototype.setVertexPositions = function (value) {
138138
* @return {Object} current geometry.
139139
*/
140140
DynamicGeometry.prototype.setNormals = function (value) {
141-
return this.setVertexBuffer('a_normals', value, 3);
141+
return this.setVertexBuffer('a_normal', value, 3);
142142
};
143143

144144
/**
@@ -190,7 +190,7 @@ DynamicGeometry.prototype.getVertexPositions = function () {
190190
* @return {Array} Vertex Buffer.
191191
*/
192192
DynamicGeometry.prototype.getNormals = function () {
193-
return this.getVertexBuffer('a_normals');
193+
return this.getVertexBuffer('a_normal');
194194
};
195195

196196
/**

webgl-geometries/primitives/Box.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function BoxGeometry(options) {
8484
buffers: [
8585
{ name: 'a_pos', data: vertices },
8686
{ name: 'a_texCoord', data: textureCoords, size: 2 },
87-
{ name: 'a_normals', data: normals },
87+
{ name: 'a_normal', data: normals },
8888
{ name: 'indices', data: indices, size: 1 }
8989
]
9090
});

webgl-geometries/primitives/Circle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function Circle (options) {
5555
buffers: [
5656
{ name: 'a_pos', data: buffers.vertices },
5757
{ name: 'a_texCoord', data: textureCoords, size: 2 },
58-
{ name: 'a_normals', data: normals },
58+
{ name: 'a_normal', data: normals },
5959
{ name: 'indices', data: buffers.indices, size: 1 }
6060
]
6161
});

webgl-geometries/primitives/Cylinder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function Cylinder (options) {
6060
buffers: [
6161
{ name: 'a_pos', data: buffers.vertices },
6262
{ name: 'a_texCoord', data: GeometryHelper.getSpheroidUV(buffers.vertices), size: 2 },
63-
{ name: 'a_normals', data: GeometryHelper.computeNormals(buffers.vertices, buffers.indices) },
63+
{ name: 'a_normal', data: GeometryHelper.computeNormals(buffers.vertices, buffers.indices) },
6464
{ name: 'indices', data: buffers.indices, size: 1 }
6565
]
6666
});

webgl-geometries/primitives/GeodesicSphere.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
22
* The MIT License (MIT)
3-
*
3+
*
44
* Copyright (c) 2015 Famous Industries Inc.
5-
*
5+
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
88
* in the Software without restriction, including without limitation the rights
99
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1010
* copies of the Software, and to permit persons to whom the Software is
1111
* furnished to do so, subject to the following conditions:
12-
*
12+
*
1313
* The above copyright notice and this permission notice shall be included in
1414
* all copies or substantial portions of the Software.
15-
*
15+
*
1616
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1717
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1818
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -36,7 +36,7 @@ var GeometryHelper = require('../GeometryHelper');
3636
*
3737
* @param {Object} options Parameters that alter the
3838
* vertex buffers of the generated geometry.
39-
*
39+
*
4040
* @return {Object} constructed geometry
4141
*/
4242
function GeodesicSphere (options) {
@@ -69,7 +69,7 @@ function GeodesicSphere (options) {
6969
buffers: [
7070
{ name: 'a_pos', data: vertices },
7171
{ name: 'a_texCoord', data: textureCoords, size: 2 },
72-
{ name: 'a_normals', data: normals },
72+
{ name: 'a_normal', data: normals },
7373
{ name: 'indices', data: indices, size: 1 }
7474
]
7575
});

webgl-geometries/primitives/Icosahedron.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
22
* The MIT License (MIT)
3-
*
3+
*
44
* Copyright (c) 2015 Famous Industries Inc.
5-
*
5+
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
88
* in the Software without restriction, including without limitation the rights
99
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1010
* copies of the Software, and to permit persons to whom the Software is
1111
* furnished to do so, subject to the following conditions:
12-
*
12+
*
1313
* The above copyright notice and this permission notice shall be included in
1414
* all copies or substantial portions of the Software.
15-
*
15+
*
1616
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1717
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1818
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -36,7 +36,7 @@ var GeometryHelper = require('../GeometryHelper');
3636
*
3737
* @param {Object} options Parameters that alter the
3838
* vertex buffers of the generated geometry.
39-
*
39+
*
4040
* @return {Object} constructed geometry
4141
*/
4242
function Icosahedron() {
@@ -65,7 +65,7 @@ function Icosahedron() {
6565
buffers: [
6666
{ name: 'a_pos', data: vertices },
6767
{ name: 'a_texCoord', data: textureCoords, size: 2 },
68-
{ name: 'a_normals', data: normals },
68+
{ name: 'a_normal', data: normals },
6969
{ name: 'indices', data: indices, size: 1 }
7070
]
7171
});

webgl-geometries/primitives/ParametricCone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function ParametricCone (options) {
5858
buffers: [
5959
{ name: 'a_pos', data: buffers.vertices },
6060
{ name: 'a_texCoord', data: GeometryHelper.getSpheroidUV(buffers.vertices), size: 2 },
61-
{ name: 'a_normals', data: GeometryHelper.computeNormals(buffers.vertices, buffers.indices) },
61+
{ name: 'a_normal', data: GeometryHelper.computeNormals(buffers.vertices, buffers.indices) },
6262
{ name: 'indices', data: buffers.indices, size: 1 }
6363
]
6464
});

webgl-geometries/primitives/Plane.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function Plane(options) {
8080
buffers: [
8181
{ name: 'a_pos', data: vertices },
8282
{ name: 'a_texCoord', data: textureCoords, size: 2 },
83-
{ name: 'a_normals', data: normals },
83+
{ name: 'a_normal', data: normals },
8484
{ name: 'indices', data: indices, size: 1 }
8585
]
8686
});

webgl-geometries/primitives/Sphere.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function ParametricSphere (options) {
5656
buffers: [
5757
{ name: 'a_pos', data: buffers.vertices },
5858
{ name: 'a_texCoord', data: GeometryHelper.getSpheroidUV(buffers.vertices), size: 2 },
59-
{ name: 'a_normals', data: GeometryHelper.getSpheroidNormals(buffers.vertices) },
59+
{ name: 'a_normal', data: GeometryHelper.getSpheroidNormals(buffers.vertices) },
6060
{ name: 'indices', data: buffers.indices, size: 1 }
6161
]
6262
});

webgl-geometries/primitives/Tetrahedron.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function Tetrahedron(options) {
9292
buffers: [
9393
{ name: 'a_pos', data: vertices },
9494
{ name: 'a_texCoord', data: textureCoords, size: 2 },
95-
{ name: 'a_normals', data: normals },
95+
{ name: 'a_normal', data: normals },
9696
{ name: 'indices', data: indices, size: 1 }
9797
]
9898
});

0 commit comments

Comments
 (0)