Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
| 8 |
const img = new OriginalImage(...args);
|
| 9 |
img.crossOrigin = "anonymous";
|
| 10 |
// Optionally log image loading for debugging
|
| 11 |
-
img.onload = function() {
|
| 12 |
console.log("[VIEWER DEBUG] Image loaded:", img.src, "crossOrigin:", img.crossOrigin);
|
| 13 |
};
|
| 14 |
img.onerror = function(e) {
|
| 15 |
console.error("[VIEWER DEBUG] Image load error:", img.src, e);
|
| 16 |
-
};
|
| 17 |
return img;
|
| 18 |
};
|
| 19 |
})();
|
|
@@ -219,11 +219,11 @@ export async function initializeViewer(config, instanceId) {
|
|
| 219 |
app.root.addChild(presentoirEntity);
|
| 220 |
|
| 221 |
if(!espace_expo_bool){
|
| 222 |
-
const grilleTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/viewer_gs/resolve/main/ressources/textures/grille_cadrillee_4k.jpg', app);
|
| 223 |
let matSol = new pc.StandardMaterial();
|
| 224 |
matSol.blendType = pc.BLEND_NONE;
|
| 225 |
matSol.emissive = new pc.Color(color_bg);
|
| 226 |
-
matSol.emissiveIntensity =
|
| 227 |
matSol.update();
|
| 228 |
|
| 229 |
|
|
|
|
| 8 |
const img = new OriginalImage(...args);
|
| 9 |
img.crossOrigin = "anonymous";
|
| 10 |
// Optionally log image loading for debugging
|
| 11 |
+
/*img.onload = function() {
|
| 12 |
console.log("[VIEWER DEBUG] Image loaded:", img.src, "crossOrigin:", img.crossOrigin);
|
| 13 |
};
|
| 14 |
img.onerror = function(e) {
|
| 15 |
console.error("[VIEWER DEBUG] Image load error:", img.src, e);
|
| 16 |
+
};*/
|
| 17 |
return img;
|
| 18 |
};
|
| 19 |
})();
|
|
|
|
| 219 |
app.root.addChild(presentoirEntity);
|
| 220 |
|
| 221 |
if(!espace_expo_bool){
|
| 222 |
+
//const grilleTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/viewer_gs/resolve/main/ressources/textures/grille_cadrillee_4k.jpg', app);
|
| 223 |
let matSol = new pc.StandardMaterial();
|
| 224 |
matSol.blendType = pc.BLEND_NONE;
|
| 225 |
matSol.emissive = new pc.Color(color_bg);
|
| 226 |
+
matSol.emissiveIntensity = 1;
|
| 227 |
matSol.update();
|
| 228 |
|
| 229 |
|