Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -237,11 +237,19 @@ export async function initializeViewer(config, instanceId) {
|
|
| 237 |
matSol.useLighting = false;
|
| 238 |
matSol.update();
|
| 239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
const bgPlane = new pc.Entity("Plane");
|
| 241 |
bgPlane.addComponent("model", { type: "plane" });
|
| 242 |
-
bgPlane.setLocalPosition(0, 0
|
| 243 |
-
bgPlane.setLocalScale(
|
| 244 |
-
bgPlane.model.material =
|
| 245 |
app.root.addChild(bgPlane);
|
| 246 |
|
| 247 |
traverse(presentoirEntity, node => {
|
|
|
|
| 237 |
matSol.useLighting = false;
|
| 238 |
matSol.update();
|
| 239 |
|
| 240 |
+
let matSol1 = new pc.StandardMaterial();
|
| 241 |
+
matSol1.blendType = pc.BLEND_NONE;
|
| 242 |
+
matSol1.emissive = new pc.Color([0.1,0.5,1]);
|
| 243 |
+
matSol1.emissiveMap = grilleTex;
|
| 244 |
+
matSol1.emissiveIntensity = 1;
|
| 245 |
+
matSol1.useLighting = false;
|
| 246 |
+
matSol1.update();
|
| 247 |
+
|
| 248 |
const bgPlane = new pc.Entity("Plane");
|
| 249 |
bgPlane.addComponent("model", { type: "plane" });
|
| 250 |
+
bgPlane.setLocalPosition(0, 0, 0);
|
| 251 |
+
bgPlane.setLocalScale(10, 10, 10);
|
| 252 |
+
bgPlane.model.material = matSol1;
|
| 253 |
app.root.addChild(bgPlane);
|
| 254 |
|
| 255 |
traverse(presentoirEntity, node => {
|