Skip to content

Commit 3299231

Browse files
committed
fix(plugin): adjust migration group
1 parent 592a78f commit 3299231

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

libs/plugin/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"nx-migrations": {
3232
"migrations": "./migrations.json",
3333
"packageGroup": [
34+
"angular-three-plugin",
3435
"angular-three-soba",
3536
"angular-three-postprocessing",
3637
"angular-three-cannon",
@@ -40,6 +41,7 @@
4041
"ng-update": {
4142
"migrations": "./migrations.json",
4243
"packageGroup": [
44+
"angular-three-plugin",
4345
"angular-three-soba",
4446
"angular-three-postprocessing",
4547
"angular-three-cannon",

libs/plugin/src/generators/gltf/gltf.ts

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,31 @@ export async function gltfGenerator(tree: Tree, options: GltfGeneratorSchema) {
155155
gltfPath = `./${gltfPath}`;
156156
}
157157

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);
177183

178184
if (options.console) {
179185
const outputPath = join(outputDir, `${fileName}.ts`);
@@ -189,8 +195,6 @@ export async function gltfGenerator(tree: Tree, options: GltfGeneratorSchema) {
189195
log.debug('Disposing of DracoLoader');
190196
dracoLoader?.dispose();
191197
}
192-
193-
await formatFiles(tree);
194198
}
195199

196200
export default gltfGenerator;

0 commit comments

Comments
 (0)