@@ -155,25 +155,31 @@ export async function gltfGenerator(tree: Tree, options: GltfGeneratorSchema) {
155
155
gltfPath = `./${ gltfPath } ` ;
156
156
}
157
157
158
- generateFiles ( tree , join ( __dirname , 'files' ) , outputDir , {
159
- tmpl : '' ,
160
- ...generateOptions ,
161
- scene,
162
- fileName,
163
- className,
164
- selector,
165
- animations : analyzed . gltf . animations || [ ] ,
166
- useImportAttribute : ! modelPath . startsWith ( 'http' ) ,
167
- preload : true ,
168
- gltfName,
169
- gltfAnimationTypeName,
170
- gltfAnimationApiTypeName,
171
- gltfResultTypeName,
172
- gltfPath,
173
- gltfOptions : injectGLTFOptions ,
174
- header : options . header ,
175
- size,
176
- } ) ;
158
+ generateFiles (
159
+ tree ,
160
+ join ( __dirname , 'files' ) ,
161
+ outputDir ,
162
+ Object . assign ( generateOptions , {
163
+ tmpl : '' ,
164
+ scene,
165
+ fileName,
166
+ className,
167
+ selector,
168
+ animations : analyzed . gltf . animations || [ ] ,
169
+ useImportAttribute : ! modelPath . startsWith ( 'http' ) ,
170
+ preload : true ,
171
+ gltfName,
172
+ gltfAnimationTypeName,
173
+ gltfAnimationApiTypeName,
174
+ gltfResultTypeName,
175
+ gltfPath,
176
+ gltfOptions : injectGLTFOptions ,
177
+ header : options . header ,
178
+ size,
179
+ } ) ,
180
+ ) ;
181
+
182
+ await formatFiles ( tree ) ;
177
183
178
184
if ( options . console ) {
179
185
const outputPath = join ( outputDir , `${ fileName } .ts` ) ;
@@ -189,8 +195,6 @@ export async function gltfGenerator(tree: Tree, options: GltfGeneratorSchema) {
189
195
log . debug ( 'Disposing of DracoLoader' ) ;
190
196
dracoLoader ?. dispose ( ) ;
191
197
}
192
-
193
- await formatFiles ( tree ) ;
194
198
}
195
199
196
200
export default gltfGenerator ;
0 commit comments