(target)
| 304 | |
| 305 | suite('custom shaders', function() { |
| 306 | function testFilterShader(target) { |
| 307 | const fragSrc = `precision highp float; |
| 308 | void main() { |
| 309 | gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0); |
| 310 | }`; |
| 311 | const s = target.createFilterShader(fragSrc); |
| 312 | target.filter(s); |
| 313 | target.loadPixels(); |
| 314 | assert.deepEqual( |
| 315 | target.get(target.width/2, target.height/2), |
| 316 | [255, 255, 0, 255] |
| 317 | ); |
| 318 | } |
| 319 | |
| 320 | test('work with a 2D main canvas', function() { |
| 321 | myp5.createCanvas(10, 10); |
no test coverage detected