Browse Source

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

Falko Schindler 2 years ago
parent
commit
47a48ca5b7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nicegui/elements/scene.js

+ 1 - 1
nicegui/elements/scene.js

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