x
This commit is contained in:
@@ -398,7 +398,7 @@ class HTMLGenerator:
|
||||
lodGeo.setAttribute('position', new THREE.BufferAttribute(new Float32Array(productVerts), 3));
|
||||
lodGeo.setIndex(new THREE.BufferAttribute(new Uint32Array(productFaces), 1));
|
||||
lodGeo.computeVertexNormals();
|
||||
const lodMat = createPBRMaterial(0x4CAF50, {{ metalness: 0.0, roughness: 0.25, opacity: 0.5 }});
|
||||
const lodMat = createPBRMaterial(0xFFFFFF, {{ metalness: 0.0, roughness: 0.20, opacity: 0.55 }});
|
||||
const lodMesh = new THREE.Mesh(lodGeo, lodMat);
|
||||
lodMesh.castShadow = true;
|
||||
lodMesh.receiveShadow = true;
|
||||
@@ -416,7 +416,7 @@ class HTMLGenerator:
|
||||
productGeometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(productVerts), 3));
|
||||
productGeometry.setIndex(new THREE.BufferAttribute(new Uint32Array(productFaces), 1));
|
||||
productGeometry.computeVertexNormals();
|
||||
const productMaterial = createPBRMaterial(0x4CAF50, {{ metalness: 0.0, roughness: 0.25, opacity: 0.5 }});
|
||||
const productMaterial = createPBRMaterial(0xFFFFFF, {{ metalness: 0.0, roughness: 0.20, opacity: 0.55 }});
|
||||
productMesh = new THREE.Mesh(productGeometry, productMaterial);
|
||||
productMesh.castShadow = true;
|
||||
productMesh.receiveShadow = true;
|
||||
@@ -437,8 +437,8 @@ class HTMLGenerator:
|
||||
}}
|
||||
}}
|
||||
const ptMaterial = new THREE.PointsMaterial({{
|
||||
color: 0x4CAF50, size: 0.5, sizeAttenuation: true,
|
||||
transparent: true, opacity: 0.85, blending: THREE.NormalBlending,
|
||||
color: 0xFFFFFF, size: 0.5, sizeAttenuation: true,
|
||||
transparent: true, opacity: 0.90, blending: THREE.NormalBlending,
|
||||
depthWrite: false,
|
||||
}});
|
||||
pointcloudMesh = new THREE.Points(ptGeometry, ptMaterial);
|
||||
@@ -450,7 +450,7 @@ class HTMLGenerator:
|
||||
|
||||
if (!productMesh && !pointcloudMesh) {{
|
||||
const productGeometry = new THREE.BoxGeometry(width * 0.9, height * 0.9, depth * 0.9);
|
||||
const productMaterial = createPBRMaterial(0x4CAF50, {{ metalness: 0.0, roughness: 0.3, opacity: 0.6 }});
|
||||
const productMaterial = createPBRMaterial(0xFFFFFF, {{ metalness: 0.0, roughness: 0.25, opacity: 0.65 }});
|
||||
productMesh = new THREE.Mesh(productGeometry, productMaterial);
|
||||
productMesh.position.set(0, 0, 0);
|
||||
scene.add(productMesh);
|
||||
@@ -513,11 +513,11 @@ class HTMLGenerator:
|
||||
if (productMesh.isLOD) {{
|
||||
productMesh.traverse(child => {{
|
||||
if (child.isMesh && child.geometry) {{
|
||||
addWireframe(child, child.geometry, 0x2E7D32);
|
||||
addWireframe(child, child.geometry, 0xCCCCCC);
|
||||
}}
|
||||
}});
|
||||
}} else {{
|
||||
addWireframe(productMesh, productMesh.geometry, 0x2E7D32);
|
||||
addWireframe(productMesh, productMesh.geometry, 0xCCCCCC);
|
||||
}}
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user