mirror of
https://github.com/storytold/spark.git
synced 2026-10-17 00:12:59 +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) => {
|
constructSplats: async (splats) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const img = new Image();
|
const img = new Image();
|
||||||
|
img.crossOrigin = "anonymous";
|
||||||
img.onerror = reject;
|
img.onerror = reject;
|
||||||
img.onload = () => {
|
img.onload = () => {
|
||||||
const { width, height } = img;
|
const { width, height } = img;
|
||||||
|
|||||||
Reference in New Issue
Block a user