Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -151,6 +151,7 @@ export async function initializeViewer(config, instanceId) {
|
|
| 151 |
const opTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/textures/op_map_1k.png', app);
|
| 152 |
const thicknessTex= await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/textures/thickness_map_1k.png', app);
|
| 153 |
const bgTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/images/banniere_earcare.png', app);
|
|
|
|
| 154 |
|
| 155 |
// ----- GLB asset definition -----
|
| 156 |
const assets = {
|
|
@@ -230,6 +231,8 @@ export async function initializeViewer(config, instanceId) {
|
|
| 230 |
tubeTransparent = new pc.StandardMaterial();
|
| 231 |
tubeTransparent.diffuse = new pc.Color(1, 1, 1);
|
| 232 |
tubeTransparent.blendType = pc.BLEND_NORMAL;
|
|
|
|
|
|
|
| 233 |
tubeTransparent.opacity = 0.05;
|
| 234 |
tubeTransparent.depthTest = false;
|
| 235 |
tubeTransparent.depthWrite = false;
|
|
|
|
| 151 |
const opTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/textures/op_map_1k.png', app);
|
| 152 |
const thicknessTex= await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/textures/thickness_map_1k.png', app);
|
| 153 |
const bgTex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/images/banniere_earcare.png', app);
|
| 154 |
+
const opTubetex = await loadImageAsTexture('https://huggingface.co/datasets/MikaFil/3D_models/resolve/main/EARCARE/textures/op_mask_tube.png', app);
|
| 155 |
|
| 156 |
// ----- GLB asset definition -----
|
| 157 |
const assets = {
|
|
|
|
| 231 |
tubeTransparent = new pc.StandardMaterial();
|
| 232 |
tubeTransparent.diffuse = new pc.Color(1, 1, 1);
|
| 233 |
tubeTransparent.blendType = pc.BLEND_NORMAL;
|
| 234 |
+
tubeTransparent.opacityMap = opTubetex;
|
| 235 |
+
tubeTransparent.opacityMapChannel = "r";
|
| 236 |
tubeTransparent.opacity = 0.05;
|
| 237 |
tubeTransparent.depthTest = false;
|
| 238 |
tubeTransparent.depthWrite = false;
|