The capacities of glslify are the following:
#pragma glslify: topDot = require(./my-function.glsl)
It allows for the import of a named function from another class. This likely works in a recursive fashion.
- It does not allow for inline javascript execution.
- It does not output JS modules.
- It does not support tree shaking?
One could create a tagged template literal function for threeify:
glsl`vec3 dot( vec3 a, vec3 b ) { return a . b ; }`