MikaFil commited on
Commit
643d034
·
verified ·
1 Parent(s): 5cf6848

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +3 -3
viewer.js CHANGED
@@ -227,7 +227,7 @@ export async function initializeViewer(config, instanceId) {
227
 
228
  if(!espace_expo_bool){
229
 
230
- const grilleTex = loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/images/banniere_earcare.png', app);
231
  let matSol = new pc.StandardMaterial();
232
  matSol.blendType = pc.BLEND_NONE;
233
  matSol.emissive = new pc.Color(color_bg);
@@ -242,9 +242,9 @@ export async function initializeViewer(config, instanceId) {
242
  // Simple material for the banner
243
  const mat = new pc.StandardMaterial();
244
  mat.diffuse = new pc.Color(1, 1, 1);
245
- mat.diffuseMap = grilleTex;
246
  mat.emissive = new pc.Color(1, 1, 1);
247
- mat.emissiveMap = grilleTex;
248
  mat.emissiveIntensity = 1;
249
  mat.useLighting = false;
250
  mat.update();
 
227
 
228
  if(!espace_expo_bool){
229
 
230
+ const bgTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/images/banniere_earcare.png', app);
231
  let matSol = new pc.StandardMaterial();
232
  matSol.blendType = pc.BLEND_NONE;
233
  matSol.emissive = new pc.Color(color_bg);
 
242
  // Simple material for the banner
243
  const mat = new pc.StandardMaterial();
244
  mat.diffuse = new pc.Color(1, 1, 1);
245
+ mat.diffuseMap = bgTex;
246
  mat.emissive = new pc.Color(1, 1, 1);
247
+ mat.emissiveMap = bgTex;
248
  mat.emissiveIntensity = 1;
249
  mat.useLighting = false;
250
  mat.update();