()
| 37 | } |
| 38 | |
| 39 | getUserCode(): string { |
| 40 | const userCode = ` |
| 41 | ${main('index')} { |
| 42 | if(index < uniforms.size) { |
| 43 | let coords = getCoordsFromIndex(index); |
| 44 | setOutputAtIndex(index, mix(uniforms.offValue, uniforms.onValue, |
| 45 | f32(i32(round(getX(coords.x))) == coords.y))); |
| 46 | } |
| 47 | } |
| 48 | `; |
| 49 | |
| 50 | return userCode; |
| 51 | } |
| 52 | } |