mirror of
https://github.com/storytold/spark.git
synced 2026-10-09 00:09:53 +00:00
Fix CORS image loading issue in procedural-splats. (#5)
This commit is contained in:
committed by
GitHub
parent
96b0b35185
commit
0f931b873a
@@ -340,6 +340,7 @@ export function imageSplats({
|
||||
constructSplats: async (splats) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
img.crossOrigin = "anonymous";
|
||||
img.onerror = reject;
|
||||
img.onload = () => {
|
||||
const { width, height } = img;
|
||||
|
||||
Reference in New Issue
Block a user