1
0
Эх сурвалжийг харах

#591 remove obsolete computeFaceNormals in scene.js; support transparent textures

Falko Schindler 2 жил өмнө
parent
commit
47a48ca5b7

+ 1 - 1
nicegui/elements/scene.js

@@ -28,7 +28,6 @@ function texture_geometry(coords) {
   geometry.setAttribute("position", new THREE.Float32BufferAttribute(vertices, 3));
   geometry.setAttribute("uv", new THREE.Float32BufferAttribute(uvs, 2));
   geometry.computeVertexNormals();
-  geometry.computeFaceNormals();
   return geometry;
 }
 
@@ -38,6 +37,7 @@ function texture_material(texture) {
   return new THREE.MeshLambertMaterial({
     map: texture,
     side: THREE.DoubleSide,
+    transparent: true,
   });
 }