Re: [w3c/webcomponents] Considering Shader Module Types (#853)

What are module types?

I know an extremely common pattern is the non-js <script> shader pattern:
```
    <script id='e_vs' type='none'>
attribute vec3 aPosition;

void main(void) {
  gl_PointSize = 50.0;
  gl_Position = vec4(aPosition, 1.0);
}
    </script>
    <script>
[...]
const vs = gl.createShader(gl.VERTEX_SHADER);
gl.shaderSource(vs, e_vs.innerHTML.trim());
gl.compileShader(vs);
[...]
```
One restriction of this is inability to use `src=` with arbitrary types. Is this proposal a formalization of something like this? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/853#issuecomment-553139766

Received on Tuesday, 12 November 2019 22:09:59 UTC