Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -60,7 +60,7 @@ let presentoirScaleX, presentoirScaleY, presentoirScaleZ;
|
|
| 60 |
|
| 61 |
let sogsUrl, glbUrl, presentoirUrl;
|
| 62 |
|
| 63 |
-
let color_bg_hex, color_bg;
|
| 64 |
|
| 65 |
export async function initializeViewer(config, instanceId) {
|
| 66 |
if (viewerInitialized) return;
|
|
@@ -101,10 +101,9 @@ export async function initializeViewer(config, instanceId) {
|
|
| 101 |
const cameraZPhone = (config.cameraZPhone !== undefined) ? parseFloat(config.cameraZPhone) : (cameraZ * 1.5);
|
| 102 |
|
| 103 |
color_bg_hex = (config.canvas_background !== undefined) ? config.canvas_background : "#FFFFFF";
|
|
|
|
| 104 |
color_bg = hexToRgbaArray(color_bg_hex);
|
| 105 |
|
| 106 |
-
console.log(config.glb_url !== undefined);
|
| 107 |
-
|
| 108 |
chosenCameraX = isMobile ? cameraXPhone : cameraX;
|
| 109 |
chosenCameraY = isMobile ? cameraYPhone : cameraY;
|
| 110 |
chosenCameraZ = isMobile ? cameraZPhone : cameraZ;
|
|
@@ -219,7 +218,7 @@ export async function initializeViewer(config, instanceId) {
|
|
| 219 |
presentoirEntity.setLocalScale(presentoirScaleX, presentoirScaleY, presentoirScaleZ);
|
| 220 |
app.root.addChild(presentoirEntity);
|
| 221 |
|
| 222 |
-
if(
|
| 223 |
let matSol = new pc.StandardMaterial();
|
| 224 |
matSol.blendType = pc.BLEND_NONE;
|
| 225 |
matSol.emissive = new pc.Color(color_bg);
|
|
|
|
| 60 |
|
| 61 |
let sogsUrl, glbUrl, presentoirUrl;
|
| 62 |
|
| 63 |
+
let color_bg_hex, color_bg, espace_expo_bool;
|
| 64 |
|
| 65 |
export async function initializeViewer(config, instanceId) {
|
| 66 |
if (viewerInitialized) return;
|
|
|
|
| 101 |
const cameraZPhone = (config.cameraZPhone !== undefined) ? parseFloat(config.cameraZPhone) : (cameraZ * 1.5);
|
| 102 |
|
| 103 |
color_bg_hex = (config.canvas_background !== undefined) ? config.canvas_background : "#FFFFFF";
|
| 104 |
+
espace_expo_bool = (config.espace_expo_bool !== undefined) ? config.espace_expo_bool : false;
|
| 105 |
color_bg = hexToRgbaArray(color_bg_hex);
|
| 106 |
|
|
|
|
|
|
|
| 107 |
chosenCameraX = isMobile ? cameraXPhone : cameraX;
|
| 108 |
chosenCameraY = isMobile ? cameraYPhone : cameraY;
|
| 109 |
chosenCameraZ = isMobile ? cameraZPhone : cameraZ;
|
|
|
|
| 218 |
presentoirEntity.setLocalScale(presentoirScaleX, presentoirScaleY, presentoirScaleZ);
|
| 219 |
app.root.addChild(presentoirEntity);
|
| 220 |
|
| 221 |
+
if(!espace_expo_bool){
|
| 222 |
let matSol = new pc.StandardMaterial();
|
| 223 |
matSol.blendType = pc.BLEND_NONE;
|
| 224 |
matSol.emissive = new pc.Color(color_bg);
|