@@ -33,7 +33,6 @@ suite('shader', function () {
3333 assert . ok ( shader . prototype . vertexShader ) ;
3434 assert . ok ( shader . prototype . fragmentShader ) ;
3535 assert . notOk ( shader . prototype . uniforms ) ;
36- assert . notOk ( shader . prototype . attributes ) ;
3736 } ) ;
3837
3938 test ( 'shader instance receives methods and properties' , function ( ) {
@@ -49,7 +48,6 @@ suite('shader', function () {
4948 assert . equal ( instance . vertexShader , shader . prototype . vertexShader ) ;
5049 assert . equal ( instance . fragmentShader , shader . prototype . fragmentShader ) ;
5150 assert . equal ( Object . keys ( instance . uniforms ) . length , 0 ) ;
52- assert . equal ( Object . keys ( instance . attributes ) . length , 0 ) ;
5351 assert . ok ( instance . material ) ;
5452 } ) ;
5553
@@ -94,8 +92,7 @@ suite('shader data binding', function () {
9492 src : { type : 'map' , is : 'uniform' } ,
9593 otherMap : { type : 'map' , is : 'uniform' } ,
9694 vec2Uniform : { type : 'vec2' , default : { x : 1 , y : 2 } , is : 'uniform' } ,
97- vec2Attribute : { type : 'vec2' , default : { x : 3 , y : 4 } , is : 'attribute' } ,
98- vec2Neither : { type : 'vec2' , default : { x : 5 , y : 6 } }
95+ vec2NotUniform : { type : 'vec2' , default : { x : 5 , y : 6 } }
9996 }
10097 } ) ;
10198
@@ -126,8 +123,6 @@ suite('shader data binding', function () {
126123 assert . ok ( updateSpy . calledOnce ) ;
127124 // The value won't be assigned until the texture loads.
128125 assert . ok ( instance . uniforms [ 'src' ] ) ;
129- assert . notOk ( instance . attributes && ( instance . attributes [ 'map' ] ||
130- instance . attributes [ 'src' ] ) ) ;
131126 } ) ;
132127
133128 test ( 'src loads inline video' , function ( done ) {
@@ -152,8 +147,6 @@ suite('shader data binding', function () {
152147 assert . ok ( updateSpy . calledOnce ) ;
153148 // The value won't be assigned until the texture loads.
154149 assert . ok ( instance . uniforms [ 'src' ] ) ;
155- assert . notOk ( instance . attributes && ( instance . attributes [ 'map' ] ||
156- instance . attributes [ 'src' ] ) ) ;
157150 } ) ;
158151
159152 test ( 'otherMap loads inline video' , function ( done ) {
@@ -178,8 +171,6 @@ suite('shader data binding', function () {
178171 assert . ok ( initSpy . calledOnce ) ;
179172 assert . ok ( updateSpy . calledOnce ) ;
180173 assert . ok ( instance . uniforms [ 'otherMap' ] ) ;
181- // The value won't be assigned until the texture loads.
182- assert . notOk ( instance . attributes && instance . attributes [ 'otherMap' ] ) ;
183174 } ) ;
184175
185176 test ( 'vec2Uniform parameter is uniform' , function ( ) {
@@ -194,25 +185,9 @@ suite('shader data binding', function () {
194185 assert . ok ( instance . uniforms [ 'vec2Uniform' ] ) ;
195186 assert . equal ( instance . uniforms [ 'vec2Uniform' ] . value . x , 1 ) ;
196187 assert . equal ( instance . uniforms [ 'vec2Uniform' ] . value . y , 2 ) ;
197- assert . notOk ( instance . attributes [ 'vec2Uniform' ] ) ;
198- } ) ;
199-
200- test ( 'vec2Attribute parameter is attribute' , function ( ) {
201- assert . notOk ( initSpy . called ) ;
202- assert . notOk ( updateSpy . called ) ;
203- el . setAttribute ( 'material' , 'shader: testShader' ) ;
204- const material = el . components . material ;
205- const instance = material . shader ;
206- assert . ok ( instance ) ;
207- assert . ok ( initSpy . calledOnce ) ;
208- assert . ok ( updateSpy . calledOnce ) ;
209- assert . ok ( instance . attributes [ 'vec2Attribute' ] ) ;
210- assert . equal ( instance . attributes [ 'vec2Attribute' ] . value . x , 3 ) ;
211- assert . equal ( instance . attributes [ 'vec2Attribute' ] . value . y , 4 ) ;
212- assert . notOk ( instance . uniforms [ 'vec2Attribute' ] ) ;
213188 } ) ;
214189
215- test ( 'vec2Neither parameter is neither uniform nor attribute ' , function ( ) {
190+ test ( 'vec2NotUniform parameter is not a uniform ' , function ( ) {
216191 assert . notOk ( initSpy . called ) ;
217192 assert . notOk ( updateSpy . called ) ;
218193 el . setAttribute ( 'material' , 'shader: testShader' ) ;
@@ -221,7 +196,6 @@ suite('shader data binding', function () {
221196 assert . ok ( instance ) ;
222197 assert . ok ( initSpy . calledOnce ) ;
223198 assert . ok ( updateSpy . calledOnce ) ;
224- assert . notOk ( instance . attributes [ 'vec2Neither' ] ) ;
225- assert . notOk ( instance . uniforms [ 'vec2Neither' ] ) ;
199+ assert . notOk ( instance . uniforms [ 'vec2NotUniform' ] ) ;
226200 } ) ;
227201} ) ;
0 commit comments