Skip to content

Commit 399fa40

Browse files
committed
fix(plugin): use options modelPath
1 parent 1e0de19 commit 399fa40

File tree

1 file changed

+4
-1
lines changed
  • libs/plugin/src/generators/gltf

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Tree } from '@nx/devkit';
2+
import { join } from 'node:path';
23
import { GenerateNGT } from './utils/generate-ngt';
34

45
export interface GltfGeneratorSchema {
@@ -28,7 +29,9 @@ export interface GltfGeneratorSchema {
2829
export async function gltfGenerator(tree: Tree, options: GltfGeneratorSchema) {
2930
const { loadGLTF, AnalyzedGLTF, gltfTransform, Log, allPruneStrategies } = await import('@rosskevin/gltfjsx');
3031

31-
const gltf = await loadGLTF('');
32+
const modelPath = join(tree.root, options.modelPath);
33+
34+
const gltf = await loadGLTF(modelPath);
3235

3336
const analyzed = new AnalyzedGLTF(
3437
gltf,

0 commit comments

Comments
 (0)