Ver Fonte

support missing points in texture

Falko Schindler há 3 anos atrás
pai
commit
6ebcd543e5
2 ficheiros alterados com 3 adições e 1 exclusões
  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 stl_loader = new THREE.STLLoader();
 var objects = new Map();
 var objects = new Map();
 
 
+const None = null;
 const False = false;
 const False = false;
 const True = true;
 const True = true;
 
 

+ 2 - 1
nicegui/elements/scene_objects.py

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