Initial commit
This commit is contained in:
7
src/scripts/common.js
Normal file
7
src/scripts/common.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export async function loadShader(url) {
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to load shader: ${response.statusText}`);
|
||||
}
|
||||
return await response.text();
|
||||
}
|
||||
Reference in New Issue
Block a user