MikaFil commited on
Commit
184d731
·
verified ·
1 Parent(s): f91ab76

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +12 -0
viewer.js CHANGED
@@ -235,6 +235,18 @@ export async function initializeViewer(config, instanceId) {
235
  matSol.emissiveIntensity = 1;
236
  matSol.update();
237
 
 
 
 
 
 
 
 
 
 
 
 
 
238
 
239
  traverse(presentoirEntity, node => {
240
  if (node.render && node.render.meshInstances) {
 
235
  matSol.emissiveIntensity = 1;
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
+ const mat = new pc.StandardMaterial();
242
+ mat.diffuse = new pc.Color(1, 1, 1);
243
+ mat.emissive = new pc.Color(1, 1, 1);
244
+ mat.emissiveMap = bgTex;
245
+ mat.emissiveIntensity = grilleTex;
246
+ mat.useLighting = false;
247
+ mat.update();
248
+ bgPlane.model.material = mat;
249
+ app.root.addChild(bgPlane);
250
 
251
  traverse(presentoirEntity, node => {
252
  if (node.render && node.render.meshInstances) {