Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -213,7 +213,6 @@ export async function initializeViewer(config, instanceId) {
|
|
| 213 |
|
| 214 |
const loader = new pc.AssetListLoader(Object.values(assets), app.assets);
|
| 215 |
loader.load(() => {
|
| 216 |
-
console.log("%c[VIEWER DEBUG] All assets loaded, starting app", "color: #2ECC40;");
|
| 217 |
app.start();
|
| 218 |
progressDialog.style.display = 'none';
|
| 219 |
|
|
@@ -224,10 +223,6 @@ export async function initializeViewer(config, instanceId) {
|
|
| 224 |
modelEntity.setLocalScale(modelScale, modelScale, modelScale);
|
| 225 |
app.root.addChild(modelEntity);
|
| 226 |
|
| 227 |
-
/*if (assets.glb && assets.glb.resource && assets.glb.resource.instantiateRenderEntity) {
|
| 228 |
-
const glbEntity = assets.glb.resource.instantiateRenderEntity();
|
| 229 |
-
app.root.addChild(glbEntity);
|
| 230 |
-
}*/
|
| 231 |
const glbEntity = assets.glb.resource.instantiateRenderEntity();
|
| 232 |
app.root.addChild(glbEntity);
|
| 233 |
|
|
@@ -236,7 +231,7 @@ export async function initializeViewer(config, instanceId) {
|
|
| 236 |
app.root.addChild(presentoirEntity);
|
| 237 |
|
| 238 |
if(!espace_expo_bool){
|
| 239 |
-
|
| 240 |
let matSol = new pc.StandardMaterial();
|
| 241 |
matSol.blendType = pc.BLEND_NONE;
|
| 242 |
matSol.emissive = new pc.Color(color_bg);
|
|
|
|
| 213 |
|
| 214 |
const loader = new pc.AssetListLoader(Object.values(assets), app.assets);
|
| 215 |
loader.load(() => {
|
|
|
|
| 216 |
app.start();
|
| 217 |
progressDialog.style.display = 'none';
|
| 218 |
|
|
|
|
| 223 |
modelEntity.setLocalScale(modelScale, modelScale, modelScale);
|
| 224 |
app.root.addChild(modelEntity);
|
| 225 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
const glbEntity = assets.glb.resource.instantiateRenderEntity();
|
| 227 |
app.root.addChild(glbEntity);
|
| 228 |
|
|
|
|
| 231 |
app.root.addChild(presentoirEntity);
|
| 232 |
|
| 233 |
if(!espace_expo_bool){
|
| 234 |
+
const grilleTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/textures/emit_map_1k.png', app);
|
| 235 |
let matSol = new pc.StandardMaterial();
|
| 236 |
matSol.blendType = pc.BLEND_NONE;
|
| 237 |
matSol.emissive = new pc.Color(color_bg);
|