MikaFil commited on
Commit
760d45a
·
verified ·
1 Parent(s): 5999a01

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +12 -12
viewer.js CHANGED
@@ -230,25 +230,25 @@ export async function initializeViewer(config, instanceId) {
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([0.1,0.5,1]);
234
  matSol.emissiveIntensity = 1;
235
  matSol.useLighting = false;
236
  matSol.update();
237
 
238
- let matSol1 = new pc.StandardMaterial();
239
- matSol1.blendType = pc.BLEND_NONE;
240
- matSol1.diffuse = new pc.Color([1,1,1]);
241
- matSol1.diffuseMap = grilleTex;
242
- //matSol1.emissiveMap = grilleTex;
243
- matSol1.emissiveIntensity = 1;
244
- matSol1.useLighting = false;
245
- matSol1.update();
246
-
247
  const bgPlane = new pc.Entity("Plane");
248
  bgPlane.addComponent("model", { type: "plane" });
249
  bgPlane.setLocalPosition(0, -0.1, 0);
250
- bgPlane.setLocalScale(10, 10, 10);
251
- bgPlane.model.material = matSol1;
 
 
 
 
 
 
 
 
 
252
  app.root.addChild(bgPlane);
253
 
254
  traverse(presentoirEntity, node => {
 
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);
234
  matSol.emissiveIntensity = 1;
235
  matSol.useLighting = false;
236
  matSol.update();
237
 
 
 
 
 
 
 
 
 
 
238
  const bgPlane = new pc.Entity("Plane");
239
  bgPlane.addComponent("model", { type: "plane" });
240
  bgPlane.setLocalPosition(0, -0.1, 0);
241
+ bgPlane.setLocalScale(11, 1, 5.5);
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();
251
+ bgPlane.model.material = mat;
252
  app.root.addChild(bgPlane);
253
 
254
  traverse(presentoirEntity, node => {