Skip to content

Commit 485657e

Browse files
committed
fix(plugin): add keep names and keep groups options
1 parent 1c1e86b commit 485657e

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export interface GltfGeneratorSchema {
1919
keepMeshes: boolean;
2020
keepMaterials: boolean;
2121
keepAttributes: boolean;
22+
keepNames: boolean;
23+
keepGroups: boolean;
2224
format: string;
2325
simplify: boolean;
2426
ratio: number;
@@ -42,8 +44,8 @@ export async function gltfGenerator(tree: Tree, options: GltfGeneratorSchema) {
4244
shadows: options.shadows,
4345
instance: options.instance,
4446
instanceall: options.instanceAll,
45-
keepgroups: false,
46-
keepnames: true,
47+
keepgroups: options.keepGroups,
48+
keepnames: options.keepNames,
4749
precision: options.precision,
4850
},
4951
allPruneStrategies,

libs/plugin/src/generators/gltf/schema.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@
105105
"alias": "a",
106106
"default": false
107107
},
108+
"keepNames": {
109+
"type": "boolean",
110+
"description": "Keep names of objects",
111+
"alias": "n",
112+
"default": false
113+
},
114+
"keepGroups": {
115+
"type": "boolean",
116+
"description": "Keep groups",
117+
"alias": "g",
118+
"default": false
119+
},
108120
"format": {
109121
"type": "string",
110122
"description": "Texture format jpeg | png | webp | avif (default: \"webp\")",

0 commit comments

Comments
 (0)