diff --git a/examples/webgl_interactive_instances_gpu.html b/examples/webgl_interactive_instances_gpu.html index 1a919893344dc52a1329fbda7451f49cec0a48e1..cec5b09ae699d19ff7602662572b2301f2647c67 100644 --- a/examples/webgl_interactive_instances_gpu.html +++ b/examples/webgl_interactive_instances_gpu.html @@ -614,7 +614,7 @@ vertexShader: vert, fragmentShader: frag, uniforms: { - color: new THREE.Uniform( 'c', new THREE.Color() ).onUpdate( updateColor ) + color: new THREE.Uniform( new THREE.Color() ).onUpdate( updateColor ) } } ); materialList.push( material ); @@ -629,7 +629,7 @@ vertexShader: "#define PICKING\n" + vert, fragmentShader: "#define PICKING\n" + frag, uniforms: { - pickingColor: new THREE.Uniform( 'c', new THREE.Color() ).onUpdate( updatePickingColor ) + pickingColor: new THREE.Uniform( new THREE.Color() ).onUpdate( updatePickingColor ) } } ); materialList.push( pickingMaterial ); diff --git a/src/core/Uniform.js b/src/core/Uniform.js index 78ecf7c59f06ae96351ab3276baab4942b80765c..e13a5a0b27a9c3ada9ee017964941b8d30017e6e 100644 --- a/src/core/Uniform.js +++ b/src/core/Uniform.js @@ -2,9 +2,15 @@ * @author mrdoob / http://mrdoob.com/ */ -THREE.Uniform = function ( type, value ) { +THREE.Uniform = function ( value ) { + + if ( typeof value === 'string' ) { + + console.warn( 'THREE.Uniform: Type parameter is no longer needed.' ); + value = arguments[ 1 ]; + + } - this.type = type; this.value = value; this.dynamic = false;