소스 검색

support missing points in texture

Falko Schindler 3 년 전
부모
커밋
6ebcd543e5
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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)