File tree Expand file tree Collapse file tree 3 files changed +411
-10
lines changed Expand file tree Collapse file tree 3 files changed +411
-10
lines changed Original file line number Diff line number Diff line change 167167
168168 triangleVertexColorBuffer = gl . createBuffer ( ) ;
169169 gl . bindBuffer ( gl . ARRAY_BUFFER , triangleVertexColorBuffer ) ;
170- var colors = [
170+ var cores = [
171171 1.0 , 0.0 , 0.0 , 1.0 ,
172172 0.0 , 1.0 , 0.0 , 1.0 ,
173173 0.0 , 0.0 , 1.0 , 1.0 ,
174174 ] ;
175- gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( colors ) , gl . STATIC_DRAW ) ;
175+ gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( cores ) , gl . STATIC_DRAW ) ;
176176 triangleVertexColorBuffer . itemSize = 4 ;
177177 triangleVertexColorBuffer . numItems = 3 ;
178178
190190
191191 squareVertexColorBuffer = gl . createBuffer ( ) ;
192192 gl . bindBuffer ( gl . ARRAY_BUFFER , squareVertexColorBuffer ) ;
193- colors = [ ] ;
193+ cores = [ ] ;
194194 for ( var i = 0 ; i < 4 ; i ++ )
195195 {
196- colors = colors . concat ( [ 0.5 , 0.5 , 1.0 , 1.0 ] ) ;
196+ cores = cores . concat ( [ 0.5 , 0.5 , 1.0 , 1.0 ] ) ;
197197 }
198- gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( colors ) , gl . STATIC_DRAW ) ;
198+ gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( cores ) , gl . STATIC_DRAW ) ;
199199 squareVertexColorBuffer . itemSize = 4 ;
200200 squareVertexColorBuffer . numItems = 4 ;
201201 }
Original file line number Diff line number Diff line change 181181
182182 triangleVertexColorBuffer = gl . createBuffer ( ) ;
183183 gl . bindBuffer ( gl . ARRAY_BUFFER , triangleVertexColorBuffer ) ;
184- var colors = [
184+ var cores = [
185185 1.0 , 0.0 , 0.0 , 1.0 ,
186186 0.0 , 1.0 , 0.0 , 1.0 ,
187187 0.0 , 0.0 , 1.0 , 1.0 ,
188188 ] ;
189- gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( colors ) , gl . STATIC_DRAW ) ;
189+ gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( cores ) , gl . STATIC_DRAW ) ;
190190 triangleVertexColorBuffer . itemSize = 4 ;
191191 triangleVertexColorBuffer . numItems = 3 ;
192192
204204
205205 squareVertexColorBuffer = gl . createBuffer ( ) ;
206206 gl . bindBuffer ( gl . ARRAY_BUFFER , squareVertexColorBuffer ) ;
207- colors = [ ] ;
207+ cores = [ ] ;
208208 for ( var i = 0 ; i < 4 ; i ++ )
209209 {
210- colors = colors . concat ( [ 0.5 , 0.5 , 1.0 , 1.0 ] ) ;
210+ cores = cores . concat ( [ 0.5 , 0.5 , 1.0 , 1.0 ] ) ;
211211 }
212- gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( colors ) , gl . STATIC_DRAW ) ;
212+ gl . bufferData ( gl . ARRAY_BUFFER , new Float32Array ( cores ) , gl . STATIC_DRAW ) ;
213213 squareVertexColorBuffer . itemSize = 4 ;
214214 squareVertexColorBuffer . numItems = 4 ;
215215 }
You can’t perform that action at this time.
0 commit comments