ソースを参照

Renamed uniforms/attributes* to getUniforms/Attr*.

tschw 10 年 前
コミット
ab8497bd61

+ 3 - 3
docs/api/renderers/webgl/WebGLProgram.html

@@ -129,17 +129,17 @@
 
 		<h2>Methods</h2>
 		
-		<h3>[method:Object uniforms]()</h3>
+		<h3>[method:Object getUniforms]()</h3>
 		<div>
 		Returns a name-value mapping of all active uniform locations.
 		</div>
 
-		<h3>[method:Object attributes]()</h3>
+		<h3>[method:Object getAttributes]()</h3>
 		<div>
 		Returns a name-value mapping of all active vertex attribute locations.
 		</div>
 
-		<h3>[method:Array attributesKeys]()</h3>
+		<h3>[method:Array getAttributesKeys]()</h3>
 		<div>
 		Returns an array of all active vertex attribute names.
 		</div>

+ 5 - 5
src/renderers/WebGLRenderer.js

@@ -779,7 +779,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		if ( object.hasUvs && ! object.__webglUvBuffer ) object.__webglUvBuffer = _gl.createBuffer();
 		if ( object.hasColors && ! object.__webglColorBuffer ) object.__webglColorBuffer = _gl.createBuffer();
 
-		var attributes = program.attributes();
+		var attributes = program.getAttributes();
 
 		if ( object.hasPositions ) {
 
@@ -895,7 +895,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		var geometryAttributes = geometry.attributes;
 
-		var programAttributes = program.attributes();
+		var programAttributes = program.getAttributes();
 
 		var materialDefaultAttributeValues = material.defaultAttributeValues;
 
@@ -1997,7 +1997,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		material.program = program;
 
-		var attributes = program.attributes();
+		var attributes = program.getAttributes();
 
 		if ( material.morphTargets ) {
 
@@ -2033,7 +2033,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		material.uniformsList = [];
 
-		var uniformLocations = material.program.uniforms();
+		var uniformLocations = material.program.getUniforms();
 		for ( var u in material.__webglShader.uniforms ) {
 
 			var location = uniformLocations[ u ];
@@ -2082,7 +2082,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		var refreshLights = false;
 
 		var program = material.program,
-			p_uniforms = program.uniforms(),
+			p_uniforms = program.getUniforms(),
 			m_uniforms = material.__webglShader.uniforms;
 
 		if ( program.id !== _currentProgram ) {

+ 6 - 6
src/renderers/webgl/WebGLProgram.js

@@ -396,12 +396,12 @@ THREE.WebGLProgram = ( function () {
 
 		var getUniforms = function() { return this._cachedUniforms; };
 
-		this.uniforms = function() {
+		this.getUniforms = function() {
 
 			// fetch, cache, and next time just use a dumb accessor
 			var uniforms = fetchUniformLocations( gl, program );
 			this._cachedUniforms = uniforms;
-			this.uniforms = getUniforms;
+			this.getUniforms = getUniforms;
 			return uniforms;
 
 		};
@@ -411,18 +411,18 @@ THREE.WebGLProgram = ( function () {
 		var getAttributes = function() { return this._cachedAttributes; };
 		var getAttribKeys = function() { return this._cachedAttribKeys; };
 
-		this.attributes = function() {
+		this.getAttributes = function() {
 
 			var attributes = fetchAttributeLocations( gl, program );
 			this._cachedAttributes = attributes;
 			this._cachedAttribKeys = Object.keys( attributes );
-			this.attributes = getAttributes;
-			this.attributesKeys = getAttribKeys;
+			this.getAttributes = getAttributes;
+			this.getAttributesKeys = getAttribKeys;
 			return attributes;
 
 		};
 
-		this.attributesKeys = function() {
+		this.getAttributesKeys = function() {
 
 			this.attributes();
 			return this._cachedAttribKeys;