Open joaodafonseca opened 1 year ago
Hello, would the following code fit your use case?
const sandbox = new GlslCanvas(document.querySelector('#app'))
fetch('/path/to/shader.frag')
.then(response => {
return response.text()
})
.then(fragment => {
sandbox.load(fragment)
})
Hello,
is it possible to load a shader in a external file? any example on how to do that?
thanks, J