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

ShaderMaterial: Attributes no longer need to be defined here.

上级 0bca894f
......@@ -36,7 +36,6 @@ THREE.ShaderMaterial = function ( parameters ) {
this.defines = {};
this.uniforms = {};
this.attributes = [];
this.vertexShader = 'void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}';
this.fragmentShader = 'void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}';
......@@ -73,10 +72,9 @@ THREE.ShaderMaterial = function ( parameters ) {
if ( parameters !== undefined ) {
if ( parameters.attributes !== undefined && Array.isArray( parameters.attributes ) === false ) {
if ( parameters.attributes !== undefined ) {
console.warn( 'THREE.ShaderMaterial: attributes should now be an array of attribute names.' );
parameters.attributes = Object.keys( parameters.attributes );
console.error( 'THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.' );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册