@@ -11,7 +11,6 @@ module.exports = obj23dtiles;
1111obj23dtiles . combine = combine ;
1212
1313function obj23dtiles ( objPath , outputPath , options ) {
14- console . time ( 'Total' ) ;
1514
1615 if ( typeof options . tilesetOptions === 'string' ) {
1716 options . tilesetOptions = fsExtra . readJsonSync ( options . tilesetOptions ) ;
@@ -49,9 +48,6 @@ function obj23dtiles(objPath, outputPath, options) {
4948 tasks . push ( fsExtra . writeJson ( tilesetPath , tileset , { spaces : 2 } ) ) ;
5049 return Promise . all ( tasks ) ;
5150 } )
52- . then ( function ( ) {
53- console . timeEnd ( 'Total' ) ;
54- } )
5551 . catch ( function ( error ) {
5652 console . log ( error . message || error ) ;
5753 process . exit ( 1 ) ;
@@ -64,7 +60,7 @@ function obj23dtiles(objPath, outputPath, options) {
6460 process . exit ( 1 ) ;
6561 }
6662
67- obj2Tileset ( objPath , outputPath , options )
63+ return obj2Tileset ( objPath , outputPath , options )
6864 . then ( function ( result ) {
6965 var i3dm = result . i3dm ;
7066 var batchTableJson = result . batchTableJson ;
@@ -84,9 +80,6 @@ function obj23dtiles(objPath, outputPath, options) {
8480 tasks . push ( fsExtra . writeJson ( tilesetPath , tileset , { spaces : 2 } ) ) ;
8581 return Promise . all ( tasks ) ;
8682 } )
87- . then ( function ( ) {
88- console . timeEnd ( 'Total' ) ;
89- } )
9083 . catch ( function ( error ) {
9184 console . log ( error . message || error ) ;
9285 process . exit ( 1 ) ;
@@ -96,7 +89,7 @@ function obj23dtiles(objPath, outputPath, options) {
9689 else if ( options && options . b3dm ) {
9790 options . binary = true ;
9891 options . batchId = true ;
99- obj2B3dm ( objPath , options )
92+ return obj2B3dm ( objPath , options )
10093 . then ( function ( result ) {
10194 var b3dm = result . b3dm ;
10295 var batchTableJson = result . batchTableJson ;
@@ -109,9 +102,6 @@ function obj23dtiles(objPath, outputPath, options) {
109102 fsExtra . ensureDirSync ( path . dirname ( outputPath ) ) ;
110103 return fsExtra . outputFile ( outputPath , b3dm ) ;
111104 } )
112- . then ( function ( ) {
113- console . timeEnd ( 'Total' ) ;
114- } )
115105 . catch ( function ( error ) {
116106 console . log ( error . message || error ) ;
117107 process . exit ( 1 ) ;
@@ -137,9 +127,6 @@ function obj23dtiles(objPath, outputPath, options) {
137127 fsExtra . ensureDirSync ( path . dirname ( outputPath ) ) ;
138128 return fsExtra . outputFile ( outputPath , i3dm ) ;
139129 } )
140- . then ( function ( ) {
141- console . timeEnd ( 'Total' ) ;
142- } )
143130 . catch ( function ( error ) {
144131 console . log ( error . message || error ) ;
145132 process . exit ( 1 ) ;
@@ -158,9 +145,6 @@ function obj23dtiles(objPath, outputPath, options) {
158145 } ;
159146 return fsExtra . outputJson ( outputPath , gltf , jsonOptions ) ;
160147 } )
161- . then ( function ( ) {
162- console . timeEnd ( 'Total' ) ;
163- } )
164148 . catch ( function ( error ) {
165149 console . log ( error . message || error ) ;
166150 process . exit ( 1 ) ;
0 commit comments