Browse Source

support missing points in texture

Falko Schindler 3 years ago
parent
commit
6ebcd543e5
2 changed files with 3 additions and 1 deletions
  1. 1 0
      nicegui/elements/scene.js
  2. 2 1
      nicegui/elements/scene_objects.py

+ 1 - 0
nicegui/elements/scene.js

@@ -5,6 +5,7 @@ var texture_loader = new THREE.TextureLoader();
 var stl_loader = new THREE.STLLoader();
 var objects = new Map();
 
+const None = null;
 const False = false;
 const True = true;
 

+ 2 - 1
nicegui/elements/scene_objects.py

@@ -1,3 +1,4 @@
+from typing import Optional
 from .scene_object3d import Object3D
 
 class Scene(Object3D):
@@ -82,6 +83,6 @@ class Texture(Object3D):
 
     def __init__(self,
                  url: str,
-                 coordinates: list[list[tuple[float, float, float]]],
+                 coordinates: list[list[Optional[tuple[float]]]],
                  ):
         super().__init__('texture', url, coordinates)