News for hackers. Stuff that matters.
Re:Multiline strings in JavaScript by PavlovsCat on Saturday July 12, 2014 @06:05AM (#8024154)
I thank you from the bottom of my heart. This drove me crazy when playing around with WebGL and shaders, because for various reasons I didn't want to put those in separate files.
Re:Multiline strings in JavaScript by waynecochran on Saturday July 12, 2014 @12:46PM (#8025026)
Why aren't you just doing this, for example?

        <script id="fragment" type="x-shader">
	precision highp float;
	uniform vec3 glyphColor;
	void main() {
	        gl_FragColor = vec4(glyphColor, 1.0);
	}
	</script>
Re:Multiline strings in JavaScript by PavlovsCat on Sunday July 13, 2014 @02:38AM (#8026819)
Because you can't do that from within javascript, and my HTML was really just a stub to load all the javascript I didn't want to have to otherwise deal with.