From 1bb26d7dbfb925b6499a3f4e51fd56f53d95ac9f Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 11 Feb 2022 12:16:29 -0500 Subject: [PATCH] Updated examples builds. --- examples/js/exporters/GLTFExporter.js | 2 +- examples/js/loaders/3MFLoader.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/examples/js/exporters/GLTFExporter.js b/examples/js/exporters/GLTFExporter.js index c80a7cd423769c..5c0ef4e4c7f00f 100644 --- a/examples/js/exporters/GLTFExporter.js +++ b/examples/js/exporters/GLTFExporter.js @@ -631,7 +631,7 @@ const occlusion = material.aoMap?.image; const roughness = material.roughnessMap?.image; const metalness = material.metalnessMap?.image; - if ( occlusion === roughness && roughness === metalness ) return occlusion; + if ( occlusion === roughness && roughness === metalness ) return material.aoMap; if ( occlusion || roughness || metalness ) { diff --git a/examples/js/loaders/3MFLoader.js b/examples/js/loaders/3MFLoader.js index dfdb7e4b54645b..fe3980d75655b1 100644 --- a/examples/js/loaders/3MFLoader.js +++ b/examples/js/loaders/3MFLoader.js @@ -1010,6 +1010,16 @@ } + if ( objectData.name ) { + + for ( let i = 0; i < meshes.length; i ++ ) { + + meshes[ i ].name = objectData.name; + + } + + } + return meshes; } @@ -1219,6 +1229,12 @@ } + if ( objectData.name ) { + + objects[ objectData.id ].name = objectData.name; + + } + } function buildObjects( data3mf ) {