提交 63e41520 编写于 作者: M Mr.doob

Uniform: Removed type. See #8606.

上级 db765284
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册