From b2cda848f0c0cb0c8c4a151da5eee2202994b0d8 Mon Sep 17 00:00:00 2001 From: yyc-git <395976266@qq.com> Date: Fri, 20 Oct 2023 09:39:54 +0800 Subject: [PATCH] feat(extensions): scenegraph: if not support material type, warn instead of throw --- doc/0.19.0.org | 20 +++++++++++++++++++ .../src/Main.ts | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/doc/0.19.0.org b/doc/0.19.0.org index a6ceb264c..6b567478f 100644 --- a/doc/0.19.0.org +++ b/doc/0.19.0.org @@ -15,7 +15,23 @@ TODO support drag loaded file to scene view +** TODO ui: Window +TODO layout: second line + first line: 2 button with image: remove, load + second line: icons:image+name + +TODO drag icon to scene + +TODO scroll bar + + + + +TODO use glb image instead of wdb image + + +** TODO support remove glb @@ -71,6 +87,10 @@ e.g. show import progress bar publish, export should show Modal + +* TODO fix: solve click button blink problem + + /* * TODO Debug Output diff --git a/utils/meta3d-scenegraph-converter-three-utils/src/Main.ts b/utils/meta3d-scenegraph-converter-three-utils/src/Main.ts index af15785f8..8b6f717fa 100755 --- a/utils/meta3d-scenegraph-converter-three-utils/src/Main.ts +++ b/utils/meta3d-scenegraph-converter-three-utils/src/Main.ts @@ -1574,11 +1574,13 @@ let _getBufferGeometry = (mesh: MeshType): BufferGeometryType => { let _getMeshStandardMaterial = (mesh: MeshType): MeshStandardMaterialType => { let material = mesh.material as MeshStandardMaterialType - if (material.type == "MeshStandardMaterial" || material.type == "MeshPhysicalMaterial") { + if (material.type == "MeshStandardMaterial") { return material } - throw new Error("error") + console.warn(`unsupport material type: ${material.type}`); + + return material } let _convertWrapToScene = (wrap_: Wrapping) => {