|
@@ -288,6 +288,10 @@ class Rhino3dmLoader extends Loader {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ map.wrapS = texture.wrapU === 0 ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;
|
|
|
|
+ map.wrapT = texture.wrapV === 0 ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;
|
|
|
|
+ map.repeat.set( texture.repeat[ 0 ], texture.repeat[ 1 ] );
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -869,6 +873,7 @@ function Rhino3dmWorker() {
|
|
const views = [];
|
|
const views = [];
|
|
const namedViews = [];
|
|
const namedViews = [];
|
|
const groups = [];
|
|
const groups = [];
|
|
|
|
+ const strings = [];
|
|
|
|
|
|
//Handle objects
|
|
//Handle objects
|
|
|
|
|
|
@@ -958,6 +963,12 @@ function Rhino3dmWorker() {
|
|
|
|
|
|
const image = doc.getEmbeddedFileAsBase64( _texture.fileName );
|
|
const image = doc.getEmbeddedFileAsBase64( _texture.fileName );
|
|
|
|
|
|
|
|
+ texture.wrapU = _texture.wrapU;
|
|
|
|
+ texture.wrapV = _texture.wrapV;
|
|
|
|
+ texture.wrapW = _texture.wrapW;
|
|
|
|
+ const uvw = _texture.uvwTransform.toFloatArray( true );
|
|
|
|
+ texture.repeat = [ uvw[ 0 ], uvw[ 5 ] ];
|
|
|
|
+
|
|
if ( image ) {
|
|
if ( image ) {
|
|
|
|
|
|
texture.image = 'data:image/png;base64,' + image;
|
|
texture.image = 'data:image/png;base64,' + image;
|
|
@@ -1081,27 +1092,22 @@ function Rhino3dmWorker() {
|
|
// Handle bitmaps
|
|
// Handle bitmaps
|
|
// console.log( `Bitmap Count: ${doc.bitmaps().count()}` );
|
|
// console.log( `Bitmap Count: ${doc.bitmaps().count()}` );
|
|
|
|
|
|
- // Handle strings -- this seems to be broken at the moment in rhino3dm
|
|
|
|
|
|
+ // Handle strings
|
|
// console.log( `Document Strings Count: ${doc.strings().count()}` );
|
|
// console.log( `Document Strings Count: ${doc.strings().count()}` );
|
|
|
|
+ // Note: doc.strings().documentUserTextCount() counts any doc.strings defined in a section
|
|
|
|
+ //console.log( `Document User Text Count: ${doc.strings().documentUserTextCount()}` );
|
|
|
|
|
|
- /*
|
|
|
|
- for( var i = 0; i < doc.strings().count(); i++ ){
|
|
|
|
-
|
|
|
|
- var _string= doc.strings().get( i );
|
|
|
|
-
|
|
|
|
- console.log(_string);
|
|
|
|
- var string = extractProperties( _group );
|
|
|
|
|
|
+ const strings_count = doc.strings().count();
|
|
|
|
|
|
- strings.push( string );
|
|
|
|
|
|
+ for ( let i = 0; i < strings_count; i ++ ) {
|
|
|
|
|
|
- _string.delete();
|
|
|
|
|
|
+ strings.push( doc.strings().get( i ) );
|
|
|
|
|
|
}
|
|
}
|
|
- */
|
|
|
|
|
|
|
|
doc.delete();
|
|
doc.delete();
|
|
|
|
|
|
- return { objects, materials, layers, views, namedViews, groups, settings };
|
|
|
|
|
|
+ return { objects, materials, layers, views, namedViews, groups, strings, settings };
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|