I've got an angular 6 app where I'm trying to get to work some custom shaders from threejs.org examples. The thing is that you need to put your script tags with some shader settings into your html page, something like the following:
<script type="x-shader/x-vertex" id="vertexshader">
uniform float amplitude;
attribute vec3 customColor;
attribute vec3 displacement;
varying vec3 vNormal;
varying vec3 vColor;
void main() {
// ... some code
}
</script>
<script type="x-shader/x-fragment" id="fragmentshader">
varying vec3 vNormal;
varying vec3 vColor;
void main() {
// ... some code
}
</script>
... and then after creating THREE.ShaderMaterial, create some mesh with this material, but angular removes script tags from its components' htmls, so I'm unable to use such a standart approach. How is one supposed to create and use vertex and fragment shaders in angular components? Will appriciate any advices and examples!