MikaFil commited on
Commit
e4492ca
·
verified ·
1 Parent(s): 6eb55bf

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +4 -3
viewer.js CHANGED
@@ -206,7 +206,7 @@ export async function initializeViewer(config, instanceId) {
206
 
207
 
208
  // /!\ ======================================== /!\
209
- const bgTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/images/banniere_earcare.png', app);
210
  // /!\ ======================================== /!\
211
  for (const key in assets) app.assets.add(assets[key]);
212
 
@@ -235,10 +235,11 @@ export async function initializeViewer(config, instanceId) {
235
  matSol.blendType = pc.BLEND_NONE;
236
  matSol.emissive = new pc.Color(color_bg);
237
  matSol.emissiveIntensity = 1;
 
238
  matSol.useLighting = false;
239
  matSol.update();
240
 
241
- const bgPlane = new pc.Entity("Plane");
242
  bgPlane.addComponent("model", { type: "plane" });
243
  bgPlane.setLocalPosition(0, -0.1, 0);
244
  bgPlane.setLocalScale(11, 1, 5.5);
@@ -252,7 +253,7 @@ export async function initializeViewer(config, instanceId) {
252
  mat.useLighting = false;
253
  mat.update();
254
  bgPlane.model.material = mat;
255
- app.root.addChild(bgPlane);
256
 
257
  traverse(presentoirEntity, node => {
258
  if (node.render && node.render.meshInstances) {
 
206
 
207
 
208
  // /!\ ======================================== /!\
209
+ const grilleTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/viewer_gs/resolve/main/ressources/textures/grille_cadrillee_4k.jpg', app);
210
  // /!\ ======================================== /!\
211
  for (const key in assets) app.assets.add(assets[key]);
212
 
 
235
  matSol.blendType = pc.BLEND_NONE;
236
  matSol.emissive = new pc.Color(color_bg);
237
  matSol.emissiveIntensity = 1;
238
+ matSol.emissiveMap = grilleTex;
239
  matSol.useLighting = false;
240
  matSol.update();
241
 
242
+ /*const bgPlane = new pc.Entity("Plane");
243
  bgPlane.addComponent("model", { type: "plane" });
244
  bgPlane.setLocalPosition(0, -0.1, 0);
245
  bgPlane.setLocalScale(11, 1, 5.5);
 
253
  mat.useLighting = false;
254
  mat.update();
255
  bgPlane.model.material = mat;
256
+ app.root.addChild(bgPlane);*/
257
 
258
  traverse(presentoirEntity, node => {
259
  if (node.render && node.render.meshInstances) {